Deploy OfferKit
Self-hosted engine for coupons, loyalty, referrals, and gift cards.
Just deployed
/var/lib/postgresql/data
Just deployed
worker
Just deployed
Redis
Just deployed
/data
Deploy and Host OfferKit on Railway
OfferKit is an open-source promotion engine for coupons, gift cards, loyalty, referrals, customer segments, validation rules, and stackable redemptions. It includes a dashboard, REST API, TypeScript SDK, CLI, and MCP server, giving developers a self-hosted way to manage promotion logic across products and checkout flows.
About Hosting OfferKit
Hosting OfferKit on Railway provisions the core services needed to run the promotion engine in production: a public web service, a private background worker, PostgreSQL for durable application data, and Redis for job processing. The web service serves the dashboard, API, and docs, while the worker handles async jobs such as webhook delivery, bulk code generation, and loyalty expiration. OfferKit runs from a published Docker image, so Railway can deploy it without building the source monorepo. On first boot, the web service runs database migrations and creates the initial admin user from environment variables.
Common Use Cases
- Run a self-hosted coupon, voucher, gift card, and loyalty engine.
- Add promotion APIs to an app, commerce platform, or checkout flow.
- Manage customer segments, validation rules, referrals, and stackable redemptions.
Dependencies for OfferKit Hosting
- Railway account with Postgres and Redis services.
- OfferKit Docker image from GitHub Container Registry.
- Admin email, admin password, and Better Auth secret for first boot.
Deployment Dependencies
- OfferKit GitHub repository: https://github.com/offerkit/offerkit
- OfferKit container image: https://github.com/offerkit/offerkit/pkgs/container/offerkit
- Railway Postgres: https://docs.railway.com/reference/postgres
- Railway Redis: https://docs.railway.com/reference/redis
- Railway templates: https://docs.railway.com/templates/create
Implementation Details
This template runs two services from the same OfferKit image:
web: public Next.js dashboard, REST API, and docs on port3000.worker: private background worker usingnode apps/worker/dist/index.js.
The web service health check is /api/v1/ready. The worker health check is /health. Set DATABASE_URL and REDIS_URL on both services. Set BETTER_AUTH_SECRET, OFFERKIT_PUBLIC_URL, ADMIN_EMAIL, and ADMIN_PASSWORD on the web service.
Why Deploy OfferKit on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying OfferKit on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
ADMIN_EMAIL
ADMIN_PASSWORD
Redis
redis:8.2.1