Deploy with Docker
One command to install on your server.
The lokipay-admin repository contains the server, the dashboard, the hosted pages and a deploy script. One command syncs the code to the server, builds the Docker image, configures nginx with HTTPS and schedules nightly backups.
REMOTE_HOST=203.0.113.10 # server IP or hostname (SSH as root by default)
DOMAIN=pay.yourshop.com # DNS A record → REMOTE_HOST
SSL_EMAIL=ops@yourshop.com # Let's Encrypt account email
# REMOTE_USER=root
# REMOTE_DIR=/var/www/lokipay
# API_HOST_PORT=5310
# POSTGRES_HOST_PORT=5534For several clients, keep files like clients/acme.env and run DEPLOY_ENV=clients/acme.env ./deploy.sh.
./deploy.shOn the first run the script stops and asks you to create /var/www/lokipay/.env on the server. Copy .env.example, fill in the secrets (see environment variables), and run ./deploy.sh again.
- Rsyncs the source to
/var/www/lokipay(never your local.env). docker compose up -d --build: builds the dashboard and pay pages into the API image, starts Postgres 16 and the API, runs database migrations and creates the first admin.- Waits for
/health/ready. - Writes an nginx site with rate limits for the device and login endpoints, gets a Let’s Encrypt certificate and reloads nginx on renewal.
- Installs a nightly
pg_dumpbackup with 14-day retention.
Open https://pay.yourshop.com and sign in with ADMIN_EMAIL / ADMIN_PASSWORD. Change the password in Settings → Security.
Containers#
| Container | Image | Port (loopback) |
|---|---|---|
lokipay-api | node:22-alpine — API, dashboard, pay pages | 127.0.0.1:5310 → 3000 |
lokipay-postgres | postgres:16-alpine | 127.0.0.1:5534 → 5432 |
Volumes: lokipay-postgres-data (database) and lokipay-uploads (relay app APKs and your logo).
Useful commands
cd /var/www/lokipay
docker compose ps
docker compose logs -f api # API logs
docker compose restart api
docker exec -it lokipay-postgres psql -U lokipay lokipay