Sherpa Orchestrator Update Process#
⚠️ Before updating: review the release notes for every version from the installed version to the target version. They may contain mandatory upgrade steps. Notes for the latest published release: version 5.9.4.
⚠️ Important: If Sherpa Orchestrator is being updated from a version below
5.9.1and the built-in Sherpa Orchestrator database is used, the database must be migrated before the update.
For MariaDB, perform the migration according to the instructions in "Migrating MariaDB to the
orchestrator-db:v5.9.2+container".
For PostgreSQL, perform the migration according to the instructions in "Migrating PostgreSQL to the
orchestrator-pg:v5.9.2+container".
If the update is from version
5.9.1or later, or an external database is used, migration is not required.
💡 Automatic update Instead of the manual steps below, an interactive script can be used:
sudo ./sh_scripts/update.shThe script performs a backup, stops containers, downloads new images, updates
.env, and starts the system with availability checks.
1. Downloading files#
Download all the latest Sherpa Orchestrator update files using the links in the preparation section
2. Transferring files to the server#
After downloading, transfer all files to the target Linux server using any convenient method:
Via SCP/SFTP#
# Copy files to the server
scp *.tar.gz user@target-server:/path/to/installation/directory/
💡 Notes on SCP/SFTP transfer
*scp .tar.gz user@target-server:/path/to/installation/directory/ - copies files to the remote server
scp- secure copy*.tar.gz- pattern for selecting update filesuser@target-server- connection credentials/path/to/installation/directory/- destination path on the server
Via SFTP client#
Use any SFTP client (FileZilla, WinSCP, Cyberduck) to copy files to the server.
Via network share#
If the server is accessible via SMB/CIFS, use Windows Explorer or the copy command.
Verifying the transfer#
# Connect to the server
ssh user@target-server
# Navigate to the directory with files (usually opt/SherpaOrchestrator)
cd /path/to/installation/directory
# Verify all files are present
ls -la *.tar.gz
# Check file sizes
ls -lh *.tar.gz
💡 Notes on transfer verification
ssh user@target-server - connects to the remote server via SSH
ssh- secure shelluser@target-server- connection credentials
cd /path/to/installation/directory - navigates to the directory with files
*ls -la .tar.gz - shows detailed information about the downloaded files
-l- long format-a- shows hidden files
*ls -lh .tar.gz - shows file sizes in human-readable format
-h- human readable (KB, MB, GB)
3. Stopping containers#
# Stop all running services
docker compose down
💡 Notes on stopping containers
docker compose down - stops all Docker Compose services
- Stops and removes containers and networks
- Preserves volumes and images
Checking stop status: docker ps -a | grep orchestrator - checks container status
docker ps -a- shows all containers (including stopped ones)| grep orchestrator- filters by the orchestrator name
4. Loading Docker images#
# Create a backup of the .env file (if it exists)
cp .env .env.backup
# Create a backup of the configuration
cp -r ./backend/config ./backend/config_backup
# If custom certificates are used, copy them to a safe location
cp -r ./backend/config/certs ./certs_backup
# Unpack the update files
tar -xvzf "$(ls docker_orchestrator_client_files_*.tgz | sort -V | tail -n 1)"
# Copy the default nginx configuration (if it does not exist)
cp -r ./nginx/config/default ./nginx/config
# Make scripts executable
chmod +x sh_scripts/*.sh
# If a certificate backup was created, restore it
cp -r ./certs_backup/* ./nginx/config/certs/
# Load all Docker images
sudo ./sh_scripts/load_all_docker_images.sh
💡 Notes on loading Docker images
Creating backups:
cp .env .env.backup- backup of the configuration filecp -r ./backend/config ./backend/config_backup- backup of the config directorycp -r ./backend/config/certs ./certs_backup- backup of SSL certificates
Unpacking and preparation:
tar -xvzf "$(ls docker_orchestrator_client_files_*.tgz | sort -V | tail -n 1)"- unpacks the latest update fileschmod +x sh_scripts/*.sh- makes scripts executablecp -r ./certs_backup/* ./backend/config/certs/- restores certificates
sudo ./sh_scripts/load_all_docker_images.sh - loads all Docker images
Verifying load: docker images | grep orchestrator - shows loaded orchestrator images
5. Selecting DB configuration and verifying environment variables#
# Open the .env file for review and updates
nano ./.env
# Check for required variables
grep -E "(HOST_IP|MYSQL_PASSWORD|DB_PASSWORD|POSTGRES_PASSWORD|NGINX_DOMAIN_NAME|DB_ENGINE)" .env
# Verify syntax correctness
cat .env | grep -v '^#' | grep '=' | wc -l
💡 Notes on environment variable verification
nano ./.env - opens the configuration file in the editor
grep -E "..." .env - checks for the presence of key variables:
HOST_IP— the server IP address or domainNGINX_DOMAIN_NAME— the NGINX domainDB_ENGINE— database type:mysqlorpgsqlMYSQL_PASSWORD/DB_PASSWORD— MySQL password for the application and the database container (must match)POSTGRES_PASSWORD— PostgreSQL password (used by both the application and the database container)
cat .env | grep -v '^#' | grep '=' | wc -l - counts the number of variables
All configuration parameters (database, mail, LDAP, proxy, and others) are read by the application directly from the environment variables in the .env file. Editing backend/config/config.ini or backend/config/phinx.php is not required — they are already configured to work through .env.
5.1 cache.bin migration (only when updating from version ≤ v141856)#
⚠️ Important: This step is required only if the update is from version v141856 or earlier. If the current orchestrator version is newer than v141856, skip this section.
When updating from version ≤ v141856, the cache.bin file must be mounted inside the orchestrator container.
Add the following line to the volumes section of the orchestrator service in docker-compose.yml:
orchestrator:
...
volumes:
- orchestrator-storage:/opt/SherpaOrchestrator/backend/Storage
- ./backend/config:/opt/SherpaOrchestrator/backend/config:z
- ./path/to/cache.bin:/opt/SherpaOrchestrator/backend/app/cache.bin # add this line
Replace ./path/to/cache.bin with the actual path to the cache.bin file on the server.
6. Starting containers#
# Start services with the selected DB profile
# Option 1: MariaDB
docker compose --profile mariadb up -d
# Option 2: PostgreSQL
docker compose --profile pg up -d
# If VNC is needed (optional), add the vnc profile:
# Option 1: MariaDB + VNC
docker compose --profile mariadb --profile vnc up -d
# Option 2: PostgreSQL + VNC
docker compose --profile pg --profile vnc up -d
# If Vault is needed (optional), add the vault profile:
# Option 1: MariaDB + Vault
docker compose --profile mariadb --profile vault up -d
# Option 2: PostgreSQL + Vault
docker compose --profile pg --profile vault up -d
# Profile combination: MariaDB + VNC + Vault
docker compose --profile mariadb --profile vnc --profile vault up -d
💡 Notes on starting containers
docker compose --profile <mariadb|pg> up -d - starts services in the background with the selected database
-d- detached mode (background mode)
--profile vnc - the VNC profile is optional and starts orchestrator-vnc-proxy
- Required only if robots use VNC to control the desktop
- Add it to any profile combination
docker compose --profile <mariadb|pg> --profile vault up -d - starts the system with Vault
- The
vaultprofile is optional and is used only when a secret store and Vault migration are needed
Verifying startup:
docker compose ps- shows the status of all containersdocker compose logs -f orchestrator- shows startup logs in real time
Vault initialization and secret migration are covered in a separate guide:
After a successful update, the Sherpa Orchestrator system is ready for use.
Migrating the screenshot indicator in logs#
This section applies to a build containing 20261006120000_add_log_has_file.php. A database backup and maintenance window are required before updating. The migration account needs permissions to alter tables and create triggers. PostgreSQL also requires permission to create the function.
The migration follows this sequence:
Application processes must be stopped while the database remains available.
Standard Phinx migrations must be run from the new build's container for the selected database engine.
After migration, the following query must confirm that no rows lack a screenshot indicator:
SELECT COUNT(*) FROM orchestrator.logs WHERE has_file IS NULL;The application can be started when the result is
0.
The migration adds orchestrator.logs.has_file and installs triggers for new and updated records. Existing rows are filled in batches of up to 100. Old screenshots are read once, so duration depends on the data volume. Schema changes may lock the table.
After an interruption, the cause must be resolved and migrations run normally again. Rows already filled are skipped. The --fake option should not be used.
The API response format and screenshot retrieval remain unchanged. The archive table is unchanged. Rollback requires stopping the application and restoring code that does not use has_file first. The migration can then be rolled back. Screenshots themselves are not deleted.