Nomploy Nomad Packs

← All packs

bark-server v0.1.0

Notifications

Bark server — the self-hosted backend for Bark, a free push-notification service for iOS: send notifications to your iPhone from scripts and services via a simple HTTP call. Deployed as a single host-networked Nomad service with a data volume.

nomad-pack run bark-server --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- bark-server

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

1 task http 8080 1 volume image finab/bark-server:latest tracks :latest image bumped today
Variables 8
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run bark-server -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "bark-server"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The Bark server container image. Pin a tag in production.
image = "finab/bark-server:latest"

# Host port for the Bark server HTTP API.
port = 8080

# Named volume for Bark's device database.
data_volume = "bark_data"

# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# Resources for the Bark server task.
resources = {
    cpu    = 200
    memory = 128
  }
NameTypeDefaultDescription
job_name string
"bark-server"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"finab/bark-server:latest"
The Bark server container image. Pin a tag in production.
port number
8080
Host port for the Bark server HTTP API.
data_volume string
"bark_data"
Named volume for Bark's device database.
constraints list
[]
Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 200
    memory = 128
  }
Resources for the Bark server task.
Back up this pack

This pack stores data in one Docker named volume: bark_data

restic

# Run on the node hosting this pack. Point restic at your repo first:
#   export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>"
#   export RESTIC_PASSWORD="<repo-password>"
#   export AWS_ACCESS_KEY_ID=<key>  AWS_SECRET_ACCESS_KEY=<secret>
restic backup \
  /var/lib/docker/volumes/bark_data/_data

rclone (sync to S3/R2)

rclone sync /var/lib/docker/volumes/bark_data/_data backup:<bucket>/bark_data

Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.

Readme

bark-server

Bark is a free push-notification service for iOS; this pack runs its self-hosted backend (bark-server). Send notifications to your iPhone from scripts, cron jobs, monitoring and any service with a simple HTTP GET/POST.

This pack runs bark-server as a single host-networked Nomad job with a data volume for device registrations — no external database is required.

Quick start

nomad-pack run bark-server --registry=nomploy

Install the Bark app from the iOS App Store, set its server to http://<node-ip>:8080 (ideally a public HTTPS URL behind a reverse proxy), and it will register a device key. Then:

curl http://<node-ip>:8080/<your-device-key>/Hello/World

Configuration

Variable Default Notes
port 8080 HTTP API host port
data_volume bark_data Device-registration database

iOS requires a reachable server URL to receive pushes, so for real use put bark-server behind a reverse proxy with HTTPS. Data persists in the bark_data named volume.