DockerSelf-Hosting

Infisical with Docker: Keep App Secrets and .env Files in One Place (Linux, Windows, Mac)

Before you start

  • 21 min read
  • Updated November 2026

Boxes marked Run in terminal are what you type; plain text explains why. Check what you need first

What you get in one minute#

Infisical is a free, self-hosted secrets manager: you keep API keys, database URLs and .env values in one encrypted place, and your programs fetch them when they start instead of reading loose .env files.

Infisical official logo

Logo: the official Infisical project (github.com/Infisical/infisical, file img/logoname-black.svg at v0.167.15)

A secret is any value a program needs but nobody should see: a token, a password, a connection string. Infisical sorts them into projects and environments (Development, Staging, Production), keeps every version, and gives each program its own login.

It is for programs, not people. For your own passwords and browser autofill, use Vaultwarden.

WhatValue (official sources, read November 2026)
Current versionInfisical v0.167.15, released 24 November 2026 (previous: v0.167.14, 20 November)
Image to pininfisical/infisical:v0.167.15 (Docker Hub; amd64 and arm64)
Time neededAbout 45 minutes (our estimate)
RAMDocs minimum for the whole stack: 4 GB. No idle measurement found
Ports8080 inside the container. PostgreSQL 5432 and Redis 6379 stay private
LicenceMIT for the repository, except folders named ee/, which need a paid Infisical licence
Official docsinfisical.com/docs

At a glance:

  • What runs: three containers: Infisical, PostgreSQL (the database) and Redis (a fast store for job queues).
  • What you use: a web page for people, the infisical command (the CLI) for programs.
  • Free and paid: secrets, environments and machine logins are free. OIDC, SAML, LDAP and SCIM sign-in and dynamic secrets are paid.
  • Big warning: lose the encryption key and the database is unreadable (Step 1).

Which version. v0.167.15 is the newest release and one day old; the project ships about weekly. We found no reports that stop a fresh install. We pin the exact tag, never latest. The CLI has its own numbers: newest is v0.45.14 (Infisical/cli).

How it fits together#

Infisical stores your secrets encrypted in PostgreSQL, uses Redis for background jobs, and answers two kinds of callers: people in a browser and programs that log in as a "machine identity".

Infisical flow: you reach the Infisical backend on port 8080 in a browser, optionally through a Traefik or Caddy HTTPS proxy; the backend stores encrypted secrets in PostgreSQL and uses Redis for job queues; your app is started by the Infisical CLI, which logs in with a machine identity, fetches the secrets and starts the app with them as environment variables

Drawn for this guide from the official Compose file and the Docker integration docs. The HTTPS route (dashed) is optional.

The CLI trades the identity's client ID and secret for a short-lived token, reads what that identity may read, and starts your program with it. The program never talks to the database.

Before you start#

SystemWhat to have
LinuxDocker Engine 20.10+ and Compose 2.0+ (docs example: Ubuntu 20.04+); amd64 or arm64
WindowsDocker Desktop in Linux-container mode (WSL 2 backend), PowerShell
MacDocker Desktop, Intel or Apple Silicon (the image has an arm64 build)

The docs' sizes cover Infisical, PostgreSQL and Redis together: minimum 2 CPU cores, 4 GB RAM and 20 GB disk; recommended 4 cores, 8 GB and 50 GB or more on an SSD. The image is about 612 MB. No GPU and no AI model are needed. Check Docker (the same on every system):

Run in terminalbash
docker --version
docker compose version

Checklist:

  • [ ] Docker and Compose print versions
  • [ ] Port 8080 is free on the host (we publish it on 127.0.0.1 only)
  • [ ] You have a safe place to copy one key (a password manager)
  • [ ] For the HTTPS section only: a domain with a DNS record, and ports 80 and 443 free

Tested by DIY Lab Hub: not yet. Commands come from the official Compose file, .env.example and docs at v0.167.15, read in November 2026. We did not run them.

Step 1: Create the folder and your keys#

Infisical needs four random values: ENCRYPTION_KEY locks every secret in the database, AUTH_SECRET signs logins, an activation token stops a stranger from claiming the first admin account (new in v0.167.15), and a database password. Never copy the sample keys from the official .env.example.

Linux#

