Help · Running sekrit
Run your own copy
sekrit runs anywhere Docker runs — a VPS, an old box under a desk, a Raspberry Pi. Images are built for amd64 and arm64.
Start it #
git clone https://github.com/IamMrCupp/sekrit.git
cd sekrit
cp .env.example .env
# set POSTGRES_PASSWORD and APP_DB_PASSWORD — generate each with: openssl rand -hex 24
docker compose up -d --build
Then browse to http://localhost:8080 and register the first promoter account.
Everything comes through one front door. Caddy routes /api/* to the API and the rest to the web app, so there's one origin and nothing else is exposed. The database sets itself up on start — there's no separate setup step.
Two database passwords. POSTGRES_PASSWORD belongs to the database owner, and only the short-lived migrate step uses it, to change the schema. The app connects with APP_DB_PASSWORD, as a role that can read and write rows but can't drop or alter a table. A bug in the app, or someone exploiting one, gets what the app can do, not everything the database can.
Put it on a domain #
In .env, set:
SITE_ADDRESS=tickets.example.comHTTP_PORT=80andHTTPS_PORT=443PUBLIC_URL=https://tickets.example.comENVIRONMENT=production
Point the domain's DNS at the box, and Caddy fetches a certificate on its own.
Production needs HTTPS. With ENVIRONMENT=production the login cookie only travels over HTTPS — over plain HTTP, login will look like it worked and then quietly fail.
.env.example lists every setting sekrit reads. If it isn't in there, it isn't configurable.
Email #
Email is optional. Without it, everything still works: tickets show on screen the moment someone RSVPs, and nobody gets mail.
With it, sekrit sends:
- a copy of each ticket, with the QR inside, when someone RSVPs or a pay-first order is released
- how to pay, for a pay-first order
- a thank-you for a door-only RSVP, and a link to their page for someone who joins the crew
- invites and reminders a promoter schedules for their list
Email never holds anything up. Each one is queued in the database with whatever caused it and sent in the background, so an RSVP is just as fast with the mail server down, and mail queued during an outage goes out when it's back.
sekrit sends through any SMTP server: an email provider, your company's mail, or a relay of your own. Switching providers means changing settings, never code. In .env:
| Setting | What it is |
|---|---|
MAIL_HOST | The SMTP server. Unset means email is off. |
MAIL_PORT | Usually 587. |
MAIL_SECURITY | starttls for port 587, tls for port 465, none for a relay on your own network. |
MAIL_USERNAME, MAIL_PASSWORD | Your provider's SMTP login. |
MAIL_FROM | Who mail comes from, like sekrit <events@tickets.example.com>. It has to be on a domain your provider lets you send as. Each promoter's name goes in front ("D-Program via sekrit"), and replies go to the promoter. |
PUBLIC_URL | Already set if you're on a domain. Links in email use it. |
MAIL_PER_MINUTE | How fast mail goes out. Defaults to 120. |
Invites can go through a different server or account from ticket mail: MAIL_BULK_HOST, MAIL_BULK_PORT, MAIL_BULK_USERNAME, MAIL_BULK_PASSWORD. Each falls back to the setting above. MAIL_BULK_HEADERS is JSON, added to every invite. Some providers use a header to keep bulk mail apart from the rest.
Once it's set, restart (docker compose up -d), then on your Account page use Send me a test email.
Some common setups:
| Provider | Host and port | Login | Notes |
|---|---|---|---|
| Postmark | smtp.postmarkapp.com, 587 | Your server's API token as both username and password | Set MAIL_BULK_HEADERS={"X-PM-Message-Stream": "broadcast"} so invites use Postmark's broadcast stream. |
| Amazon SES | email-smtp.<region>.amazonaws.com, 587 | SMTP credentials from the SES console (not your AWS access keys) | Optionally MAIL_BULK_HEADERS={"X-SES-CONFIGURATION-SET": "invites"}. |
| Mailgun | smtp.mailgun.org, 587 | The domain's SMTP login and password | |
| Resend | smtp.resend.com, 587 | Username resend, password an API key | |
| SendGrid | smtp.sendgrid.net, 587 | Username apikey, password an API key | |
| Brevo | smtp-relay.brevo.com, 587 | Your SMTP login and an SMTP key | |
| Fastmail | smtp.fastmail.com, 465, tls | Your address and an app password | Fine for ticket mail. Mailbox providers cap how much you can send a day, so not for invites to a big list. |
| Google Workspace | smtp.gmail.com, 587 | Your address and an app password | Same daily caps as above. |
| Your own relay | Its address, often port 25, none | Usually none |
Set up your domain the way your provider asks: SPF, DKIM, and a DMARC record. Without them, mail lands in spam or doesn't arrive. Sending straight from a home internet connection rarely works at all: most mail servers refuse home IP addresses.
To try it without sending anything, start the bundled Mailpit with docker compose --profile mail up -d, set MAIL_HOST=mailpit, MAIL_PORT=1025 and MAIL_SECURITY=none, and read every email at http://localhost:8025.
Back it up #
Everything that matters is in Postgres, plus the uploaded flyers. A nightly dump is enough for most people:
docker compose exec -T db pg_dump -U sekrit sekrit | gzip > sekrit-$(date +%F).sql.gz
Keep copies somewhere other than the box itself. Flyers live in the media volume — back that up alongside the database, because the database points at those files.
Test a restore before you need one. A backup you've never restored is a hope, not a backup. After restoring into a fresh database, run docker compose run --rm migrate so the app's role and its access are set up again.
Update #
git pull
docker compose up -d --build
The migrate step runs first, then the app starts. Take a backup first.
Updating from a version before September 2026? Add APP_DB_PASSWORD to your .env (openssl rand -hex 24). Compose refuses to start without it and tells you so.
These docs #
They ship with the app, so the help on your copy always matches the version it's running.