Configuration

Environment variables and defaults for the KumaPush relay.

The relay is configured entirely through environment variables. With the provided Compose file, set them in relay/.env.

APNs

VariableRequiredDescription
APNS_AUTH_KEY_PATHYesPath to the .p8 APNs auth key inside the container. The Compose file sets this to /run/secrets/apns_auth_key for you.
APNS_KEY_IDYesKey ID of the APNs auth key.
APNS_TEAM_IDYesYour Apple Developer Team ID.
APP_BUNDLE_IDENTIFIERYesBundle identifier of the app. It’s used as the APNs topic.
ENVNoSet to development to use the APNs sandbox instead of production.

The relay exits at startup if any of the required APNs variables is missing.

Database

VariableDescription
DATABASE_HOSTPostgreSQL host.
DATABASE_PORTPostgreSQL port.
DATABASE_USERPostgreSQL user.
DATABASE_PASSWORDPostgreSQL password.
DATABASE_NAMEDatabase name.

The Compose file sets all of these for its bundled PostgreSQL 16. You only provide POSTGRES_PASSWORD. Migrations are applied on startup.

Server

VariableDefaultDescription
PORT4321Port the relay listens on inside the container.
BEHIND_PROXYfalseSet to true when running behind a reverse proxy.
PROXY_HEADERX-Forwarded-ForHeader the proxy uses to pass the client IP.
TRUSTED_PROXIESnoneComma-separated proxy addresses to trust, in addition to 127.0.0.1 and ::1.

Client IPs drive the rate limits. Without BEHIND_PROXY, every request behind a reverse proxy appears to come from the proxy’s address and shares a single limit.

Compose-only variables

These are read by docker-compose.yml, not by the relay itself.

VariableDefaultDescription
POSTGRES_PASSWORDnone (required)Password for the bundled PostgreSQL database.
RELAY_PORT4321Host port the relay is published on.
APNS_AUTH_KEY_FILE./authkey.p8Host path of the .p8 key mounted into the container.

Health check

GET /health returns {"status":"ok"} when the database is reachable and 503 otherwise. The container image also ships a healthcheck command, which the Docker HEALTHCHECK uses, so docker ps shows whether the relay is healthy.

Limits

Request bodies are limited to 64 KB. The relay logs one line per request (status, method, route, latency and client IP) but never request bodies or notification content.