Run in terminalbash
mkdir -p ~/docker_volumes/infisical/backups
cd ~/docker_volumes/infisical
ENC=$(openssl rand -hex 16)
AUTH=$(openssl rand -base64 32)
PGPASS=$(openssl rand -hex 16)
TOKEN=$(openssl rand -hex 32)
cat > .env << EOF
ENCRYPTION_KEY=$ENC
AUTH_SECRET=$AUTH
POSTGRES_USER=infisical
POSTGRES_PASSWORD=$PGPASS
POSTGRES_DB=infisical
DB_CONNECTION_URI=postgres://infisical:$PGPASS@db:5432/infisical
REDIS_URL=redis://redis:6379
SITE_URL=http://localhost:8080
INITIAL_SETUP_ACTIVATION_TOKEN=$TOKEN
TELEMETRY_ENABLED=false
DISABLE_UPDATE_CHECK=true
EOF
chmod 600 .env

Windows (PowerShell)#

Windows has no openssl by default, so we use .NET's random generator. Run all of it in one window.

Codepowershell
New-Item -ItemType Directory -Force "$HOME\docker_volumes\infisical\backups" | Out-Null
Set-Location "$HOME\docker_volumes\infisical"
function New-Hex($n) { $b = New-Object byte[] $n; $r = [Security.Cryptography.RandomNumberGenerator]::Create(); $r.GetBytes($b); $r.Dispose(); [BitConverter]::ToString($b).Replace('-','').ToLower() }
function New-Base64($n) { $b = New-Object byte[] $n; $r = [Security.Cryptography.RandomNumberGenerator]::Create(); $r.GetBytes($b); $r.Dispose(); [Convert]::ToBase64String($b) }
$enc = New-Hex 16
$auth = New-Base64 32
$pg = New-Hex 16
$tok = New-Hex 32
@"
ENCRYPTION_KEY=$enc
AUTH_SECRET=$auth
POSTGRES_USER=infisical
POSTGRES_PASSWORD=$pg
POSTGRES_DB=infisical
DB_CONNECTION_URI=postgres://infisical:$pg@db:5432/infisical
REDIS_URL=redis://redis:6379
SITE_URL=http://localhost:8080
INITIAL_SETUP_ACTIVATION_TOKEN=$tok
TELEMETRY_ENABLED=false
DISABLE_UPDATE_CHECK=true
"@ | Set-Content -Encoding ascii .env
icacls .env /inheritance:r /grant:r "$($env:USERNAME):(F)"

icacls (a standard Windows tool; we did not run it) limits the file to your account. -Encoding ascii matters: a byte-order mark would spoil the first key name.

Mac (Terminal)#

Same commands as Linux.

Check it worked. .env exists, has 11 lines, and no value is empty. Do not paste the file anywhere.

Tip: Copy ENCRYPTION_KEY to your password manager right now. The docs say that without it you cannot decrypt secrets, even from a full database backup. Run Step 1 once: running it again overwrites .env with a new key.

What the less obvious lines mean:

VariableMeaning
SITE_URLThe address you type in the browser, with http:// or https://. Required
HTTPS_ENABLEDNot set here: the image's Dockerfile sets it to false, which suits plain HTTP. With HTTPS you will set it to true so login cookies are marked secure
INITIAL_SETUP_ACTIVATION_TOKEN32 to 256 characters, or Infisical will not start
TELEMETRY_ENABLED, DISABLE_UPDATE_CHECKTurn off usage telemetry and the weekly GitHub version check (see Security)

Step 2: Write the Compose file and start Infisical#

This is the official docker-compose.prod.yml with our changes:

  • Pinned tags. The official file says latest # PIN THIS TO A SPECIFIC TAG and uses an untagged redis.
  • PostgreSQL 16. The official file uses postgres:14-alpine, but PostgreSQL 14 had its final release on 12 November 2026, and the docs say 16 is tested most. A fresh install can start on 16. An existing 14 volume cannot be switched by a tag change.
  • Redis settings. The requirements page says Redis must use noeviction and keep data on disk. We set both.
  • Loopback port. 127.0.0.1:8080:8080 instead of 80:8080: only this computer can open it until you add HTTPS. The image already listens on 8080 on all container interfaces (PORT and HOST in its Dockerfile), so we set neither.
  • Less exposure. The database container gets only its three variables, not your whole .env. We left out the obsolete version: line, pull_policy: always and the ALLOW_EMPTY_PASSWORD line, which we found no use for with the official Redis image.

Linux#

