Skip to main content

Running a ReadyRoam server

These steps run a ReadyRoam server with Docker on a machine on your network (a home server, a NAS, a Raspberry Pi), for use with the app. Start locally, then add HTTPS with Tailscale or your own domain before connecting a distributed app build. The server comes as a ready-made image, ghcr.io/aengeln/readyroam, for both Intel/AMD and ARM machines. Nothing needs building.

It covers the basics (steps 1–7), single sign-on with Authentik, Microsoft or Google (step 8), and moving over from a server you built yourself (Switching).

Already running a server you built yourself? See Switching from a self-built server.

Single sign-on needs server version 1.3 or newer (latest has it). The developer image, READYROAM_VERSION=dev, is an untested build of what comes next: keep a backup and don't use it for data you depend on.

What you need​

  • Docker with the Compose plugin (docker compose version prints a version).
  • A free TCP port. The steps use 8080; pick another one if 8080 is taken (check with ss -ltn | grep :8080).
  • The machine's LAN IP address (e.g. 192.168.1.50, from hostname -I).
  • For single sign-on only: an https address for the server (step 7), and an account with the provider you want to use.

1. Check that Docker can get the image​

The image is public, so no account or token is needed:

docker pull ghcr.io/aengeln/readyroam:latest

It should download (or say it is up to date). If it fails, check that the machine is online and that Docker is running.

2. Create a folder with the compose file​

mkdir -p ~/readyroam/config && cd ~/readyroam

The config folder is for the single sign-on files (step 8). It can stay empty. The example below is adapted from the server configuration, with local-only networking by default. Save this as docker-compose.yml:

# ReadyRoam server with its own Postgres. Settings come from .env.
services:
server:
image: ghcr.io/aengeln/readyroam:${READYROAM_VERSION:-latest}
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
DATABASE_URL: postgresql://readyroam:${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}@db:5432/readyroam?sslmode=disable
TOKEN_SECRET: ${TOKEN_SECRET:?set TOKEN_SECRET in .env}
PUBLIC_URL: ${PUBLIC_URL:-}
SERVER_NAME: ${SERVER_NAME:-Roam Home}
DIRECTORY: ${DIRECTORY:-false}
DIRECTORY_LIMIT: ${DIRECTORY_LIMIT:-100}
DIRECT_ADD: ${DIRECT_ADD:-false}
REGISTRATION: ${REGISTRATION:-closed}
ACCOUNT_DELETION: ${ACCOUNT_DELETION:-true}
TRUST_PROXY: ${TRUST_PROXY:-false}
SHARING_PAID: ${SHARING_PAID:-false}
ADMIN_WEB: ${ADMIN_WEB:-false}
# Optional: single sign-on. One provider with the SSO_* settings, or
# several in config/sso.yaml with SSO_CONFIG.
PASSWORD_LOGIN: ${PASSWORD_LOGIN:-true}
SSO_CONFIG: ${SSO_CONFIG:-}
SSO_ID: ${SSO_ID:-}
SSO_NAME: ${SSO_NAME:-}
SSO_ISSUER: ${SSO_ISSUER:-}
SSO_CLIENT_ID: ${SSO_CLIENT_ID:-}
SSO_CLIENT_SECRET: ${SSO_CLIENT_SECRET:-}
SSO_CLIENT_SECRET_FILE: ${SSO_CLIENT_SECRET_FILE:-}
SSO_SCOPES: ${SSO_SCOPES:-}
SSO_SIGNUP: ${SSO_SIGNUP:-}
SSO_TRUST_EMAIL: ${SSO_TRUST_EMAIL:-}
SSO_ALLOWED_DOMAINS: ${SSO_ALLOWED_DOMAINS:-}
SSO_SUBJECT_CLAIM: ${SSO_SUBJECT_CLAIM:-}
SSO_TYPE: ${SSO_TYPE:-}
SSO_TENANT: ${SSO_TENANT:-}
SSO_ALLOW_GUESTS: ${SSO_ALLOW_GUESTS:-}
# Optional: email for "Forgot password?" (needs PUBLIC_URL too).
SMTP_HOST: ${SMTP_HOST:-}
SMTP_PORT: ${SMTP_PORT:-}
SMTP_SECURITY: ${SMTP_SECURITY:-}
SMTP_USERNAME: ${SMTP_USERNAME:-}
SMTP_PASSWORD: ${SMTP_PASSWORD:-}
SMTP_FROM: ${SMTP_FROM:-}
volumes:
# Files the server reads: sso.yaml and secrets for it. They must be
# readable by server UID/GID 65534; do not make secrets world-readable.
- ./config:/config:ro
ports:
- "127.0.0.1:${PORT:-8080}:8080" # port on this machine : port in the container

