Deploy App
Deploy by hand (deploy.sh)
Every app has a deploy.sh on your server — the same script the panel runs — so you can deploy, rebuild or roll back even when the panel isn't reachable.
Every deploy from the panel writes a script called deploy.sh next to
your app on the server, and then runs it. It's the whole deploy: pull, build,
start the new version beside the old one, switch over, and put the old one
back if anything fails. So if you ever can't reach the panel, you can do
exactly the same deploy from the server.
| App | Where it is |
|---|---|
| Websites, WordPress, containers with a domain | /var/www/<your domain>/deploy.sh |
| Containers without a domain | /opt/dcp/apps/<name>/deploy.sh |
The app's Overview tab shows the exact command.
Commands
cd /var/www/example.com
sudo bash deploy.sh # pull the latest code, build, switch over
sudo bash deploy.sh --no-pull # rebuild from the code already on the server
sudo bash deploy.sh --rollback # list the versions kept on this server
sudo bash deploy.sh --rollback manual-20261010120000 # switch back to one
For a custom container or WordPress, sudo bash deploy.sh pulls the image
again and restarts the container with the same settings; its data stays in
its volumes.
Private repositories
The script asks for a username and a personal access token (the same kind you saved in the panel). They're used for that one pull and never saved on the server. To skip the prompt, for example from another script:
sudo GIT_USERNAME=acme-bot GIT_TOKEN=github_pat_… bash deploy.sh
(The token then sits in that terminal's history — prefer the prompt.)
If you don't have the token handy, --no-pull rebuilds and restarts from the
code already on the server.
Settings and environment
- The app's environment is the
.envfile at the project root (/var/www/<domain>/app/.env, or next todeploy.shfor containers and WordPress). You can edit it before a manual deploy. - The panel is the source of truth. The next deploy from the panel writes
deploy.shand.envagain from the panel's settings. If you changed a value by hand, make the same change on the Environment tab. - An uploaded
.zipapp can't pull: unzip the new version intoapp/first, then runsudo bash deploy.sh.
When the panel is back
It notices the container is running a different version and shows "Deployed by hand on the server with deploy.sh" on the app. The next deploy from the panel takes over again as usual.
