Skip to content

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.

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.

  1. Make a folder and go into it, for example mkdir adiutor && cd adiutor.

  2. Run the install script, and press Enter at both questions: to keep http://localhost:3000 as Adiutor’s address, and PostgreSQL in Docker.

    Terminal window
    curl -fsSL https://raw.githubusercontent.com/bastolen/adiutor/production/install.sh | sh

    It writes compose.yaml and .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.

  3. Create the tables: docker compose run --rm app pnpm db:migrate.

  4. Start everything: docker compose up -d.

  5. Open http://localhost:3000. It sends you to /setup: create the first staff Admin as First run describes.

  6. 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.

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:

Terminal window
curl -fsSLO https://raw.githubusercontent.com/bastolen/adiutor/production/install.sh
less install.sh
sh install.sh

What 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.yaml or .env yet. A new .env would 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 adiutor would share the first one’s database. Give the folder another name. With COMPOSE_PROJECT_NAME set, the script checks that name instead and writes it into .env.
  • Asks for Adiutor’s address. It takes an https:// address, and http:// only on this computer: localhost, 127.0.0.1 or a name ending in .localhost, with a port. For an http:// address, the app is published on that port. To answer ahead, set ADIUTOR_URL, for example curl -fsSL … | ADIUTOR_URL=https://adiutor.dev sh. With no terminal to ask on, it takes http://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 %2F for /, %40 for @ and %23 for #. The Compose file then has no db service. See A database on the host for a PostgreSQL on the same computer, which the script won’t take as localhost.
    • ADIUTOR_DATABASE_URL answers 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_SECRET and NEXT_SERVER_ACTIONS_ENCRYPTION_KEY, made from your computer’s random numbers;
    • POSTGRES_PASSWORD, made the same way, for PostgreSQL in Docker, or DATABASE_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_URL and EMAIL_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:

compose.yaml
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:

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.

To stop Adiutor and keep what you made, run docker compose down. To remove it completely, run this in the same folder:

Terminal window
docker compose down -v

The -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).

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.

  • The app’s port is published on 127.0.0.1 only, 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 down and a restart of your computer.
  • The jobs service in the file runs the background jobs. Without it, emails queued by the app wouldn’t be sent and nothing scheduled would run.

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).