Prerequisites
- A Linux server (Ubuntu 20.04+ recommended) or macOS/Windows with Docker Desktop
- Docker Engine (version 20.10+)
- Docker Compose (version 2.0+ recommended)
System Requirements
The following are minimum requirements for running Infisical with Docker Compose:| Component | Minimum | Recommended |
|---|---|---|
| CPU | 2 cores | 4 cores |
| RAM | 4 GB | 8 GB |
| Disk | 20 GB | 50 GB+ (SSD recommended) |
Deployment Steps
- Docker Compose
- Podman Compose
Verify prerequisites
Confirm that Docker and Docker Compose are installed on your machine:You should see version information for both commands. If not, install Docker and Docker Compose following the official documentation.
Download the Docker Compose file
You can obtain the Infisical docker compose file by using a command-line downloader such as
wget or curl. If your system doesn’t have either of these, you can use an equivalent command that works with your machine.- curl
- wget
Configure environment variables
Infisical requires a set of credentials used for connecting to dependent services such as Postgres, Redis, etc. The default credentials can be downloaded using one of the commands listed below.Once downloaded, the credentials file will be saved to your working directory as
- curl
- wget
.env file. View all available configurations here.Start Infisical
Start all services in detached mode:This command starts three containers:
- backend: The main Infisical application (exposed on host port 80, internal port 8080)
- db: PostgreSQL database for storing encrypted secrets
- redis: Redis for caching and job queues
Managing Your Deployment
Stopping and Restarting Services
To stop all Infisical services:Data Persistence and Volumes
The Docker Compose configuration uses named volumes to persist data:| Volume | Purpose | Data Stored |
|---|---|---|
pg_data | PostgreSQL data | All encrypted secrets, users, projects, and configuration |
redis_data | Redis data | Cache and job queue data (can be regenerated) |
Viewing Logs
To view logs from all services:Additional Configuration
Firewall Configuration
Firewall Configuration
Configure your firewall to allow traffic to Infisical while securing other services:Required ports:
Internal ports (should NOT be exposed publicly):
UFW (Ubuntu/Debian):firewalld (RHEL/CentOS):
| Port | Service | Access |
|---|---|---|
| 80 | HTTP (Infisical) | Public (or internal network) |
| 443 | HTTPS (if using TLS) | Public (or internal network) |
| Port | Service | Notes |
|---|---|---|
| 5432 | PostgreSQL | Container-to-container only |
| 6379 | Redis | Container-to-container only |
SMTP/Email Configuration
SMTP/Email Configuration
Infisical uses email for user invitations, password resets, and notifications. Configure SMTP by adding these variables to your Common SMTP providers:After updating the
.env file:- AWS SES
- SendGrid
- Gmail
.env file, restart Infisical:Enable HTTPS with NGINX
Enable HTTPS with NGINX
We recommend securing your Infisical deployment with HTTPS using a reverse proxy like NGINX.1. Obtain SSL certificates (e.g., via Let’s Encrypt):2. Create NGINX configuration directory:3. Add NGINX service to 4. Create 5. Update 6. Restart services:
docker-compose.prod.yml:./nginx/nginx.conf:.env:Externalize Database and Redis
Externalize Database and Redis
For higher availability, use external managed services like AWS RDS and ElastiCache.Update your Remove or comment out
.env:db and redis services in docker-compose.prod.yml.Ensure firewall/VPC access to these services is properly configured.Backup Strategy
Backup Strategy
Regular backups are critical for protecting your data.Database backup:Automated daily backups (cron):Restore from backup:
Enable Prometheus Monitoring
Enable Prometheus Monitoring
Infisical exposes Prometheus metrics when enabled.1. Add to 2. Expose port 3. Configure Prometheus to scrape
.env:9464 in docker-compose.prod.yml by adding to the backend service:localhost:9464 or the container DNS.See the Monitoring Guide for full setup.Upgrade Instructions
Upgrade Instructions
Keeping Infisical up-to-date ensures you receive the latest features and security patches.1. Back up your database:2. Update the image tag in 4. Verify the upgrade:Watch for successful database migration messages. See the Upgrade Guide for more details.
docker-compose.prod.yml to the desired version.3. Pull and restart:Troubleshooting
Containers fail to start
Containers fail to start
Check container status:View startup logs:Common causes:
- Port 80 already in use: Stop other services or change the port mapping
- Insufficient memory: Ensure at least 4GB RAM is available
- Invalid
.envfile: Check for syntax errors or missing required variables
Database connection errors
Database connection errors
Check if PostgreSQL is running:Verify database credentials:Check Infisical logs for connection errors:If the database was corrupted, you may need to restore from backup or recreate the volume:
Cannot access Infisical in browser
Cannot access Infisical in browser
Verify the service is running:Check if the port is listening:Check firewall rules:Verify SITE_URL is correct in your
.env file and matches how you’re accessing Infisical.Email/SMTP not working
Email/SMTP not working
Test SMTP connectivity:Check Infisical logs for email errors:Common issues:
- Incorrect SMTP credentials
- Firewall blocking outbound port 587 or 465
- SMTP provider requires specific authentication (e.g., Gmail App Passwords)
Performance issues
Performance issues
Check resource usage:Check for slow database queries:Solutions:
- Increase container memory limits in
docker-compose.prod.yml - Add more CPU cores to the host
- Consider migrating to a managed database for better performance
Reset admin password
Reset admin password
If you have lost access to your admin account, you can reset it via the database:For security reasons, passwords are hashed and cannot be directly reset in the database. Use the “Forgot Password” flow if SMTP is configured, or contact Infisical support for assistance.
Your Infisical instance should now be running on port
80 (or 443 if using TLS). Visit http://localhost:80 or https://<your-domain> to access your instance.
