Deploy
Backups & upgrades
Nightly backups, restores and updating LokiPay.
Backups#
A cron job dumps the database every night at 02:15 to /var/backups/lokipay/lokipay-YYYY-MM-DD.sql.gz and keeps 14 days. Copy that folder off the server regularly (for example with rclone or your provider’s backup product).
Restore
on the server
cd /var/www/lokipay
docker compose stop api
gunzip -c /var/backups/lokipay/lokipay-2026-11-01.sql.gz | docker exec -i lokipay-postgres psql -U lokipay lokipay
docker compose start apiRestore into an empty database (drop and recreate it first) to avoid conflicts.
Upgrading LokiPay#
- Pull the latest
lokipay-admincode. - Run
./deploy.sh. The API image is rebuilt and database migrations run automatically on start; downtime is a few seconds. - Publish the new relay app (if any) in App updates — phones update themselves.
