
Deploy Keygen
Keygen CE 1.7: software licensing and license-key validation API.
Just deployed
/var/lib/postgresql/data
keygen
Just deployed
keygen-worker
Just deployed
Redis
Just deployed
/data
Deploy and Host Keygen on Railway
Keygen is a software licensing and distribution API. It issues license keys, validates them, tracks machine activations and enforces policies such as expiry, seats and feature entitlements. Desktop apps, on-premise software, plugins and SaaS add-ons call it to check whether a customer's license is valid. Keygen CE is the free self-hosted edition.
About Hosting Keygen
This template runs Keygen CE keygen/api:v1.7.2 as a web service and a Sidekiq worker, with Railway Postgres and Redis. On the first deploy, a pre-deploy step runs Keygen's setup, which creates the account and an admin user. Later deploys only run migrations. The pre-deploy step also waits for the database. Setup output is filtered so that secrets stay out of the logs. The admin email defaults to admin@example.com, and the password is generated. CE is API-only, without a dashboard. Keygen is published under the Fair Core License, which is source-available rather than open source.
Common Use Cases
- License keys and activation limits for desktop or on-premise software
- Feature entitlements and trials checked by your app at runtime
- Offline license files and machine fingerprinting for air-gapped installs
Dependencies for Keygen Hosting
keygen/api:v1.7.2(Keygen CE), askeygenandkeygen-worker- Railway Postgres and Railway Redis
Deployment Dependencies
Implementation Details
| Service | Source | Networking | Storage |
|---|---|---|---|
| keygen | keygen/api:v1.7.2 (web) | public HTTPS | Postgres + Redis |
| keygen-worker | keygen/api:v1.7.2 (Sidekiq) | private | Postgres + Redis |
| Postgres, Redis | Railway databases | private | volumes |
| Variable | Purpose |
|---|---|
KEYGEN_ACCOUNT_ID | Generated account ID; part of every API path |
KEYGEN_ADMIN_EMAIL, KEYGEN_ADMIN_PASSWORD | First admin, created by setup |
KEYGEN_HOST | Public domain; change it if you add a custom domain |
SECRET_KEY_BASE, ENCRYPTION_* | Generated keys; keep them, they protect data at rest |
Validate a key (no auth needed):
curl -XPOST "$KEYGEN_URL/v1/accounts/$KEYGEN_ACCOUNT_ID/licenses/actions/validate-key" \
-H 'Content-Type: application/vnd.api+json' -d '{"meta":{"key":""}}'
Change KEYGEN_ADMIN_EMAIL before the first deploy if you want your own address; setup only runs once. Under the FCL, you may self-host Keygen for your own products, but you may not offer it as a competing licensing service.
This is a community-maintained deployment package and does not imply affiliation with or endorsement by Keygen LLC.
Why Deploy Keygen 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 Keygen 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

