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.
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.
| What | Value (official sources, read November 2026) |
|---|---|
| Current version | Infisical v0.167.15, released 24 November 2026 (previous: v0.167.14, 20 November) |
| Image to pin | infisical/infisical:v0.167.15 (Docker Hub; amd64 and arm64) |
| Time needed | About 45 minutes (our estimate) |
| RAM | Docs minimum for the whole stack: 4 GB. No idle measurement found |
| Ports | 8080 inside the container. PostgreSQL 5432 and Redis 6379 stay private |
| Licence | MIT for the repository, except folders named ee/, which need a paid Infisical licence |
| Official docs | infisical.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
infisicalcommand (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".
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#
| System | What to have |
|---|---|
| Linux | Docker Engine 20.10+ and Compose 2.0+ (docs example: Ubuntu 20.04+); amd64 or arm64 |
| Windows | Docker Desktop in Linux-container mode (WSL 2 backend), PowerShell |
| Mac | Docker 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):
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.1only) - [ ] 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#
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.
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_KEYto 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.envwith a new key.
What the less obvious lines mean:
| Variable | Meaning |
|---|---|
SITE_URL | The address you type in the browser, with http:// or https://. Required |
HTTPS_ENABLED | Not 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_TOKEN | 32 to 256 characters, or Infisical will not start |
TELEMETRY_ENABLED, DISABLE_UPDATE_CHECK | Turn 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 TAGand uses an untaggedredis. - 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
noevictionand keep data on disk. We set both. - Loopback port.
127.0.0.1:8080:8080instead of80:8080: only this computer can open it until you add HTTPS. The image already listens on 8080 on all container interfaces (PORTandHOSTin its Dockerfile), so we set neither. - Less exposure. The database container gets only its three variables, not your whole
.env. We left out the obsoleteversion:line,pull_policy: alwaysand theALLOW_EMPTY_PASSWORDline, which we found no use for with the official Redis image.
Linux#
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 ${...}.
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):
curl -s http://127.0.0.1:8080/api/status
{"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:8080on a server. Docker publishes on every interface and its firewall rules go aroundufw. Keep127.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.
- Open
http://localhost:8080. You should see the sign-up page with a field for the activation token. - Paste
INITIAL_SETUP_ACTIVATION_TOKENfrom.env, then enter your email and a strong password. The first account becomes the instance administrator. - 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)#
- Select Secrets Management, then + Add New Project. Name it
demo-app. New projects have Development, Staging and Production environments. - 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_MESSAGEshould appear in the list.
DEMO_MESSAGE=hello-from-infisical
- Open Project Settings and select Copy Project ID. Keep it for Step 4.
Create a machine identity (browser)#
- In the project, go to Access Control, then Machine Identities, then Add Machine Identity, then Create New.
- Name it
demo-app-reader, give it a role that can read secrets, and create it. Universal Auth is on by default. - 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:
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)#
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)#
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.
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
$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#
infisical secrets-manager run --projectId=<project-id> --env=dev -- printenv DEMO_MESSAGE
Windows (PowerShell)#
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):
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:
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:
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 theproxynetwork (docker network inspect proxy, fieldSubnet, for example172.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.
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:
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:
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#
| Control | How |
|---|---|
| Where it listens | 127.0.0.1:8080 or the proxy network. Never 0.0.0.0 |
| First admin | The activation token (ignored after setup) |
| Signups | Off 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, Docker | No 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 identities | One per program, with a role that reads only its project |
| Internal addresses | Leave 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:
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?#
| Tool | Best for | Trade-off |
|---|---|---|
| Infisical | App secrets and .env files, web page, environments, machine logins | Needs PostgreSQL and Redis; SSO and dynamic secrets are paid |
| Vaultwarden | Your passwords, with autofill | Not built to feed programs |
| SOPS (MPL-2.0) | Encrypted secret files in Git, no server | No web page, no per-program logins |
| OpenBao | Teams that want a Vault-style engine | More 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.
| Mistake | Why it happens | Do this instead |
|---|---|---|
REDIS_URL=redis://localhost:6379 (issue 1767) | Inside the container localhost is Infisical itself | Use 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 key | Keep 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 them | Use 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 error | Set 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 localhost | Route the host name with your proxy (HTTPS section) |
| Exporting .env as a backup (issue 3148) | The export has values only, not folders, imports or links | Back up PostgreSQL and the key (see Updates and backups) |
| "Download as .env" breaks JSON values (issue 9879, open) | The web page escapes double quotes | Use the CLI export, which writes KEY='value' |
Editing .env, then docker compose restart | restart does not re-read the environment (Docker's docs), though Infisical's page suggests it | Run docker compose up -d |
| Moving PostgreSQL 14 to 16 by changing the tag | A major version cannot open the old data folder | Dump, start a fresh 16 volume, restore (Updates and backups) |
docker compose down -v to "fix" a start | -v deletes the database volume | Read the logs first. Use -v only on a throwaway test |
AI assistants: an old image such as latest-postgres, a MongoDB setup, or latest | Old tutorials. Only PostgreSQL is supported, and tags look like v0.167.15 | Pin 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 version | Guessing. Signups are an Admin Console option; no sub-path is documented; the app listens on 8080; the CLI has its own numbers | Use the names in this guide and check the docs at your tag |
Tip: Keep
ENCRYPTION_KEYand a database dump together in a backup away from the server. One without the other cannot be restored.
Tip: After every
.envchange rundocker compose up -d, then readdocker 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#
| Problem | Solution |
|---|---|
| Page does not open | docker compose ps. Only this computer can reach 127.0.0.1:8080 |
| Logged out on refresh | HTTPS_ENABLED=true but the address is plain HTTP. Use HTTPS or remove the line |
| Infisical exits at start | Check .env: an activation token under 32 characters, or a bad DB_CONNECTION_URI or REDIS_URL |
| UI looks broken after an update | Hard-refresh or use a private window (browser cache, per the upgrade guide) |
infisical login status shows the cloud address | Set 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 differentENCRYPTION_KEY. Put the original key back.Boot up migration failedwith aKnexTimeoutError(issue 3233): reported on one 2-vCPU, 4 GB machine running Infisical and PostgreSQL, on an old version. No single cause was found. Check thatdbis healthy.Can't take lock to run migrations: Migration table is already locked(same issue): a start was interrupted. The message suggestsknex 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_TYPEas 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:
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#
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 %:
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.
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:
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:
docker stats --no-stream
| Setting | Default | What it does |
|---|---|---|
DB_POOL_MAX | 10 | Most database connections per Infisical instance. Leave it alone at home |
| Scaling | one container | The 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#
- Release v0.167.15, README, LICENSE, docker-compose.prod.yml, .env.example, sso.md, Dockerfile, status route - read November 2026
- Docker Hub tags infisical/infisical, postgres (
16.16-alpinechecked) and redis (7.4.12-alpinechecked) - November 2026 - Infisical docs: Compose, variables, requirements, hardening, upgrading, FAQ, CLI install, CLI quickstart, CLI reference, Docker integration, first secret, dynamic secrets - read November 2026
- Infisical CLI (v0.45.14), PostgreSQL versioning, Docker compose restart, Caddy v2.11.9 - read November 2026
- GitHub issues #559, #1767, #2189, #2659, #3148, #3233, #3435, #5309, #7122, #9466 and #9879 - read November 2026
Checked against the official docs on 2026-11-25.