Run in terminalbash
cd ~/docker_volumes/infisical
cat > docker-compose.yml << 'EOF'
services:
  infisical:
    image: infisical/infisical:v0.167.15
    restart: unless-stopped
    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_healthy
    env_file: .env
    environment:
      - NODE_ENV=production
    ports:
      - "127.0.0.1:8080:8080"
    networks:
      - infisical

  redis:
    image: redis:7.4.12-alpine
    restart: unless-stopped
    command: ["redis-server", "--appendonly", "yes", "--maxmemory-policy", "noeviction"]
    volumes:
      - redis_data:/data
    networks:
      - infisical
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 5s
      timeout: 3s
      retries: 10

  db:
    image: postgres:16.16-alpine
    restart: unless-stopped
    environment:
      - POSTGRES_USER=${POSTGRES_USER}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_DB=${POSTGRES_DB}
    volumes:
      - pg_data:/var/lib/postgresql/data
    networks:
      - infisical
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
      interval: 5s
      timeout: 10s
      retries: 10

volumes:
  pg_data:
  redis_data:

networks:
  infisical:
EOF
docker compose up -d
docker compose ps
docker compose logs --tail=50 infisical

Windows (PowerShell)#

The single-quoted @' form keeps PowerShell away from ${...}.

Codepowershell
Set-Location "$HOME\docker_volumes\infisical"
@'
services:
  infisical:
    image: infisical/infisical:v0.167.15
    restart: unless-stopped
    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_healthy
    env_file: .env
    environment:
      - NODE_ENV=production
    ports:
      - "127.0.0.1:8080:8080"
    networks:
      - infisical

  redis:
    image: redis:7.4.12-alpine
    restart: unless-stopped
    command: ["redis-server", "--appendonly", "yes", "--maxmemory-policy", "noeviction"]
    volumes:
      - redis_data:/data
    networks:
      - infisical
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 5s
      timeout: 3s
      retries: 10

  db:
    image: postgres:16.16-alpine
    restart: unless-stopped
    environment:
      - POSTGRES_USER=${POSTGRES_USER}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_DB=${POSTGRES_DB}
    volumes:
      - pg_data:/var/lib/postgresql/data
    networks:
      - infisical
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
      interval: 5s
      timeout: 10s
      retries: 10

volumes:
  pg_data:
  redis_data:

networks:
  infisical:
'@ | Set-Content -Encoding ascii docker-compose.yml
docker compose up -d
docker compose ps
docker compose logs --tail=50 infisical

Mac (Terminal)#

Same commands as Linux (Docker Desktop).

Check it worked. docker compose ps lists all three as running, db and redis as healthy. The first start is slow: a large image, then database migrations (table changes). Then ask the status route (on Windows use curl.exe or Invoke-RestMethod):

Run in terminalbash
curl -s http://127.0.0.1:8080/api/status
File contenttext
{"date":"...","message":"Ok","emailConfigured":false,"redisConfigured":true, ...}

That is the shape from the route's source at v0.167.15, not a captured run.

Tip: Never publish this port as 8080:8080 on a server. Docker publishes on every interface and its firewall rules go around ufw. Keep 127.0.0.1: until a proxy is in front.

First run: create the admin account (all systems)#

Until the first super admin exists, anyone who reaches the page could take over the instance. The activation token closes that gap.

  1. Open http://localhost:8080. You should see the sign-up page with a field for the activation token.
  2. Paste INITIAL_SETUP_ACTIVATION_TOKEN from .env, then enter your email and a strong password. The first account becomes the instance administrator.
  3. Open the Admin Console, then Authentication. Allow user signups should not be Anyone. New installs start with it off; an older install keeps its old setting, so check.

Without SMTP (an outgoing mail server) sign-up, login and secrets work, but multi-factor sign-in, e-mail invites and login alerts do not.

Step 3: Add secrets, install the CLI and log in a program#

Create a project and a test secret (browser)#

  1. Select Secrets Management, then + Add New Project. Name it demo-app. New projects have Development, Staging and Production environments.
  2. In Development, choose Paste Secrets (or drag a .env file in), paste the line below, review it, tick Development under Target Environments and select Upload Secrets. DEMO_MESSAGE should appear in the list.
File contenttext
DEMO_MESSAGE=hello-from-infisical
  1. Open Project Settings and select Copy Project ID. Keep it for Step 4.

