Skip to content

Apply CloudPanel UI mods

Sometimes you want to change a small thing in the CloudPanel UI like adding a new menu item or adjusting what IP is shown in the dashboard. You can adjust the twig templates and clear it's cache but these changes are overwritten once CloudPanel is updated. To make this easier and integrate with clp-update (the CloudPanel update command) I've created a small helper in my cloudpanel.helpers repo on github.

Follow the Readme or the guide below and adjust to your needs.

Setup your mod

Create a new folder /home/clp/htdocs/app_mod/. Inside keep the same directory structure as CloudPanel uses.

For example if you want to overwrite the file /home/clp/htdocs/app/files/templates/Frontend/Dashboard/Partial/information.html.twig you would create a file /home/clp/htdocs/app_mod/files/templates/Frontend/Dashboard/Partial/information.html.twig.

Copy the script

Copy the file clp-install-mod to /usr/local/bin/

Assign alias

CloudPanel uses the command clp-update to install updates. We can overwrite that command with an alias: Add or create the file /root/.bash_aliases with the following contents:

alias clp-update='/usr/bin/clp-update && /usr/local/bin/clp-install-mod'

Now when you login and run clp-update it will first pull any update and afterwards apply the mod and clear the twig prod cache.