Quick Start
Get Yopass running locally in under five minutes. The recommended path is Docker Compose — it wires up the server and its storage backend in a single command.
Prerequisites
- Docker and Docker Compose (v2+)
- Port
1337available on your machine
Option 1: Docker Compose (recommended)
With Valkey (recommended)
services:
yopass:
image: jhaals/yopass:latest
ports:
- "1337:1337"
environment:
DATABASE: redis
REDIS: redis://valkey:6379/0
depends_on:
- valkey
valkey:
image: valkey/valkey:8-alpine
command: valkey-server --save "" --appendonly no
Valkey speaks the Redis protocol, so it uses the redis backend. Redis works with the same settings. The command turns off snapshots and the append-only file, so secrets stay in memory and are never written to disk. See Persistence to change that.
Switching the backend starts with an empty database. Links to secrets still stored in Memcached stop working. Switch after the outstanding secrets have expired, or keep Memcached.
With Memcached
services:
yopass:
image: jhaals/yopass:latest
ports:
- "1337:1337"
environment:
MEMCACHED: memcached:11211
depends_on:
- memcached
memcached:
image: memcached
Memcached is supported, but it evicts unexpired secrets when memory runs low and limits items to 1 MB by default.
Start either setup with:
docker compose up -d
Open http://localhost:1337 — Yopass is running.
- Type or paste a secret into the box.
- Choose an expiration (1 hour, 1 day, or 1 week).
- Click Encrypt, or press Ctrl+Enter (Cmd+Enter on macOS) while focused in the form. Copy the generated link.
- Send the link to the recipient. It self-destructs after one view.
Persistence
The examples in these docs run Valkey in memory only. A secret that has expired or been opened is gone, and restarting Valkey removes every stored secret.
To keep secrets across restarts, remove the command line and mount a volume on /data:
valkey:
image: valkey/valkey:8-alpine
volumes:
- valkey-data:/data
volumes:
valkey-data:
Valkey then writes snapshots to that volume, by default at most once a minute and as rarely as once an hour when few secrets change. This has three costs:
- A crash loses recent secrets. Anything created since the last snapshot is gone after a crash.
- A crash can restore an opened one-time secret. If the secret was in the last snapshot and Valkey crashes before the next one, the restart brings it back, and anyone with the link can open it again.
- Deleted secrets linger on disk. A snapshot holds the encrypted secrets, so a deleted or expired secret stays in the snapshot file until a later snapshot replaces it. A backup of the volume keeps it until the backup itself is deleted.
Memcached never writes to disk.
Common server flags
| Flag | Env var | Default | Description |
|---|---|---|---|
--database | DATABASE | memcached | Storage backend: memcached or redis |
--memcached | MEMCACHED | localhost:11211 | host:port of the Memcached instance |
--redis | REDIS | redis://localhost:6379/0 | Valkey or Redis connection URL |
--port | PORT | 1337 | Port for the HTTP server |
--max-length | MAX_LENGTH | 10000 | Maximum encrypted secret size in bytes |
--metrics-port | METRICS_PORT | — | Port to expose Prometheus metrics (disabled when unset) |
--license-key | LICENSE_KEY | — | License key for premium features |
See Server Options for the complete list.
Yopass needs a Valkey, Redis or Memcached backend to store secrets. Valkey is recommended. The server still uses Memcached unless --database redis is set; --redis alone does not switch the backend.
Next steps
- Add TLS — TLS / HTTPS guide to serve over HTTPS
- Enable file uploads — File Storage guide for disk or S3 backends
- Add authentication — OpenID Connect guide (license required)
- Customize branding — Theming guide (license required)
- Production metrics — Metrics guide for Prometheus and Grafana