Create a machine identity (browser)#

  1. In the project, go to Access Control, then Machine Identities, then Add Machine Identity, then Create New.
  2. Name it demo-app-reader, give it a role that can read secrets, and create it. Universal Auth is on by default.
  3. Under Authentication, open Universal Auth and copy the Client ID. Select Create Client Secret and copy it now. You cannot view it again.

Linux#

On Debian or Ubuntu:

Run in terminalbash
curl -1sLf 'https://artifacts-cli.infisical.com/setup.deb.sh' | sudo -E bash
sudo apt-get update && sudo apt-get install -y infisical
infisical --version

For Red Hat type systems use setup.rpm.sh and sudo yum install infisical. The old Cloudsmith repository stopped serving the CLI on 16 September 2026; use artifacts-cli.infisical.com.

Windows (PowerShell)#

Run in terminalpowershell
winget install infisical

Open a new PowerShell window and run infisical --version. Scoop also works (scoop bucket add org https://github.com/Infisical/scoop-infisical.git, then scoop install infisical).

Mac (Terminal)#

Run in terminalbash
brew install infisical/get-cli/infisical
infisical --version

Check it worked. infisical --version prints a version number.

Log in as the identity (all systems)#

A machine login does not remember your server. Without INFISICAL_DOMAIN every command goes to Infisical's US cloud. Replace the two placeholders.

Run in terminalbash
export INFISICAL_DOMAIN="http://localhost:8080"
export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=<client-id> --client-secret=<client-secret> --silent --plain)
infisical login status
Codepowershell
$env:INFISICAL_DOMAIN = "http://localhost:8080"
$env:INFISICAL_TOKEN = infisical login --method=universal-auth --client-id=<client-id> --client-secret=<client-secret> --silent --plain
infisical login status

You should see that you are authenticated and the Domain line shows your address. (setx also saves a variable, but only for new windows.)

Step 4: Run a program with its secrets#

infisical secrets-manager run (short form infisical sm run) fetches the secrets and starts your command with them as environment variables. Nothing is written to disk. Replace <project-id> with the ID from Step 3.

Linux#

Run in terminalbash
infisical secrets-manager run --projectId=<project-id> --env=dev -- printenv DEMO_MESSAGE

Windows (PowerShell)#

Run in terminalpowershell
infisical secrets-manager run --projectId=<project-id> --env=dev -- cmd /c "echo %DEMO_MESSAGE%"

Mac (Terminal)#

Same command as Linux.

Check it worked. The terminal prints hello-from-infisical.

Secrets are fetched at start. Change a value in Infisical and a running program does not see it: restart the program. (--watch does that for you, for development.) A secret overrides a shell variable of the same name; HOME, PATH and a few others are never injected.

Use it in a Docker container#

Put the CLI in your image and start your program through it (Alpine example from the Docker guide):

File contentdockerfile
RUN apk add --no-cache bash wget \
    && wget -qO- 'https://artifacts-cli.infisical.com/setup.apk.sh' | sh \
    && apk add --no-cache infisical

CMD ["infisical", "sm", "run", "--projectId=<project-id>", "--env=dev", "--", "npm", "start"]

Never put the client ID, secret or token in a Dockerfile. Pass the token at start, and pin the CLI version in real images:

Run in terminalbash
docker run --rm --env INFISICAL_TOKEN --env INFISICAL_DOMAIN my-app-image

Inside a container, localhost is the container itself. The docs say to use host.docker.internal for an instance on the Docker host. We expect that to fail on Linux while the port is bound to 127.0.0.1. Two safer ways: use your HTTPS address (next section), or join the app container to Infisical's network and use the service name (--network infisical_infisical, INFISICAL_DOMAIN=http://infisical:8080; the network is named after the folder). We did not test either.

An expired token does not stop a program that already started. Every new start needs a valid token and a reachable Infisical.

Need a file instead? infisical secrets-manager secrets export --format=dotenv --output-file=./.env writes plain text. Treat it as a secret; it goes stale when a value changes.

Put it behind HTTPS with Traefik#

This section is for a server with a domain; skip it on one computer. Infisical documents no sub-path hosting, so use a host name like secrets.<your-domain>, with a DNS record to the server and ports 80 and 443 open.

Both routes remove the host port and use the shared proxy network. Create it once:

Run in terminalbash
docker network create proxy

