Skip to main content
Version: 2.0.28

Update

opencli update command is used to check if new update is available and to update.

Check if update is available:

opencli update --check
Example output
# opencli update --check
{"status": "Update available", "installed_version": "2.0.11", "latest_version": "2.0.12"}

Start update immediately if autoupdate or autopatch is enabled:

opencli update
Example output
# opencli update
[INFO] Update available and will be automatically installed
===== Starting update to version 2.0.12 =====
[INFO] Update log: /var/log/openpanel/updates/2.0.12.log
---- Updating OpenCLI ----
[INFO] Downloading terminal commands from github: https://github.com/stefanpejcic/opencli/releases/latest/download/opencli-amd64
[INFO] [✔] Terminal commands updated successfully
---- Updating OpenPanel container image ----
...
---- [✔] image openpanel/openpanel:2.0.12 downloaded successfully ----
---- Updating version in /root/.env ----
---- Restarting OpenPanel service ----
...
---- Cleaning up previous images ----
---- Updating installed locales ----
[INFO] Updated locale: de-de
[INFO] Updated locale: sr-rs
---- [✔] Locales updated: 2, failed: 0 ----
---- Updating OpenAdmin modules ----
---- Updating OpenAdmin ----
---- [✔] OpenAdmin update triggered (applying in background) ----
---- Regenerating logrotate configs ----
---- [✔] Minor update - skipping system updates ----
---- Checking for custom post-update scripts ----
---- Update completed successfully! ----

Add --no-restart to install the update without restarting the openpanel container and the admin service. The new versions are applied on their next restart, and /root/openpanel_restart_needed and /root/openadmin_restart_needed are created so OpenAdmin shows that a restart is needed:

opencli update --force --no-restart
Example output
# opencli update --force --no-restart
...
---- [✔] image openpanel/openpanel:2.0.18 downloaded successfully ----
---- Updating version in /root/.env ----
---- [!] Skipping OpenPanel restart, restart the 'openpanel' container to apply the new version ----
...
---- [!] OpenAdmin updated, restart the 'admin' service to apply it ----
...

If both autoupdate and autopatch are disabled, nothing is installed:

Example output
# opencli update
[INFO] [!] Autopatch and Autoupdate are both disabled. No updates will be installed automatically.

Only one update can run at a time. An update that doesn't finish within 30 minutes is stopped, and an update lock older than 30 minutes is treated as stale and deleted, so a stuck update can't block new ones.

Example output
# opencli update
[INFO] Update available and will be automatically installed
[✘] Error: Update process is already running.
Lock /var/lock/openpanel_update.lock is held by PID: 12345
Please wait for it to complete before retrying.

Start update immediately, regardless of autoupdate or autopatch setting:

opencli update --force
Example output
# opencli update --force
[INFO] [!] Forcing update, ignoring autopatch and autoupdate settings
[INFO] Update available and will be automatically installed
===== Starting update to version 2.0.12 =====
[INFO] Update log: /var/log/openpanel/updates/2.0.12.log
---- Updating OpenCLI ----
[INFO] Downloading terminal commands from github: https://github.com/stefanpejcic/opencli/releases/latest/download/opencli-amd64
[INFO] [✔] Terminal commands updated successfully
---- Updating OpenPanel container image ----
...
---- [✔] image openpanel/openpanel:2.0.12 downloaded successfully ----
---- Updating version in /root/.env ----
---- Restarting OpenPanel service ----
...
---- Cleaning up previous images ----
---- Updating installed locales ----
[INFO] Updated locale: de-de
[INFO] Updated locale: sr-rs
---- [✔] Locales updated: 2, failed: 0 ----
---- Updating OpenAdmin modules ----
---- Updating OpenAdmin ----
---- [✔] OpenAdmin update triggered (applying in background) ----
---- Regenerating logrotate configs ----
---- [✔] Minor update - skipping system updates ----
---- Checking for custom post-update scripts ----
---- Update completed successfully! ----

Admin​

