The `sixpanel` command line
What this page is for: run your server from an SSH prompt — especially when the panel itself will not open.
You need
- SSH access to the server.
- Nothing else. The installer put the tool on the box. It is called
sixpanel, andspis the same tool with a shorter name.
The tool must run as root. On most cloud images you log in as ubuntu or
opc — type the command anyway and it re-runs itself through sudo, asking
for your password once. In a script it prints the exact sudo sixpanel … line
to use instead, so nothing hangs waiting on a prompt you cannot see.
Start with these three
sixpanel the menu — everything below, by number
sixpanel doctor what is wrong, and the fix under each failure
sixpanel logs nginx -f watch a service's log livesixpanel on its own opens a numbered menu. It starts with your panel link and
how many services are running, then lists actions. Pick a number. If an action
fails you get the reason and the menu again — never a bare shell prompt.
The five you will actually use
1. Find out what is wrong
sudo sixpanel doctor
sudo sixpanel doctor --selfEvery check prints a tick, a warning or a cross, and every failure carries the same one-line fix the panel's Health tab shows.
2. Read a log
sudo sixpanel logs nginx -n 50
sudo sixpanel logs app -f
sudo sixpanel logs php --since 10m --grep 'PHP Fatal'
sudo sixpanel logs laravel -n 100Targets: any service name, app (php + queue + scheduler + nginx together),
all, or laravel for the application's own log file. Everything except
laravel comes out of the system journal, which is where systemd keeps each
service's output. -f follows the log until you press Ctrl-C.
3. Clear the caches after a settings change
sudo sixpanel cache clearThis is the answer to most "I changed a setting and nothing happened" reports. It clears the application's cached configuration, rebuilds the fast caches and restarts the workers.
4. Restart the website
sudo sixpanel service restart appThe classic "turn it off and on again" for the site. The panel keeps running.
5. Send support one file
sudo sixpanel support-bundleIt writes one .tgz — by default into /root/ — with versions, the health
report, service states, disk usage and the last 500 lines of every log. Send us
that file and most questions are answered in one round trip. What is removed
before it is written: the stack settings file is reduced to key names only, the
panel's own state file is not included at all, and the secret code in your
panel link plus common password-looking values are masked in the collected
logs.
The seven that get you back in
Each of these undoes one lock, over SSH, in one line. This is the reason root SSH matters as much as your panel password.
sudo sixpanel username forgot the name you type on the login page
sudo sixpanel password reset forgot the panel password
sudo sixpanel 2fa off lost the phone with the 6-digit codes
sudo sixpanel domain none the panel's own domain broke
sudo sixpanel entry-code reset the secret link leaked
sudo sixpanel allowlist clear the login IP allowlist shut you out
sudo sixpanel unlock too many failed logins locked your address outsixpanel unlock on its own lists what is locked and why, and changes nothing.
Add an address, or all, to let it log in again. It is the answer to "my
password is right and the panel still will not take it" — after enough failed
tries the panel refuses that address for 30 minutes, and one of the two counters
doing it is not written to any file, so there is nothing on the server to read
that would explain it.
sixpanel 2fa off forgets the phone you set up, so your next login shows a
fresh QR code to scan with the new one. Two-factor stays on and staying on is
the recommendation. If you have no phone at that moment the enrolment screen
also offers Not now — continue without two-factor login, which is a real way
through — it is written to your activity log, and from then on your password
alone opens the panel until you enrol again from the Security page.
Two more, for the logins you gave to other people:
sudo sixpanel temp-login list the temporary logins
sudo sixpanel temp-login revoke-all delete every one of them
sudo sixpanel demo off switch the public demo login offEvery one of them says what it will change and asks before it does it. See Security for what each lock does, Let someone else in for the two shared logins, and When something is broken for the symptoms that lead here.
Which of these work when the panel is down
The sixpanel tool is an ordinary program on the machine, not a client for a
server that has to be up. The services it talks to are systemd units and the
files it reads are on disk, so almost everything keeps working with the panel
stopped: info, url, version, logs, every service command,
ssl status, disk, prune, top, cache clear, the db commands, sql,
exec, artisan, support-bundle, server firewall, server os-update,
server reboot, password reset, username, entry-code, domain, port,
2fa off, temp-login, demo off, allowlist, unlock, backup targets,
backup password and deploy history.
Some of those change something the panel keeps in memory. With the panel up they are applied straight away. With it down, the tool stops the panel, writes, and starts it again — that takes ten to twenty seconds and it announces each stage, so a pause is not a hang.
Needs the panel, or its own switch: doctor. Use sixpanel doctor --self
for the host-only checks that need nothing from the panel. That is the one to
run when the panel will not start.
Runs the panel's own engine: backup run, backup list, backup restore,
deploy and deploy rollback. These work when the panel is running normally,
and also when it is fully stopped. They refuse in the middle state — a running
panel this tool cannot talk to — and tell you which of two things to do:
install the small helper (sudo apt-get install -y python3) or do that one
action in the panel.
Getting help
sixpanel help every command, grouped
sixpanel help logs one command, with examples
sixpanel logs --help the same thing
sixpanel cheatsheet the ones people actually use, on one screen
man sixpanel the manual pagePress Tab to complete commands, service names and project names.
Typed something that is not a command? It suggests the closest ones, including
two-word commands: sixpanel restore points at sixpanel backup restore,
sixpanel firewall at sixpanel server firewall. It will never offer a
command that reboots or deletes something as a guess for an unrelated word.
Safety rules that are true everywhere
- Anything that cannot be undone tells you what changes, what restarts and how to undo it, then asks.
- Anything that deletes data makes you type the target's name — the database name, or the stack path.
--yesdoes not skip that one. - A password is never accepted as an argument. Use
sudo sixpanel password reset(it generates one and prints it), or let your shell read it without showing it:
read -rs NEW && printf '%s' "$NEW" | sudo sixpanel password --stdinsixpanel server updateupdates SixPanel.sixpanel deployupdates your own 6ammart code. See Update SixPanel itself.sixpanel port randommoves the panel to a new random port. It does not restore an old one; to go back, name it:sixpanel port 41397.
Full reference — you will not need most of this
Everything above is the part people use. What follows is the complete surface, for the day you want to look something up. Skip it until then.
This list mirrors the CLI's own command table. If the two ever disagree,
sudo sixpanel help is the truth.
Panel — its address, password and lifecycle
| Command | What it does |
|---|---|
sixpanel panel url | Print just the panel's secure login URL |
sixpanel panel open | The panel URL, large, with a QR code you can scan |
sixpanel panel port [<n>|random] | Show, set, or randomise the panel's port |
sixpanel panel entry-code [reset] | Show, or replace, the secret code at the end of your panel URL |
sixpanel panel domain <domain>|none | Point the panel at your own domain, or undo it |
sixpanel panel username [set <name>|reset] | Show, or change, the name you type on the login page |
sixpanel panel password reset | Set a new admin password and print it |
sixpanel panel 2fa off | Forget the two-factor phone; the next login enrols a new one |
sixpanel panel temp-login [revoke-all] | Show, or delete, the short-term logins you gave to helpers |
sixpanel panel demo off | Switch the public read-only demo login off |
sixpanel panel allowlist [clear] | Show, or switch off, the login IP allowlist that can lock you out |
sixpanel panel unlock [<ip>|all] | Show what failed logins have locked out, and let an address back in |
sixpanel panel restart | Restart just the panel service |
Creating a temporary login, and switching the demo login on, are done in the panel and not here. Both hand out a password that is shown exactly once, and both deserve the warning that is on the screen at the time. See Let someone else in.
Each of these also works without the word panel: sixpanel url,
sixpanel password reset, sixpanel allowlist clear, and so on.
Services — the systemd units that run your site
| Command | What it does |
|---|---|
sixpanel service list | Every service on this server: state, health, uptime |
sixpanel service status [<name>...|all] | State of the named services (default: all) |
sixpanel service start <name>...|all|app | Start services |
sixpanel service stop <name>...|all|app | Stop services |
sixpanel service restart <name>...|all|app | Restart services |
sixpanel service enable <reverb|react> | Turn on an optional service |
sixpanel service disable <reverb|react> | Stop an optional service until the next start |
Service names: db, redis, nginx, panel, php, queue, scheduler,
reverb, react. With several projects, each project has its own
php-SLUG, queue-SLUG, scheduler-SLUG, reverb-SLUG and react-SLUG.
Behind those short names are ordinary Ubuntu services: db is
mariadb.service, redis is redis-server@six-<project>.service (one per
project — the bare name is the default project's, and redis-<project> names
another's), php is
php8.3-fpm.service (one service, with one pool per project), and the
per-project workers are sixpanel-queue@<slug>.service,
sixpanel-schedule@<slug>.timer, sixpanel-reverb@<slug>.service and
sixpanel-react@<slug>.service. You never have to use those names — but if you
already know systemd, systemctl status on any of them works exactly as you
expect.
Two shortcuts: all is every service this server defines, including every
project's. app is php + queue + scheduler + nginx for the current
project — the "restart my website" set.
Projects — one 6ammart install each
| Command | What it does |
|---|---|
sixpanel project list | Every 6ammart project on this server |
sixpanel project show <slug> | One project: domains, services, disk, install state |
sixpanel project create <slug> | [panel] Add another 6ammart project |
sixpanel project delete <slug> | [panel] Remove a project and its database |
sixpanel project deploy <slug> | [panel] Deploy one project's code |
Database
db importreplaces everything in that database. Every table in this project's database is replaced by the contents of the file you name. Orders, users and settings that the file does not contain are gone, and nothing takes a copy for you first. Take one yourself before you start:sudo sixpanel db dump -o /root/before.sql.gz. The command then makes you type the database name to confirm, and--yesdoes not skip that. When it finishes, runsudo sixpanel db migrateand thensudo sixpanel cache clear— in that order.
| Command | What it does |
|---|---|
sixpanel db info | Database size, table count, biggest tables, engine version |
sixpanel db dump [-o FILE] | Write a gzipped dump of this project's database |
sixpanel db import <file.sql[.gz]> | Replace this project's data with a dump |
sixpanel db console [--root] | Open an interactive MariaDB prompt |
sixpanel db slow [-n N] | The slowest queries the database has recorded |
sixpanel db migrate [--pretend] | Run this project's pending Laravel migrations |
Backups
| Command | What it does |
|---|---|
sixpanel backup run [full|db|files] | Take a backup now and stream its log |
sixpanel backup list | Snapshots in the backup repository, newest first |
sixpanel backup targets | Backup destinations and their last run |
sixpanel backup restore <snapshot> | Restore a snapshot over the live data |
sixpanel backup password | Reveal the backup encryption password (root only) |
A restore writes over your live database and files, and backup password
prints a secret to your terminal in plain text. Both are explained on
Backups.
Deploying your 6ammart code
| Command | What it does |
|---|---|
sixpanel deploy | Deploy your 6ammart code: pull, migrate, cache, restart workers |
sixpanel deploy preview | What a deploy would pull, without touching anything |
sixpanel deploy history [-n N] [--repo admin|website] | Recent deploys and how they ended |
sixpanel deploy rollback <commit|last> | Put the previous release back |
This server
server uninstall --purge-datacannot be undone by anything on this server. Without--purge-datathe command only stops and switches off the services: your databases, uploaded files, certificates and local backups stay on disk, and re-installing picks them up again. With--purge-datathe panel's own folder is deleted — its settings and every backup kept on this server. Your databases, your site files (/var/www) and your certificates (/etc/letsencrypt) are not deleted by either form; take them off the server yourself if you want them gone.sixpanel disknames the directory your database files are in (Ubuntu keeps them in/var/lib/mysqlor/var/lib/mariadb, depending on the release). Backups you sent to S3, SFTP or Google Drive are not touched, but they are encrypted, and the password that opens them is stored in what you are about to delete. Runsudo sixpanel backup passwordand save that password somewhere else first. The command makes you type the stack path to confirm, and--yesdoes not skip that.Two things uninstall does not do, whichever form you use: nginx keeps serving your shop's PHP (the site files, the vhosts and the databases are all still there), and certificate renewal stops, because the panel was the only thing running it.
| Command | What it does |
|---|---|
sixpanel server update [--check] | Update SIXPANEL itself (panel, CLI, serving configuration) |
sixpanel server os-update [--check] | Update UBUNTU itself and its security fixes |
sixpanel server reboot | Reboot the server, shutting everything down cleanly first |
sixpanel server firewall | The exact ports this server needs open, and why |
sixpanel server uninstall [--purge-data] | Stop and remove SixPanel |
server update and server os-update are different things. See Server
updates and restarts.
Diagnose and fix
| Command | What it does |
|---|---|
sixpanel doctor [--self] | Full health check; --self runs host-only checks |
sixpanel logs <target> [flags] | Tail logs: a service, app, laravel, or all |
sixpanel ssl status [<domain>] | Every certificate here: issuer, days left, which site |
sixpanel ssl renew [<domain>] | [panel] Re-issue a certificate for a domain |
sixpanel cache clear | Clear Laravel's caches, rebuild the fast ones, restart the workers |
sixpanel top [--watch] | Memory, tasks and CPU time per service, one screen |
sixpanel disk | Where the disk went, per project and per kind |
sixpanel prune | Reclaim disk: old journal entries, the package cache, fat logs |
sixpanel support-bundle [-o FILE] | One redacted .tgz with everything support needs |
prune takes no arguments. It trims the system journal to the last seven days,
clears the package manager's cache and empties this project's application log.
It asks first, and no database, upload or backup can be removed by it.
Getting inside
You will probably never need this group. It is for support, and for people who already know Linux, Laravel and SQL. A wrong command here can break the site in ways the panel cannot repair.
| Command | What it does |
|---|---|
sixpanel exec <service> [cmd...] | A shell (or one command) as that service's own user, in its directory |
sixpanel artisan <args...> | Run php artisan for this project |
sixpanel sql [-e "SQL"] | Run SQL against this project's database |
exec matters more than it looks. There is nothing to "enter" on this server —
the programs are simply here — so exec runs your command as the project's
own Linux user, in the project's own directory. That is what keeps file
ownership right. A root shell in your code folder leaves root-owned files that
break the app days later, and this is the command that stops you doing it by
accident.
Reference
| Command | What it does |
|---|---|
sixpanel info | Panel URL, admin user, version, and what is running |
sixpanel version | SixPanel, panel, Node, nginx, PHP, MariaDB and OS versions |
sixpanel cheatsheet | The 20-odd commands people actually use, on one screen |
sixpanel menu | The numbered menu (what bare sixpanel shows on a terminal) |
sixpanel help [<command>] | Help for everything, or one command with examples |
[panel] marks commands whose work happens in the panel's web interface, not here. The tool says so before you type it — in
help, in the cheatsheet and inman sixpanel— instead of failing at you afterwards.
Flags every command understands
| Flag | Effect |
|---|---|
--json | Machine-readable output, for scripts and monitoring |
--yes, -y | Do not ask for confirmation |
--quiet, -q | Only the answer, no chatter |
--project <slug> | Act on one project when you run several here |
--offline | Never look up the public IP over the network |
--force | Accept a check the command would otherwise refuse |
--help, -h | Help for the command in front of it |
What the exit codes mean
0 fine · 1 you typed something wrong · 2 SixPanel is not installed ·
3 the panel is unreachable · 4 the check or the action failed.
So a monitoring hook is one line:
sudo sixpanel doctor --json || alert-someoneIf it went wrong
- "sixpanel must run as root" — put
sudoin front, exactly as the message prints it. - "no /etc/sixpanel.conf found" — SixPanel is not installed on this server, or the stack folder moved.
- "sixpanel libraries not found" — the tool was copied by hand. Re-run the installer for this server.
- "… is read out of the panel's JSON, and this host has no JSON reader" — a few commands read the panel's own file to answer:
backup list,backup targets,deploy history,deploy rollback lastandallowlist. They stop with that message rather than print an empty list you would believe. Install a reader and run it again:sudo apt-get install -y python3(orjq).sudo sixpanel allowlist cleardoes not need one, so a lockout is still one command away.
More symptoms, in the order people hit them: see When something is broken.