For both routes, change three things in .env, then recreate:

  • SITE_URL=https://secrets.<your-domain>
  • add HTTPS_ENABLED=true (hardening page: marks login cookies as secure)
  • add TRUSTED_PROXY_CIDRS=<subnet>, the range of the proxy network (docker network inspect proxy, field Subnet, for example 172.18.0.0/16). Unset, Infisical trusts forwarded client addresses from anyone.

With Traefik#

On a server that already runs Traefik v3 (see our Traefik guide), replace the ports: block of the infisical service with the network and labels. We assume entrypoint https and resolver le, as in that guide. Every router that uses Let's Encrypt must carry its own tls.certresolver label.

File contentyaml
services:
  infisical:
    image: infisical/infisical:v0.167.15
    restart: unless-stopped
    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_healthy
    env_file: .env
    environment:
      - NODE_ENV=production
    networks:
      - infisical
      - proxy
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=proxy"
      - "traefik.http.routers.infisical.rule=Host(`secrets.<your-domain>`)"
      - "traefik.http.routers.infisical.entrypoints=https"
      - "traefik.http.routers.infisical.tls=true"
      - "traefik.http.routers.infisical.tls.certresolver=le"
      - "traefik.http.services.infisical.loadbalancer.server.port=8080"

networks:
  infisical:
  proxy:
    external: true

Keep the redis, db and volumes: parts from Step 2, then run docker compose up -d. Check it worked. curl -I https://secrets.<your-domain>/api/status returns an HTTP status line over HTTPS with a valid certificate.

Without Traefik: Caddy#

Choose this if you have no Traefik. Caddy gets and renews its own certificates. Our Caddy guide covers details, including trusting Caddy's local root. Use the same infisical service without the labels: block, then add Caddy:

Run in terminalbash
mkdir -p ~/docker_volumes/caddy/{conf,data,config}
cd ~/docker_volumes/caddy
cat > docker-compose.yml << 'EOF'
services:
  caddy:
    image: caddy:2.11.9
    container_name: caddy
    restart: unless-stopped
    ports:
      - "80:80/tcp"
      - "443:443/tcp"
      - "443:443/udp"
    volumes:
      - ./conf:/etc/caddy:ro
      - ./data:/data
      - ./config:/config
    networks:
      - proxy

networks:
  proxy:
    external: true
EOF

Save ~/docker_volumes/caddy/conf/Caddyfile:

File contenttext
secrets.example.com {
    reverse_proxy infisical:8080
}

For a home-only name add tls internal inside the block. Start both stacks with docker compose up -d. Caddy reaches Infisical by service name on the proxy network (infisical:8080, never 127.0.0.1). The Docker commands work unchanged in PowerShell and Terminal.

Check it worked. curl -I https://secrets.example.com/api/status shows an HTTP status line over HTTPS.

Security and testing#

ControlHow
Where it listens127.0.0.1:8080 or the proxy network. Never 0.0.0.0
First adminThe activation token (ignored after setup)
SignupsOff by default on new installs. Check Admin Console, Authentication
Keys and passwords.env readable only by you (chmod 600, or icacls on Windows). Never in Git, never in a Dockerfile
Database, Redis, DockerNo ports: for db or redis (the docs say never to expose 5432 or 6379). Do not mount the Docker socket; Infisical does not need it
Machine identitiesOne per program, with a role that reads only its project
Internal addressesLeave ALLOW_INTERNAL_IP_CONNECTIONS at false (it weakens request protection)

What leaves the machine. We did not audit all traffic. Per the docs: a GitHub release check at start and weekly (DISABLE_UPDATE_CHECK=true stops it), usage telemetry (TELEMETRY_ENABLED=false), mail if you set SMTP, and any integration you connect. The CLI has its own --telemetry flag, on by default.

What injection does not do. Secrets still sit in the program's environment, where the host, logs and child processes can see them.

Quick tests after each change:

Run in terminalbash
cd ~/docker_volumes/infisical
docker compose ps
docker compose logs --tail=100 infisical
curl -s http://127.0.0.1:8080/api/status

Then run the Step 4 command again. On Windows use curl.exe.

Infisical, Vaultwarden, SOPS or OpenBao?#

ToolBest forTrade-off
InfisicalApp secrets and .env files, web page, environments, machine loginsNeeds PostgreSQL and Redis; SSO and dynamic secrets are paid
VaultwardenYour passwords, with autofillNot built to feed programs
SOPS (MPL-2.0)Encrypted secret files in Git, no serverNo web page, no per-program logins
OpenBaoTeams that want a Vault-style engineMore to learn and run

