---
title: "Deploy OfferKit"
description: "Self-hosted engine for coupons, loyalty, referrals, and gift cards."
category: "Other"
url: https://railway.com/deploy/offerkit
---

# Deploy OfferKit

Self-hosted engine for coupons, loyalty, referrals, and gift cards.

**[Deploy OfferKit on Railway](https://railway.com/template/offerkit)**

- **Creator:** Akshit Kr Nagpal's Projects
- **Category:** Other
- **Total deploys:** 4

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### web

- **Image:** ghcr.io/offerkit/offerkit:edge
- **Start command:** `node apps/web/server.js`
- **Health check:** /api/v1/ready
- **Public domain:** Yes

### worker

- **Image:** ghcr.io/offerkit/offerkit:edge

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2.1
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

## Documentation

# 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 port `3000`.
- `worker`: private background worker using `node 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.

## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/offerkit
