Skip to main content
Bark Pay creates its Bark wallet on mainnet the first time it starts, so plan to back up the wallet right after.

Before you start

You need:
  • A server with Docker Engine and the Docker Compose plugin, on x86_64 or arm64.
  • Git.
  • A domain name pointing at the server.
Follow the Railway README in the repository, then continue with Back up your wallet.
The values below connect Bark Pay to Second’s mainnet Ark server, so charges move real bitcoin from the first sat. To try Bark Pay with test bitcoin first, add test mode once the stack runs.

Configure and start the stack

1

Clone the repository

2

Create the environment file

3

Set the public URL, the admin account, and the Ark endpoints

Open .env and delete the leading # from the two BARKD_MAINNET_ lines, so they take effect. Replace pay.example.com, the email, and the password with your own, and leave both BARKD_MAINNET_ URLs as shown. Leave the # in front of BARKD_MAINNET_ACCESS_TOKEN.
.env
Bark Pay creates the admin account from these two values while no admin exists, and ignores them afterwards. The password needs 12 or more characters and can’t contain a common word such as password, admin, or barkpay. Otherwise Bark Pay refuses to start.
4

Start Barkd

5

Copy the Barkd access token into .env

Paste the printed value into .env as BARKD_MAINNET_ACCESS_TOKEN.
6

Start Bark Pay

The first build takes a few minutes.
7

Check that Bark Pay is ready

The endpoint answers {"status":"ready"}. To follow the first start, run docker compose -f docker/docker-compose.prod.yml logs -f bark-pay.
Bark Pay only starts with the access token in .env. If you start the whole stack before copying it, the bark-pay container restarts in a loop until you add the token and run the start command again.

Serve Bark Pay over HTTPS

Bark Pay listens on plain HTTP on port 8080.
Put Bark Pay behind HTTPS before you sign in. Over plain HTTP, your password travels unencrypted. Anyone who captures it can sign in and send payouts from your wallet.
Point your proxy (nginx, Traefik, or a Cloudflare tunnel) at port 8080 on the server, terminate TLS there, and set BARKPAY_TRUSTED_PROXY_HOPS=2 in .env. Then recreate the container:

Sign in to the dashboard

Open your domain in a browser and sign in with the email and password from .env.
Screenshot of the Bark Pay Overview page, with the My Bark Wallet balance card, the Today's volume card, and the Recent charges table

After sign-in, Overview shows the wallet balance and the latest charges

Add test mode

Test mode needs a second Barkd on signet:
1

Add a signet Barkd to the stack

In docker/docker-compose.prod.yml, copy the whole barkd-mainnet service under the name barkd-signet, point its volume at barkd_signet_data, and declare that volume next to the other two:
docker/docker-compose.prod.yml
2

Configure the signet instance in .env

Delete the leading # from the BARKD_SIGNET_ lines, and leave these values as they are:
.env
3

Start the signet Barkd

4

Copy its access token into .env

Paste the printed value into .env as BARKD_SIGNET_ACCESS_TOKEN.
5

Restart Bark Pay

Bark Pay creates the signet wallet on this start. Switch to Test mode in the sidebar footer to work against it.