Docs apolopanel.com ↗ Start trial ↗
Documentation Server

Server settings

How the server itself is run from the panel: its health and facts, the clock and host name, the services and their automatic restart, operating system updates, swap, logs, the network, SSH and who may open the administration. Everything on this page is for administrators only; hosting users never see these screens.

The Server page

Open Server in the main menu. The header shows the host name and operating system, how long the server has been up, the APOLO version and a badge: Online, or Degraded when a key service has failed or a service the websites and databases use is not running. The page has three tabs:

Overview
The CPU and Memory cards with their use over the last two hours (a point every 5 minutes), the load average and the swap file (see Swap file). The Disk card compares what is on the disk with what the hosting accounts have been promised: Used on disk, Given to accounts and Free on disk, and a bar split into system files, files of the accounts, space reserved for accounts and space that is free to allocate. Below them are the network traffic of the server, the System facts (host name, IPv4 and IPv6 address, operating system, kernel, processor, uptime, web servers, APOLO version) and the Server history.
PHP, Node.js, Python and .NET
The runtime versions, their installation and the PHP extensions. They are described in Apps and runtimes.
Audit log
The same log as Monitoring → Audit log, described in Monitoring.

Server history keeps a point every 5 minutes for 7 days and shows the last 2 hours, 24 hours or 7 days: CPU and memory (averages of samples taken every 30 seconds), network traffic received and sent, the number of processes, established TCP connections and MySQL or MariaDB connections against max_connections. On a new server the history fills up over the first days.

Restart the server

Restart server in the header (and in the The server should be restarted message of System updates) restarts the whole machine, like reboot over SSH.

  1. Choose Restart server, then Restart. Websites, mail and the panel are unavailable for a minute or two.
  2. The agent runs systemctl reboot three seconds later. The page waits until the panel stops answering and answers again, then reloads by itself.
  3. When the panel starts on the new boot it writes to the audit log that the server is available again and how long the restart took.

The restart is refused while system or APOLO updates run, while a backup or restore runs, while a website is being set up and while something is being installed in the background: wait until it has finished. It works only from the panel in a browser, never with an API token.

If the page still waits after 10 minutes, it says so. Check the server in your hosting provider's console: a server that doesn't boot is outside what the panel can see.

Time and time zone

Settings → Server → Time shows the server's clock, the date, the time zone with its offset from UTC and whether the clock is synchronised (Synced, Not synced or Sync off), with the time source in use and its offset.

Time zone
The operating system's time zone (timedatectl set-timezone; cron is restarted to pick it up). Tick Use it for the panel too to give the panel the same zone. The panel's own time zone is also in Settings → General → Panel: it is used for dates in the panel, for cron job schedules and as date.timezone of new PHP websites.
Automatic time sync
chronyd keeps the clock right. Turning it on installs chrony when the server has no time service.
NTP servers
One per line. While you list your own, the distribution's pool and server lines in chrony.conf are switched off; an empty list brings back the distribution's servers. Sync now sets the clock from them at once (chronyc makestep). Time sources lists each source as In use, Reachable, Unreachable or Not trusted.
Date and time
Only while automatic sync is off: set the clock by hand in the server's time zone and choose Set the clock.

In a container the clock belongs to the host: the card says so, and time sync and the clock can't be changed there (the time zone can).

Host name and its certificate

The host name is the server's own name. Mail (Postfix's myhostname and its default certificate), FTP, the panel address and the panel's certificate use it. Settings → Server → Host name shows the current name, the addresses it resolves to in public DNS and whether it Points to this server. APOLO asks public resolvers (1.1.1.1, 8.8.8.8, 9.9.9.9) directly, since this server resolves its own name from /etc/hosts; when none answers, the card shows what this server resolves the name to and says it isn't known whether the name points here.

  1. Create an A record (and AAAA for IPv6) for the new name that points to the server, at the DNS provider of its domain.
  2. Enter the full name (like server1.example.com) in New host name. Leave Get a Let's Encrypt certificate for it ticked.
  3. Choose Change host name and confirm.

