To self-host Authorizer on a managed VPS is to keep the accounts, passwords and sessions of your users on a server of your own, which our teams keep up to date and monitor day and night. Authorizer is a free, open source authentication and authorization server under the Apache-2.0 license, with OAuth 2.0 and OpenID Connect, social logins, passkeys and multi-factor authentication. This guide follows its official Docker image at version 2.4.10, and we ran every command on a Simafri VPS before writing it: installation with Docker Compose, PostgreSQL and Redis, HTTPS, the admin API, a first user, backups and updates.
By Simon Vasconcelos Lee
Published on 30 November 202612 minute read
quay.io/authorizer/authorizer, PostgreSQL 18 for the data and Redis 8 for the sessions, with port 8110 published on 127.0.0.1 behind an HTTPS reverse proxy..env file that holds the six secrets.--url to your public address, list it in --allowed-origins with your apps, and give the reverse proxy to --trusted-proxies.pg_dump, restore into an emptied database with pg_restore --exit-on-error, and update by changing the image tag: the schema migrates at startup.Authorizer is an authentication and authorization server written in Go. Your applications send their users to it to sign up and sign in, and receive tokens they can trust; the user data stays in your own database.
/app, an admin dashboard at /dashboard, webhooks, email templates, audit logs, rate limiting and Prometheus metrics.Authorizer is published under the Apache License 2.0. You can use it free of charge, for your company, your products or your clients, copy it, modify it and distribute it, including in closed products, as long as you keep the license and its notices and say which files you changed. The license also grants a patent license from the contributors. The software is provided without warranty.
The documentation sets no minimum size, and Authorizer is very light. Here is what we measured on our test VPS, with two vCPU and 4 GB of memory, after the installation and a first user:
Server size therefore depends on the number of sign-ins and on the other applications you run beside Authorizer. On a managed VPS, tell us about your usage and we will recommend the right size.
The official image, quay.io/authorizer/authorizer, contains the server, the login page and the dashboard, and serves them on port 8080. Version 2 is configured with command-line flags only: the server does not read a .env file or environment variables. Docker Compose does, though, so the flags go in the command of the service and the secrets in a .env file that Compose substitutes. On a server with Docker Engine and its Compose plugin, installed from Docker’s repository for Ubuntu, create a folder such as /opt/authorizer and put this compose.yaml in it, based on the PostgreSQL and Redis example of the Docker page:
services:
postgres:
image: postgres:18-alpine
restart: unless-stopped
environment:
POSTGRES_DB: authorizer
POSTGRES_USER: authorizer
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}
volumes:
- postgres_data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U authorizer -d authorizer"]
interval: 10s
timeout: 5s
retries: 10
redis:
image: redis:8-alpine
restart: unless-stopped
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 10
authorizer:
image: quay.io/authorizer/authorizer:2.4.10
restart: unless-stopped
ports:
- "127.0.0.1:8110:8080"
command:
- --env=production
- --url=https://authorizer.example.com
- --allowed-origins=https://authorizer.example.com,https://app.example.com
- --trusted-proxies=172.30.110.1
- --database-type=postgres
- --database-url=postgres://authorizer:${POSTGRES_PASSWORD}@postgres:5432/authorizer?sslmode=disable
- --redis-url=redis://redis:6379
- --client-id=${CLIENT_ID:?set CLIENT_ID in .env}
- --client-secret=${CLIENT_SECRET:?set CLIENT_SECRET in .env}
- --admin-secret=${ADMIN_SECRET:?set ADMIN_SECRET in .env}
- --disable-admin-header-auth=true
- --jwt-type=HS256
- --jwt-secret=${JWT_SECRET:?set JWT_SECRET in .env}
- --encryption-key=${ENCRYPTION_KEY:?set ENCRYPTION_KEY in .env}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
default:
ipam:
config:
- subnet: 172.30.110.0/24
gateway: 172.30.110.1
volumes:
postgres_data:
redis_data:
The six secrets go in the .env file next to it. Create it readable by root only, then start the stack:
umask 077
printf 'POSTGRES_PASSWORD=%s\nCLIENT_ID=%s\nCLIENT_SECRET=%s\nADMIN_SECRET=%s\nJWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 24)" "$(openssl rand -hex 16)" "$(openssl rand -hex 32)" "$(openssl rand -hex 24)" "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
umask 022
docker compose up -d
docker compose ps
--url is required since 2.4.0: it is the public address of the server, with https://. Authorizer builds the links of its emails, the iss claim of its tokens and its OpenID Connect discovery from it, and ignores the Host header for that purpose.--allowed-origins lists the origins that may call the server. Every state-changing request must carry an Origin header from this list, so put the address of Authorizer itself, for its dashboard and login page, and the address of each app that uses it. Without the flag, every origin is allowed and the server logs a warning.--trusted-proxies names the reverse proxy whose X-Forwarded-For header is trusted. Caddy, on the same server, reaches the container through the gateway of the Compose network, which the networks block pins to 172.30.110.1. Without it, rate limiting, the admin lockout and the audit logs see every request as coming from the proxy. If this range is already used on your server, pick another private one and change both lines.admin, secret and test. ADMIN_SECRET opens the dashboard and the admin API; JWT_SECRET signs the tokens, in HS256; ENCRYPTION_KEY encrypts the authenticator secrets of your users at rest. Keep the last two stable: changing them signs everyone out, and the encryption key locks out every user with an authenticator app until they enroll again.CLIENT_ID and CLIENT_SECRET identify the default client of the instance: your apps send this client ID with their requests.--disable-admin-header-auth=true, recommended for production by the security page: the admin secret is then accepted only to open an admin session, never as a header on each request.--redis-url, they live in the memory of the container and are lost on every restart.127.0.0.1: the examples publish port 8080 on every address of the server. Published locally, Authorizer is reachable only through the reverse proxy; gRPC (9091) and metrics (8081) stay inside Docker.latest. A full version, here 2.4.10, lets you choose when each update happens.docker inspect, by whoever can run Docker on the server, that is, root.On its first start, Authorizer creates its tables in PostgreSQL, those of the embedded OpenFGA engine included. The image has its own health check, which turned the container “healthy” about 30 seconds after it started on our test VPS. To check it:
docker compose logs authorizer | grep -E 'Starting (HTTP|gRPC|metrics) server'
curl -s http://127.0.0.1:8110/healthz
curl -s http://127.0.0.1:8110/readyz
The logs show the three listeners, the two endpoints answer {"status":"ok"} and {"status":"ready"}.
The container serves Authorizer over HTTP, on port 8110 of the server. HTTPS is handled by a reverse proxy in front of it. We tested Caddy, installed from its official Debian and Ubuntu repository: it obtains the Let’s Encrypt certificate itself, renews it, and sets X-Forwarded-For by default.
authorizer.example.com {
reverse_proxy 127.0.0.1:8110
}
sudo systemctl reload caddy
Then check that the dashboard, the login page and the OpenID Connect discovery answer on your address:
curl -s -D - -o /dev/null https://authorizer.example.com/dashboard/ | grep -i -E '^HTTP|^via|^content-type|^strict'
curl -s https://authorizer.example.com/dashboard/ | grep -o -E '<title>[^<]*</title>'
curl -s https://authorizer.example.com/app/ | grep -o -E '<title>[^<]*</title>'
curl -s https://authorizer.example.com/.well-known/openid-configuration | grep -o -E '"issuer":"[^"]*"|"token_endpoint":"[^"]*"'
HTTP/2 200 through Caddy, the titles “Authorizer | Dashboard” and “Authorizer”, and an issuer equal to your https:// address. Plain HTTP is redirected to HTTPS by Caddy.curl -I, which sends HEAD, gets a 404 even when everything works.--trusted-proxies at work.Open /dashboard on your address and sign in with the ADMIN_SECRET of your .env file. The dashboard manages users, webhooks, email templates and audit logs; the configuration itself stays in the flags of compose.yaml. The same admin API answers from the terminal, through an admin session kept in a cookie file:
umask 077
ADMIN_SECRET=$(grep ^ADMIN_SECRET= /opt/authorizer/.env | cut -d= -f2)
curl -s -c admin.txt https://authorizer.example.com/graphql -H 'Content-Type: application/json' -H 'Origin: https://authorizer.example.com' -d '{"query":"mutation { _admin_login(params: {admin_secret: \"'"$ADMIN_SECRET"'\"}) { message } }"}'; echo
curl -s -b admin.txt https://authorizer.example.com/graphql -H 'Content-Type: application/json' -H 'Origin: https://authorizer.example.com' -d '{"query":"{ _users { pagination { total } users { email signup_methods } } }"}'; echo
rm admin.txt
The first command answers “admin logged in successfully”, the second lists the users. On our test VPS, a wrong secret was refused with “invalid admin secret”, the admin secret sent as a header was refused with “unauthorized”, and a request from an origin outside --allowed-origins was refused with “Origin not allowed”.
Sign-up is open by default. Your apps usually go through the login page at /app or an SDK; the GraphQL API shows what happens underneath. Multi-factor authentication is on by default and offered once to every new user: the sign-up returns “Proceed to mfa setup” and withholds the token, together with a short-lived mfa_session cookie. Here the user declines the offer with skip_mfa_setup, which issues the token:
umask 077
curl -s -c mfa.txt https://authorizer.example.com/graphql -H 'Content-Type: application/json' -H 'Origin: https://authorizer.example.com' -d '{"query":"mutation { signup(params: {email: \"alice@example.com\", password: \"Correct-Horse-42\", confirm_password: \"Correct-Horse-42\", given_name: \"Alice\"}) { message } }"}'; echo
curl -s -b mfa.txt https://authorizer.example.com/graphql -H 'Content-Type: application/json' -H 'Origin: https://authorizer.example.com' -d '{"query":"mutation { skip_mfa_setup(params: {email: \"alice@example.com\"}) { message access_token } }"}' | grep -o -E '"message":"[^"]*"|"access_token":"[^.]*'
rm mfa.txt
Strong passwords are required by default: 6 to 36 characters, with upper and lower case letters, a digit and a special character. Once the offer is declined, the user signs in with a single call, and the token opens the profile:
TOKEN=$(curl -s https://authorizer.example.com/graphql -H 'Content-Type: application/json' -H 'Origin: https://authorizer.example.com' -d '{"query":"mutation { login(params: {email: \"alice@example.com\", password: \"Correct-Horse-42\"}) { message access_token } }"}' | grep -o '"access_token":"[^"]*"' | cut -d'"' -f4)
echo "token: ${TOKEN:0:20}... (${#TOKEN} characters)"
curl -s https://authorizer.example.com/graphql -H 'Content-Type: application/json' -H 'Origin: https://authorizer.example.com' -H "Authorization: Bearer $TOKEN" -d '{"query":"{ profile { email given_name roles } }"}'; echo
On our test VPS, the login returned a token of 625 characters, valid for 30 minutes, and the profile answered with the email, the first name and the user role. A wrong password was refused with “invalid credentials”.
Email verification is off by default, which is why the account above could sign in at once. To turn it on, add --smtp-host, --smtp-port, --smtp-username, --smtp-password and --smtp-sender-email to the flags, then --enable-email-verification=true: since 2.4.0, the server refuses to start with verification on and no SMTP. On a Simafri VPS, applications send through an authenticated SMTP relay on port 587, which also gives your email the best deliverability. We did not test sending email on our VPS.
Everything Authorizer keeps lives in the PostgreSQL database: users, clients, roles, webhooks, audit logs and the OpenFGA data. Redis holds only sessions, which users recreate by signing in. The other thing to keep is the configuration: compose.yaml and .env, whose JWT_SECRET and ENCRYPTION_KEY must come back with the database. Under umask 077, the dump and the archive are readable by root only:
(
umask 077
docker compose exec -T postgres pg_dump -U authorizer -Fc authorizer > authorizer-$(date +%F).dump
tar -czf config-$(date +%F).tar.gz compose.yaml .env
chmod 600 authorizer-*.dump config-*.tar.gz
)
ls -l authorizer-*.dump config-*.tar.gz
The chmod also covers a dump written earlier the same day, which keeps its old permissions when it is overwritten. Schedule this copy and send it off the server. Stored on the disk, the files are also included in the server’s nightly backups.
On the same or a new installation, with the same compose.yaml and .env, stop Authorizer, replace the database with an empty one, load the dump into it, then start Authorizer again:
docker compose stop authorizer &&
docker compose exec -T postgres dropdb -U authorizer authorizer &&
docker compose exec -T postgres createdb -U authorizer authorizer &&
docker compose exec -T postgres pg_restore -U authorizer -d authorizer --exit-on-error --no-owner < authorizer-2026-11-29.dump &&
docker compose start authorizer
--exit-on-error stops the restore at the first error, and the && stop the sequence there: Authorizer stays stopped. What was loaded before the error remains in the database, so start again from dropdb once the cause is fixed. On our VPS, a truncated dump stopped the restore with “could not read from input file: end of file”, and Authorizer stayed stopped.We tested the whole cycle on our VPS with these exact commands: dump, a user created after it, the database deleted and created again empty (“Did not find any tables”), restore. The user of the dump signed in again with her password, the one created after the dump was gone, and the admin API listed one user.
Authorizer releases often, security fixes included: 2.4.8, 2.4.9 and 2.4.10 came out on 24, 26 and 27 November 2026, and their release notes say who should upgrade and what changes. Read them, take a backup, change the image tag in compose.yaml, then pull the new image and recreate the container. The schema is migrated at startup:
docker compose pull
docker compose up -d
Then check the version the server reports:
curl -s https://authorizer.example.com/graphql -H 'Content-Type: application/json' -H 'Origin: https://authorizer.example.com' -d '{"query":"{ meta { version } }"}'; echo
2.4.10, the account created on 2.4.7 signed in with its password, and the admin session opened on 2.4.7 survived the upgrade, kept in Redis. None of the flags of this guide changed between the two versions.MIGRATION.md gives the mapping. Recent releases also turned silent defaults into startup errors, such as a missing --url or --admin-secret: read the upgrade notes before you switch.latest tag follows each release as soon as it is published: pin a version.Self-hosting means running the server on top of the application. On a managed VPS, our teams take charge of the server and proactively monitor your instance; Authorizer remains your software, with your users and your settings.
| Topic | Our teams | You |
|---|---|---|
| The server | System and security updates, server interventions included | The timing that suits you |
| Monitoring | Server monitored 24/7, with intervention without waiting for your call | Your users, clients and roles in Authorizer |
| Authorizer | Proactive monitoring: errors, slowdowns, database and disk space spotted, fix recommended | Its installation, updates, flags and secrets, which you apply, yourself or through your AI assistant |
| Users | The server that carries them, monitored and backed up | Accounts, sign-up, multi-factor authentication and social logins |
| Backups | Every night, encrypted and kept off the machine; restores included | Authorizer’s own database dumps, and the restore request, when you need one |
| Migration | Your current server migrated, free of charge | The timing of the switch |
If you would rather have our teams work inside the application itself, that service is billed by the hour or at a fixed rate, with an estimate shared before the work starts.
With a Simafri Managed VPS, our teams keep your Authorizer instance’s server up to date, monitor it day and night and step in without waiting for your call; they also proactively monitor your instance and recommend useful fixes, which you apply, yourself or through your AI assistant. Backups are encrypted every night and kept off the machine, restores are included, and migrating your current server is free.
Yes. Authorizer is under the Apache-2.0 license: you can run it for your company, your products or your clients, and modify it, with no license to buy. What remains is the cost of the server that runs it.
Use the quay.io/authorizer/authorizer image with PostgreSQL 18 and Redis 8 in a compose.yaml. Pass the configuration as flags in the command of the service, with the secrets substituted from a .env file, set --url to your https address, publish port 8110 on 127.0.0.1, run docker compose up -d, and put an HTTPS reverse proxy in front.
Since version 2, the server reads its configuration from command-line flags only, never from .env or the environment. In Docker Compose, write the flags in the command list and let Compose substitute the values of your .env file; MIGRATION.md maps every old variable to its flag.
Multi-factor authentication is offered to every new user by default: the response says “Proceed to mfa setup” and sets an mfa_session cookie. The user then enrolls a factor, or declines with the skip_mfa_setup mutation, which issues the token. With --enforce-mfa, declining is not possible.
Every state-changing request needs an Origin or Referer header, and with an explicit --allowed-origins list, that origin must be in it. List the address of Authorizer itself, for its dashboard and login page, and the address of each of your apps.
Very little. On our test VPS, Authorizer used about 50 MB, PostgreSQL 57 MB and Redis 19 MB after the installation, and the three images take about 260 MB of disk.
Dump the PostgreSQL database with pg_dump -Fc under umask 077, and keep compose.yaml and .env, whose JWT and encryption keys must come back with the data. To restore, stop Authorizer, recreate the database empty with dropdb and createdb, then load the dump with pg_restore --exit-on-error --no-owner.
A managed VPS covers the server: system, security, monitoring and backups. Our teams also proactively monitor your instance and recommend useful fixes, which you apply. Work inside the application is billed by the hour or at a fixed rate.
Simafri
Let's talk about your project
Tell us what you need in a few words: we will get back to you quickly.
Thank you! Your request has been sent. We'll get back to you shortly.
Prefer email? Write to us at support@simafri.com.