Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
OS
Self-host Onetime Secret
updated Nov 2026deployed by usprices checked · Jul 2026Install verified on Ubuntu 26.04 · Nov 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →
A service for sending a password, key or message as a link that works once. The recipient opens the link, the secret is shown and then deleted, and unviewed secrets expire on a timer. Secrets can be protected with an additional passphrase, and the sender can use the web interface or the REST API, with optional accounts. The simple Docker Compose stack runs the Ruby app with Valkey, a Redis-compatible store that holds the secrets and sessions.
Pick Onetime Secret when you want a small, long-established service for sending a password or message as a link that works once, with the secret kept on your own server instead of a hosted site. The recipient opens the link, the secret is shown and then deleted, and secrets that are never opened expire on a timer. It is MIT-licensed Ruby with a TypeScript front end, and the repository also offers a REST API. Our snippet clones the release tag `v0.26.19` (released 2026-10-25) and runs upstream's simple Docker Compose stack, the app plus Valkey, with `OTS_IMAGE_TAG` set to `v0.26.19` because the Compose default and the README quick start still say `v0.26.14`. The `SECRET` and the Valkey password are generated into `.env`. Docker Hub lists amd64 and arm64 builds for that tag and the image is about 178 MB compressed. Upstream's self-hosting guide recommends 2+ CPU cores, 2 GB+ RAM and 10 GB+ disk for an instance in simple mode, so our floor is that 2048 MB. In the catalog, Password Pusher adds file, URL and QR pushes and an audit log, Yopass encrypts in the browser, and Vault, OpenBao, Infisical and Phase store application credentials for developers; Onetime Secret, Password Pusher and Yopass are the ones built for a person handing a single secret to another person.
What you need
Any VPS with at least 2048 MB of RAM
A domain you control — most self-hosted setups need HTTPS in front of them
Paid link — we earn a commission if you shop through it.
Install
Run these commands on your server:
# Onetime Secret — one-time secret links — upstream's simple Docker Compose stack (app + Valkey), cloned at tag v0.26.19 with the image pinned to onetimesecret/onetimesecret v0.26.19# Changed from upstream: the tag is pinned in .env (the compose default is v0.26.14) and the root secret and Valkey password are generated with opensslgit clone --depth 1 --branch v0.26.19 https://github.com/onetimesecret/onetimesecret.gitcd onetimesecretcp -p .env.example .envecho "OTS_IMAGE_TAG=v0.26.19" >> .envecho "SECRET=$(openssl rand -hex 32)" >> .envecho "VALKEY_PASSWORD=$(openssl rand -hex 32)" >> .envdocker compose up -dtimeout 300 bash -c 'until curl -fsS -o /dev/null http://localhost:3000/; do sleep 3; done'# → http://SERVER_IP:3000 (create a secret from the home page; HOST=localhost:3000 in .env sets the host in generated links, so change it to SERVER_IP:3000 and run docker compose up -d again. Back up SECRET from .env)
Onetime Secret's README, Compose file and `.env.example` flag these before you rely on it:
non-negotiableThe project is pre-1.0 and the simple Compose file says so: "releases before 1.0 can introduce breaking changes between minor versions", which is why it recommends a specific release over a moving tag. Read the release notes before bumping OTS_IMAGE_TAG.
non-negotiableLosing SECRET is not recoverable. The README says it makes existing secrets unreadable "among other things", and .env.example says all other cryptographic material is derived from it. Our snippet generates it into .env; back that file up.
non-negotiableLinks use HOST, which .env.example sets to localhost:3000. Until you change it to your server's address or domain, the links the app generates point at localhost. SSL=false is also the default, which sets the scheme of generated links.
non-negotiableThe simple stack serves plain HTTP on port 3000, so it sets SESSION_COOKIE_SECURE=false; the Compose comment says production mode would otherwise refuse to write the session cookie. For real use put a TLS reverse proxy in front, set SSL=true and export SESSION_COOKIE_SECURE=true.
non-negotiableThe simple stack has no accounts until you create one: the README makes an admin ("colonel") with bin/ots customers create, and says full authentication (MFA, WebAuthn) is a separate mode that adds a SQL database for accounts, SQLite by default with PostgreSQL optional, and the full Compose stack adds Caddy, RabbitMQ, workers and a scheduler. Our snippet does not create an account, and our run only checks that the home page answers, so we did not create or open a secret. .env.example mentions a separate maximum lifetime (TTL_MAX_ANONYMOUS, default 7 days) for secrets made without an account. By default anyone who can reach port 3000 can create secrets and sign-up is on (AUTH_REQUIRED and AUTH_SIGNUP change that), so keep the port private until you have decided who may use it.
non-negotiableSecrets and sessions live in Valkey, in the named volume onetime_maindb_data with append-only persistence on; the password protects it and the port is not published to the host. The README also states the project was developed with help from AI tools for architecture, code and documentation.
Onetime Secret used 380 MB of RAM at idle on GCP e2-standard-2 · Ubuntu 26.04 LTS · Docker 29.9.3 (first boot, measured Nov 2026). We list a minimum of 2048 MB.
Is the Onetime Secret install snippet verified?
The Onetime Secret install snippet is marked verified on Ubuntu 26.04 (Nov 2026).