How to upgrade Infisical deployment using linux package
This guide explains how to upgrade Infisical Linux package installations to newer versions. The Infisical Linux package includes only the Infisical service component itself, as PostgreSQL and Redis databases are managed separately. Upgrades for PostgreSQL and Redis are not covered in this guide as they depend on your specific database deployment method.
There are two primary methods to upgrade Infisical:
Before upgrading, note your current Infisical version:
Look for infisical
component. This will be the version of Infisical currently installed.
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:
By default, Infisical runs database migrations automatically on startup.
This method is suitable for single-node deployments or situations where a brief downtime is acceptable.
Stop the Infisical service
Upgrade the Infisical package
To upgrade to the latest version:
To upgrade to a specific version:
Apply configuration changes
Start Infisical
Verify the upgrade
Check the logs for any issues:
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.
“Draining” a server means gracefully removing it from the pool of active servers without disrupting existing connections. When you drain a server:
This approach ensures users/machines do not experience sudden connection errors during the upgrade process.
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.
Drain traffic from the node
Drain the traffic on this node gracefully. You can do this in a number of ways depending on the load balancer you have configured. Approaches for some common load balancers are provided below:
If using NGINX as a load balancer, you can remove the server from the upstream pool temporarily:
Verify no new traffic is arriving
Verify no new traffic is arriving before proceeding with the upgrade.
Stop Infisical on this node
Upgrade the Infisical package
To upgrade to the latest version:
To upgrade to a specific version:
Apply configuration and start the service
Verify the upgrade and migration success
Look for successful migration messages in the logs.
Return this node to load balancer pool
Re-enable the server in your load balancer using the same method you used to remove it.
Drain traffic from the node
Follow the same draining procedure as described for the deploy node:
Stop Infisical on this node
Upgrade the Infisical package
To upgrade to the latest version:
To upgrade to a specific version:
Apply configuration and start the service
Verify the upgrade success
Wait for service to be fully operational
Return the node to service
Re-enable the server in your load balancer using the same method you used to remove it.
Verify traffic is flowing correctly
Check logs and monitoring to ensure traffic is flowing correctly.
Repeat for each remaining node
Repeat steps 1-7 for each remaining node, one at a time.
Verify application functionality
After all nodes are upgraded, verify that the application is functioning correctly:
If you need to roll back to a previous version of Infisical, follow steps below.
Stop the Infisical service
Install the previous version
For Debian/Ubuntu:
For RHEL/CentOS/Amazon Linux:
Restore your database from backup
Restore your Postgres/Redis database from backup.
Start the service
Verify the rollback
Migration Issues
If you encounter database 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
Check for configuration errors:
Verify all required environment variables are set in your /etc/infisical/infisical.rb
file.