db:
image: postgres:17
restart: unless-stopped
environment:
POSTGRES_USER: readyroam
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}
POSTGRES_DB: readyroam
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U readyroam -d readyroam"]
interval: 5s
timeout: 5s
retries: 10
# No ports: Postgres is only reachable by the server container.

volumes:
db-data: # all ReadyRoam data lives here; it survives updates

3. Configure it​

Create .env next to docker-compose.yml. Replace 192.168.1.50 with the machine's LAN IP address, and 8080 with your port if you chose another one:

umask 077
cat > .env <<EOF
POSTGRES_PASSWORD=$(openssl rand -hex 24)
TOKEN_SECRET=$(openssl rand -base64 48 | tr -d '\n')
PUBLIC_URL=http://192.168.1.50:8080
SERVER_NAME=Home
REGISTRATION=closed
PORT=8080
READYROAM_VERSION=latest
EOF
chmod 600 .env

Registration is closed by default. Create accounts with the admin tool in step 5. Only set REGISTRATION=open if you intentionally want anyone who can reach the server to register.

Create .env only for a new installation; do not overwrite an existing file and regenerate its database password or signing secret.

SettingMeaning
POSTGRES_PASSWORDPassword of the bundled Postgres. Set it once: Postgres keeps the first one in its data volume.
TOKEN_SECRETSigns sign-in tokens; at least 32 characters. Changing it signs every device out.
PUBLIC_URLThe address phones reach the server at. Invite links, password reset links and single sign-on are built from it.
SERVER_NAMEThe name the app shows for this server. Default Roam Home.
REGISTRATIONclosed (default): you create accounts with the admin tool. open: anyone who can reach the server can make an account in the app.
ACCOUNT_DELETIONtrue (default): people can delete their own account in the app.
TRUST_PROXYtrue behind a reverse proxy (step 7), so sign-in limits count each visitor, not the proxy. Leave false without one.
DIRECTORY, DIRECTORY_LIMIT, DIRECT_ADDSee Finding each other.
PORTThe port on this machine.
READYROAM_VERSIONlatest, a major version such as 1 (new features, nothing that breaks), a minor version such as 1.3 (fixes only), an exact one like 1.3.0, or dev (untested developer build).
PASSWORD_LOGIN, SSO_*Single sign-on; see step 8.
SMTP_*Optional, for "Forgot password?" emails: SMTP_HOST, SMTP_PORT, SMTP_SECURITY (starttls, tls or none), SMTP_USERNAME, SMTP_PASSWORD, SMTP_FROM (e.g. ReadyRoam <roam@example.com>). Needs PUBLIC_URL. Without them, reset passwords with the admin commands below.

Keep .env private: anyone with TOKEN_SECRET can sign in as any user.

4. Start it​

docker compose up -d

The first start downloads the images. Then check it:

docker compose ps # both services "running"; db "healthy"
docker compose logs server --tail 20 # "ReadyRoam server 1.x.y listening on port 8080"
curl -s http://localhost:8080/healthz # {"status":"ok"}

The example binds port 8080 to localhost. Leave it this way when using Tailscale on the host or Caddy in the Compose network. Do not expose port 8080 publicly.

For LAN-only debug testing, explicitly bind to your machine’s LAN address instead, for example "192.168.1.50:${PORT:-8080}:8080", and limit access to trusted devices. Published Docker ports may bypass UFW rules; binding to the correct address is important.

curl -s http://localhost:8080/api/v1/info lists what the server offers. A server with single sign-on set up lists sso among its features.

