Quick start
This page is for anyone who wants to see Adiutor running before deciding how to host it. It takes a few minutes, needs only Docker, and runs on your own computer. It covers what to start, what works without a mail server, and how to remove it again.
Before you start
Section titled “Before you start”You need Docker with Compose, running, and curl, on Linux, macOS or Windows with WSL: the install script runs in a POSIX shell, not in PowerShell. Nothing else: the image brings Adiutor, and Compose brings PostgreSQL 18.
Start Adiutor
Section titled “Start Adiutor”-
Make a folder and go into it, for example
mkdir adiutor && cd adiutor. -
Run the install script, and press Enter at both questions: to keep
http://localhost:3000as Adiutor’s address, and PostgreSQL in Docker.Terminal window curl -fsSL https://raw.githubusercontent.com/bastolen/adiutor/production/install.sh | shIt writes
compose.yamland.env, with a database password and secrets made on your computer, and never replaces a file that’s already there. What the install script does explains both files. -
Create the tables:
docker compose run --rm app pnpm db:migrate. -
Start everything:
docker compose up -d. -
Open
http://localhost:3000. It sends you to/setup: create the first staff Admin as First run describes. -
Add a passkey or an authenticator app when asked. The staff Admin role needs a second step, so the Security page asks before you do anything else.
http:// works here only because the address is localhost, this computer. On a real server, Adiutor refuses an http:// address in production.
What the install script does
Section titled “What the install script does”The script is short and can be read first: install.sh on GitHub, on the production branch, which follows Adiutor’s releases. That’s the file the line above runs, so it always installs the latest release. To read it before it runs, download it, read it, then run it:
curl -fsSLO https://raw.githubusercontent.com/bastolen/adiutor/production/install.shless install.shsh install.shWhat it does:
- Checks first, and writes nothing if a check fails.
- Docker and Docker Compose must be installed and running.
- The folder must be one only you (and your group) may write to, not one like
/tmp, where someone else could put a file where the script is about to write. - The release’s image must be on Docker Hub. For a few minutes after a release, while its image is still being published, the script asks you to try again shortly.
- The folder must not have a
compose.yamlor.envyet. A new.envwould lose what the old one holds: the password the database was made with, and the secret that encrypts what Adiutor keeps. - Docker must not have the folder’s Compose project yet. Compose names a project, and its containers and volumes, after the folder, so a second folder called
adiutorwould share the first one’s database. Give the folder another name. WithCOMPOSE_PROJECT_NAMEset, the script checks that name instead and writes it into.env.
- Asks for Adiutor’s address. It takes an
https://address, andhttp://only on this computer:localhost,127.0.0.1or a name ending in.localhost, with a port. For anhttp://address, the app is published on that port. To answer ahead, setADIUTOR_URL, for examplecurl -fsSL … | ADIUTOR_URL=https://adiutor.dev sh. With no terminal to ask on, it takeshttp://localhost:3000. - Asks which PostgreSQL to use.
- 1, the default, is one in Docker, as in the file below.
- 2 is your own PostgreSQL 18, by its address, such as
postgresql://adiutor:[email protected]:5432/adiutor, with the database already made. Write the password’s special characters percent-encoded, such as%2Ffor/,%40for@and%23for#. The Compose file then has nodbservice. See A database on the host for a PostgreSQL on the same computer, which the script won’t take aslocalhost. ADIUTOR_DATABASE_URLanswers with your own PostgreSQL’s address ahead. Typed on the command line, it ends up in your shell’s history, with its password; the question doesn’t.
- Writes
compose.yaml, the file below for PostgreSQL in Docker, with the release’s image. - Writes
.env, readable only by you, with a comment above each setting:BETTER_AUTH_SECRETandNEXT_SERVER_ACTIONS_ENCRYPTION_KEY, made from your computer’s random numbers;POSTGRES_PASSWORD, made the same way, for PostgreSQL in Docker, orDATABASE_URL, your own PostgreSQL’s address, in single quotes so Compose reads it as written;BETTER_AUTH_URL, the address;- for an
https://address,CLIENT_IP_HEADERS=x-real-ip, for a reverse proxy set up as Reverse proxy describes; SMTP_URLandEMAIL_FROM, commented out, for a mail server (see Email).
- Writes both or neither. Each file is written aside and then linked into place, which never replaces anything, not even a file that appears while the script asks its questions.
- Starts nothing. It ends with the two commands of steps 3 and 4.
This is the compose.yaml it writes for http://localhost:3000, the same file as on the Docker page, where each part is explained:
services: db: image: postgres:18-alpine restart: unless-stopped environment: POSTGRES_USER: adiutor POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_DB: adiutor # No published port: only the other services reach the database, over Compose's own network. volumes: - database:/var/lib/postgresql healthcheck: test: ['CMD-SHELL', 'pg_isready -U adiutor -d adiutor'] interval: 5s timeout: 5s retries: 10
app: image: bastolen/adiutor:0.5.0 restart: unless-stopped env_file: .env environment: &settings DATABASE_URL: postgresql://adiutor:${POSTGRES_PASSWORD}@db:5432/adiutor # Keeps attached files in the volume below. Leave both lines out to choose a storage in Settings. ATTACHMENTS_STORAGE: local ATTACHMENTS_DIR: /data/attachments ports: # Only on the loopback address: for a reverse proxy on the same computer, never the network. - '127.0.0.1:3000:3000' volumes: - attachments:/data/attachments depends_on: db: condition: service_healthy
jobs: image: bastolen/adiutor:0.5.0 restart: unless-stopped env_file: .env environment: *settings volumes: - attachments:/data/attachments # The background jobs' tick: a run, then 5 minutes' pause. command: ['sh', '-c', 'while true; do pnpm jobs:run; sleep 300; done'] # The image's health check asks the web server, which this container doesn't run. healthcheck: disable: true depends_on: db: condition: service_healthy
volumes: database: attachments:What works without a mail server
Section titled “What works without a mail server”Setting up works without one, and so does signing in with your password, and everything a staff Admin can do alone: settings, request types and internal requests.
Anything that sends an email fails until a mail server is set up: invitations, sign-in links, password resets, security notices and the emails about requests. You set one up on Settings › Integrations, or with SMTP_URL in .env.
In production Adiutor refuses a plain smtp:// address to another computer, and a mail catcher running as another Compose service counts as another computer. So for a real try of the emails, use a mail provider with TLS: see Email.
Remove it again
Section titled “Remove it again”To stop Adiutor and keep what you made, run docker compose down. To remove it completely, run this in the same folder:
docker compose down -vThe -v deletes the volumes: the database and the attached files. What’s left is the two files the script wrote and the images Docker downloaded, which docker image rm removes (docker image ls lists them).
Example
Section titled “Example”In the first-run form, a staff called “Adiutor” with Alex Admin ([email protected]) as the first staff Admin is a good start. Then add a company such as “Adiutor Alpha” and raise a request in it.
Good to know
Section titled “Good to know”- The app’s port is published on
127.0.0.1only, and the database’s not at all, so nobody else on your network can reach them. - Data lives in Docker volumes, so it survives
docker compose downand a restart of your computer. - The
jobsservice in the file runs the background jobs. Without it, emails queued by the app wouldn’t be sent and nothing scheduled would run.
Related
Section titled “Related”Adiutor's code is released under the MIT License. The Adiutor name and logo aren’t covered by it; see the notice.
Set in Inter and JetBrains Mono, under the SIL Open Font License (Inter, JetBrains Mono).