Skip to main content

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 1337 available on your machine

docker-compose.yml
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.

Already running Memcached?

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​

docker-compose.yml
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.

Share your first secret
  1. Type or paste a secret into the box.
  2. Choose an expiration (1 hour, 1 day, or 1 week).
  3. Click Encrypt, or press Ctrl+Enter (Cmd+Enter on macOS) while focused in the form. Copy the generated link.
  4. 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​

FlagEnv varDefaultDescription
--databaseDATABASEmemcachedStorage backend: memcached or redis
--memcachedMEMCACHEDlocalhost:11211host:port of the Memcached instance
--redisREDISredis://localhost:6379/0Valkey or Redis connection URL
--portPORT1337Port for the HTTP server
--max-lengthMAX_LENGTH10000Maximum encrypted secret size in bytes
--metrics-portMETRICS_PORT—Port to expose Prometheus metrics (disabled when unset)
--license-keyLICENSE_KEY—License key for premium features

See Server Options for the complete list.

Backend required

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​