Pick Vaultwarden for people, Infisical for programs, SOPS for no server at all. The catch with Infisical: sign-in with your own OIDC provider is paid.

Common mistakes#

These come from Infisical's issues, its docs and what AI assistants often write.

MistakeWhy it happensDo this instead
REDIS_URL=redis://localhost:6379 (issue 1767)Inside the container localhost is Infisical itselfUse the service name: redis://redis:6379, and db for PostgreSQL
A different ENCRYPTION_KEY than the data was made with (issue 2189)The rows are locked with the old keyKeep the original key. One reporter deleted the volumes, which destroys the data
Logged out on every refresh (issue 559)Secure cookies (HTTPS_ENABLED=true) on a plain-HTTP address: the browser drops themUse HTTPS, or leave HTTPS_ENABLED at its default false on plain HTTP
CLI talks to Infisical's cloud (issue 2659)A machine login does not save your server, so you get No identity with specified client ID was found. A 2024 CLI bug gave the same errorSet INFISICAL_DOMAIN first (Step 3)
Expecting SITE_URL to change where Infisical listens (issue 3435)It only sets the public address used in links. The start-up log still printed localhostRoute the host name with your proxy (HTTPS section)
Exporting .env as a backup (issue 3148)The export has values only, not folders, imports or linksBack up PostgreSQL and the key (see Updates and backups)
"Download as .env" breaks JSON values (issue 9879, open)The web page escapes double quotesUse the CLI export, which writes KEY='value'
Editing .env, then docker compose restartrestart does not re-read the environment (Docker's docs), though Infisical's page suggests itRun docker compose up -d
Moving PostgreSQL 14 to 16 by changing the tagA major version cannot open the old data folderDump, start a fresh 16 volume, restore (Updates and backups)
docker compose down -v to "fix" a start-v deletes the database volumeRead the logs first. Use -v only on a throwaway test
AI assistants: an old image such as latest-postgres, a MongoDB setup, or latestOld tutorials. Only PostgreSQL is supported, and tags look like v0.167.15Pin infisical/infisical:v0.167.15
AI assistants: invented settings like DISABLE_SIGNUP or BASE_PATH, port 80 for the app, the server tag as the CLI versionGuessing. Signups are an Admin Console option; no sub-path is documented; the app listens on 8080; the CLI has its own numbersUse the names in this guide and check the docs at your tag

Tip: Keep ENCRYPTION_KEY and a database dump together in a backup away from the server. One without the other cannot be restored.

Tip: After every .env change run docker compose up -d, then read docker compose logs --tail=50 infisical. A wrong activation token length stops Infisical.

Tip: Never paste real secrets into chat assistants or screenshots when you ask for help. Use fake values like DEMO_MESSAGE.

Troubleshooting#

ProblemSolution
Page does not opendocker compose ps. Only this computer can reach 127.0.0.1:8080
Logged out on refreshHTTPS_ENABLED=true but the address is plain HTTP. Use HTTPS or remove the line
Infisical exits at startCheck .env: an activation token under 32 characters, or a bad DB_CONNECTION_URI or REDIS_URL
UI looks broken after an updateHard-refresh or use a private window (browser cache, per the upgrade guide)
infisical login status shows the cloud addressSet INFISICAL_DOMAIN

Exact error texts#

  • Unsupported state or unable to authenticate data (HTTP 500 when creating a secret, issue 2189): the data was made with a different ENCRYPTION_KEY. Put the original key back.
  • Boot up migration failed with a KnexTimeoutError (issue 3233): reported on one 2-vCPU, 4 GB machine running Infisical and PostgreSQL, on an old version. No single cause was found. Check that db is healthy.
  • Can't take lock to run migrations: Migration table is already locked (same issue): a start was interrupted. The message suggests knex migrate:unlock, which was missing in the container. Restore the pre-upgrade backup instead.
  • Missing project KMS key ID (issue 5309): reported with a Redis cluster on v0.154.2, closed. This guide uses one Redis.
  • FastifyError: Unsupported Media Type / FST_ERR_CTP_INVALID_MEDIA_TYPE as an HTTP 500 (issue 7122): seen on v0.161.x; a comment says it was gone on v0.162.13.
  • DatabaseError: COMMIT; - duplicate key value violates unique constraint "import_pos_composite_uniqe" (issue 9466): two imports created in one folder at once. Create them one at a time.

Known bugs (open, November 2026)#

  • Issue 9466: simultaneous secret-import creation in one folder returns 500.
  • Issue 9879: the web page's Copy and "Download as .env" escape double quotes, which Node's dotenv cannot read in JSON values. The CLI export is fine.

Diagnose with docker compose ps, docker compose logs --tail=100 infisical and docker compose exec db pg_isready.

Updates and backups#

Update. Back up first. Read the release notes between your version and the new one, or use Infisical's upgrade tool. Change the tag, then:

Run in terminalbash
cd ~/docker_volumes/infisical
docker compose pull
docker compose up -d
docker compose logs -f infisical

Migrations run by themselves at start. Watch the log until they finish. Never run an older Infisical on a database a newer one has migrated (docs): restore the pre-upgrade dump together with the older tag.

Back up three things: a PostgreSQL dump (the official pattern), .env (it holds the key) and the Compose file.

Linux and Mac#

Run in terminalbash
cd ~/docker_volumes/infisical
docker compose exec -T db pg_dump -U infisical infisical > "backups/infisical-$(date +%F).sql"
tar -czf "backups/config-$(date +%F).tar.gz" .env docker-compose.yml
chmod 600 backups/*

Schedule it at 03:00 with crontab -e. Cron needs the folder and \% for each %:

File contenttext
0 3 * * * cd ~/docker_volumes/infisical && docker compose exec -T db pg_dump -U infisical infisical > backups/infisical-$(date +\%F).sql

On a Mac that sleeps at night, run it when the Mac is awake. The files hold your key, so keep copies off the machine, for example with our restic guide.

Windows (PowerShell)#

Redirecting pg_dump in PowerShell can change the file's encoding, so we write the dump inside the container and copy it out.

Codepowershell
Set-Location "$HOME\docker_volumes\infisical"
$d = Get-Date -Format yyyy-MM-dd
docker compose exec -T db pg_dump -U infisical -f /tmp/backup.sql infisical
docker compose cp db:/tmp/backup.sql ".\backups\infisical-$d.sql"
docker compose exec -T db rm /tmp/backup.sql
Copy-Item .env ".\backups\env-$d.txt"
Copy-Item docker-compose.yml ".\backups\compose-$d.yml"

Run it nightly with Task Scheduler. Redis holds the job queue (rotations, syncs), not your secret values. The requirements page still says to back it up, so if you use those features, also copy the redis_data volume.

Restore test. Never restore over the live stack. In a new folder with a different name, put .env, docker-compose.yml and one dump, and change the published port to 127.0.0.1:8081:8080 (and SITE_URL to match). The folder name gives the stack its own volumes. Then:

Run in terminalbash
docker compose up -d db
docker compose cp backups/infisical-<date>.sql db:/tmp/restore.sql
docker compose exec -T db psql -U infisical -f /tmp/restore.sql infisical
docker compose up -d

Open http://localhost:8081, sign in and read DEMO_MESSAGE: it proves dump and key match. Remove the test with docker compose down -v in that folder only.

Performance and resources#

The docs give sizes, not measurements. Measure on your machine:

Run in terminalbash
docker stats --no-stream
SettingDefaultWhat it does
DB_POOL_MAX10Most database connections per Infisical instance. Leave it alone at home
Scalingone containerThe app scales sideways, but the docs call Docker Compose "not designed for high availability" and point to Kubernetes

The minimum is 2 cores and 4 GB for the whole stack. The migration-timeout report below came from a small shared host, so leave room.

FAQ#

Is Infisical free? The code is MIT, except ee/ folders, which need a paid licence. Secrets, environments and machine logins work without one. OIDC, SAML, LDAP, SCIM and dynamic secrets do not.

Does it replace my .env files by itself? No. You import the values and start each program with infisical sm run.

If Infisical is down, do my apps break? A running program keeps the secrets it already fetched. A program that starts while Infisical is down cannot get them. Start Infisical first.

Can I sign in with my own OIDC provider for free? No. The repository's SSO notes list OIDC, SAML, LDAP, SCIM and groups as paid.

Is the .env export a backup? No. It holds values only, not folders, imports or links (issue 3148). Back up PostgreSQL and ENCRYPTION_KEY.

Sources#

Checked against the official docs on 2026-11-25.