Reference
Configuration
Every environment variable the Pretend image reads.
Environment variables
Pass these with docker run -e NAME=value or an env file. None of them are required to start the container.
| Variable | Default | What it does |
|---|---|---|
RESEND_API_KEY | re_local_dev_key | The bearer token the API accepts. You can create more keys in the dashboard. |
DISABLE_LOGIN | false | true opens the dashboard without signing in. Trusted machines only. |
ADMIN_USERNAME | none | Dashboard login username. |
ADMIN_PASSWORD | none | Dashboard login password, as a scrypt hash (see below). |
SESSION_SECRET | none | Long random string that signs the session cookie. Required unless DISABLE_LOGIN=true. |
DATA_DIR | /app/.data | Where the database and attachments are stored. Mount your volume here. |
RATE_LIMIT | false | true applies Resend's limit of 10 requests per second, answering 429 rate_limit_exceeded. |
DOMAIN_ENFORCEMENT | true | false lets any sender domain send. See Differences from Resend. |
PORT | 3000 | Port the server listens on inside the container. |
Dashboard login
Unless DISABLE_LOGIN=true, the dashboard asks for ADMIN_USERNAME and a password. Store the password as a scrypt hash, never in plain text. Generate one with the Node.js that ships in the image:
Terminal
docker run --rm a2coder/pretend node -e '
const c = require("crypto"), salt = c.randomBytes(16).toString("hex");
console.log("scrypt:" + salt + ":" + c.scryptSync(process.argv[1], salt, 64).toString("hex"));
' 'your-password'Then pass the output as ADMIN_PASSWORD, along with a random SESSION_SECRET:
Terminal
docker run -d --name pretend -p 3000:3000 \
-v pretend-data:/app/.data \
-e ADMIN_USERNAME=admin \
-e ADMIN_PASSWORD='scrypt:…' \
-e SESSION_SECRET="$(openssl rand -hex 32)" \
a2coder/pretendwarning
A new SESSION_SECRET signs everyone out. Keep the same value across restarts.
Image details
- Based on
node:22-slimand runs as a non-root user (uid 1001). - Exposes port
3000and declares/app/.dataas a volume. - Tags:
latest, plus one per commit sha onmain. Every tag passes the full compatibility suite before it is pushed.