5. Connect the app​

In the app: More → Server & sync, enter the address (http://192.168.1.50:8080) and create an account (with REGISTRATION=open), or sign in with one you made with the admin tool:

docker compose exec server /app/bin/server admin create-user ford@megadodo.example --name "Ford Prefect"

It prints a random password (or give one after the email address).

Plain http works only in debug builds (run from a computer with flutter run, or in a simulator or emulator), and only for LAN addresses (192.168.x.x, 10.x.x.x, 172.16–31.x.x). Builds from TestFlight or Google Play need https: see step 7. Single sign-on needs https too.

6. Day-to-day​

On server 1.10.0 or later, you can also enable the web admin interface to manage accounts in your browser.

Run these in the folder with docker-compose.yml:

# Back up before upgrading; database migrations may require a backup to undo
# See the backup command below, then update:
docker compose pull && docker compose up -d

# Logs
docker compose logs -f server

# Stop / start (data is kept)
docker compose stop
docker compose start

# Accounts
docker compose exec server /app/bin/server admin users
docker compose exec server /app/bin/server admin create-user ford@megadodo.example --name "Ford Prefect"
docker compose exec server /app/bin/server admin set-name ford@megadodo.example "Ford"
docker compose exec server /app/bin/server admin reset-password ford@megadodo.example
docker compose exec server /app/bin/server admin sign-out ford@megadodo.example
docker compose exec server /app/bin/server admin disable ford@megadodo.example
docker compose exec server /app/bin/server admin enable ford@megadodo.example

# Back up the database
docker compose exec -T db pg_dump -U readyroam readyroam | gzip > readyroam-$(date +%F).sql.gz


Resetting a password signs the account out everywhere. The person's encrypted personal backup stays locked by their own recovery key, which you can't reset.

7. Optional: https for TestFlight builds and phones away from home​

Pick one:

  • Tailscale (simplest; nothing exposed to the internet). Install Tailscale on the server and the phones, then run sudo tailscale serve --bg --https=443 http://localhost:8080. The server gets an address like https://homeserver.tailnet-name.ts.net. No domain, public IP or open ports needed, and Tailscale Funnel can make it public for people without Tailscale. See Running ReadyRoam with Tailscale.

  • Caddy with your own domain (reachable from anywhere). Point a DNS name at your home IP and forward ports 80 and 443 to the server. Then add a Caddy service to the compose file (running it on AWS or Google Cloud instead of at home? See the cloud guide):

    caddy:
    image: caddy:2
    restart: unless-stopped
    ports:
    - "80:80"
    - "443:443"
    volumes:
    - caddy-data:/data
    command: caddy reverse-proxy --from roam.megadodo.example --to server:8080

    Add caddy-data: under volumes:. Caddy fetches the certificate itself.

Either way, set PUBLIC_URL in .env to the https address and, with a proxy in front, TRUST_PROXY=true, then run docker compose up -d again so links use the address.

8. Single sign-on​

People can sign in with an account they already have: Authentik, Microsoft (Office 365) or Google, or any other OpenID Connect provider. The server does the sign-in itself, so the app needs no setup of its own beyond a version that has the "sign in with another service" button. Passwords keep working beside it, unless you turn them off.

It needs PUBLIC_URL set, and a server version with single sign-on (see the note at the top). Microsoft and Google also need https.

8.1 Register ReadyRoam with the provider​

Create an application (Authentik), an app registration (Microsoft Entra ID) or an OAuth client (Google), and give it this redirect address, with your own address and sso as the provider's id:

https://roam.megadodo.example/auth/sso/sso/callback

Copy the client id and the client secret it gives you.

In Authentik also check, in the provider:

  • Grant Types: tick "Authorization Code." Recent versions (2026.5 at least) start with none ticked and then refuse every sign-in with invalid_request: The request is otherwise malformed.
  • Signing Key: pick the self-signed certificate. Without a key, Authentik signs with a shared secret (HS256), which ReadyRoam refuses.
  • Redirect URIs: one strict entry with exactly the address above.
  • Scopes: openid, email and profile.

8.2 Add it to .env​

SSO_NAME=Authentik # the button's label
SSO_ISSUER=https://auth.megadodo.example/application/o/readyroam/
SSO_CLIENT_ID=readyroam
SSO_CLIENT_SECRET=...
SSO_SIGNUP=false # true lets a first sign-in create an account

The issuer for Microsoft is https://login.microsoftonline.com/<tenant id>/v2.0, but use the Entra settings below. For Google it is https://accounts.google.com.

SettingDefault
SSO_IDssoShort name in the callback address.
SSO_SIGNUPfalseMay a first sign-in create an account? Separate from REGISTRATION, which is about passwords.
SSO_TRUST_EMAILtrueMatch a sign-in to the existing account with the same email.
SSO_ALLOWED_DOMAINSanyOnly these email domains (comma-separated) may get a new account.
SSO_CLIENT_SECRET_FILERead the secret from a file, e.g. /config/authentik.secret.
SSO_SCOPES, SSO_SUBJECT_CLAIMopenid email profile, subRarely needed.
PASSWORD_LOGINtruefalse makes single sign-on the only way in: no passwords, no sign-ups in the app, no password reset. Needs a provider.

8.3 Check it​

docker compose up -d
docker compose exec server /app/bin/server sso check

It reads the provider's settings, prints the redirect address to register and sends the provider a test sign-in request (nobody is signed in). A provider that refuses it, for example because no grant type is ticked, shows up here and not at the first sign-in.

8.4 How people are matched​

  • People who already have an account are matched on their email address the first time they sign in with the provider, so you can turn single sign-on on for a server that already has users. After that they're matched on their id at the provider, so a changed email doesn't matter. Set SSO_TRUST_EMAIL=false for a provider whose email addresses you don't trust.
  • Everyone else gets an account on their first sign-in only if SSO_SIGNUP=true. SSO_ALLOWED_DOMAINS limits new accounts to those email domains. A new account needs an email: the email claim, or a preferred_username that looks like one.
  • Someone who leaves can't sign in again, but stays signed in on the devices they already use until you disable them: admin disable signs them out at once.

8.5 Microsoft Entra ID (Office 365)​

One app registration, and one provider, for each tenant. Everyone in that tenant may sign in, so there is no domain list to keep up.

  1. In the Entra admin center, App registrations → New registration. Choose Accounts in this organizational directory only (single tenant) and add a Web redirect URI: the address from 8.1, with the provider's id in it.
  2. Copy the Application (client) ID and the Directory (tenant) ID. Under Certificates & secrets make a client secret and copy its Value.
  3. Under Token configuration → Add optional claim → ID, add email, upn and acct. They let the server match people to the accounts they already have, and tell guests from members.
  4. Under Enterprise applications → ReadyRoam → Properties, set Assignment required to Yes, and assign who may use it. This is the control that decides who can sign in.
  5. In .env: SSO_TYPE=entra, SSO_TENANT=<tenant id>, SSO_NAME=..., SSO_CLIENT_ID=..., SSO_CLIENT_SECRET=... (no SSO_ISSUER). Then run sso check.

Guests invited into the tenant are refused unless SSO_ALLOW_GUESTS=true.

8.6 Several providers​

Put them in config/sso.yaml (the compose file already mounts ./config at /config; grant file access to server UID/GID 65534, without making secrets world-readable) and set SSO_CONFIG=/config/sso.yaml in .env. Leave all other SSO_* settings empty when using this file; even SSO_SIGNUP=false conflicts with file-based configuration:

providers:
- id: authentik
name: Authentik
issuer: https://auth.megadodo.example/application/o/readyroam/
client_id: readyroam
client_secret_file: /config/authentik.secret
- id: megadodo
name: Megadodo Publications
type: entra
tenant: 11111111-2222-3333-4444-555555555555
client_id: <application id>
client_secret_file: /config/megadodo.secret
signup: true

Each provider has its own callback address, with its id: https://roam.megadodo.example/auth/sso/megadodo/callback. Two tenants are two providers and two app registrations. Lower-case letters, digits and dashes in an id.

8.7 Signing in from the app​

The app asks the server which providers it has (GET /api/v1/auth/providers), shows a button for each, and opens the provider's page in the system browser. The browser comes back to the app (readyroam://auth), which trades a one-minute code for a session. So the phone needs a build with the "sign in with another service" button; an older one only shows email and password.

Finding each other​

By default people share a trip by sending an invite link. On a server for a family or a company two settings in .env make it easier:

DIRECTORY=true # everyone with an account can see everyone else's name and email
DIRECT_ADD=true # a trip's owner can add anyone in the directory, with no invite

The directory shows in the app's People tab. Up to DIRECTORY_LIMIT accounts (100) it lists everyone; above that people search. Nobody can opt out of it, so only turn it on where that is what you want. DIRECT_ADD needs DIRECTORY=true; the person gets an email if the server can send any, and can leave the trip whenever they like. Names come from each person's own profile, or from you: admin set-name.

Switching from a self-built server​

If you set the server up earlier by cloning the repository and building the image, you can switch to the published image and keep all data: accounts, trips and backups.

The data is in a Docker volume named after the folder the compose file is in (e.g. readyroam-server_db-data for a folder called readyroam-server). So the one rule is: switch in the same folder, with the same .env. A compose file in a different folder would start with a new, empty database (the old one would still be there, just not used).

cd ~/readyroam/readyroam-server # the folder you've been using

# 1. Back up first, just in case
docker compose exec -T db pg_dump -U readyroam readyroam | gzip > ~/readyroam-before-switch.sql.gz

# 2. Get the compose file that uses the published image
git pull
mkdir -p config # the new compose file mounts it

# 3. Switch
docker compose pull
docker compose up -d

# 4. Check: same accounts as before
docker compose exec server /app/bin/server admin users

When the server starts, it upgrades the database to its version on its own and keeps everything in it. Upgrades only go forward: don't go back to an older image after a newer one has upgraded the database, and that includes going from dev back to a release. Restore the backup instead if you ever need to.

Troubleshooting​

SymptomLikely cause
The image can't be pulledNo internet from the server, Docker isn't running, or the name or version in READYROAM_VERSION is mistyped (check with step 1).
set TOKEN_SECRET in .env.env is missing or not next to the compose file.
Server keeps restarting, logs mention the database passwordPOSTGRES_PASSWORD was changed after the first start. Put the old one back.
After switching, the app's account is goneThe compose file ran from a different folder, so it uses a new volume. Go back to the old folder; the data is still there.
Port already allocatedAnother service uses the port; change PORT in .env.
App says it can't reach the serverWrong address, firewall, or a TestFlight build using http. Check /healthz in a browser.
App says the server is incompatibleThe app is older or newer than the server; update both.
"This server doesn't take sign-ups in the app"REGISTRATION=closed: make the account with admin create-user, or set REGISTRATION=open.
"Too many attempts"Wait five minutes. If it happens to everyone at once, the server is behind a proxy without TRUST_PROXY=true, so it sees everyone as one visitor.
No sign-in button for the providerThe server is older than 1.3, which has no single sign-on (update it), the SSO_* settings are empty, or /api/v1/info doesn't list sso. Check docker compose logs server.
sso check says the redirect address is wrongRegister exactly the address it prints, with https for Microsoft and Google, and PUBLIC_URL set.
Authentik: invalid_request: The request is otherwise malformedNo grant type ticked in the provider. Tick "Authorization Code".
Authentik sign-in fails after the provider's pageThe provider has no signing key, so Authentik signs with a shared secret (HS256), which ReadyRoam refuses. Pick the self-signed certificate under Signing Key.
The sign-in ends back in the app with sso_signup_closedThe person has no account yet and SSO_SIGNUP=false, or their email domain isn't in SSO_ALLOWED_DOMAINS.
The sso.yaml or a secret file isn't readGrant server UID/GID 65534 read access to the files and traversal access to the directory. Avoid world-readable secret files.
Locked out after PASSWORD_LOGIN=falseSet it back to true and run docker compose up -d; admin commands still work meanwhile.

Further guides​