Push Server: Deployment and Operations
The Push Server is delivered as a container image and deployed to Kubernetes with a generic Helm chart. It depends on PostgreSQL (or Oracle 19c), RabbitMQ and Redis, which are provisioned separately.
Local development
Section titled “Local development”Prerequisites: JDK 25 (Kotlin 2.4, Spring Boot 4.2, Gradle Wrapper) and Docker with Docker Compose for PostgreSQL, RabbitMQ and Redis.
The launcher script starts everything with the dev profile:
./start.sh # fresh PostgreSQL, RabbitMQ and Redis containers./start.sh --keep-data # reuse containers and data between runsstart.sh builds the application, waits for healthy dependencies, generates a tenant configuration for tenant dev / app default (unless M8TY_PUSH_TENANT_CONFIG_FILE or SPRING_CONFIG_IMPORT is set), enables the reporting dashboard with local Basic credentials, and routes iOS through FCM by default. Without --keep-data, every start discards previous registrations and messages.
Manual start:
docker compose up -d rabbitmq redis postgresSERVER_PORT=8080 SPRING_PROFILES_ACTIVE=dev \ M8TY_PUSH_DATABASE_URL=jdbc:postgresql://localhost:5432/push \ M8TY_PUSH_DATABASE_RUNTIME_USERNAME=push M8TY_PUSH_DATABASE_RUNTIME_PASSWORD=push \ ./gradlew :m8ty-server:bootRunWithout a database URL the server uses in-memory H2. The dev profile permits requests without bearer tokens, uses an ephemeral server key and an in-memory replay store, and runs Liquibase on startup. Device signatures, attestation and the admin-port filter stay active; for emulators, a development-only TEST attestation can be enabled with M8TY_PUSH_TEST_ATTESTATION_ENABLED and M8TY_PUSH_TEST_ATTESTATION_SECRET.
./devops/send_test_notification.sh sends a public and a private test notification to all registered devices of the local database (--dry-run, --tenant, --title, --body and further options are available).
| Local URL | Purpose |
|---|---|
http://localhost:8080/api-docs/index.html |
Messaging and mobile API documentation |
http://localhost:8090/api-docs/index.html |
Admin API documentation |
http://localhost:8090/push/ui/dashboard |
Operator dashboard |
http://localhost:8181/actuator/health |
Health endpoint |
http://localhost:8080/push/.well-known/jwks.json |
Server public keys |
Container image
Section titled “Container image”./gradlew :m8ty-server:bootJar --no-daemondocker build -f devops/Dockerfile -t m8ty-push-server:local .The image is based on a Java 25 JRE, runs as a non-root user, exposes ports 8080, 8090 and 8181, and checks /actuator/health on port 8181. It contains no credentials or provider configuration. The same JAR runs the schema migration with java -jar m8ty-push-server.jar --migrate-database.
Configuration
Section titled “Configuration”Global settings are environment variables; customer and app settings live in the imported tenant YAML (see Architecture and APNs and FCM Setup). The most important properties:
| Variable | Default | Description |
|---|---|---|
SPRING_PROFILES_ACTIVE |
unset (production security) | dev only for local development; auditlog adds audit publishing to RabbitMQ |
SPRING_CONFIG_IMPORT |
— | Tenant YAML, for example file:/app/config/tenants.yaml |
SERVER_PORT / M8TY_PUSH_ADMIN_API_PORT / M8TY_PUSH_MANAGEMENT_PORT |
8080 / 8090 / 8181 |
Public, admin and management connectors |
M8TY_PUSH_DATABASE_URL |
in-memory H2 | JDBC URL (PostgreSQL or Oracle in production) |
M8TY_PUSH_DATABASE_RUNTIME_USERNAME / _PASSWORD |
— | Runtime database login |
M8TY_PUSH_DATABASE_MAINTENANCE_USERNAME / _PASSWORD |
— | Maintenance login for global jobs (required outside dev) |
M8TY_PUSH_DATABASE_REPORTING_USERNAME / _PASSWORD |
— | Read-only reporting login (required when reporting is enabled outside dev) |
M8TY_PUSH_DATABASE_MIGRATION_USERNAME / _PASSWORD |
— | Migration login, used only by --migrate-database |
M8TY_PUSH_DATABASE_RLS_ENABLED |
true |
PostgreSQL row-level security; requires M8TY_PUSH_DATABASE_SCOPE_KEY_FILE and DBA-installed policies |
M8TY_PUSH_REDIS_URL |
redis://localhost:6379 |
Replay store for device signatures |
SPRING_RABBITMQ_HOST, _PORT, _USERNAME, _PASSWORD, _SSL_ENABLED |
Spring defaults | RabbitMQ connection |
M8TY_PUSH_JWKS_KEYSTORE, _PASSWORD, _KEY_PASSWORD, _ALIASES |
— | Persistent server key (PKCS#12, EC P-256); required outside dev |
M8TY_SECURITY_OAUTH2_RESOURCE_JWT_ISSUER_URI |
— | Optional global JWT trust for requests without customer scope; customers configure their own jwt |
M8TY_SECURITY_OAUTH2_RESOURCE_JWT_MAX_TOKEN_LIFETIME |
15m |
Maximum backend token lifetime (up to 1h) |
M8TY_SECURITY_OAUTH2_RESOURCE_JWT_TENANT_CLAIM / _APP_CLAIM |
tenant_id / app_access |
Claim names for tenant and app grants |
M8TY_PUSH_ATTESTATION_ENABLED |
true |
Must stay true outside dev |
M8TY_PUSH_ATTESTATION_APPLE_TRUST_KEYSTORE / _PASSWORD |
— | Apple App Attest trust store (required for enabled iOS apps) |
M8TY_PUSH_APNS_BASE_URL |
https://api.push.apple.com |
APNs environment (sandbox or production) |
M8TY_PUSH_APNS_SEND_VIA_FCM |
true |
Default iOS routing through FCM |
M8TY_PUSH_MESSAGING_ENABLED |
true |
false pauses listeners, outbox and fallback dispatchers |
M8TY_PUSH_SILENT_FIRST_DELIVERY |
true |
Silent-first delivery also for public messages |
M8TY_PUSH_PRIVATE_NOTIFICATION_FALLBACK_TIMEOUT |
15s |
Delay before the public fallback |
M8TY_PUSH_PROCESSING_TURN_TIMEOUT |
30s |
Time budget per delivery turn (OAuth and provider calls) |
M8TY_PUSH_MESSAGING_QUEUE_MAX_MESSAGES / _MAX_BYTES |
10000 / 67108864 |
Per-queue capacity |
M8TY_PUSH_HTTP_MAX_BODY_BYTES |
1048576 |
Maximum request body size |
M8TY_PUSH_CALLBACK_ALLOWED_BASES |
— | Additional global restriction for callback destinations |
M8TY_PUSH_HOUSEKEEPING_RETENTION |
3d |
Retention for expired messages and deduplication records |
M8TY_PUSH_REPORTING_ENABLED |
false |
Operator dashboard and customer reporting endpoints |
M8TY_PUSH_REPORTING_AUTH_MODE |
oidc-proxy outside dev, basic in dev |
Dashboard authentication |
Customer budgets are set under m8ty.push.tenants.<tenantId>.limits (for example registrations-per-minute, sends-per-minute, reads-per-minute, writes-per-minute, messages-per-month, recipients-per-month, pending-messages) and apply across all apps of the customer.
Kubernetes deployment
Section titled “Kubernetes deployment”The server is deployed with the generic stakater/application Helm chart; all settings are Helm values (backend-values.yaml as baseline plus a protected, environment-specific override file).
helm repo add stakater https://stakater.github.io/stakater-chartshelm upgrade --install m8ty-push-server stakater/application \ --version "<pinned chart version>" --namespace <namespace> \ --values devops/backend-values.yaml --values /secure/environment-values.yaml \ --atomic --wait --timeout 10m| Values section | Content |
|---|---|
deployment.env |
Global environment settings (database URL, Redis, RabbitMQ, attestation, provider routing, key aliases) |
deployment.image |
Registry image repository and digest |
configMap.files.tenants |
The complete tenant YAML (m8ty.push.tenants) |
secret.files.environment |
Database, broker, dashboard and keystore passwords |
secret.files.migration |
Migration login, referenced only by the init container |
secret.files.tenant-credentials |
Original Firebase JSON, APNs .p8 and callback secret files, mounted at /app/tenant-credentials |
secret.files.security-files |
server.p12, optional Apple trust store and RLS scope key, mounted at /app/keys |
ingress, networkPolicy |
Hostname and TLS, allowed ingress controllers and internal clients |
Essentials:
- Ingress: route
/pushto port 8080 and/push/uito admin port 8090 (for examplehttps://push.example.com/push/ui/dashboard). Keep management port 8181 and the admin reporting API off the public ingress. - Replicas and broker: run at least two replicas in production and use RabbitMQ over TLS (port 5671,
SPRING_RABBITMQ_SSL_ENABLED=true). All replicas share database, broker, Redis and server keys. - Server key: create
server.p12once with an EC P-256 key and reuse it across replicas and releases. Keep previous keys while existing messages still need them. - Schema migration: each pod runs
--migrate-databasein an init container with the dedicated migration login before the server starts; normal startup cannot migrate. A DBA provisions the database groups and logins (and RLS policies and scope key when RLS is enabled) beforehand. - Configuration changes: tenant YAML, credentials and Secrets are loaded at startup. Bump a pod annotation (for example
m8ty.eu/configuration-revision) to roll all replicas after changes. Emergency credential replacement or customer disablement requires that old pods are gone before new configuration is served. - Validation:
devops/validate_deployment_values.pychecks merged values (separate database logins, production security, provider origins, complete enabled apps, ingress TLS) before Helm runs.
Operations
Section titled “Operations”Delivery and queues
Section titled “Delivery and queues”INSTANTmessages use the instant queue (queue TTL 120 s),ALERTmessages the standard queue (900 s). Failed attempts wait in a five-minute delay queue; retry limits are 3 (INSTANT) and 5 (ALERT) within the message lifetime. Exhausted messages go to the standard dead-letter queue (4 hours).- Queues reject new publications when full; the outbox keeps the commands and retries later. Monitor ready messages and bytes, unacknowledged messages, dead-letter queues, outbox backlog and the age of the oldest work.
- Queue arguments are immutable: changing capacity or upgrading queue definitions requires a controlled broker migration (pause submissions, drain, stop all replicas, recreate empty queues).
- Set
M8TY_PUSH_MESSAGING_ENABLED=falseto pause delivery processing, for example during upgrades that must not run mixed publisher and consumer versions.
Persistence and uncertain outcomes
Section titled “Persistence and uncertain outcomes”Provider calls and callbacks are protected by persistent claims on message_recipient (delivery_claim_id, callback_claim_id). After an ambiguous failure, the claim is kept and the recipient is not resent automatically. Find unresolved work with a read-only query:
select tenant_id, push_id, device_id, provider_type, delivery_claim_id, delivery_claimed_at, callback_claim_id, callback_claimed_atfrom message_recipientwhere delivery_claim_id is not null or callback_claim_id is not null;Reconcile with the provider or callback backend before clearing a claim. For callbacks, the claim ID is sent as Idempotency-Key.
Housekeeping
Section titled “Housekeeping”Housekeeping jobs delete expired messages, deduplication records, opaque tokens and registration nonces in bounded batches (M8TY_PUSH_HOUSEKEEPING_* cron and batch settings, retention 3d). Diagnostics and recipients are removed together with their message.
Logs and metrics
Section titled “Logs and metrics”Logs are structured (Log4j2; JSON with LOGGING_CONFIG=classpath:log4j2-json.xml) and carry tenantId, appId, pushId, deviceId, claimId and attemptId. They never contain tokens, credentials or notification content. Search by pushId first; events such as delivery.recipient.blocked, fcm.oauth.failed, apns.response.rejected, delivery.recipient.claim.retained and broker.retry.exhausted explain most failures. Actuator exposes health, info and prometheus on the management port.
Reporting dashboard
Section titled “Reporting dashboard”With M8TY_PUSH_REPORTING_ENABLED=true, the dashboard at /push/ui/dashboard (admin connector) shows registrations and de-registrations, message traffic by OS and version, active versus total devices, platform, version and language distributions, and a current device inventory per tenant, in English or German. Authentication:
| Mode | Configuration |
|---|---|
oidc-proxy (default outside dev) |
An OIDC access proxy forwards operator tokens; configure M8TY_PUSH_REPORTING_ISSUER_URI and M8TY_PUSH_REPORTING_AUDIENCE. Tokens need scope m8ty:usr:pushreportingoperator, role reporting, a sub and a lifetime of at most 15 minutes |
basic |
M8TY_PUSH_DASHBOARD_USERNAME and M8TY_PUSH_DASHBOARD_PASSWORD from a Secret |
All operators see all customers; keep the admin connector private.
Device de-registration
Section titled “Device de-registration”DELETE /push/api/v2/{tenantId}/devices/{deviceId} (scope m8ty:usr:pushdevice) sets the device to BLOCKED, invalidates its opaque tokens and stops pending deliveries. It returns 204 (also when repeated) and 404 for unknown devices. A blocked device cannot be re-registered or unblocked; a new registration needs a new device ID.
Known limitations
Section titled “Known limitations”- Provider acceptance (
SENT) and retrieval are recorded; display and user interaction on the device are not. - Delivery and callbacks are at-least-once with claims; there is no exactly-once guarantee, and uncertain outcomes require manual reconciliation.
- Private-first display is not guaranteed: silent pushes can be delayed or suppressed by the OS, and fallback suppression is based on retrieval.
INSTANTmessages are consumed on read even if the response is lost.- The APNs environment is global per server process; sandbox and production need separate deployments.
- Nonce and opaque token lifetimes are fixed at five minutes. Only the
SENDER_SPECIFIED_DEVICES_LISTtarget is supported; user-targeted sending returns 501. - Oracle 19c runs without row-level security (no VPD). Outbound callback mTLS is not available.
- A shared mobile binary serving several customers cannot prove which customer a device belongs to; each native app identity has one owning customer.
See Also
Section titled “See Also”- Push Server — overview and capabilities
- Push Server: APNs and FCM Setup — provider credentials
- Push Server: Integration and API — endpoints and examples
© m8ty GmbH 2023 · m8ty.eu
