
Deploy Onetime Secret
Self-hosted one-time secret links with Valkey on a volume, no setup prompts
Just deployed
/data
Onetime Secret
Just deployed
Deploy and Host Onetime Secret on Railway
Onetime Secret is an open-source (MIT) service for sharing passwords, API keys and other sensitive text through links that work only once. The recipient opens the link, sees the secret, and it is deleted. Secrets can carry a passphrase and an expiry time, so nothing lingers in chat logs or inboxes.
About Hosting Onetime Secret
Onetime Secret is a Ruby (Puma) web app that keeps every secret, account and session in Redis or Valkey, encrypted with one root key. This template runs the official onetimesecret/onetimesecret v0.26.19 image and a private Valkey 8.1 service. Both are pinned by version and digest and built from a public GitHub repo. Valkey writes an append-only file and snapshots to a Railway volume, so secrets survive restarts and redeploys. The root key, the Valkey password and the admin password are generated at deploy time. The app is served over HTTPS on your Railway domain, and a health check on /health must pass before traffic switches to a new deploy.
Common Use Cases
- Send a password, API key or recovery code to a colleague or customer without leaving a copy in chat or e-mail
- Give a team or company its own private secret-sharing page on its own domain
- Create one-time links from scripts and CI through the built-in REST API
Dependencies for Onetime Secret Hosting
- Valkey 8.1 (Redis-compatible), included as a private service with a volume
- A public HTTPS domain, added automatically by Railway
Deployment Dependencies
- Onetime Secret source and releases: https://github.com/onetimesecret/onetimesecret (v0.26.19)
- Self-hosting guide: https://docs.onetimesecret.com/en/self-hosting/
- Template repo (Dockerfiles, start scripts, changelog): https://github.com/aalfath/onetimesecret-railway-template
Implementation Details
What you're asked at deploy: nothing is required. ADMIN_EMAIL is optional: fill it in to get an admin ("colonel") account on first start. Its password is generated into ADMIN_PASSWORD; read it in the Onetime Secret service's Variables tab, then sign in at /signin. Admin tools are at /colonel.
Defaults: anyone with the URL can create and open secrets, and public sign-up is off. Add users from the service shell with bin/ots customers create someone@example.com (it prints a generated password), or set AUTH_SIGNUP=true to open sign-up. To require a login before creating secrets, set AUTH_REQUIRED=true. To send e-mail, add upstream's SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD and FROM_EMAIL variables. With a custom domain, set HOST to it so share links use it.
Back up SECRET. It encrypts every stored secret. If it changes or is lost, existing secrets can't be opened.
Updates: new upstream releases arrive as a merge to the template repo, and Railway shows an update notice in your project. Read the repo's CHANGELOG first, because Onetime Secret is below 1.0, then apply the update. Your data stays on the Valkey volume.
Why Deploy Onetime Secret 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 Onetime Secret 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
Onetime Secret
aalfath/onetimesecret-railway-template