Install on one Linux server¶
Run HelixIAM in production on one Linux server with Docker Compose, without Kubernetes. The install bundle provided
with your licence, helixiam-linux-server.tar.gz, holds everything:
- a TLS front door (Caddy) on ports 80 and 443, with your own certificate or one from Let's Encrypt;
- the server and the dashboard, the same signed images as on Kubernetes;
- PostgreSQL 16, or your own PostgreSQL.
It uses two host names:
| Host name | Example | For |
|---|---|---|
| Sign-in host | id.example.com |
Users and applications: sign-in, OpenID Connect, SAML, the account console. |
| Admin host | admin.example.com |
Administrators only: the dashboard, the admin API and the master realm. |
The admin API and the master realm answer 404 on the sign-in host. The admin host answers only for the addresses
you allow. Health and metrics are never published.
Requires a HelixIAM licence
The bundle and the images are delivered to licensed customers: you receive registry credentials and the release files from KubeDNA B.V. For a licence, contact contact@helixiam.com.
Tested setup
This guide was followed as written on a new Hetzner cloud server with 2 vCPU and 4 GB of memory, Ubuntu 24.04, Docker Engine 29.10 and Compose 5.7, with a Let's Encrypt certificate and with an own certificate: install, sign-in with a second factor, a realm with an application and its tokens, the admin restrictions, an upgrade, a backup and restore, and a reboot. During the upgrade sign-in was unavailable for about 20 seconds; after a reboot it was back within a minute.
One server, no failover
One server has no failover: when it is down, sign-in is down. For high availability run HelixIAM on Kubernetes with the Helm chart (see High availability).
Requirements¶
- A Linux server, x86-64 (amd64) or ARM64 (arm64), with at least 2 vCPU, 4 GB of memory and 40 GB of disk. From 1.1.0 every HelixIAM image is built for both, under one tag.
- Docker Engine 24 or later with the Compose plugin 2.20 or later (
docker compose version). Install it from Docker's packages for your distribution. - Two DNS names pointing at the server, for the sign-in host and the admin host.
- Ports 80 and 443 free on the server and reachable by your users. Port 80 only redirects to HTTPS (and answers Let's Encrypt's challenge).
- Outbound HTTPS to
ghcr.ioto pull the images (or a registry mirror you load them into). - The JDBC driver of your database: one jar, from Maven Central or your mirror (step 5). HelixIAM ships none.
- A TLS certificate valid for both names, or a server that Let's Encrypt can reach on ports 80 and 443.
- An SMTP server for verification and password-reset emails.
Install¶
1. Unpack the bundle, for example in /opt; it creates /opt/helixiam. If it came with a .sigstore.json file,
verify it first (see Verify the release files).
2. Create .env from the example and make it readable by root only. It holds the database password and the
encryption key.
3. Fill in .env. Every setting has a comment. The ones you must set:
| Setting | Set it to |
|---|---|
HELIX_IDP_HOST |
The sign-in host name, for example id.example.com. |
HELIX_ADMIN_HOST |
The admin host name, for example admin.example.com. |
HELIX_ADMIN_ALLOW |
Who may open the admin host: IP addresses or CIDR ranges, separated by spaces, for example your office and VPN ranges. Others get 403. |
HELIX_TLS |
files (your own certificate), acme (Let's Encrypt) or internal (test certificate, for a trial only). |
DB_PASSWORD |
A new random password: openssl rand -hex 24. |
DB_ENCRYPTION |
The key that encrypts secrets in the database: openssl rand -hex 16. |
HELIX_SMTP_HOST, HELIX_SMTP_PORT, HELIX_SMTP_USERNAME, HELIX_SMTP_PASSWORD, HELIX_SMTP_TLS_MODE, HELIX_SMTP_FROM |
Your SMTP server, account and sender address. |
Keep DB_ENCRYPTION safe, and never change it
DB_ENCRYPTION encrypts secrets in the database. Without the exact same key a backup cannot be read. Store a copy
apart from your backups, in your password vault, and never change it.
4. Add the certificate (with HELIX_TLS=files). Put the certificate with its full chain and its key in certs/.
The certificate must be valid for both host names.
sudo cp fullchain.pem certs/tls.crt
sudo cp privkey.pem certs/tls.key
sudo chmod 644 certs/tls.crt
sudo chmod 600 certs/tls.key
With HELIX_TLS=acme, Caddy requests and renews the certificates from Let's Encrypt itself; both host names must be
reachable from the internet on ports 80 and 443.
5. Add the JDBC driver. The bundle's drivers/ folder is empty: put the one jar of your database's driver in
it, checked and read-only. For the bundled PostgreSQL (for MySQL, the jar of
the table):
cd "$(mktemp -d)" &&
curl -fLO https://repo1.maven.org/maven2/org/postgresql/postgresql/42.7.14/postgresql-42.7.14.jar &&
echo "73914527305a40cce504b0d3d90b23caf565136912d607ae8ae7c5895512332c postgresql-42.7.14.jar" | sha256sum -c &&
sudo cp postgresql-42.7.14.jar /opt/helixiam/drivers/ &&
sudo chmod 0444 /opt/helixiam/drivers/postgresql-42.7.14.jar &&
sudo chmod 0555 /opt/helixiam/drivers
cd /opt/helixiam
sha256sum -c prints postgresql-42.7.14.jar: OK; on FAILED the chain stops before the copy. The server refuses
a missing, writable, second or untested jar, naming it: see
What the server says.
6. Start HelixIAM. Log in to the registry with the credentials of your licence, then start. The first start takes a few minutes: it creates the database schema.
server, console and postgres show healthy, and caddy shows Up.
7. Sign in. The first start creates the administrator admin with a generated password. It is never logged:
read it once from the server.
Open https://<admin host>, sign in as admin and set up the second factor (an authenticator app). Then change the
password. To choose the first password yourself instead, set HELIX_ADMIN_PASSWORD in .env before the first start.
8. Check from the outside. From a machine outside the admin allow-list:
curl -s https://id.example.com/realms/master/.well-known/openid-configuration -o /dev/null -w '%{http_code}\n' # 404
curl -s https://admin.example.com/ -o /dev/null -w '%{http_code}\n' # 403
Next, create a realm and an application: see Core concepts and the
OIDC quickstart. Applications use the sign-in host, for example
https://id.example.com/realms/<realm> as issuer.
Your own PostgreSQL¶
To use a PostgreSQL 16 you already run, in .env:
- delete the line
COMPOSE_PROFILES=bundled-db; - set
DB_HOST, andDB_PORT,DB_NAMEandDB_USERNAMEwhere they differ from the defaults; - set
DB_SSLMODE=verify-fulland mount the CA that signed the database's certificate (see Database TLS).
Create the database and its owner first; HelixIAM creates and migrates its own schema.
Settings not in .env¶
Server settings that .env does not cover go in config/helixiam.yaml, which the server loads if it exists, for
example a key custody backend. Restart the server after a change:
For a Thales Luna HSM, see Set up without Kubernetes: add
its volumes to a docker-compose.override.yml next to docker-compose.yml, which Compose reads automatically.
Do not edit docker-compose.yml itself: an upgrade replaces it.
Backup and restore¶
Back up three things:
- the database, daily, with
pg_dump; .env, which holdsDB_ENCRYPTION: keep it apart from the database dumps;certs/andconfig/, if you use them.
cd /opt/helixiam
sudo docker compose exec -T postgres sh -c 'pg_dump -U "$POSTGRES_USER" -d "$POSTGRES_DB" -Fc' > helixiam-$(date +%F).dump
Run it from cron or a systemd timer and copy the dump off the server. With your own PostgreSQL, use your usual database backups instead.
To restore, on an empty install with the same .env:
sudo docker compose up -d --wait postgres
sudo docker compose exec -T postgres sh -c 'pg_restore -U "$POSTGRES_USER" -d "$POSTGRES_DB" --no-owner' < helixiam-<date>.dump
sudo docker compose up -d --wait
See Backup & disaster recovery for realm exports and recovery times.
Upgrade¶
- Read the breaking changes between your version and the new one.
- Take a backup (above).
- Unpack the new bundle over the old one. It replaces
docker-compose.yml,Caddyfileand.env.example, and leaves your.env,certs/,config/and the driver indrivers/alone. When the new release is tested with another driver version (the table of its docs), replace the jar indrivers/as in step 5 of the install. - Set
HELIX_VERSIONin.envto the new release, and add any new settings from.env.example. - Pull and restart. The server migrates the database schema at start-up.
sudo tar -xzf helixiam-linux-server.tar.gz -C /opt --no-same-owner
sudo docker compose pull
sudo docker compose up -d --wait
Sign-in is down while the server restarts, usually under a minute. Then check it as in Verify the upgrade.
Logs and health¶
- Status:
sudo docker compose psshows each service and whether it is healthy. - Logs:
sudo docker compose logs -f server(JSON, one line per event). The bundle keeps 5 files of 50 MB per service. The audit trail is in the server log and in the console under Audit. - Restarts: every service restarts by itself after a failure or a reboot of the server, as long as Docker starts
at boot (
sudo systemctl enable docker).
Verify the release files¶
Each release file comes with a Sigstore bundle. With cosign:
cosign verify-blob --bundle helixiam-linux-server.tar.gz.sigstore.json \
--certificate-identity https://github.com/melmarzgioui/helixiam/.github/workflows/release.yml@refs/tags/v<version> \
--certificate-oidc-issuer https://token.actions.githubusercontent.com helixiam-linux-server.tar.gz
Troubleshooting¶
| Symptom | Cause and fix |
|---|---|
Pool overlaps with other one on this address space at start |
The bundle's network (10.213.70.0/24) overlaps a Docker network on the server. Set HELIX_SUBNET in .env to a free /24. |
port is already allocated |
Another service uses port 80 or 443. Stop it, or set HELIX_HTTP_PORT / HELIX_HTTPS_PORT and put your own proxy in front. |
no matching manifest for linux/arm64 |
The server is ARM and HELIX_VERSION names a release before 1.1.0, which had amd64 images only. Use 1.1.0 or later. |
password authentication failed in the server log |
DB_PASSWORD changed after the first start. The bundled database keeps the first password: set it back. |
| The browser shows a certificate warning | HELIX_TLS=internal, or certs/tls.crt does not cover the host name. Use files or acme. |
403 on the admin host |
Your address is not in HELIX_ADMIN_ALLOW. Add it and run sudo docker compose up -d caddy. |
404 for the dashboard or /realms/master on the sign-in host |
Expected: the admin side answers only on the admin host. |