Self-Hosting Bark with Docker Compose

What Is Bark?

Bark is a self-hosted push notification server that sends instant notifications to your iPhone through Apple Push Notification service (APNs). Point any script, monitoring tool, or automation at Bark’s HTTP API, and notifications appear on your lock screen within seconds. It replaces Pushover, Pushbullet, and other paid notification services — with zero recurring cost. Official repo.

Updated March 2026: Verified with latest Docker images and configurations.

Prerequisites

  • A Linux server (Ubuntu 22.04+ recommended)
  • Docker and Docker Compose installed (guide)
  • 256 MB of free RAM (Bark uses ~20 MB idle)
  • 1 GB of free disk space
  • An iPhone with the Bark app installed

Docker Compose Configuration

Create a docker-compose.yml file:

services:
  bark-server:
    image: finab/bark-server:v2.3.3
    container_name: bark-server
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - bark-data:/data
    healthcheck:
      test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/ping"]
      interval: 30s
      timeout: 5s
      retries: 3

volumes:
  bark-data:

Bark requires no environment variables for basic operation. The embedded BBolt database stores notification history automatically in /data.

Start the stack:

docker compose up -d

Initial Setup

  1. Open the Bark app on your iPhone
  2. Tap the server settings icon and enter your server URL: http://your-server-ip:8080
  3. The app registers your device and gives you a device key — save this key
  4. Test with a curl command:
curl -X POST "http://your-server-ip:8080/push" \
  -H "Content-Type: application/json" \
  -d '{"body": "Hello from my server!", "device_key": "YOUR_DEVICE_KEY"}'

You should see the notification on your iPhone immediately.

Configuration

Push API Parameters

Bark supports rich notification features through its API:

ParameterDescriptionExample
bodyNotification text (required)"Server backup complete"
device_keyTarget device (required)"abc123..."
titleNotification title"Server Alert"
levelPriority: passive, active, timeSensitive, critical"timeSensitive"
soundiOS notification sound"minuet"
iconCustom icon URL (iOS 15+)"https://example.com/icon.png"
groupGroup notifications by category"monitoring"
urlURL to open on tap"https://grafana.local"
copyText to copy to clipboard"192.168.1.100"
callRing for 30 seconds (set to 1)1
isArchiveArchive the notification (set to 1)1

Using MySQL Instead of BBolt

For high-volume deployments, switch to MySQL:

services:
  bark-server:
    image: finab/bark-server:v2.3.3
    container_name: bark-server
    restart: unless-stopped
    ports:
      - "8080:8080"
    command: ["-dsn", "bark:barkpass@tcp(bark-db:3306)/bark"]
    depends_on:
      bark-db:
        condition: service_healthy

  bark-db:
    image: mysql:8.0
    container_name: bark-db
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: rootpass_change_me
      MYSQL_DATABASE: bark
      MYSQL_USER: bark
      MYSQL_PASSWORD: barkpass
    volumes:
      - bark-mysql:/var/lib/mysql
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
      interval: 10s
      timeout: 5s
      retries: 5

volumes:
  bark-mysql:

Integration Examples

Uptime Kuma webhook:

# In Uptime Kuma notification settings, use webhook URL:
http://bark-server:8080/push?device_key=YOUR_KEY&title=Monitor+Alert

Shell script alert:

#!/bin/bash
BARK_URL="http://your-server:8080"
DEVICE_KEY="YOUR_DEVICE_KEY"

# Check disk space and alert if over 90%
USAGE=$(df / | awk 'NR==2 {print $5}' | tr -d '%')
if [ "$USAGE" -gt 90 ]; then
  curl -s -X POST "$BARK_URL/push" \
    -H "Content-Type: application/json" \
    -d "{\"body\":\"Disk usage at ${USAGE}%\",\"title\":\"Disk Alert\",\"device_key\":\"$DEVICE_KEY\",\"level\":\"timeSensitive\"}"
fi

Reverse Proxy

Set up Nginx Proxy Manager or Caddy to expose Bark over HTTPS. This is required for the iOS app to connect securely. See Reverse Proxy Setup.

Example Caddy config:

bark.example.com {
    reverse_proxy bark-server:8080
}

Backup

Back up the BBolt database file:

docker compose stop bark-server
cp -r /var/lib/docker/volumes/bark-data/_data ./bark-backup
docker compose start bark-server

For MySQL setups, use mysqldump. See Backup Strategy.

Troubleshooting

Notifications Not Arriving

Symptom: API returns 200 but no notification on iPhone. Fix: Verify the device key matches your Bark app registration. Re-register the device by removing and re-adding the server in the app. Check that Apple APNs isn’t blocked by your firewall (outbound port 443 to api.push.apple.com).

Connection Refused on Port 8080

Symptom: curl: (7) Failed to connect to port 8080. Fix: Check the container is running with docker compose ps. Verify port mapping isn’t conflicting with another service. Try binding to a different host port: "8081:8080".

High Memory Usage with BBolt

Symptom: Bark consuming more memory than expected with many archived notifications. Fix: Switch to MySQL for deployments with heavy notification history. Or periodically clear old data by recreating the volume: docker compose down -v && docker compose up -d.

Resource Requirements

  • RAM: ~20 MB idle, ~50 MB under load
  • CPU: Very low — handles thousands of notifications per minute on a single core
  • Disk: ~50 MB for application, plus notification history

Verdict

Bark is the best self-hosted notification option if you’re an iPhone user. The setup is trivial — one container, no config files, no database required. The API is dead simple: one curl command sends a notification. The limitation is obvious: iOS only. If you need cross-platform notifications, use ntfy instead. If you need notification routing to multiple services, use Apprise. But for iPhone-only push notifications with minimal overhead, Bark is unbeatable.

Frequently Asked Questions

Does Bark work on Android?

No. Bark is iOS-only — it uses Apple Push Notification service (APNs) exclusively. There’s no Android app and no plans to add one. For cross-platform push notifications, use ntfy instead, which has both iOS and Android apps plus a web interface.

Is the Bark iOS app free?

Yes. The Bark app is free on the App Store with no in-app purchases. The app connects to your self-hosted Bark server and receives push notifications through APNs. You only need to maintain the server — the app itself costs nothing.

Can I send notifications to multiple iPhones?

Yes. Each iPhone that installs the Bark app and registers with your server gets a unique device key. Send notifications to a specific device by including its key in the API URL. You can set up groups and send to multiple devices simultaneously through the API.

How does Bark compare to Pushover?

Pushover is a commercial service ($5 one-time purchase per platform) with both iOS and Android support, priority levels, and message acknowledgment. Bark is free and self-hosted but iOS-only with simpler features. Choose Bark if you want zero ongoing costs and only use iPhones. Choose Pushover if you need cross-platform support or don’t want to maintain a server.

Can I send images or rich notifications?

Yes. Bark supports rich notifications with custom icons, images, sounds, and URL links. Include parameters in the API call: icon for a custom notification icon, url to open a link when tapped, and sound to set a custom notification sound. Images can be included as URL parameters.

How do I integrate Bark with my monitoring tools?

Any tool that can make HTTP requests can send Bark notifications. The API is a simple GET or POST to https://your-bark-server/device-key/title/body. Integrate with Uptime Kuma via its custom notification setting, with shell scripts via curl, or with n8n via HTTP request nodes.

Comments