Ubuntu 22.04 LTS | Self-Hosted | Open Source
Complete AMI guide for Infisical Community Edition. Learn how to access your secrets management platform, create projects, and integrate with your applications.
Follow these steps to access your Infisical secrets management platform.
Connect to your EC2 instance using SSH with your key pair.
ssh -i your-key.pem ubuntu@<your-instance-ip>
View the auto-generated admin credentials and encryption key.
sudo cat /opt/infisical/credentials.txt
Open Infisical in your browser using HTTPS on port 443.
https://<your-instance-ip>
Create your first admin account using the web interface.
Check that all Infisical services are running correctly.
# Check health endpoint
curl -k https://localhost/api/status
# Check service status
sudo systemctl status infisical
All credentials are automatically generated and stored securely on your instance.
sudo cat /opt/infisical/credentials.txt
Infisical provides a powerful web interface for managing your secrets across projects and environments.
Sign up for your first admin account on the web interface.
https://<your-ip>Organize your secrets into projects for different applications.
Store your application secrets securely.
DATABASE_URL)Generate tokens for your applications to access secrets.
Import from .env files or other secret managers via the web UI or CLI.
View secret history and rollback to previous versions when needed.
Invite team members and assign roles with granular permissions.
Track who accessed or modified secrets with detailed audit logs.
Reference secrets across environments using ${SECRET_NAME} syntax.
Organize secrets into folders for better project structure.
Integrate Infisical with your applications and CI/CD pipelines.
Install the CLI on your local machine or CI/CD environment.
# macOS
brew install infisical/get-cli/infisical
# Linux (Debian/Ubuntu)
curl -1sLf 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' | sudo -E bash
sudo apt-get update && sudo apt-get install -y infisical
# npm (all platforms)
npm install -g @infisical/cli
Login to your Infisical instance using the CLI.
# Set your Infisical URL
export INFISICAL_API_URL=https://<your-instance-ip>
# Login with your account
infisical login
# Or use service token
export INFISICAL_TOKEN=<your-service-token>
Retrieve secrets using the CLI or inject into your app.
# Export secrets to .env
infisical export --env=prod > .env
# Run command with secrets injected
infisical run --env=prod -- npm start
# List all secrets
infisical secrets --env=prod
Access secrets programmatically via the REST API.
# Get secrets via API
curl -X GET "https://<your-ip>/api/v3/secrets/raw" \
-H "Authorization: Bearer <service-token>" \
-H "Content-Type: application/json" \
-d '{"workspaceId": "<project-id>", "environment": "prod"}'
INFISICAL_API_URL to point to your self-hosted instance.
infisical run to inject secrets without storing them on disk.
Protect your secrets data with regular backups.
CRITICAL: Back up your ENCRYPTION_KEY!
The ENCRYPTION_KEY in your credentials file is essential for decrypting all stored secrets. If lost, your secrets cannot be recovered. Store this key securely in a separate location (e.g., AWS Secrets Manager, password manager).
Back up the PostgreSQL database containing your secrets.
# Create database backup
sudo -u postgres pg_dump infisical > infisical_backup_$(date +%Y%m%d).sql
# Compressed backup
sudo -u postgres pg_dump -Fc infisical > infisical_backup_$(date +%Y%m%d).dump
Restore your database from a backup file.
# Stop Infisical service
sudo systemctl stop infisical
# Restore from SQL backup
sudo -u postgres psql infisical < infisical_backup.sql
# Or from compressed backup
sudo -u postgres pg_restore -d infisical infisical_backup.dump
# Start Infisical service
sudo systemctl start infisical
Securely store your encryption key for disaster recovery.
# View encryption key
sudo cat /opt/infisical/credentials.txt | grep ENCRYPTION_KEY
# Store in AWS Secrets Manager
aws secretsmanager create-secret \
--name infisical/encryption-key \
--secret-string "$(sudo cat /opt/infisical/credentials.txt | grep ENCRYPTION_KEY)"
Use AWS EBS snapshots for full instance backup.
Follow these steps to secure your Infisical deployment.
Important: Replace the self-signed SSL certificate with a valid certificate from a trusted CA for production use. Consider using AWS Certificate Manager with an Application Load Balancer.
Install a valid SSL certificate from Let's Encrypt or AWS ACM for production.
Restrict port 443 access to only your IP addresses or VPC CIDR range.
Store the ENCRYPTION_KEY in AWS Secrets Manager or similar secure storage.
# Install certbot for Let's Encrypt
sudo apt install certbot python3-certbot-nginx
# Obtain SSL certificate
sudo certbot --nginx -d secrets.yourdomain.com
# Update SITE_URL in environment
sudo nano /opt/infisical/.env
# Set: SITE_URL=https://secrets.yourdomain.com
# Restart Infisical
sudo systemctl restart infisical
Common issues and how to resolve them.
Symptom: Connection refused or timeout when accessing the dashboard.
Solution:
443sudo systemctl status infisicalcurl -k https://localhost/api/statusSymptom: Infisical service fails to start or keeps crashing.
Solution:
sudo journalctl -u infisical -fsudo systemctl status postgresqlsudo systemctl status redisSymptom: Browser shows certificate warning or CLI rejects connection.
Solution:
--insecure flag temporarilySymptom: "Cannot connect to database" error in logs.
Solution:
sudo systemctl status postgresqlsudo -u postgres psql -l/opt/infisical/.env# Infisical service logs
sudo journalctl -u infisical -f
# PostgreSQL logs
sudo journalctl -u postgresql -f
# Redis logs
sudo journalctl -u redis -f
# All services status
sudo systemctl status infisical postgresql redis
Our team is available 24/7 to assist you with any questions or issues.
support@flowopsconsulting.co.uk