Upgrading
ShellHub cuts regular releases for Community Edition to keep it as close to ShellHub Cloud as possible.
We actively develop ShellHub to add new features and remove bugs, and encourage you to ensure your ShellHub self-hosted instance is using the most up-to-date version.
Upgrading to a newer version
Steps
-
Change to ShellHub project dir
-
Stop the instance:
make stop -
Fetch remote changes:
git remote update origin - Checkout the latest stable release:
git checkout v0.25.0 -
Bring up the instance:
make start
Make sure to backup all database data files before proceeding with upgrade.
Database Migration (MongoDB to PostgreSQL)
Starting with v0.23.0, ShellHub introduced a migration pipeline that automatically
copies all data from MongoDB to PostgreSQL. In v0.24.0, PostgreSQL became the only
supported database backend: MongoDB, the SHELLHUB_DATABASE=migrate mode, and the
migration pipeline were all removed.
The migration only runs on v0.23.x. If you still keep data in MongoDB, upgrade to v0.23.x and complete the migration before moving to v0.24.0 or later. There is no in-place MongoDB-to-PostgreSQL migration on v0.24.0+ — jumping straight from MongoDB to v0.24.0 leaves that data behind.
How the migration works (v0.23.x)
On v0.23.x, the migration runs automatically on startup when SHELLHUB_DATABASE is set
to migrate. It reads all data from MongoDB, writes it to PostgreSQL, and performs a
full validation to ensure data integrity. Check the progress at
GET /api/migration/status (available on v0.23.x), in the web UI, or in the API logs.
Once the migration completes successfully, you can switch to PostgreSQL permanently.
Upgrading from v0.22.x or earlier
If you are upgrading from v0.22.x or earlier, follow these steps:
-
Backup your MongoDB data before doing anything.
-
Upgrade to v0.23.x first. The default
SHELLHUB_DATABASEis already set tomigratein the.envfile, so no additional configuration is needed. Do not skip this release — it is the only one that can migrate your MongoDB data. -
Start ShellHub and wait for the migration to complete. On v0.23.x you can check the status at
GET /api/migration/status— it returns{"status":"completed"}when done — or follow the web UI and the API logs. -
Verify the migration completed without errors by checking the API logs.
-
Upgrade to v0.24.0. The default
SHELLHUB_DATABASEis nowpostgresin the.envfile, so no additional configuration is needed. -
Start ShellHub. It will now use PostgreSQL directly. MongoDB is no longer needed.
Do not remove your MongoDB data or container until you have verified that the migration completed successfully and PostgreSQL is working correctly.
Upgrading from v0.23.x
If you already ran v0.23.x with SHELLHUB_DATABASE=migrate and the migration completed
successfully, simply update to v0.24.0. The default database is already set to postgres.
Upgrade to Enterprise Edition
This section describes how to upgrade from the ShellHub Community Edition to the ShellHub Enterprise.
Prerequisites
To complete this guide you will need:
- An ShellHub Private Docker Registry account to pull ShellHub Enterprise containers.
- A valid ShellHub Enterprise license file.
Contact us to get a quote for the Enterprise version.
Configuring Enterprise
Once the Open Source containers of the ShellHub are up and running, let's configure your environment to bring up the ShellHub Enterprise containers.
Pull ShellHub Enterprise containers
First log in to the ShellHub Private Docker Registry with your credentials:
docker login https://registry.infra.ossystems.io/
Update environment config
Open the .env.override file inside ShellHub project dir and set the following variables:
SHELLHUB_ENTERPRISE=trueSHELLHUB_ENTERPRISE_ADMIN_USERNAME=<USER>SHELLHUB_ENTERPRISE_ADMIN_PASSWORD=<PASSWORD>
Restart containers
If ShellHub is up and running you need to restart containers by running:
make restart