Update only OpenAdmin UI (the /usr/local/admin/openadmin-amd64 or openadmin-arm64 binary from the stefanpejcic/openadmin release, checked against its SHA256SUMS and that it runs before the admin service is stopped; a bad download keeps the current OpenAdmin):

opencli update --admin
Example output
# opencli update --admin
Updating OpenAdmin
[✔] OpenAdmin update triggered (applying in background)

Panel​

Update only OpenPanel UI (container image from openpanel/openpanel-ui):

opencli update --panel
Example output
# opencli update --panel
...
openpanel

Terminal​

Update only OpenCLI (the /usr/local/opencli/opencli binary from the latest stefanpejcic/opencli release, checked against its SHA256SUMS, files left in /usr/local/opencli by older versions are removed):

opencli update --cli
Example output
# opencli update --cli
Updating OpenCLI
[INFO] Downloading terminal commands from github: https://github.com/stefanpejcic/opencli/releases/latest/download/opencli-amd64
[INFO] [✔] Terminal commands updated successfully

Locales​

Update only translation files (locale files from stefanpejcic/openpanel-translations):

opencli update --translations

Each locale download is tried up to 3 times with a 60 second limit per try, a locale that can't be downloaded is counted as failed and keeps its current file, and the update continues.

Example output
# opencli update --translations
Updating installed locales
[INFO] Updated locale: de-de
[INFO] Updated locale: sr-rs
[✔] Locales updated: 2, failed: 0
[INFO] Restarting OpenPanel service
[INFO] [✔] Translations updated and OpenPanel restarted

System​

Update system packages and kernel, remove older kernels and check if a reboot is required:

opencli update --system
Example output
# opencli update --system
[INFO] Updating system packages
System package update ready to proceed. A full server backup is recommended beforehand. Continue? [y/N] y
[INFO] Installing required system tools
[INFO] Updating system packages
[INFO] Cleaning up packages
[INFO] Removing old kernels (Debian/Ubuntu), keeping the running one (6.8.0-45-generic) and the 2 newest others
[INFO] Purging: linux-headers-6.8.0-40-generic linux-image-6.8.0-40-generic linux-modules-6.8.0-40-generic
[INFO] Checking if reboot is required
[WARN] [!] Reboot required: new kernel 6.8.0-47-generic installed, running 6.8.0-45-generic

You'll be asked to confirm before packages are updated. A full server backup is recommended beforehand.

Packages are upgraded without prompts, changed config files keep the server's version. Old kernels are removed with their modules and headers, the running kernel and the newest installed one are always kept. On Ubuntu apt autoremove already leaves only those two, elsewhere up to 2 kernels besides the running one stay. When a reboot is needed (a newer kernel is installed than the one running, /var/run/reboot-required exists, or needs-restarting -r says so) a Reboot required notification is sent to OpenAdmin > Notifications and by email/webhook, it follows the update toggle on OpenAdmin > Settings > Notifications. The server is never rebooted automatically. This also runs on major version updates. The full log is in /var/log/openpanel/updates/.

Caddy​

Download a new image for the running caddy container (for example openpanel/caddy-coraza:latest when the WAF is enabled) and recreate the container with it:

opencli update --caddy

The new image first has to validate the current /etc/openpanel/caddy/Caddyfile. If the download or the validation fails, the running Caddy is left as it was. If the container already runs the newest image, nothing is restarted. Major version updates run this step automatically, after the system update.

Example output
# opencli update --caddy
[INFO] Downloading new caddy image docker.io/openpanel/caddy-coraza:latest
[INFO] [✔] caddy already runs the newest docker.io/openpanel/caddy-coraza:latest

Modules​

Update only the OpenAdmin modules/features list (/etc/openpanel/openadmin/config/features.json from stefanpejcic/openpanel-configuration):

opencli update --modules
Example output
# opencli update --modules
Updating OpenAdmin modules

If the file can't be downloaded or isn't valid JSON, the current features.json is kept.

Templates​

Update only the docker-compose.yml template used for new users (/etc/openpanel/docker/compose/1.0/docker-compose.yml):

