docs/en-us/deploy.md
docker run -dt --name bark -p 8080:8080 -v `pwd`/bark-data:/data finab/bark-server
You can also use the image ghcr.io/finb/bark-server
mkdir bark && cd bark
curl -sL https://git.io/JvSRl > docker-compose.yaml
docker-compose up -d
Or compile it yourself:
<a href="https://github.com/Finb/bark-server">https://github.com/Finb/bark-server</a>
./bark-server_linux_amd64 -addr 0.0.0.0:8080 -data ./bark-data
chmod +x bark-server_linux_amd64
Note: The bark-server uses the /data directory by default to store data. Ensure it has read/write permissions or specify a custom directory with the -data option.
cwxiaos/bark-worker
Supports Cloudflare Workers; databases can be D1 or KV.
Only recommended for personal use. Fine for occasional notifications, but not intended for frequent or large-scale pushes.
sylingd/bark-worker-server
Supports Tencent EdgeOne, Alibaba Cloud ESA, and Cloudflare Workers; uses key-value (KV) database.
Only recommended for personal use. Fine for occasional notifications, but not intended for frequent or large-scale pushes.
curl http://0.0.0.0:8080/ping
If it returns pong, the deployment is successful.
If you need to send a large volume of push notifications in a short period, you can configure the bark-server to use multiple APNS Clients for delivery. Each Client represents a new connection (which may connect to different APNs servers). Please set this parameter according to the number of CPU cores. The number of Clients cannot exceed the number of CPU cores (if exceeded, it will automatically be set to the current number of CPU cores).
docker run -dt --name bark -p 8080:8080 -v `pwd`/bark-data:/data finab/bark-server bark-server --max-apns-client-count 4
version: '3.8'
services:
bark-server:
image: finab/bark-server
container_name: bark-server
restart: always
volumes:
- ./data:/data
ports:
- "8080:8080"
command: bark-server --max-apns-client-count 4
./bark-server --addr 0.0.0.0:8080 --data ./bark-data --max-apns-client-count 4
The app sends the <a href="https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application">DeviceToken</a>to the server. The server sends push requests to Apple’s servers.
Server code: <a href='https://github.com/Finb/bark-server'>https://github.com/Finb/bark-server</a>
App code: <a href="https://github.com/Finb/Bark">https://github.com/Finb/Bark</a>