Command line
Almost everything is done in the panel, but a few things need the server itself: getting back in when you are locked out, going back a version, and looking at the services and their logs. These commands run as root over SSH.
The apolo command
Signing in to the server over SSH shows a short menu of these commands; apolo -help shows it again.
apolo reset-password- Sets a new password for the panel's administrator
adminand prints it once.apolo admin reset-password --username NAMEfor another administrator, optionally with--password. apolo admin 2fa off [--username admin]- Lost the authenticator app? Turns off two-factor sign-in for that account. Every session of the account ends; sign in with the password and turn two-factor on again.
apolo unlock- Locked out? Shows what the panel limits: the administration port by address (Administration access) and every port kept private under Network, with the allowed addresses, and whether the address of your SSH session gets through. It suggests the commands and changes nothing.
apolo unlock all- Opens the administration and every limited port to every address.
apolo unlock <port>- Opens one port, for example
8443(the administration; this empties its address list),22, or53/udp. apolo admin allow-ip <address>- Keeps the administration's address list and lets one more address (or a range) in.
apolo setup hostname <name> [--email address]- Sets the server's host name and gets its Let's Encrypt certificate, as Settings → Server → Host name does. The installer runs it at the end; it says where the name points when the certificate can't be issued yet.
apolo setup apache- Installs Apache behind Nginx and starts it, as Install under Services does.
apolo account list [--json]- The hosting accounts: username, main domain, disk use and whether the account is suspended.
apolo account export <account> [--dir DIR]- Makes the account's Full account backup (Full account backup) as
apolo-backup-<account>-<date>.tar.gzin/root(orDIRunder/var/lib/apolo/export) and prints its path, size and sha256. Another APOLO server imports it (From an APOLO backup); its direct migration runs this command over SSH. apolo mcp [--token-file FILE]- MCP over stdio, for an AI assistant that starts it over SSH (
ssh ana@server1.example.com apolo mcp). The token comes fromAPOLO_MCP_TOKEN, the file, or~/.apolo-mcp-token(chmod 600); see AI assistants over SSH. apolo revert- Goes back to the previous APOLO version, after showing it and asking (
--yes: without asking); see Going back a version. apolo version- The installed version.
apolo support- How to reach APOLO support.
What apolo unlock opens is recorded in the audit log as done by root. It doesn't touch limits outside the panel: BEDEM's blocks, your own firewall rules or your provider's firewall.
Blocked by BEDEM after too many failed sign-ins? Unblock your address in BEDEM's console from another address, or wait until the block ends; see BEDEM.
APOLO's services
| Service | What it does |
|---|---|
apolo-api | The panel and its API on ports 8443, 2083 and 2096, as the unprivileged user apolo |
apolo-agent | Does the work that needs root (websites, PHP, mail, DNS, backups, updates), on a local socket only the panel can use |
apolo-pulse | Apolo Pulse, the automatic recovery of the server |
apolo-php@<website> | The PHP-FPM pool of one website, as its owner |
apolo-node@<website> | A Node.js, Python or .NET app of one website, as its owner |
Besides them, the services APOLO manages: nginx, httpd (Apache), lshttpd (OpenLiteSpeed), mariadb, postgresql, redis, postfix, dovecot, rspamd, named (DNS), pure-ftpd and crond. They are all on the panel's Services page, with their state and Start, Stop and Restart (Services).
# the state of the panel's services
systemctl status apolo-api apolo-agent apolo-pulse --no-pager
# restart the panel (websites and mail keep running)
systemctl restart apolo-api apolo-agent
Logs
# the panel and the agent, as they happen
journalctl -u apolo-api -u apolo-agent -f
# Apolo Pulse
journalctl -u apolo-pulse -n 200
# the last update
tail -n 100 /var/log/apolo/update.log
# a website's web server logs
ls /var/log/apolo/<domain>/
- Errors of the panel are in
journalctl -u apolo-api; what the server work did (an installation, a website that couldn't be written) injournalctl -u apolo-agent. - The panel's sign-in log for BEDEM is
/var/log/apolo-panel/auth.log. - Every change made in the panel is also in the Audit log, with who did it and from where.
Files and folders
| Where | What |
|---|---|
/usr/local/bin/apolo, /opt/apolo/ | The program; /opt/apolo/current is the running version, with the previous ones kept for rollback |
/etc/apolo/apolo.env | Settings of the panel's services: the ports (APOLO_LISTEN, APOLO_LISTEN_USER, APOLO_LISTEN_APPS), the update address (APOLO_UPDATE_URL), the certificate |
/etc/apolo/ | APOLO's configuration; /etc/apolo/tls/ the panel's certificate, /etc/apolo/backup/ the backup destinations and password (root only) |
/var/lib/apolo/ | The panel's state (accounts, websites, settings) in state.json, statistics and Apolo Pulse's history |
/home/<account>/<domain>/ | A website's folder; public_html (or the document root you chose), logs, tmp |
/var/vmail/<domain>/ | The mailboxes of a domain |
/var/log/apolo/ | The websites' web server logs and the update log |
/etc/nginx/, /etc/httpd/, /usr/local/lsws/ | The web servers' configuration; APOLO writes its own files and its changes are overwritten when a website is saved |
Don't edit the files APOLO writes (website configurations, PHP pools, mail and DNS settings) by hand: APOLO writes them again from the panel's settings. Use the panel's settings, the configuration editors it offers (Postfix, the database server, the web servers) or the per-version php.ini directives instead.
The configuration file
The panel's settings can be exported to a file and imported on another server (Settings → General, Export settings and Import settings), to set up a second server the same way. The file also lists the PHP and Node.js versions, the database engine and BEDEM, which the setup wizard of a new server installs. It has no host name, panel address, accounts, websites, mail or IP addresses, and never a password, key or token. The chosen settings replace the server's; security hardening and resource limits apply to every website right away. What the file holds is listed under Configuration file.
Something missing or unclear? Ask support or report a bug.