opencli update --compose
Example output
# opencli update --compose
[INFO] Updating /etc/openpanel/docker/compose/1.0/docker-compose.yml
[INFO] Previous file saved as /etc/openpanel/docker/compose/1.0/docker-compose.yml.bak
[INFO] [✔] docker-compose.yml updated

Update only the .env template used for new users (/etc/openpanel/docker/compose/1.0/.env):

opencli update --env
Example output
# opencli update --env
[INFO] Updating /etc/openpanel/docker/compose/1.0/.env
[INFO] Previous file saved as /etc/openpanel/docker/compose/1.0/.env.bak
[INFO] [✔] .env updated

The previous file is saved with a .bak extension. Existing users are not changed.

PHP​

Update PHP files and add new PHP versions to the template and to all existing users:

opencli update --php
Example output
# opencli update --php
===== Updating PHP =====
[INFO] Downloading configuration files from github
[INFO] PHP versions on github: 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 8.5
[INFO] Overwriting /etc/openpanel/php/
[INFO] [✔] /etc/openpanel/php/ updated
[INFO] Checking template in /etc/openpanel/docker/compose/1.0
[INFO] [template] up to date
[INFO] Checking user stefan (1)
[INFO] [stefan] mounts added: php-fpm-8.5:/etc/openpanel/php/ioncube/ioncube_loader_lin_8.5.so php-fpm-8.5:/etc/openpanel/php/ioncube_extension.ini
[INFO] [stefan] backups: /home/stefan/docker-compose.yml.php_20260924_103000.bak, /home/stefan/.env.php_20260924_103000.bak
[INFO] Checking user demo (2)
[INFO] [demo] added: php-fpm-8.5 PHP_FPM_8_5_CPU PHP_FPM_8_5_RAM PHP_FPM_8_5_PIDS php.ini/8.5.ini
[INFO] [demo] backups: /home/demo/docker-compose.yml.php_20260924_103000.bak, /home/demo/.env.php_20260924_103000.bak
===== PHP update summary =====
template: unchanged
stefan: changed: | mounts: php-fpm-8.5:/etc/openpanel/php/ioncube/ioncube_loader_lin_8.5.so php-fpm-8.5:/etc/openpanel/php/ioncube_extension.ini
demo: changed: php-fpm-8.5 PHP_FPM_8_5_CPU PHP_FPM_8_5_RAM PHP_FPM_8_5_PIDS php.ini/8.5.ini
Users checked: 2 | updated: 2 | up to date: 0 | skipped: 0 | failed: 0

This will:

  • replace /etc/openpanel/php/ (ini files, ionCube loaders, composer) with the latest files from stefanpejcic/openpanel-configuration,
  • add any missing php-fpm-X.Y services to docker-compose.yml and their PHP_FPM_X_Y_* limits to .env,
  • add missing PHP mounts (php.ini, ionCube) to the OpenLiteSpeed service,
  • add missing ionCube mounts to existing php-fpm-X.Y services (e.g. when a loader for a PHP version becomes available),
  • copy the php.ini/X.Y.ini file for each new version.

The template and every user in /home/ are checked. Before changing a file, a backup is saved as docker-compose.yml.php_<date>.bak and .env.php_<date>.bak. If the new configuration is invalid, the backup is restored and that user is skipped. A summary is shown at the end.

Running containers are not restarted. New mounts take effect the next time the user's PHP or OpenLiteSpeed service is restarted.

Service files​

These options download the latest files for a single service from stefanpejcic/openpanel-configuration and overwrite the files in /etc/openpanel/. Files that exist only on your server are kept. Several options can be combined, the files are downloaded only once.

WP-CLI​

Update WP-CLI (/etc/openpanel/wordpress/wp-cli.phar):

opencli update --wp
Example output
# opencli update --wp
[INFO] Downloading configuration files from github
[INFO] [✔] /etc/openpanel/wordpress/wp-cli.phar updated

OpenLiteSpeed​

Update OpenLiteSpeed files (/etc/openpanel/openlitespeed/ from stefanpejcic/openpanel-configuration):

opencli update --ols
Example output
# opencli update --ols
[INFO] Downloading configuration files from github
[INFO] [✔] /etc/openpanel/openlitespeed updated