APOLO sets the name with hostnamectl, replaces the old name in /etc/hosts, tells cloud-init to keep it (otherwise many providers put the old name back at the next boot) and sets up mail and FTP again. NetworkManager writes /etc/resolv.conf again when the name changes, with only the DNS servers of its connections; DNS servers that were only in the file (written by the provider) would be gone, so APOLO puts them back into the connection and says so under the form. A panel address in Settings that used the old name gets the new one. A panel address that is this server's IP address becomes the host name once the host name has a valid certificate (also when you get the certificate later with Get certificate) and public DNS points the name here; the activity log says so. When /etc/hosts or the cloud-init setting couldn't be changed, a warning shows under the form. The host name is changed only from the panel in a browser, not with an API token.

Host name certificate

Settings → Server → Host name certificate (SSL) shows the issuer, the expiry date, the names on the certificate, where it is used (Panel, Mail and FTP), automatic renewal and the last check. Its badge is Valid, Expires soon, Expired, Not for this name or Self-signed.

  • Get certificate requests a Let's Encrypt certificate for the host name; Renew now renews it early. The name must point to this server first. Let's Encrypt allows 5 certificates for the same name a week, so don't renew in a loop.
  • The certificate is copied to the panel (both ports, reloaded within 30 seconds), mail and FTP. Until there is one, the panel uses the self-signed certificate made at installation.
  • The panel checks the certificate every 6 hours. When it expires within 14 days, has expired or doesn't match the name, the bell says so and administrators get one e-mail per change.

Services

Services lists the programs that run the websites, grouped as Web servers, PHP, Databases, Email, File transfer and SSH, Security and System. Each row shows the service, its systemd unit, what it does, its version, its ports and its status, and the header counts how many run, failed, are not running, not used or not installed.

StatusMeaning
RunningThe unit is active; below it, how long it has been up.
StoppedStopped on purpose, or not started. A stopped service the websites depend on is marked as a warning.
FailedThe unit failed and systemd doesn't start it again. When it can't start at all, the row says why: the system user, the system group or the program it needs doesn't exist.
Not usedA PHP version no running website uses. APOLO runs one PHP-FPM per website (apolo-php@<id>), so nothing of that version runs; it is not a problem.
Not installedNot on the server. Install appears when APOLO can install it.
Start, Restart
Before starting or restarting, APOLO tests the configuration (nginx -t, the Apache and OpenLiteSpeed tests, sshd -t, postfix check, doveconf -n, rspamadm configtest, named-checkconf). A configuration with errors is not started and the message shows its last lines, so a typo doesn't take a working service down.
Stop
In the row's menu. It asks first; for a service the websites depend on, the dialog warns that they stop working until you start it again. A stopped service stays stopped (the automatic restart leaves it alone). The APOLO agent can be restarted but not stopped from the panel.
Install
Apache, OpenLiteSpeed, MariaDB, PostgreSQL, Redis, OpenSearch, Postfix, Dovecot, Rspamd, Roundcube webmail, SOGo, FTP and Certbot. The installation runs in the background with a card in the bottom right corner; you can leave the page. MySQL is never installed by the panel, because its packages conflict with MariaDB.

When OpenSearch is installed, the page also shows its cluster health, memory and indices, and the commands that connect a Magento store to it.

Automatic restart

When a key service stops unexpectedly (a crash, the out-of-memory killer, an error exit), APOLO starts it again. The card is at the end of the Services page and is on by default for every installed key service: Nginx, Apache, OpenLiteSpeed, MariaDB, PostgreSQL, MySQL, Redis, OpenSearch, Postfix, Dovecot, Rspamd, SOGo, BIND (DNS), SSH and SFTP, FTP, BEDEM and Cron.

The Automatic restart card on the Services page: the main switch, the services it looks after and the latest events
Services → Automatic restart: the switch, the services it looks after and what happened lately.

