Self-hosted ATS security: backups, updates and access
Self-hosted ATS security in practice: backups, image updates, HTTPS, secrets, user accounts and how CV files are served, with a monthly checklist.
Self-hosted ATS security is mostly routine work: backups you have actually restored, updates you apply on purpose, HTTPS, secrets kept out of reach, and accounts that match the people who still work with you. This guide covers that routine for Vekt, our open-source recruiting platform, from the first week to the monthly checklist. Running your own applicant tracking system means CVs and personal data sit on a machine you are responsible for, so the boring parts matter more than any feature.
It follows on from our Docker Compose setup tutorial, which covers installation. Every Vekt fact below was checked in the Vekt repository on 2 December 2026 (code, SECURITY.md, docker-compose.yml, .env.example); facts about Docker, Caddy, nginx, SQLite, Auth.js and GitHub link to their own documentation. This is an operations guide, not a security audit: nobody has audited Vekt, and nothing here makes it certified or compliant with anything.
What you are protecting
A Vekt install has four things worth protecting, and each one lives in a different place:
| Asset | Where it lives | What losing it means | What protects it |
|---|---|---|---|
| Candidate records, evaluations, users | db-data volume (/data/app.db, SQLite) |
Recruiting history gone, or exposed | Backups, port binding, accounts |
| CV files | uploads volume (/app/private/uploads) |
Personal documents gone, or exposed | Backups, the login-only file route |
| Secrets | .env on the host |
Forged sessions and links, or broken email links | File permissions, a separate encrypted copy |
| Recruiter access | User accounts and session cookies | Someone reads candidates they shouldn’t | Roles, account hygiene, HTTPS |
Keep this table in mind for the rest of the guide: every step below protects one of these four.
Backups: two volumes and one file
The setup tutorial has a full backup.sh script. The short version: stop the app for a few seconds, archive both volumes, start it again. Stopping first matters because the database is a single SQLite file, and SQLite’s own documentation warns that a copy taken while a transaction is active “might contain some old and some new content, and thus be corrupt” (How To Corrupt An SQLite Database File, section 1.2).
Two additions make the backup useful for security rather than only for disasters.
Back up .env too, separately. The volume archive does not contain it, and .env holds AUTH_SECRET. Vekt uses that secret for more than logins: it signs the status-page and unsubscribe links in the emails candidates receive (lib/public-tokens.ts). Those links carry no expiry date, so a new AUTH_SECRET after a rebuild means every link already sent stops working.
Encrypt before the archive leaves the server. The archives contain CVs. A symmetric GnuPG passphrase is the simplest option; keep the passphrase in your password manager, not on the server:
# encrypt the newest archive and the .env file, then copy them off the server
cd /opt/vekt/backups
latest=$(ls -1t vekt-*.tar.gz | head -n 1)
gpg --symmetric --cipher-algo AES256 "$latest"
gpg --symmetric --cipher-algo AES256 -o "env-$(date +%F).gpg" ../.env
rsync -a ./*.gpg backup-user@backup-host:/srv/vekt-backups/
rm -f ./*.gpg
Then do the step most people skip: restore an archive into a test install at least once, and log in to check that candidates and CVs are there. A backup you have never restored is a hope, not a backup.
Finally, match backup rotation to your retention period. Vekt’s daily purge job (02:00 UTC, in lib/queue.ts) deletes expired candidates and their CV files from the live system only; old archives keep them until the archives themselves are deleted. Our candidate data retention guide covers how to set the period.
Updates: how fixes reach your server
Vekt’s SECURITY.md says that “security updates are provided for the latest code on the main branch”. The Docker image at ghcr.io/behnoudmst/vekt is built by a GitHub workflow when a release is published, and the latest tag points at the newest stable release. That gives you two update routes.
The normal route: pull the released image.
cd /opt/vekt
./backup.sh
docker compose -f docker-compose.yml -f docker-compose.override.yml pull
docker compose -f docker-compose.yml -f docker-compose.override.yml up -d
docker compose logs --tail=50 app # migrations run on start; check they succeeded
When a fix is on main but not yet released: build from source with the repository’s docker-compose.dev.yml, which replaces the published image with a local build. Keep your .env and override file next to the clone:
git clone https://github.com/Behnoudmst/vekt.git /opt/vekt-src
cd /opt/vekt-src
cp /opt/vekt/.env /opt/vekt/docker-compose.override.yml .
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.override.yml up -d --build
Because the Compose project name is vekt in both directories, this reuses the same volumes. Take a backup first all the same, and go back to the released image once the fix ships.
To hear about releases without checking by hand, watch the repository on GitHub with Custom notifications; GitHub lets you limit notifications to event types such as releases and security alerts (configuring notifications). The inngest/inngest image in the Compose file uses the latest tag as well, so docker compose pull updates it at the same time.
HTTPS and the network
Three settings decide who can reach Vekt over the network.
Bind the app to localhost. The shipped Compose file publishes port 3000 on all interfaces. Docker’s documentation states plainly that “publishing container ports is insecure by default”, and that only the host can reach a port published with 127.0.0.1 (port publishing; the same page notes that before Docker Engine 28.0.0, hosts on the same L2 segment could still reach localhost-published ports). The override file in the setup tutorial changes the binding to 127.0.0.1:3000. The Inngest server’s port 8288 is already bound to 127.0.0.1 in the shipped file; if you want its dashboard, use an SSH tunnel (ssh -L 8288:127.0.0.1:8288 you@server) rather than opening the port.
Commit to HTTPS before go-live. In production, Vekt sends a Strict-Transport-Security header with max-age=63072000 (two years), includeSubDomains and preload (next.config.ts). Once a browser has seen it over HTTPS, that browser will only use HTTPS for your Vekt hostname for two years. That is what you want, but it means the hostname should stay on HTTPS for good.
Make sure the client IP header can’t be forged. Vekt limits applications to 5 per IP address and 3 per email address per hour (app/api/candidates/route.ts), and it reads the IP from the first entry of X-Forwarded-For. The limiter is in memory, so it resets when the container restarts. Which IP comes first depends on your proxy:
- Caddy ignores incoming
X-Forwarded-*values from clients it doesn’t trust, “to prevent spoofing” (reverse_proxy docs). The default configuration is fine. - nginx with the common
$proxy_add_x_forwarded_forappends the client address to any incoming header (nginx wiki), so a value the client sent itself comes first. Set the header to the connection address instead:
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
If port 3000 is open to the internet, anyone can send the header straight to the app, which is one more reason for the localhost binding.
Secrets in .env
.env holds AUTH_SECRET, both Inngest keys, and any OPENAI_API_KEY, OPENROUTER_API_KEY and RESEND_API_KEY you set. The app container refuses to start without AUTH_SECRET and the two Inngest keys, and .env.example gives the generators (openssl rand -base64 32 for AUTH_SECRET, openssl rand -hex 32 for the signing key).
chown root:root /opt/vekt/.env
chmod 600 /opt/vekt/.env
# after the first successful login: no seed password left on disk
sed -i 's/^SEED_ON_START=.*/SEED_ON_START="false"/; s/^SEED_ADMIN_PASSWORD=.*/SEED_ADMIN_PASSWORD=/' /opt/vekt/.env
Keep SEED_ON_START off after the first boot. In the current release image (v1.2.0, September 2026), starting with SEED_ON_START=true sets the seeded admin’s password back to SEED_ADMIN_PASSWORD on every start; the code on main stopped doing that on 3 November 2026. Either way, a password sitting in .env is one more copy to protect.
Rotating AUTH_SECRET is your emergency lever, with a cost. It signs everyone out, and it breaks the status and unsubscribe links in emails already sent (see the backup section). Use it when you suspect a session or the secret itself has leaked, not as a routine.
Accounts and roles
Vekt has two roles, set when an admin creates the account in the Admin Dashboard:
| Can… | Recruiter | Admin |
|---|---|---|
| Create job listings; edit and delete them | Their own | All |
| See candidates and CVs | Only for jobs they created | All |
| Record accept and reject decisions | For their own jobs | All |
| Create and delete user accounts | No | Yes (not their own account) |
| Change retention, email delay and email templates | No | Yes |
A few practical consequences, all from the current code:
- One person, one account. Shared logins make it impossible to tell who looked at a candidate. New passwords must be at least 8 characters and are stored as bcrypt hashes; pick longer ones, and use a password manager.
- There is no password-change screen yet. To give a recruiter a new password, an admin deletes the account and creates it again. Deleting a user leaves their job listings in place with no owner (the schema uses
onDelete: SetNull), so after that only admins see those jobs’ candidates. - Deleting an account stops new logins, not open sessions. Vekt uses JWT sessions (
lib/auth.ts) and doesn’t set a lifetime, so Auth.js’s default applies: 30 days after last use (Auth.js source,session.maxAge). If someone leaves on bad terms, delete the account and rotateAUTH_SECRET. - Keep the admin count small. An admin sees every candidate across every job.
How CV files are stored and served
This is the part of an ATS that holds the most sensitive documents, so here is exactly what the code does (app/api/candidates/route.ts and app/api/uploads/[filename]/route.ts):
- Upload. The application form only accepts a file declared as
application/pdf, up to 5 MB, after the candidate has given consent. The file is saved under a random UUID name (for example3f2a…c9.pdf) inprivate/uploads, which is not a public web folder. - Storage. In Docker, that folder is the
uploadsvolume. The container runs as a non-root user (nextjs, in theDockerfile). - Serving. A CV can only be fetched through
GET /api/uploads/<file>, which requires a logged-in session. The filename must match the UUID pattern (which blocks path tricks), and a recruiter only gets files belonging to candidates of jobs they created; anything else returns “Not found”. Responses carryCache-Control: no-storeandX-Content-Type-Options: nosniff. - Deletion. The daily purge removes the file along with the candidate record once the retention period has passed.
To report a weakness in any of this, SECURITY.md asks you not to open a public issue and to use GitHub’s private vulnerability reporting instead: on the repository page, open the security tab and choose Report a vulnerability (GitHub docs).
The monthly checklist
Put this in your calendar for the first working day of each month. It takes about half an hour once it is routine.
| # | Check | How |
|---|---|---|
| 1 | Backups ran every night | ls -lt /opt/vekt/backups | head and the backup log |
| 2 | A restore works | Restore last month’s archive into a test install, log in, open a CV |
| 3 | Off-site copies are encrypted and current | Check the backup host for this month’s .gpg files |
| 4 | Vekt is on the latest release | Compare docker compose images with the releases page |
| 5 | No open advisory affects you | Read the repository’s security tab and recent release notes |
| 6 | Host is patched | Your distribution’s updates, then a reboot if the kernel changed |
| 7 | Only 80 and 443 are reachable | From another machine: curl -m 5 http://<server-ip>:3000 fails |
| 8 | Accounts match the team | Admin Dashboard: delete anyone who has left; count the admins |
| 9 | .env is still locked down |
stat -c '%a %U' /opt/vekt/.env shows 600 root; no seed password |
| 10 | Retention still matches your policy | Admin Dashboard retention setting, and backup rotation to match |
| 11 | The purge ran | docker compose logs app around 02:00 UTC; no candidates older than the period |
| 12 | Certificate renews | Caddy renews automatically; check the expiry date in the browser anyway |
Where candidate data goes
With AI_PROVIDER=mock or ollama, CV scoring runs on hardware you control, so candidate data stays on your servers. With openai or openrouter, the CV text is sent to that provider after Vekt removes names, contact details and other direct identifiers. Candidate emails, whatever the provider, go through Resend. Hosting it yourself gives you control over the machine; the privacy notice, the lawful basis and answering candidate requests remain your organisation’s job.
More about the platform is on the Vekt home page, and the code and MIT licence are on our open-source page.
FAQ
Is a self-hosted ATS more secure than a hosted one?
Not automatically. Self-hosting moves the work to you: patching, backups, access and monitoring. It can be the better choice when you want control over where candidate data lives and have someone to run the routine above every month. If nobody will, a reputable hosted ATS may be the safer option.
How do I back up a self-hosted ATS?
For Vekt, archive both Docker volumes (db-data and uploads) with the app stopped for a few seconds, keep a separate encrypted copy of .env, and store everything off the server. Restore a backup into a test install at least once to prove it works.
How do I remove a recruiter’s access straight away?
Delete their account in the Admin Dashboard to stop new logins. Because sessions are signed tokens that stay valid until they expire, also rotate AUTH_SECRET if access must end immediately; note that this signs everyone out and breaks status links in emails already sent.
Can recruiters see every candidate in Vekt?
No. Recruiters see candidates and CVs only for job listings they created. Admins see all of them, so keep the number of admin accounts small.
Where do I report a security problem in Vekt?
Privately, through GitHub’s “Report a vulnerability” on the repository’s security tab, as described in SECURITY.md. Please don’t open a public issue for it.