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.

VariableDefaultWhat it does
RESEND_API_KEYre_local_dev_keyThe bearer token the API accepts. You can create more keys in the dashboard.
DISABLE_LOGINfalsetrue opens the dashboard without signing in. Trusted machines only.
ADMIN_USERNAMEnoneDashboard login username.
ADMIN_PASSWORDnoneDashboard login password, as a scrypt hash (see below).
SESSION_SECRETnoneLong random string that signs the session cookie. Required unless DISABLE_LOGIN=true.
DATA_DIR/app/.dataWhere the database and attachments are stored. Mount your volume here.
RATE_LIMITfalsetrue applies Resend's limit of 10 requests per second, answering 429 rate_limit_exceeded.
DOMAIN_ENFORCEMENTtruefalse lets any sender domain send. See Differences from Resend.
PORT3000Port 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/pretend

warning

A new SESSION_SECRET signs everyone out. Keep the same value across restarts.

Image details

  • Based on node:22-slim and runs as a non-root user (uid 1001).
  • Exposes port 3000 and declares /app/.data as a volume.
  • Tags: latest, plus one per commit sha on main. Every tag passes the full compatibility suite before it is pushed.