It works in two layers:

  1. systemd. Each guarded service gets the drop-in /etc/systemd/system/<unit>.d/90-apolo-restart.conf: systemd starts it again 5 seconds after it fails, at most 5 times in 10 minutes. A service whose user, group or program is missing (exit status 203, 216 or 217) is not started over and over, because that needs a fix. OpenLiteSpeed and SOGo get no drop-in (they watch themselves), but the next layer covers them.
  2. The panel. Every minute it looks for a guarded service that is Failed (systemd gave up, or it failed at boot) and starts it within that minute, testing its configuration first. While it keeps failing, it tries again after 5 and 15 minutes, then every hour. A broken configuration is reported once, with the error, and tried again on the same schedule in case someone fixes it.

A service you stop yourself, in the panel or with systemctl stop, stays stopped. The panel also waits for 2 minutes after it starts (the server may be booting), for 2 minutes after someone used Start, Stop or Restart on that service, and while an APOLO or system update runs.

Lately lists the latest events: a service systemd started again, one the panel started, one that couldn't be started, a configuration error, a missing user or program, and a service that runs again. The panel keeps up to 100 events for 30 days; each also goes to the audit log, restarts show in the bell for 3 days, and a row that was started again in the last 24 hours says Started again with the time.

To leave one service alone, untick it under Services it looks after; to turn everything off, switch off Start key services again when they stop. The drop-ins are removed again (also when APOLO is uninstalled).

Apolo Pulse goes further: it also restarts a service that still runs but no longer answers, and acts on memory and disk trouble. See Apolo Pulse.

System updates

Operating system packages are updated from Updates → System updates, below the APOLO updates (the panel itself updates separately, see Updates and licence). By default nothing is installed on its own: the panel checks once a day, shows what is available on the dashboard and in the bell, and waits for you.

What is updated

  • The server's packages, with dnf: the operating system, PHP (from Remi), MariaDB, PostgreSQL, Nginx, Postfix, OpenSSL, the kernel and the rest.
  • The Node.js versions APOLO installed in /opt/apolo/node/<major>: newer patch releases of the same major version, such as 22.11.0 to 22.12.0. Node.js from the distribution or other folders is not touched.
  • Roundcube webmail, when a newer 1.6 release is out. The previous version and its database are kept for a rollback.

