Deploy

Environment variables

Every setting in the server .env file.

The server reads /var/www/lokipay/.env. Generate secrets with openssl rand -hex 32.

VariableRequiredDescription
POSTGRES_PASSWORDyesDatabase password (used by both containers).
PUBLIC_URLyesPublic HTTPS URL, e.g. https://pay.yourshop.com. Used in pairing QR codes, checkoutUrl and payment-link URLs.
WEBHOOK_SECRETyesSigns outgoing webhooks (X-LokiPay-Signature). Give the same value to your backend.
DEVICE_SECRET_KEYyesEncrypts each relay phone’s signing secret at rest. Changing it un-pairs every phone.
ADMIN_EMAILfirst runEmail of the first admin (created only if no admin exists).
ADMIN_PASSWORDfirst runPassword of the first admin. Change it after signing in.
BRAND_NAMEnoDefault business name (default LokiPay). Editable in Settings → Branding.
WEBHOOK_URLnoDefault webhook endpoint. Usually set in Settings → Webhook instead.
MERCHANT_API_KEYnoA fixed API key (≥ 32 characters). Prefer generating one in Settings → API keys, which is stored hashed and can be rotated.
COOKIE_SECUREnoDefault true. Only set false for local development over plain HTTP.
NODE_ENVnoproduction on servers.
Keep .env on the server
deploy.sh never uploads a local .env. Do not commit secrets. If WEBHOOK_SECRET leaks, change it here and in your backend at the same time.