Self-hosting
Avrel runs as a hosted service at app.getavrel.com, or inside your own network. This guide covers the second: on your Kubernetes cluster with the Helm chart, or on one machine with Docker Compose. Both run the same release as the hosted service, with no features removed. Nothing in a self-hosted install calls Avrel's servers: there is no licence check and no usage reporting, and it works with no internet access.
What you run#
- The Avrel server. One container image,
ghcr.io/jamiegreee/avrel-telemetry:<version>, for Intel and ARM servers. It serves the app, the API, the MCP server for AI assistants, the collector installer and these guides (at/docs). It runs as an unprivileged user with a read-only file system, and listens on port 8080. - Postgres 14 or later. All data is in one database. Use your own managed or operator-run Postgres in production. The chart and the Compose file can also run a small Postgres for trials.
- A TLS proxy in front. This is your ingress controller or load balancer. Collectors, browsers and assistants reach Avrel through it over
https://.
Site collectors connect outward to this server, exactly as they do to the hosted service. See Connect a site.
Install on Kubernetes#
You need Helm 3, a namespace, an ingress controller, and a Postgres database with an empty database and user for Avrel.
Step 1. Store the database address and the app's secrets as Kubernetes secrets:
kubectl create namespace avrel
kubectl -n avrel create secret generic avrel-db \
--from-literal=database-url='postgresql://avrel:PASSWORD@db.internal:5432/avrel?sslmode=require'
kubectl -n avrel create secret generic avrel-secrets \
--from-literal=AVREL_SIGNING_KEY="$(docker run --rm ghcr.io/jamiegreee/avrel-telemetry:0.1.0 python server/manage.py signing-key)"
Add AVREL_SMTP_URL, ANTHROPIC_API_KEY or AVREL_OIDC_CLIENT_SECRET to avrel-secrets if you use them (see Settings).
Step 2. Install the chart:
helm install avrel oci://ghcr.io/jamiegreee/charts/avrel-telemetry --version 0.1.0 -n avrel \
--set publicUrl=https://avrel.example.internal \
--set database.existingSecret=avrel-db \
--set secrets.existingSecret=avrel-secrets \
--set ingress.enabled=true --set ingress.className=nginx \
--set ingress.tls[0].secretName=avrel-tls --set ingress.tls[0].hosts[0]=avrel.example.internal
For a trial without your own database, use --set postgresql.enabled=true in place of database.existingSecret.
Step 3. Create the first organization and its owner's sign-in link:
kubectl -n avrel exec deploy/avrel -- python server/manage.py setup \
--org-name "Your organization" --base-url https://avrel.example.internal
Open the link it prints, within 7 days, and set your name, email and password, or continue with single sign-on. From then on, owners invite people in Settings > Members.
To see every chart setting, run helm show values oci://ghcr.io/jamiegreee/charts/avrel-telemetry --version 0.1.0. The pod has health checks at /api/health (the process is alive) and /api/ready (the database answers).
Install with Docker Compose#
On one Linux machine with Docker:
Step 1. Download compose.yaml and .env.example from the release (they are also in the offline bundle) into a folder, and rename .env.example to .env.
Step 2. Fill in .env: at least AVREL_PUBLIC_URL and POSTGRES_PASSWORD, and an AVREL_SIGNING_KEY (the file says how to make one).
Step 3. Start it, then create the first organization:
docker compose up -d
docker compose exec app python server/manage.py setup --org-name "Your organization" --base-url https://avrel.example.internal
The app listens on 127.0.0.1:8080. Put your TLS proxy (Caddy, nginx, Traefik or a load balancer) in front of it.
Without internet access#
Each release has an offline bundle, avrel-telemetry-<version>-offline.tar.gz, on the releases page. It holds the image for both CPU types, the Postgres image, the Helm chart, the Compose files and a SHA256SUMS file. Check the bundle's checksum, carry it across, and load the images into your registry or onto the machine:
sha256sum -c avrel-telemetry-0.1.0-offline.tar.gz.sha256
tar -xzf avrel-telemetry-0.1.0-offline.tar.gz && cd avrel-telemetry-0.1.0-offline
sha256sum -c SHA256SUMS
docker load -i avrel-telemetry-0.1.0-amd64.tar # or push it to your own registry
helm install avrel ./avrel-telemetry-0.1.0.tgz --set image.repository=registry.internal/avrel-telemetry ...
The guides are served by the install itself at /docs, and the app's links point there. Keep AI features off (the default), or point them at a service you can reach inside your network (see AI features). Email alerts need a mail server you can reach. Webhook alerts to the public internet will not arrive from a closed network.
Settings#
All settings are environment variables. The chart and the Compose file set them for you from their own values.
| Setting | What it does |
|---|---|
AVREL_PUBLIC_URL | The address people and collectors open Avrel at. Required. |
AVREL_DATABASE_URL | The Postgres connection URL. A password can also come from PGPASSWORD. |
AVREL_TRUST_PROXY | 1 behind a proxy that sets X-Forwarded-For and X-Forwarded-Proto (the chart sets it). |
AVREL_SECURE_COOKIES | 1 to mark sign-in cookies Secure when the proxy does not say the request was https. |
AVREL_SIGNING_KEY | Signs readiness records (Ed25519). Make one with manage.py signing-key and keep a copy. |
AVREL_SMTP_URL, AVREL_MAIL_FROM | Your mail server for email alerts, e.g. smtps://user:password@smtp.internal:465. |
AVREL_AI and the AVREL_AI_* settings | AI features. See AI features. |
AVREL_OIDC_*, AVREL_PASSWORD_SIGN_IN | Single sign-on. See Single sign-on. |
AVREL_DOCS_URL | Where the app's guide links go. The image sets /docs, so the guides are served by the install. |
Secrets (AVREL_SIGNING_KEY, AVREL_SMTP_URL, ANTHROPIC_API_KEY, AVREL_OIDC_CLIENT_SECRET, the database password) belong in Kubernetes secrets or the .env file, never in values files you commit.
AI features#
Two features call a model from the server: drafting an incident investigation, and reading wiring photos and schematics into a hardware draft. Both are optional. With AI off, every other feature works, and the app says these two are turned off.
AVREL_AI | Where requests go | Also set |
|---|---|---|
off (default) | Nowhere. | |
anthropic | The Anthropic API under your own account, or a gateway that speaks the Anthropic API. | ANTHROPIC_API_KEY, and ANTHROPIC_BASE_URL for a gateway |
bedrock | Claude on Amazon Bedrock in your AWS account. | AVREL_AI_REGION, plus AWS credentials (an IAM role for the pod, or AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) |
vertex | Claude on Google Vertex AI in your Google Cloud project. | AVREL_AI_PROJECT, AVREL_AI_REGION, and Google application default credentials |
AVREL_AI_MODEL picks the model (default claude-opus-5-5; on Bedrock the anthropic. prefix is added, and an inference profile id such as eu.anthropic.claude-opus-5-5 is used as written). If the model declines a request, Avrel retries it once on claude-opus-4-8; set AVREL_AI_FALLBACK to another model, or to off. Set AVREL_AI_FALLBACK=off too when a gateway rejects the Anthropic API's fallback option.
AI assistants that people connect to Avrel over MCP are separate: they use whatever AI service their owner chose, and Avrel only answers their requests. See AI assistants (MCP). For a self-hosted install, use your own address in place of https://app.getavrel.com/mcp.
Single sign-on#
Avrel signs people in with your identity provider over OpenID Connect: Microsoft Entra ID, Okta, Google Workspace, Keycloak, Ping and others. Multi-factor authentication and conditional access stay with your provider.
Step 1. In your identity provider, register a web application (a confidential client) with the redirect URI https://<your Avrel address>/api/auth/sso/callback, and the scopes openid, email and profile.
Step 2. Set these on Avrel:
| Setting | Value |
|---|---|
AVREL_OIDC_ISSUER | The issuer URL, e.g. https://login.microsoftonline.com/<tenant id>/v2.0, https://<org>.okta.com or https://accounts.google.com. It must be https://. |
AVREL_OIDC_CLIENT_ID | The application's client id. |
AVREL_OIDC_CLIENT_SECRET | Its client secret (a secret). |
AVREL_OIDC_PROVIDER_NAME | The name on the button, e.g. Acme SSO. |
AVREL_OIDC_ALLOWED_DOMAINS | Only people with these email domains may sign in this way, e.g. acme.com,acme.co.uk. |
AVREL_OIDC_ORG | Optional: the organization id (from manage.py orgs) that people with no account yet join, as members. Needs AVREL_OIDC_ALLOWED_DOMAINS. |
AVREL_OIDC_EMAIL_CLAIM | Optional: the claim with the email, if not email (Entra ID often needs preferred_username). |
AVREL_OIDC_SESSION_HOURS | Optional: how long a single sign-on session lasts, default 12 hours. Someone removed in your provider is signed out of Avrel within this time. |
AVREL_PASSWORD_SIGN_IN | Optional: off to allow only single sign-on. |
The sign-in page then shows Sign in with your provider. How people get in:
- People with an account sign in with the same email. The first time, their account is tied to their identity at your provider. After that, a different identity with the same email is refused.
- People with an invite link open it and choose Continue with your provider. Their account is created with the role the invite gives, and it has no password.
- Anyone else is refused, unless
AVREL_OIDC_ORGis set, in which case people from the allowed domains join that organization as members. Owners can then change their role in Settings > Members.
With AVREL_PASSWORD_SIGN_IN=off, password sign-in, password invites and password reset links are refused, so make the first owner's link with manage.py setup and open it with single sign-on. Passwords stay on while single sign-on is not set up, so a mistake in these settings never locks everyone out. Sign-ins and refusals with single sign-on are in the audit log.
Upgrades#
Each release has a version (0.1.0), and the image, the chart and the offline bundle carry the same one. Read the release notes for every version in between, back up the database, then change the version:
- Helm:
helm upgrade avrel oci://ghcr.io/jamiegreee/charts/avrel-telemetry --version <new> -n avrel --reuse-values - Compose: set
AVREL_VERSION=<new>in.env, thendocker compose pull && docker compose up -d
The new version updates the database schema itself when it starts. Upgrades only go forward: a version older than the database refuses to start, with a message saying so, rather than damage data. To go back, restore the backup you made before upgrading, then run the older version. The chart replaces the old pod rather than running both at once, so expect a minute without service.
Backups#
Everything is in the Postgres database: organizations, readings, records, accounts and the audit log. Back it up with your usual Postgres tooling, or with pg_dump:
# Kubernetes, bundled Postgres
kubectl -n avrel exec avrel-postgresql-0 -- pg_dump -U avrel -Fc avrel > avrel-$(date +%F).dump
# Docker Compose
docker compose exec -T db pg_dump -U avrel -Fc avrel > avrel-$(date +%F).dump
To restore, stop the app, restore the dump into an empty database with pg_restore --clean --if-exists -d avrel, and start the app at the same version as the backup. Then open Settings > Audit log in each organization: it should say Chain intact. A broken chain after a restore means the backup was incomplete or changed.
Keep a copy of AVREL_SIGNING_KEY with your backups. Records signed with it can still be checked without it, because each one names its public key, but new records need it.
Support#
When you ask Avrel for help, send the version (/api/health shows it), the pod or container logs, and what you saw. Logs never contain passwords, keys, tokens or readings.