Check and install

  1. Choose Check now (the panel also checks daily, 2 minutes after it starts and after every update). The status says how many updates are available, how many are security updates, which PHP versions and Node.js versions change, and lists them under Available updates, with excluded packages marked.
  2. Choose Update now and pick what to install: Security patches, PHP and Node.js fixes (recommended) (the operating system's security advisories plus every PHP patch release, because PHP fixes arrive as ordinary releases) or All updates (every update the repositories offer, as dnf upgrade; never a distribution upgrade, and nothing is removed). Keep Node.js patch releases on to update Node.js too.
  3. The update runs in the background; you can leave the page and follow it with Show the update log.

On the server the update runs in its own systemd unit (apolo-sysupdate-<time>), so restarting the agent or the panel never stops dnf in the middle. The log is /var/log/apolo/sysupdate.log (the previous one is sysupdate.log.1). The steps:

  1. Packages: the packages are installed.
  2. PHP: every running website whose PHP version changed gets a graceful reload of its own PHP-FPM, so requests in progress finish and the new program takes over. Without this step websites would keep running the old PHP.
  3. Node.js: the newer patch release is installed, then the apps of that version restart one after the other.
  4. Webmail: a newer Roundcube release, when there is one.
  5. Services: web, database, mail, FTP, cron, SSH, time and fail2ban services that still use replaced files restart (open SSH sessions stay). APOLO's own services, systemd, D-Bus and the firewall are never restarted this way.
  6. Restart check: whether the server needs a restart and which services still use old files.

Websites keep running the whole time; a database may restart for a few seconds. APOLO never restarts the server by itself. When a new kernel or system library needs it, The server should be restarted appears here and on the dashboard with a Restart server button. An update doesn't start while an APOLO update, another system update, a backup or restore runs, or while a website is being set up; an APOLO update waits for a running system update.

Automatic system updates

Automatic system updates Manual
Manual, Every day, Every week (with a Day) or Every month (with a Day of the month from 1 to 28), at a Time (default 05:30) in the panel's time zone. A scheduled run starts only when there is something to install, checks again first when the last check is older than an hour, and is caught up within 2 hours when the panel wasn't running at the time.
What to install security patches
The same two choices as for Update now.
Never update
Package names or patterns such as MariaDB-* or kernel*, separated by commas, at most 30. They stay in the list, marked as excluded, and are left out of every update.
Node.js patch releases on
Newer patch releases of the Node.js versions APOLO installed.
Restart services that use updated libraries on
The services step above. Off, they keep the old files until you restart them.
Mail me a summary after automatic runs off
Administrators always get an e-mail when an update fails.

If it doesn't work: The last check failed shows the reason, usually a repository that can't be reached; the panel keeps the last known list meanwhile. The APOLO agent doesn't answer means the agent is restarting or stopped (systemctl status apolo-agent). An update that stopped halfway is marked as failed with what was done; Update now tries again.

Swap file

Swap lets the server slow down instead of stopping a process (often MariaDB) when memory runs out. The swap file is in the Memory card on Server → Overview.

  1. Choose Create swap file (or Change size when there is one).
  2. Keep the suggested size or enter another one, then confirm. The suggestion is a third of the RAM rounded up to 256 MB, at least 2048 MB.
  3. The file is made in the background: /swapfile, mode 0600, the SELinux type swapfile_t, mkswap, swapon, and a line in /etc/fstab with an APOLO comment, so it is on after every restart.
  • Sizes from 512 MB to 64 GB, and only what fits: the free disk space (counting the current file) minus a reserve of 2 GB or 10% of the disk, whichever is larger.
  • To change the size, the file is turned off for a moment and its contents move to memory, so this works only when they fit into free memory and other swap. A failed change puts the old size back.
  • Remove swap file in the same dialog turns it off and removes it.
  • APOLO manages only /swapfile. Other swap (a partition, zram, another file) is shown as Other swap, left as it is. A /swapfile you made by hand is taken over; another kind of file at that path is refused. Your own fstab line for it stays as it is.
  • Swap can't be changed inside a container, and a swap file is offered only on ext4, XFS and Btrfs.

Log rotation

Settings → Server → Logs sets one rotation policy for every log on the server: the websites', the panel's, mail, the services' and the system's, and the systemd journal. A table shows, for each group (Websites, The panel, Mail, Web server and databases, System, System journal), how big the logs being written are and how much their old copies take, and a bar compares all old copies with the limit.

Keep old copies for 14 days
1 to 365 days. Voyager and the website statistics read the old copies, so fewer days means less history for them.
Rotate a log earlier at 100 MB
10 MB to 10 GB. Logs rotate daily, and earlier when they reach this size; logrotate runs every hour, so a log doesn't grow much past it.
All old copies at most automatic
Empty means 10% of the disk that holds /var/log, at least 1 GB and at most 20 GB; otherwise 100 MB to 1 TB. Over the limit the oldest copies go first; the newest copy of each log always stays.
System journal at most 1024 MB
100 MB to 20 GB. The journal keeps at most this much and no more days than above.
The system's and the packages' logs too on
maillog, messages, secure, Nginx, Apache, MariaDB, PHP-FPM, Rspamd and the others, and the journal, follow the policy. The packages' own lines in /etc/logrotate.d stay in their files, commented out, and come back when you turn this off. Off, only APOLO's logs (websites, panel, tools) follow it.

Old copies are compressed and get the date in their name. Every 30 minutes the panel applies the policy to new packages' files and cleans up: copies older than the days you set plus one, then the oldest until the limit is met; anything written in the last hour stays. Clean up now runs logrotate and the clean-up at once; the card then shows how many copies were removed and how much space came free.

Rules files lists every file in /etc/logrotate.d and whether it Follows this. The login records (wtmp, btmp) keep their own rules; a file written in a form APOLO doesn't change safely is Left as is, and so is one that logrotate refused after the change (it gets the package's version back). When logrotate reports an error, the card shows its message.

