Running the panel on the VPS
Day-to-day work after installation: updating, useful commands, where the files live and how to
change the terminal user or the panel port. All commands run on the VPS, connected
over SSH with your user, inside /opt/tws-panel.
Update the panel
Section titled “Update the panel”A single line, on the VPS:
cd /opt/tws-panel && sudo git pull && sudo git log --oneline -1 && sudo docker compose up -d --buildgit log --oneline -1 shows the commit that went live, so you can check it. Your projects,
domains, email and the administrator account stay as they were. What changed in each version
is in the CHANGELOG.
Emergency scripts
Section titled “Emergency scripts”| Situation | Command (in /opt/tws-panel) | Guide |
|---|---|---|
| Lost the setup token | sudo ./scripts/show-token.sh | Installation |
| Want to redo the wizard | sudo ./scripts/reset-setup.sh (--full also deletes the admin account) | Recover access |
| Lost your phone and the two-factor authentication codes | sudo ./scripts/reset-2fa.sh | Recover access |
| Disabled access by IP and the panel domain stopped opening | sudo ./scripts/reativar-acesso-ip.sh | Features |
The panel does not open and you have a .7z backup of it | sudo ./scripts/restaurar-painel.sh /root/ARQUIVO.7z | Features |
| Want to remove the panel | ./scripts/uninstall.sh --dry-run and then ./scripts/uninstall.sh | Installation |
Where your projects’ files live
Section titled “Where your projects’ files live”Each project you deploy has its own folder on the server, with the code cloned from Git (in src/)
and the files the panel generates around it (such as repo.git and paas.env). By default these folders live in
/opt/tws-projects — next to /opt/tws-panel, and outside any /home, so they do not
disappear if you ever delete a Linux user.
They live in a real directory on the VPS, not hidden inside the container, for two practical reasons:
- You can look at them. Connected over SSH,
ls /opt/tws-projectsalready shows everything; you can read a log, copy a file or take a backup with the usual tools. - Projects that write files work. If your project’s
docker-compose.ymlhas a line like./dados:/app/dados(to keep uploads, a SQLite database, whatever), the one looking for thatdadosfolder is Docker on the VPS, not the panel. If it existed only inside the panel’s container, Docker would create an empty folder and your project would come up without its data. That is why the path is exactly the same inside and outside.
Want to use another location (a larger disk mounted at /mnt/dados, for example)? Choose it
at install time:
./scripts/install.sh --projects-dir=/mnt/dados/projetosChange the panel’s terminal user
Section titled “Change the panel’s terminal user”The user the terminal opens as and the mode (senha or segundo-plano) are stored in the .env
file in /opt/tws-panel. To change them, run the installer again asking it to prompt you
once more:
cd /opt/tws-panel./scripts/install.sh --reconfigure-terminalIt asks the same questions again, validates the answer and recreates the panel with the new choice. Your projects, domains, email and the administrator account are not touched — it is the same safe reinstall as always. If you would rather not answer anything, pass the values directly:
./scripts/install.sh --terminal-user=OUTRO_USUARIO --root-mode=segundo-planoChange the panel port on the VPS
Section titled “Change the panel port on the VPS”It only matters for tunnel access. With HTTPS access (the default) this port is internal — the panel listens only inside the VPS and the proxy serves the outside world, on ports 80/443 — and the installer picks it by itself.
With tunnel access, the port is the one you chose at installation (default 9000) and it is stored in the
PAAS_PORT= line of the .env in /opt/tws-panel. To change it, run the installer again passing
the new one:
cd /opt/tws-panel./scripts/install.sh --port=9500It checks that the new port is free, rejects the ones that would break the panel (22, 80, 443 and the mail ports), recreates the container and prints the tunnel command with the right number already in it. Your projects, domains, email and the administrator account are not touched.
Useful commands (production)
Section titled “Useful commands (production)”sudo docker compose ps # panel statussudo docker compose logs -f panel # real-time logssudo docker compose up -d --build # update to a new version (git pull first)
sudo ./scripts/show-token.sh # shows the URL + setup token again (if you lost the token)sudo ./scripts/reset-setup.sh # restarts the wizard from scratch (--full also deletes users/sessions)./scripts/install.sh --reconfigure-terminal # changes the panel's terminal user/mode./scripts/install.sh --port=9500 # changes the panel port on the VPS./scripts/uninstall.sh --dry-run # shows what removing the panel would delete