Home
Available on AWS Marketplace

Infisical Secrets Management

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.

Community Edition Infisical v0.167.8 Ubuntu 22.04 LTS License MIT

Quick Start Guide

Follow these steps to access your Infisical secrets management platform.

1

SSH to Your Instance

Connect to your EC2 instance using SSH with your key pair.

ssh -i your-key.pem ubuntu@<your-instance-ip>
2

Find Your Credentials

View the auto-generated admin credentials and encryption key.

sudo cat /opt/infisical/credentials.txt
3

Access the Web UI

Open Infisical in your browser using HTTPS on port 443.

https://<your-instance-ip>

Create your first admin account using the web interface.

4

Verify Health Status

Check that all Infisical services are running correctly.

# Check health endpoint curl -k https://localhost/api/status # Check service status sudo systemctl status infisical

Credentials & Connection Details

All credentials are automatically generated and stored securely on your instance.

Infisical Web UI

  • URL: https://<your-instance-ip>
  • Port: 443 (HTTPS)
  • Health Check: /api/status
  • SSL: Self-signed certificate

Backend Services

  • Database: PostgreSQL
  • Cache: Redis
  • Encryption: AES-256-GCM
  • License: MIT (Community Edition)

Credentials File Location

sudo cat /opt/infisical/credentials.txt

Using the Infisical Dashboard

Infisical provides a powerful web interface for managing your secrets across projects and environments.

1

Create Your Account

Sign up for your first admin account on the web interface.

  • 1. Navigate to https://<your-ip>
  • 2. Click Sign Up
  • 3. Enter your email and create a password
  • 4. Complete the account setup wizard
2

Create a Project

Organize your secrets into projects for different applications.

  • 1. Click + New Project
  • 2. Enter a project name (e.g., "my-app")
  • 3. Choose environments (dev, staging, prod)
  • 4. Click Create Project
3

Add Secrets

Store your application secrets securely.

  • 1. Select your project and environment
  • 2. Click + Add Secret
  • 3. Enter key name (e.g., DATABASE_URL)
  • 4. Enter the secret value
  • 5. Click Save
4

Create Service Tokens

Generate tokens for your applications to access secrets.

  • 1. Go to Project Settings > Service Tokens
  • 2. Click Create Token
  • 3. Select environment and permissions
  • 4. Copy and securely store the token

Common Infisical Tasks

Import Secrets

Import from .env files or other secret managers via the web UI or CLI.

Secret Versioning

View secret history and rollback to previous versions when needed.

Access Control

Invite team members and assign roles with granular permissions.

Audit Logs

Track who accessed or modified secrets with detailed audit logs.

Secret References

Reference secrets across environments using ${SECRET_NAME} syntax.

Folders

Organize secrets into folders for better project structure.

API Access & CLI Usage

Integrate Infisical with your applications and CI/CD pipelines.

Install Infisical CLI

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

CLI Authentication

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>

Fetch Secrets

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

REST API

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"}'

Integration Tips

  • Use service tokens for CI/CD pipelines and automated deployments.
  • Set INFISICAL_API_URL to point to your self-hosted instance.
  • Use infisical run to inject secrets without storing them on disk.
  • Native SDKs available for Node.js, Python, Go, and more.

Backup & Recovery

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).

PostgreSQL Database Backup

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 from Backup

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

Backup Encryption Key

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)"

EBS Snapshots

Use AWS EBS snapshots for full instance backup.

  • Go to EC2 Console > Volumes
  • Select your instance's volume
  • Actions > Create Snapshot
  • Enable AWS Backup for automation

Security Configuration

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.

SSL/TLS Certificate

Install a valid SSL certificate from Let's Encrypt or AWS ACM for production.

Security Groups

Restrict port 443 access to only your IP addresses or VPC CIDR range.

Encryption Key

Store the ENCRYPTION_KEY in AWS Secrets Manager or similar secure storage.

Configure Custom Domain & SSL

# 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

Additional Security Recommendations

  • Enable MFA/2FA for all user accounts via the settings page.
  • Use service tokens with minimal required permissions for CI/CD.
  • Regularly rotate service tokens and review audit logs.
  • Place Infisical behind an Application Load Balancer with WAF.

Troubleshooting

Common issues and how to resolve them.

Can't Access Web UI

Symptom: Connection refused or timeout when accessing the dashboard.

Solution:

  • 1. Check Security Group allows inbound on port 443
  • 2. Verify Infisical is running: sudo systemctl status infisical
  • 3. Check health endpoint: curl -k https://localhost/api/status

Service Won't Start

Symptom: Infisical service fails to start or keeps crashing.

Solution:

  • 1. Check logs: sudo journalctl -u infisical -f
  • 2. Verify PostgreSQL is running: sudo systemctl status postgresql
  • 3. Verify Redis is running: sudo systemctl status redis

SSL Certificate Error

Symptom: Browser shows certificate warning or CLI rejects connection.

Solution:

  • 1. Accept self-signed cert in browser for testing
  • 2. For CLI, use --insecure flag temporarily
  • 3. Install valid certificate for production

Database Connection Failed

Symptom: "Cannot connect to database" error in logs.

Solution:

  • 1. Check PostgreSQL: sudo systemctl status postgresql
  • 2. Verify database exists: sudo -u postgres psql -l
  • 3. Check connection string in /opt/infisical/.env

View Service Logs

# 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

Need Help?

Our team is available 24/7 to assist you with any questions or issues.

support@flowopsconsulting.co.uk
24/7 Support Available