Without logrotate nothing is rotated, and the card says so: install it with dnf install logrotate. A disk that fills up anyway is handled by Apolo Pulse when its setting Delete logs on a full disk is on (see Apolo Pulse).

Network

Network shows the server's addresses, its connection, SSH, the listening ports and the traffic.

The Network page with the IP addresses, the SSH ports, the network ports and the connection facts
Network: IP addresses, SSH, Network ports and the Connection card.

IP addresses

IP addresses lists every IPv4 address on the server with its prefix and interface. The Main address can't be removed, and an address given to a hosting account shows Used by with the account (assign addresses on the account's page, see Users and packages).

  • Add IP address adds an address your provider has routed to this server, with its network prefix (24 for a 255.255.255.0 mask). On a server with NetworkManager it is kept across reboots; without it the change applies at once but is lost at the next boot, and the Connection card warns about that.
  • Removing an available address takes it off the server at once; websites and DNS records that still point to it stop working on it.
  • When the main address changes (a new address from the provider), the page lists what APOLO already updated (its DNS records, records with the old address, your nameservers' addresses, the panel address, /etc/hosts) and what is left to you: DNS hosted elsewhere, glue records at the registrar, reverse DNS, outside systems and an APOLO licence tied to the old address. A dedicated address that disappeared from the server is reported too.

DNS servers

The Connection card shows the host name, interface, gateway, MAC address, DNS servers and network manager. Change next to the DNS servers sets 1 to 3 resolvers this server uses for updates, mail and certificates (buttons fill in Cloudflare, Google or Quad9). Each one must answer a test query first. APOLO writes them through NetworkManager, systemd-resolved or /etc/resolv.conf, whichever the server uses. Choosing this server's own BIND (127.0.0.1) shows a warning: BIND also answers from the zones the accounts add here, so where accounts can add domains that aren't theirs, use another DNS server.

Network ports and the firewall

Network ports lists every port the server listens on and the service behind it. A port is Public, Private (only the addresses on its list, and the server itself, reach it) or Local only (it listens on the server's own loopback address, so nobody outside reaches it anyway).

  1. Choose Restrict on a public port.
  2. Read the warning for well-known ports (closing 443 stops HTTPS for every website, closing 80 stops Let's Encrypt, closing a mail port cuts off mail apps).
  3. List the allowed addresses, one address or range (like 203.0.113.0/24) per line, up to 100. An empty list closes the port to everyone but the server.
  4. Choose Save. Edit changes the list later and Open makes the port public again.

For SSH and the administration port your current address is added automatically, so you don't lock yourself out. The administration port shares its list with Administration access.

The rules go into firewalld (rich rules) or ufw when one of them runs, and always also into APOLO's own nftables table inet apolo_ports, which holds even when a firewalld service or a ufw profile opens the port. Without firewalld and ufw only that table is used. What APOLO enforces is kept in /etc/apolo/port-firewall.json and put back after every start, and the installer doesn't open a private port again on updates. New rules go in before a port closes, so allowed addresses never lose access during a change.

A firewall in front of the server (your provider's cloud firewall or security group) is outside the panel: open or close the ports there too. Private ports need firewalld, ufw or nftables on the server; when none is there the page says the list is only remembered.

SSH ports

The SSH card on the Network page shows the Main port and an optional Port for accounts. With a separate port the hosting accounts sign in for SSH and SFTP there and root can't sign in on it, so you can limit the main port to your own addresses in Network ports while the accounts keep theirs open.

  1. Choose Change ports, enter the Main port (22 is the default) and, if you want one, the Port for accounts (optional). Both use 1 to 65535 and must differ.
  2. Choose Change ports. APOLO allows the new ports in SELinux and opens them in the firewall first, then writes /etc/ssh/sshd_config.d/00-apolo-ports.conf, tests it with sshd -t, applies it and checks that every port listens within 8 seconds. Otherwise the previous ports come back.
  3. Open a new SSH connection on the new port (ssh -p <port> root@<server>) before you close the old one. Open sessions stay connected.
  • A port another program uses is refused. A Port line in sshd_config is commented out with a note; a port set in another file of the SSH configuration, or a ListenAddress with its own port, stops the change until you remove it there.
  • A main port limited to an address list keeps the limit on its new number, with your current address on it.
  • Going back to 22 without a port for accounts removes APOLO's file. The SFTP command on the users' Access page follows the port for accounts (see Files, FTP, SSH and cron).

Administration access by IP address

Settings → Server → Administration access limits the administration to a list of IP addresses and ranges (CIDR), up to 100. An empty list means every address.

  • With two ports (the default): the administration port answers only the listed addresses and the server itself (127.0.0.1 and ::1, so an SSH tunnel always works). Other addresses get a short page that points to the users' panel, and API calls get a 403. The users' port is not affected.
  • With one port for everyone: only administrators' sign-ins, sessions and API tokens are limited. The server itself counts only when 127.0.0.1 is on the list.
  • An administrator signing in from an address that isn't listed is refused without the password being checked, and it counts as a failed sign-in.
  • API tokens (a billing system) must come from a listed address too. Before you save, the card lists tokens last used from addresses that aren't on the list, each with Add.
  1. Add addresses or ranges and choose Add, or Add my address. The list can't be saved without the address you are saving from.
  2. With two ports and a running firewall, turn on Close the port in the firewall too: other addresses then can't even reach the port. APOLO adds rules for the listed addresses (firewalld, ufw and its nftables table inet apolo_admin) before it closes the port, and keeps what it set in /etc/apolo/admin-firewall.json.
  3. Choose Save and confirm.

Locked out

If your address changed or the list has a typo, sign in to the server over SSH (or the provider's console) as root:

# what the panel limits, and whether your SSH address gets in
apolo unlock
# add one address to the administration list
apolo admin allow-ip 203.0.113.7
# every address again (also removes the firewall rules)
apolo admin allow-ip all
# open one private port, or everything
apolo unlock 22/tcp
apolo unlock all

These commands stop and start apolo-api for the change and write it to the audit log as root. Limits outside the panel (BEDEM, your own firewall rules, the provider's firewall) are not touched. For a lost password or authenticator see Security.

The panel's ports

APOLO answers on separate ports, chosen when it is installed (installer options --port, --user-port and --apps-port, see Requirements and installation) and kept in /etc/apolo/apolo.env:

PortWhatSetting
8443Administration and the REST APIAPOLO_LISTEN
2083The users' panel, and Log in as userAPOLO_LISTEN_USER
2096Webmail and the database toolsAPOLO_LISTEN_APPS
  • An administrator's session works only on the administration port and a user's only on the users' port; each port has its own cookies. Signing in on the wrong port checks the password there and sends you on with a one-time link (valid for 60 seconds) to the right port, where two-factor sign-in continues.
  • API tokens work only on the administration port (403 on the users' port). E-mails send users to the users' port and administrators to the administration port.
  • Both ports use the same certificate (see Host name certificate).
  • With the same number for both (one port for everyone), Administration access limits only administrators' sign-ins and can't close the port in the firewall.

Configuration file

Settings → General → Configuration file exports this panel's settings to a file, to set up another APOLO server the same way. Export settings downloads it; Import settings on the other server (or in its welcome wizard, see First steps) shows the parts in the file, each with a tick box.

  • It holds the panel settings (name, language, time zone, PHP limits and disabled functions, sign-in security, white label), the defaults for new accounts, the hosting packages, the backup schedule (not the destination or its keys), the notification settings (not the channels), the antimalware (Voyager) settings, APOLO and system updates, security hardening, log rotation, the mail server limits (not the smarthost), spam protection, resource limits, and the PHP and Node.js versions, database engine and BEDEM for a new server's wizard.
  • It never holds the host name, the panel address, accounts, websites, mail, IP addresses, passwords, keys or tokens.
  • Each imported part goes through the checks of its own settings form and into the audit log. Packages with the same name are updated, the others added. Security hardening and resource limits apply to every website right away.

Something missing or unclear? Ask support or report a bug.