Self-hosting Votion
This page walks through running Votion on your own server with Docker, pulling the ready-built image instead of cloning and building the project yourself. No development setup, no just, no Node on your machine — just Docker.
Before this works: the image below is pulled from this project's container registry on GitLab, which is not public yet. This guide is written for the day it is — anonymous
docker pull, no login step — so it's ready to go the moment that happens. Until then, following the steps below will fail at thedocker pull/docker loginstep with an authentication error. If you want to run Votion today, ask the project for registry access, or see the developer deployment guide, which works against the registry as it exists right now.
What you need
- A server (or your own machine) with Docker and Docker Compose v2 installed.
- A bit of disk space for the database and any files you upload.
- Optionally, a domain name pointed at the server if you want it reachable from outside your network — this guide covers plain HTTP on a port; putting HTTPS in front of it is a separate step with whatever reverse proxy you already use (Caddy, Traefik, nginx, Cloudflare Tunnel...).
1. Pull the image
docker pull registry.gitlab.com/venturini.codes/votion:latestlatest always points at the newest published build. Once a change qualifies as a release (see Releases & versioning), a vX.Y.Z tag — and floating X.Y / X tags — are also published; pin to one of those instead if you want a specific, reproducible version rather than whatever main currently is.
2. Create a folder and a compose file
Make a folder for Votion's config and data, and save this as docker-compose.yml inside it:
services:
db:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- votion_db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 12
app:
image: registry.gitlab.com/venturini.codes/votion:latest
restart: unless-stopped
depends_on:
db:
condition: service_healthy
env_file:
- .env
environment:
HOST: "0.0.0.0"
PORT: "3000"
NODE_ENV: production
LOG_LEVEL: info
DB_HOST: db
DB_PORT: "5432"
ports:
- "${APP_PORT:-3000}:3000"
volumes:
- votion_uploads:/app/storage/uploads
- votion_avatars:/app/storage/avatars
# Installed plugin code (e.g. Daily Notes): without this volume
# any plugin you install is wiped the next time you upgrade.
- votion_plugins:/app/storage/plugins
volumes:
votion_db_data:
votion_uploads:
votion_avatars:
votion_plugins:This runs the database and the app; both your pages and any uploaded images are kept in the named volumes, so they survive restarts and upgrades.
This one app container serves the API, Votion and the Mail and Calendar apps. That all-in-one image is the one to use for a single-container install. The API, Votion, Mail and Calendar are also published as images of their own (…/votion/api, …/votion/web, …/votion/mail, …/votion/calendar); to run them as separate containers, see Separate containers.
3. Create your .env file
In the same folder, create a file named .env:
POSTGRES_DB=votion
POSTGRES_USER=votion
POSTGRES_PASSWORD=<pick a long random password>
APP_KEY=<generate this next>Generate APP_KEY with the image you just pulled:
docker run --rm registry.gitlab.com/venturini.codes/votion:latest node ace generate:key --showCopy its output into .env as the APP_KEY value. This key encrypts sessions and signed links — keep it the same across restarts, and keep .env private; never share it or commit it anywhere.
If you want Votion to create your first admin account automatically on first boot, add two more lines:
ADMIN_EMAIL=you@example.com
ADMIN_PASSWORD=<a real password>Optional: push notifications
Votion can send push notifications to browsers and the installed app (Settings › Notifications › Push notifications on this device). They need a VAPID key pair, generated once per instance:
docker run --rm registry.gitlab.com/venturini.codes/votion:latest npx web-push generate-vapid-keysCopy both keys into .env, plus a contact address the push services can reach:
VAPID_PUBLIC_KEY=<public key>
VAPID_PRIVATE_KEY=<private key>
VAPID_SUBJECT=mailto:you@example.comKeep the private key as private as APP_KEY. Without the two keys push stays off: the Inbox doesn't offer it and Settings shows "Push notifications aren't set up on this server"; everything still reaches the Inbox (and email, where people turned it on). Replacing the key pair later signs every device out of push — people turn it on again in Settings. Browsers only allow push on an https:// address (or localhost).
When a browser rotates a device's push subscription, its service worker renews it without a login. To stop anyone guessing devices there, Votion blocks a client IP for 15 minutes after 30 renewals that name an unknown device; real renewals never count. Votion reads the client IP from X-Forwarded-For when the request comes from a private network, so a reverse proxy on the same server or Docker network needs no extra setup. A proxy on a public address would make every visitor look like that proxy.
Optional: Gmail accounts in Mail
The Mail plugin connects any mailbox over IMAP/SMTP out of the box. To let people connect Gmail with a Google sign-in instead of an app password, create an OAuth client once per instance:
Open the Google Cloud console, create a project (or pick one) and enable the Gmail API under APIs & Services › Library.
Under APIs & Services › OAuth consent screen, set up the consent screen: user type External (or Internal for a Google Workspace organisation), your app name and support address, and add the scope
https://www.googleapis.com/auth/gmail.modify. While the app is in Testing, only the test users you list can connect; publish it (Google reviews apps that ask for Gmail scopes) to open it to everyone.Under APIs & Services › Credentials, choose Create credentials › OAuth client ID, type Web application, and add this Authorized redirect URI — your
WEB_ORIGINfollowed by/mail/oauth/google:texthttps://votion.example.com/mail/oauth/googleCopy the client ID and secret into
.envand restart Votion:shGOOGLE_CLIENT_ID=<client id>.apps.googleusercontent.com GOOGLE_CLIENT_SECRET=<client secret>
Without the two values, Add account › Gmail shows "Gmail isn't set up on this server" and IMAP/SMTP keeps working. Mail passwords and Google tokens are stored encrypted with APP_KEY, so keep that key stable: changing it disconnects every mail account.
Optional: Google Calendar in Calendar
The Calendar plugin connects CalDAV servers and Votion databases out of the box. Google Calendar uses the same OAuth client as Gmail (the GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET above), with three additions in the Google Cloud console:
Enable the Google Calendar API under APIs & Services › Library.
Add the scope
https://www.googleapis.com/auth/calendarto the consent screen.Add a second Authorized redirect URI to the OAuth client — your
WEB_ORIGINfollowed by/calendar/oauth/google:texthttps://votion.example.com/calendar/oauth/google
Without the two values, Add calendar account › Google Calendar shows "Not set up on this server" and the Calendar settings tell admins what is missing; CalDAV keeps working. Calendar passwords and Google tokens are stored encrypted with APP_KEY. Accounts sync in the background every few minutes; a failed sync shows Reconnect in Calendar.
Optional: Google contacts in Contacts
The Contacts plugin works without Google: workspace contacts, private contacts and CSV / vCard import and export need nothing. To let members sync their own Google contacts, use the same OAuth client as Gmail and Google Calendar (GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET) with three additions in the Google Cloud console:
Enable the People API under APIs & Services › Library.
Add the scope
https://www.googleapis.com/auth/contactsto the consent screen (read and write: "Edits in Votion › Write back to Google" writes a member's changes back to their own Google contacts).Add another Authorized redirect URI — your
WEB_ORIGINfollowed by/contacts/oauth/google:texthttps://votion.example.com/contacts/oauth/google
A member who already connected the same Google account for Mail or Calendar is asked to add contacts to that grant (Google's incremental authorization) instead of signing in a second time. Google contacts sync in the background every 15 minutes with a People API sync token and are matched only by their Google id, so a re-sync or re-connect never creates a contact twice. Tokens are stored encrypted with APP_KEY. Without the two values the Contacts settings show Google contacts · Not set up and the rest of Contacts keeps working.
Billing: PDFs and VAT ID checks
Invoice PDFs are rendered on the API server with the Chromium that ships in the image (Playwright); nothing to configure. The same page is the in-app preview, so preview and PDF always match.
VAT IDs are checked against the EU's VIES service (https://ec.europa.eu/taxation_customs/vies/rest-api/check-vat-number). Two optional variables:
BILLING_VIES_URL— another VIES endpoint (a proxy, or the VIES test service).BILLING_VIES_MODE=mock— no network: IDs that look valid count as valid. For development and demos only; tests use it automatically.
When VIES cannot be reached, the client keeps its last result and the check can be tried again; nothing is sent until an EU business client's VAT ID is valid.
Optional: the Mail and Calendar apps
Votion Mail and Votion Calendar are installable apps of their own that show the mail and calendars of every workspace in one place. Each is a separate build in the image, served by the same container as Votion, on two names next to your WEB_ORIGIN: with WEB_ORIGIN=https://votion.example.com they live at https://mail.votion.example.com and https://calendar.votion.example.com. There is nothing to configure in .env — Votion picks the app from the host name a request arrives on. To offer only one of them (or neither), set VOTION_APPS to mail, calendar or none; a switched-off app's host answers 404 and the other app stops linking to it. To run the apps as containers of their own (each app has its own image), see Separate containers.
- Point both names at your server (two DNS records, or one wildcard
*.votion.example.com). - In your reverse proxy, send both names to the same Votion container and port as the main one, and give them a certificate.
People sign in with their Votion account: the app sends them to Votion, which signs them in (two-factor included) and hands the app a session of its own. Signing out of an app ends only that app's session.
Both apps show a Terms of Service and a Privacy Policy at /terms and /privacy, linked under their sign-in. Without configuration they show a built-in text; to use your own, write each as a Markdown file (## headings and paragraphs) on the server and set:
| Variable | What it does |
|---|---|
LEGAL_TERMS_FILE | Path to the Terms of Service. "Last updated" is the file's modification date. |
LEGAL_PRIVACY_FILE | Path to the Privacy Policy, same rules. |
LEGAL_OPERATOR | Who runs the instance, e.g. your company. Default: the instance host. |
LEGAL_CONTACT_EMAIL | The privacy contact. Default: privacy@ your host. |
LEGAL_DATA_LOCATION | Where the servers are, e.g. Germany (EU). Left out when unset. |
Your own text can use {app}, {operator}, {mailHost}, {calendarHost}, {contact} and {location}; mount the files into the container so the paths exist there.
4. Set up the database
Run this once before starting the app for the first time (it creates all the database tables Votion needs):
docker compose run --rm app node ace migration:run --forceRun it again any time you pull a newer image — new versions sometimes add new tables or columns, and this command is what applies them.
Upgrading to UUID ids
The release that switches every id from a running number to a UUID rewrites your existing data in place, in one transaction. Before you run migration:run for it:
- Stop editing and wait about ten seconds, so the last edits in open tabs are saved.
- Stop the app (
docker compose stop app) and take a database backup (pg_dump). The migration cannot be rolled back; going back means restoring that backup and the previous image. - Pull the new image, run the migration, start the app.
What changes for your users:
- Everyone is signed out. Log in again in the browser and in the browser extension.
- API keys stop working. Create new ones in Settings → API Keys & AI, including the key your MCP client uses.
- Old links break. Bookmarked
/p/123or/db/45URLs show “not found”. Links inside your pages (mentions, page links, images, relations) are rewritten and keep working. - Plugins you wrote yourself that store core ids in
integercolumns need a migration touuidcolumns. The bundled plugins are converted automatically.
5. Start Votion
docker compose up -dGive it a few seconds, then open http://<your-server>:3000 (or http://localhost:3000 if you're running it on your own machine) in a browser. If you set ADMIN_EMAIL/ADMIN_PASSWORD above, log in with those; otherwise register a new account (registration is open by default until you set ALLOW_REGISTRATION=false in .env).
Troubleshooting
Port 3000 is already used by something else on this server. Change which host port maps to the app before starting it — add a line to .env:
APP_PORT=8080then docker compose up -d again. The app still listens on 3000 inside the container; only the left-hand number (the one you browse to) changes.
The container keeps restarting and logs mention a missing or invalid app key. APP_KEY is either missing from .env or wasn't copied in correctly. Generate it again (step 3), make sure the line in .env reads exactly APP_KEY=<the generated value> with no quotes or extra workspaces, and run docker compose up -d again.
The app container errors with a connection-refused or "database not ready" message right after startup. The app service waits for db's healthcheck, so this is rare, but it can happen on a very slow disk the first time Postgres initializes. Check docker compose logs db — once it logs "database system is ready to accept connections", run docker compose up -d again (or just wait; restart: unless-stopped retries automatically).
Migrations fail with a permissions or "relation already exists" error. This usually means migration:run was run against the wrong database, or run twice against a database that was only partially set up by something else. Check POSTGRES_DB/POSTGRES_USER in .env match what db actually created, and that nothing else is writing to the same votion_db_data volume.