Skip to content
Self-hosted

LAN deployment and sizing

Set up LAN access and HTTPS, plan firewall rules and size your self-hosted Permafrost deployment.

Reach Permafrost on your LAN

Point your internal DNS name at the reverse proxy or ingress address. In Compose, set AUTH_URL to the HTTPS origin users open in their browsers. Set APP_BIND=0.0.0.0 when the proxy connects to the Docker host over the LAN, and set APP_PORT to the host port the proxy uses.

AUTH_URL=https://permafrost.corp.local
APP_BIND=0.0.0.0
APP_PORT=3000

Allow only the reverse proxy to reach the published app port. If the proxy runs on the Docker host, keep APP_BIND=127.0.0.1. In Helm, set authUrl to the browser-facing HTTPS origin.

In your Entra app registration, add the full sign-in callback as a Web redirect URI. Use the same hostname and port as the HTTPS origin, followed by the exact callback path.

https://permafrost.corp.local/api/auth/callback/microsoft-entra-id

Configure HTTPS

Compose. Terminate HTTPS at the reverse proxy and forward requests to the app port. For an internal name, configure the proxy with your certificate and private key and make sure users’ devices trust the issuing CA. For a public DNS name, use a proxy that obtains and renews certificates automatically through ACME. Use DNS validation to keep the HTTPS listener private.

Kubernetes. Enable ingress, add the hostname to ingress.hosts and create a TLS Secret in the release namespace. List the hostname and the Secret name under ingress.tls using hosts and secretName.

Block /api/cron, /api/cron/* and /api/healthz at the proxy or ingress. The scheduler and health probes use the internal app address.

Allow outbound HTTPS

Allow TCP 443 from the app and workers for sign-in, collection, licence checks and scheduled update checks. Allow registry access from the hosts that pull images and charts.

Core outbound destinations
Destination
Purpose
login.microsoftonline.comMicrosoft Entra sign-in, token requests and signing keys.
graph.microsoft.comMicrosoft Graph collection.
permafrostid.comLicence checks and signed update checks.
selfhosted.permafrostid.comScheduled update release downloads.
registry.permafrostid.comPermafrost container images and the Helm OCI chart.
permafrostid.comRegistry pull authentication at /api/registry/token.

Users’ browsers also need access to login.microsoftonline.com and the LAN address.

For a forward proxy, set HTTPS_PROXY in the Compose environment file or proxy.httpsProxy in Helm. Use NO_PROXY or proxy.noProxy for internal destinations. Configure the Docker host or Kubernetes image puller separately for registry access through a proxy.

Size your deployment

Use the identity count to choose a starting worker count in Helm.

Starting capacity by identity count
Identities
Sync workers
PostgreSQL
Under 2,0001Bundled or external
2,000 to 20,0002Bundled or external
Over 20,0004External required
Helm defaults per pod
Pod
DB pool max
CPU and memory requests
CPU and memory limits
Web10250m CPU, 512 MiB2 CPUs, 2 GiB
Sync worker4250m CPU, 512 MiB2 CPUs, 2 GiB

Budget database connections across all replicas using databasePoolMax and worker.databasePoolMax. Leave room for migrations and other database clients. The bundled Helm database requests a 10 GiB volume. The Compose app has a 2 GiB memory limit and defaults to a pool of 10 connections through PG_POOL_MAX.

To use external PostgreSQL in Helm, set postgres.enabled: false and configure externalDatabase. In Compose, set both DATABASE_URL and DATABASE_URL_UNPOOLED to endpoints for the same external database.

Scale sync workers

In Helm, change worker.replicaCount and upgrade the release. Sync workers scale independently. Keep one scheduler.

The bundled Compose file runs one app and a scheduler. Use Helm when you need independently scaled sync workers.