Upgrade Options
There are two primary methods to upgrade Infisical:- Standard Upgrade (with brief downtime): The simplest approach that briefly takes Infisical offline during the upgrade.
- Minimal-Downtime Upgrade: For multi-node deployments where high availability is required.
Before You Begin
Checking Your Current Version
Before upgrading, note your current Infisical version:infisical
component. This will be the version of Infisical currently installed.
Prerequisites
- Verify that your PostgreSQL and Redis instances are up and running
- Back up your PostgreSQL database before proceeding with any upgrade
- Review release notes for the version you’re upgrading to
Creating a Database Backup
We strongly recommend backing up your database before upgrading. Your backup approach may look different depending on how you configured PostgreSQL and whether it’s self-managed or using a managed service. Here is a sample of how you would perform a manual backup:Database Migrations During Upgrade
By default, Infisical runs database migrations automatically on startup.- It uses database locks to ensure only one instance runs migrations at a time
- Other instances will wait for the lock to be released before continuing startup
- This prevents race conditions and database conflicts
Standard Upgrade (with Downtime)
This method is suitable for single-node deployments or situations where a brief downtime is acceptable.Stop the Infisical service
Upgrade the Infisical package
- Debian/Ubuntu
- RHEL/CentOS/Amazon Linux
- Debian/Ubuntu
- RHEL/CentOS/Amazon Linux
Apply configuration changes
Start Infisical
Verify the upgrade
Minimal-Downtime Upgrade
For multi-node setups where you need to maintain availability during upgrades, follow this procedure. This approach requires at least two Infisical nodes behind a load balancer.Understanding Traffic Draining
“Draining” a server means gracefully removing it from the pool of active servers without disrupting existing connections. When you drain a server:- The load balancer stops sending new requests to the server
- Existing connections are allowed to complete naturally
- Once all connections finish, the server can be safely taken offline for maintenance
Preparing for the Upgrade
- Designate a deploy node: Choose any single node that will run migrations. This node will be upgraded first.
-
Configure your load balancer: Ensure your load balancer can perform health checks against Infisical’s
api/status
endpoint.
Upgrade Process
On the deploy node:
Drain traffic from the node
- NGINX
- HAProxy
- AWS ALB/ELB
- Other load balancers
Verify no new traffic is arriving
Stop Infisical on this node
Upgrade the Infisical package
- Debian/Ubuntu
- RHEL/CentOS/Amazon Linux
- Debian/Ubuntu
- RHEL/CentOS/Amazon Linux
Apply configuration and start the service
Verify the upgrade and migration success
Return this node to load balancer pool
On all remaining nodes (one at a time):
Drain traffic from the node
- Remove the server from your load balancer’s active pool
- Wait for existing connections to complete
- Verify the node is no longer receiving traffic
Stop Infisical on this node
Upgrade the Infisical package
- Debian/Ubuntu
- RHEL/CentOS/Amazon Linux
- Debian/Ubuntu
- RHEL/CentOS/Amazon Linux
Apply configuration and start the service
Verify the upgrade success
Wait for service to be fully operational
- Check logs to ensure the service has started successfully
- Verify it can connect to the database and Redis
Return the node to service
Verify traffic is flowing correctly
Repeat for each remaining node
Verify application functionality
- Test core functionality
- Check logs for any errors
Rolling Back
If you need to roll back to a previous version of Infisical, follow steps below.Stop the Infisical service
Install the previous version
Restore your database from backup
Start the service
Verify the rollback
Troubleshooting
Migration Issues
Migration Issues
-
Check the logs:
- Ensure the database user has sufficient privileges to create/modify tables.
- If migrations fail repeatedly, consider restoring from the backup you took prior to upgrading.
Service Won't Start After Upgrade
Service Won't Start After Upgrade
-
Check for configuration errors:
-
Verify all required environment variables are set in your
/etc/infisical/infisical.rb
file.