---
title: "Deploy unkey-template"
description: "Template for a self-hosted Unkey instance."
category: "Other"
url: https://railway.com/deploy/unkey-template
---

# Deploy unkey-template

Template for a self-hosted Unkey instance.

**[Deploy unkey-template on Railway](https://railway.com/template/unkey-template)**

- **Creator:** toxzak-svg's Projects
- **Category:** Other
- **Total deploys:** 2

## Template content

### unkey-vault

- **Source:** toxzak-svg/railway-unkey

### 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"`

### unkey-api

- **Source:** toxzak-svg/railway-unkey

### clickhouse

- **Source:** toxzak-svg/railway-unkey

### MySQL https://devicons.railway.app/i/mysql.svg

- **Image:** mysql:9.4
- **Start command:** `docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G`

## Documentation

# Deploy and Host unkey-template on Railway

Unkey is an open-source API key management platform that allows you to issue, verify, and monitor API keys with low latency. This template provides a fully self-hosted environment, giving you total control over your security infrastructure and analytics data without the overhead of third-party SaaS management.


## About Hosting unkey-template

This template deploys a robust, production-ready stack on Railway. It includes the core Unkey API for key lifecycle management, a dedicated Vault service for high-security encryption, and a ClickHouse instance for high-performance usage analytics. The stack is rounded out with MySQL for relational data and Redis for sub-millisecond caching, ensuring your API remains fast and scalable.


## Common Use Cases

- [SaaS API Management: Issue and rotate customer API keys with ease.]
- [Rate Limiting: Protect your upstream services from abuse at the edge.]
- [Usage Analytics: Monitor real-time API consumption and billing metrics.]

## Dependencies for unkey-template Hosting

- [unkey-api: The core logic engine.]
- [unkey-vault: Secure storage for secrets and encryption.]
- [ClickHouse: High-speed analytical database for usage logs.]
- [MySQL &amp; Redis: Reliable persistence and caching layers.]

### Deployment Dependencies

https://github.com/toxzak-svg/railway-unkey


## Why Deploy unkey-template on Railway?

Railway provides a seamless infrastructure experience. By deploying this Unkey template, you benefit from automatic private networking, managed scaling, and zero-downtime redeploys. It's the fastest way to move from a local development environment to a secure, globally available API management layer.

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 unkey-template 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) — 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/unkey-template