LiteSpeed​

Update LiteSpeed Enterprise files (/etc/openpanel/litespeed/ from stefanpejcic/openpanel-configuration):

opencli update --litespeed
Example output
# opencli update --litespeed
[INFO] Downloading configuration files from github
[INFO] [✔] /etc/openpanel/litespeed updated

Apache​

Update Apache files (/etc/openpanel/apache/ from stefanpejcic/openpanel-configuration):

opencli update --apache
Example output
# opencli update --apache
[INFO] Downloading configuration files from github
[INFO] [✔] /etc/openpanel/apache updated

ClamAV​

Update ClamAV files (/etc/openpanel/clamav/). If the clamav container is running, it is also removed, its image is deleted, and the container is started again with a newly downloaded image:

opencli update --clamav
Example output
# opencli update --clamav
[INFO] Downloading configuration files from github
[INFO] [✔] /etc/openpanel/clamav updated
[INFO] Removing clamav container
[INFO] Deleting image docker.io/clamav/clamav:1.4
[INFO] Downloading new clamav image
[INFO] Starting clamav container
[INFO] [✔] clamav container restarted with the new image

If the container is not running, only the files are updated:

Example output
# opencli update --clamav
[INFO] Downloading configuration files from github
[INFO] [✔] /etc/openpanel/clamav updated
[INFO] clamav container is not running, skipping image update

phpMyAdmin​

Update phpMyAdmin files (/etc/openpanel/mysql/phpmyadmin/). If the phpmyadmin container is running, it is also removed, its image is deleted, and the container is started again with a newly downloaded image:

opencli update --phpmyadmin
Example output
# opencli update --phpmyadmin
[INFO] Downloading configuration files from github
[INFO] [✔] /etc/openpanel/mysql/phpmyadmin updated
[INFO] Removing phpmyadmin container
[INFO] Deleting image docker.io/library/phpmyadmin:latest
[INFO] Downloading new phpmyadmin image
[INFO] Starting phpmyadmin container
[INFO] [✔] phpmyadmin container restarted with the new image

PostgreSQL​

Update PostgreSQL files (/etc/openpanel/postgres/ from stefanpejcic/openpanel-configuration):

opencli update --postgres
Example output
# opencli update --postgres
[INFO] Downloading configuration files from github
[INFO] [✔] /etc/openpanel/postgres updated

Skeleton​

Update the files copied to new user accounts (/etc/openpanel/skeleton/ from stefanpejcic/openpanel-configuration):

opencli update --skeleton
Example output
# opencli update --skeleton
[INFO] Downloading configuration files from github
[INFO] [✔] /etc/openpanel/skeleton updated

SSH​

Update SSH files (/etc/openpanel/ssh/ from stefanpejcic/openpanel-configuration):

opencli update --ssh
Example output
# opencli update --ssh
[INFO] Downloading configuration files from github
[INFO] [✔] /etc/openpanel/ssh updated

Varnish​

Update Varnish files (/etc/openpanel/varnish/ from stefanpejcic/openpanel-configuration):

opencli update --varnish
Example output
# opencli update --varnish
[INFO] Downloading configuration files from github
[INFO] [✔] /etc/openpanel/varnish updated

Cron​

Update the OpenPanel cron jobs (/etc/openpanel/cron) and install them to /etc/cron.d/openpanel:

opencli update --cron
Example output
# opencli update --cron
[INFO] Downloading configuration files from github
[INFO] [✔] /etc/openpanel/cron updated
[INFO] [✔] /etc/cron.d/openpanel updated

Combining options​

Several options can be combined. They run in the order given:

opencli update --compose --env
Example output
# opencli update --compose --env
[INFO] Updating /etc/openpanel/docker/compose/1.0/docker-compose.yml
[INFO] Previous file saved as /etc/openpanel/docker/compose/1.0/docker-compose.yml.bak
[INFO] [✔] docker-compose.yml updated
[INFO] Updating /etc/openpanel/docker/compose/1.0/.env
[INFO] Previous file saved as /etc/openpanel/docker/compose/1.0/.env.bak
[INFO] [✔] .env updated