Security
How APOLO protects the panel, the server and the hosting accounts from each other: two-factor sign-in and passkeys, the hardening switches and the protections that are always on, the BEDEM firewall and WAF, Voyager's malware scanning, KernelCare's live kernel patches and SELinux. Sign-in security applies to every account; the rest is set by administrators.
Sign-in and sessions
Every panel account signs in with its user name and password, then with a code from an authenticator app when two-factor authentication is on, or with a passkey instead of both. The rules for everyone are in Settings → General → Sign-in security (administrators):
- Sign out after 12 hours
- 1 hour of inactivity, 12 hours, 1 day or 7 days without using the panel. Whatever you choose, a session ends 7 days after it signed in.
- Require two-factor authentication off
- Off (each account chooses), Administrators or Everyone. See Requiring two-factor.
- A panel password has at least 10 characters. Change your own in Settings → Account → Panel password (users: Settings) with the current password; every other session of the account ends. The SFTP, FTP and SSH password is separate and is set on the Access page (see Files, FTP, SSH and cron).
- Wrong passwords and codes are limited: 10 failures from one address in 10 minutes (IPv6 counts per /64), and 10 failures for one user name in 15 minutes from addresses it hasn't signed in from lately. After 5 wrong two-factor codes the password is asked again.
- Failed sign-ins are written to
/var/log/apolo-panel/auth.log. With BEDEM in Block mode, 8 of them from one address in 10 minutes block that address for an hour (see BEDEM). - Users may reset a forgotten password with a one-time e-mail link (valid 30 minutes) when panel e-mail is set up and Settings → User isolation and security → Password reset for users allows it. Administrators never reset by e-mail; they use the command in Recover access from the server.
Two-factor authentication
Two-factor authentication asks for a 6-digit code from an authenticator app (1Password, Google Authenticator, Aegis and others) after the password. It is set up by each account for itself in Settings → Account → Two-factor authentication (users: Settings → Two-factor authentication).
- Choose Set up. The dialog shows a QR code, the setup key and the setup link.
- Scan the QR code with the app, or type the key in it. The entry carries the panel name from Settings → General → Panel.
- Enter the 6-digit code the app shows and choose Turn on. Every other session of the account ends, so a session opened with the password alone doesn't stay.
From then on, signing in asks for the code after the password (Verify and sign in). A code works once. To turn it off, choose Turn off and confirm with your password and a current code; the other sessions end and the account's e-mail address gets a notice.
Two-factor authentication protects the panel. SFTP, FTP and SSH don't ask for the code: they sign in with the account's system password, which starts out the same as the panel password. With two-factor on, the Access page suggests giving them a password of their own.
Requiring two-factor
With Require two-factor authentication set to Administrators or Everyone, an account it applies to that has no authenticator yet sees Two-factor authentication required right after signing in and can use nothing else until it is set up (or sign out). A sign-in with a passkey already counts as two factors and isn't asked, and an administrator's Log in as user session is not affected.
Passkeys
A passkey signs in with the device's fingerprint, face or PIN, a phone or a security key, instead of the password and the code. It counts as both factors. Passkeys are optional: the password and the two-factor code keep working.
- Open the panel at its host name over HTTPS (like
https://panel.example.com:8443). Passkeys don't work on an IP address. - In Settings → Account → Passkeys (users: Settings → Passkeys) choose Add a passkey.
- Give it a name so you know which device it is, enter your current password and choose Continue. The browser asks for the device's fingerprint, face or PIN, or offers a phone or security key.
- Next time, choose Sign in with a passkey on the sign-in page.
- A passkey works only on the host name it was made on. The server keeps only its public key.
- The list shows when each passkey was added and last used. Removing one stops it signing in here; delete it on the device too (in its password manager) if you won't use it again.
- Only the account's owner can add passkeys, not an administrator in Log in as user.
Recover access from the server
When nobody can sign in to the administration, sign in to the server over SSH or the provider's console as root:
# a new password for an administrator (printed once; add --password to choose it)
apolo admin reset-password --username admin
# the authenticator is lost: turn two-factor off for that account
apolo admin 2fa off --username admin
reset-passwordsets a new password and ends every session, sign-in link and reset link of the account. Two-factor stays as it was.2fa offturns two-factor authentication off, ends every session of the account and its Log in as user sessions, records it in the audit log as root and sends the account's address a notice when apolo-api starts. Sign in with the password, then set up two-factor again in Settings → Account → Two-factor authentication; when the panel requires it, that comes right after signing in.- Both commands work for any panel account (use its user name) and stop and start apolo-api for the change.
- A hosting user who lost the authenticator can also be helped from the panel: open the account, choose Log in as user, then Settings → Two-factor authentication → Turn off; in that session no password or code is asked.
- Locked out by an address list or a private port: see Server settings.
Security hardening
Settings → User isolation and security → Security hardening (administrators) adds isolation for the websites and limits their network traffic. Every switch is off until you turn it on: try them on one server first. The card shows what the server can do (its systemd version, SELinux, Port lock (BPF), Local mail server) and how many PHP and Node.js websites the switches apply to. Each switch says what it may break. Change the switches, then choose Save and apply; the settings are kept in /etc/apolo/hardening.json.
Website processes
Each switch is a systemd drop-in per website (30-apolo-sandbox.conf for apolo-php@<id> and apolo-node@<id>); without it a website runs exactly as before. Saving a change applies every PHP and Node.js website again, which restarts its PHP or app once, and shows the progress. Websites that couldn't be switched over are listed with the reason and Try again. The database tools (phpMyAdmin, Adminer) follow the PHP switches.
- PHP without root off
- The whole PHP-FPM of each website runs as its owner, so no PHP process of a website runs as root. The PHP socket moves to
/run/apolo-php/<id>/, a folder only Nginx and Apache may enter. SELinux still runs PHP ashttpd_t. - PHP sandbox off
- A read-only system, the other accounts' homes hidden (the website sees only its owner's home),
~/.sshread-only, a private/tmp, no devices, no kernel settings, no setuid programs and a filter of system calls (a refused call returns an error instead of stopping PHP).mail()hands the message to the local mail server on 127.0.0.1:25 through APOLO's relay, so it needs Postfix running (the card warns when nothing answers there). May break programs that need setuid (sudo, crontab, ping), headless Chrome and plugins that show the server load. - Node.js sandbox off
- The same sandbox for Node.js apps, and an app can only listen on its own port. The port lock needs systemd with BPF support; without it the rest of the sandbox still works. May break apps that open a second port and headless Chrome (Puppeteer) without
--no-sandbox.
A website that breaks in the sandbox can be left out: on its Security tab, Process isolation, switch off Security hardening on this website (administrators). Its units then run as before, whatever the settings say.
Network
These are nftables rules for the processes of hosting accounts, in APOLO's own table inet apolo. They apply as soon as you save and again after a restart (apolo-nft.service), next to firewalld's rules, and need nftables on the server. The card counts the blocked attempts since the rules were loaded, also per account.
- Block outbound SMTP off
- Website and account processes can't connect to port 25 of other servers; they get an immediate refusal. PHP's
mail()and the server's own mail are not affected. May break scripts that deliver mail straight to other mail servers. - Also block ports 465 and 587 off
- Only with the switch above. WordPress SMTP plugins (Gmail, Mailgun, SendGrid and the like) send through these ports, so they stop working.
- Protect internal ports off
- Accounts can't reach Apache's backend port (it would bypass Nginx and the WAF), the database tools, BEDEM's API, OpenDKIM or other accounts' Node.js apps. Nginx and Apache still reach the apps. May break code that calls 127.0.0.1:8080 to reach a website directly.
- Allow port 25 of this server without signing in off
- Account processes send with PHP's
mail(), sendmail or port 587 with a mailbox, so no account can hand over unsigned mail as the server. Turn this on only for apps set to SMTP on localhost:25 without a password, until they are changed: while it is on, any account can hand mail to this server on port 25 with anyone's address as the sender.
Some rules in the same table don't depend on a switch: whatever the switches say, account processes can't reach the ports Nginx passes websites to (Apache, OpenLiteSpeed), and the ports they may listen on are limited too (see Reserved ports).
SSH, SFTP and FTP
- Confine SFTP to the home folder off
- An SFTP user (WinSCP, FileZilla and the like) sees only their own home folder, not the rest of the server. Only SFTP-only accounts are confined; an account with a full SSH shell is not. OpenSSH needs the folder it confines to be owned by root, so saving gives every account's home folder to root (the folder only: the files inside stay the account's); the account still uses its home over SFTP and Nginx still reaches the websites. On SELinux APOLO turns on
selinuxuser_use_ssh_chroot. May break an SFTP account that reaches files outside its home on purpose. - Require TLS for FTP off
- FTP signs in only over TLS (explicit FTPS), so passwords never cross the network unencrypted. Off, TLS is used when the FTP app asks for it. pure-ftpd restarts only when its configuration changes. May break old FTP tools and devices without TLS.
Turning on Confine SFTP to the home folder changes every account's SSH setup. On a new server, check that an SFTP sign-in still works and the websites still load before you rely on it.
Privacy between accounts
These protections are always on, with no switch. An account (its SSH shell, the web terminal, its websites' PHP and Node.js) sees only what is its own:
- Processes
/procis mounted withhidepid=2:ps,topand/proc/<pid>show an account only its own processes. The load, memory and CPU figures stay readable. Root sees everything, and so do members of the groupapoloproc(for monitoring agents that need it). A process can also trace only its own children (kernel.yama.ptrace_scopeat least 1).- Sign-ins
- The login records (wtmp, btmp, utmp, lastlog and their newer database forms) are closed to other users, so
last,lastb,w,whoandlastlogdon't show who signed in to the server. - Home folders
/homecan't be listed, and no account can enter another account's home folder; only the owner, root and the web server's group pass.- Mail queue
- Only root may list or flush Postfix's queue (
authorized_mailq_usersandauthorized_flush_users), somailqshows no other domain's senders and recipients. The panel's mail queue page works as before (see Email). - Kernel log
kernel.dmesg_restrictandkernel.kptr_restrictare at least 1, sodmesgand kernel addresses are root's. A stricter value you set stays. The values are kept in/etc/sysctl.d/90-apolo-privacy.conf.
The agent applies all of this when it starts and checks it every 10 minutes (logrotate and the boot can bring old modes back); apolo-privacy.service mounts /proc the same way early at every boot, before anyone can sign in. Where /proc can't be remounted (some containers), the server keeps working and the agent's log says why.
Reserved ports
Nginx, the websites' apps and the panel find the services on the server by port. So that each port stays with its owner, account processes can't listen on:
- the ports of this server's services: the panel, the database tools, BEDEM, OpenDKIM, the mail services, Rspamd, ManageSieve and SOGo, and Apache, OpenLiteSpeed, Redis, MariaDB, PostgreSQL, Memcached and OpenSearch when they are installed;
- the range of the websites' Redis instances, 6400 to 6899;
- the port of another account's app;
- ports 1 to 1023.
This is always on. With systemd 249 or newer built with BPF support, systemd refuses such a listen (a drop-in 40-apolo-ports.conf in each account's slice and website unit). In addition the agent looks at the listening sockets every 3 seconds and stops the processes of an account that holds a port kept for someone else, which also covers servers whose systemd can't refuse it and jobs outside those units. The Network card of Security hardening shows Reserved ports with the counts and the last process that was stopped.
Disabled PHP functions
Settings → General → Disabled PHP functions lists the PHP functions websites can't call (disable_functions), for every PHP website without a list of its own. Add the usual list adds exec, passthru, shell_exec, system, proc_open, popen and pcntl_exec. For each function you decide whether users may turn it on again for their websites (users may enable) or not (the lock). Users can always disable more. Saving (Save panel settings) applies the list to every website that follows it. Some plugins (backups, image tools) need exec or proc_open. A website's own list is set in its PHP settings, see Websites.
BEDEM firewall and WAF
BEDEM is the web application firewall and intrusion prevention for APOLO: ModSecurity with the OWASP rules for the websites, an IP firewall in the kernel, limits against floods and scanners, and blocking of password guessing for SSH, mail, FTP and the panel. It is a separate product that APOLO installs as an addon (see Addons); on an APOLO server the APOLO licence covers it. BEDEM's own documentation is at bedem.apolopanel.com.
Once it runs, Security has the tabs Overview, Blocked addresses, WAF, IP lists and Console (and Voyager when that is enabled).

Modes
- Log only after installation
- BEDEM records whom it would block but blocks nothing automatically. Manual blocks still apply.
- Block
- Automatic decisions go into the firewall: addresses that break the rules lose access to the server for a while. Before switching, review the blocked addresses and WAF events in Log only mode and add exclusions for false alarms.
- Off
- Blocks, greylist and connection limits are removed from the kernel and attacks reach the websites unfiltered. Decisions are still logged.
After installation, Finish BEDEM's setup opens its first-run wizard in the console, where you choose what it protects and when it starts blocking. Until then it only logs.
Overview
The top card shows the mode, BEDEM's own summary, its version (with a link when an update is available), how long it has been running, whether it gets the Websites' requests from Nginx (Not connected means floods, scanners and password guessing on websites aren't stopped: repair the connection in Addons) and the WAF state. Below are BEDEM's warnings, What BEDEM did over 24 hours, 7 days or 30 days (blocked, greylisted, would be blocked, blocked by hand, passed the check, and the WAF's figures), the Protection modules and the Latest decisions.
Blocked addresses
- Check an address answers why a customer can't reach the server: paste the address from the support ticket to see whether and why it is blocked, and unblock or block it from there.
- The list shows each blocked address, whether it covers All ports or Websites only, its state (in Log only mode Would block), the rule and reason, who set it, the offence number and when it ends. Unblock lets it in again; if the attacks continue, BEDEM blocks it again.
- Block address takes an IP address or network, what to do (Block on every port: websites, mail, SSH and FTP; or Greylist: websites only, where visitors get a check page and pass after it), a Duration (1 hour, 24 hours, 7 days, 30 days or No end) and an optional note BEDEM keeps with your name. Manual blocks apply right away, also while BEDEM only logs.
WAF
The WAF is ModSecurity with the OWASP Core Rule Set and works inside Apache: it checks the websites that run on Apache. Websites only on Nginx are still protected by BEDEM's request rules (floods, scanners, password guessing). Its own mode is Off, Log only or Block; in Block, requests that break the rules get a 403 and repeated attacks send the address to the firewall.
- Rules that fire groups the hits by rule and website; exclude a rule on one website when it hits normal requests.
- Recent requests lists the requests that matched, filtered by outcome and website.
- Exclusions are where the rules don't apply, only log, or the WAF is off: per website, path or field.
- When the WAF can't be turned on, the tab says why and offers Install ModSecurity for Apache, or removes a second set of OWASP rules from the distribution (BEDEM brings its own).
An administrator can also turn the WAF off for one website on the website's Security tab; prefer excluding the single rule that causes trouble.
IP lists
The Allow list is never blocked: your office, monitoring and deploy servers. The Block list is blocked on every port with no end, until you remove the entry. Entries that come from BEDEM's configuration file (/etc/bedem/bedem.conf) are marked Fixed and are changed there.
Console
BEDEM console opens BEDEM's full interface inside the panel: every module, the rules, the lists, the log and the first-run wizard. It uses your administrator session (no separate BEDEM account, no open BEDEM port) and works only from the panel in a browser, not with an API token. Open in a new tab gives it the whole window.
What APOLO connects
- The websites' requests from Nginx, so BEDEM sees floods and scanners.
- Two sign-in rules in
bedem.conf:apolo_login(8 wrong panel passwords or codes from one address in 10 minutes block it for an hour) andpostfix_sasl(10 wrong passwords for sending mail in 10 minutes, an hour). - The error logs of the Apache websites for the WAF, and an SELinux module that lets Nginx talk to BEDEM.
Hosting users see on each website's Security tab whether the WAF protects it, the rules that fired, the suspicious requests, BEDEM's decisions and the exclusions for their own domains. Only administrators change modes, blocks, lists and exclusions. The bell tells administrators when BEDEM isn't running, when a new version is available and when its setup isn't finished.
Voyager by BEDEM
Voyager scans the websites' files for malware, web shells and changed WordPress files, and checks files as they are written. It is a built-in addon: enable it in Addons → Voyager by BEDEM (see Addons), then use it in Security → Voyager (administrators).

How it checks
- Each file is checked by APOLO's own rules, by ClamAV (from the distribution's packages; its signatures update themselves) and, in WordPress websites, against the checksums wordpress.org publishes for WordPress and its plugins.
- Besides the files, scans can read the WordPress databases (injected scripts, hidden links and PHP in posts and options, a new administrator), the accounts' crontabs and shell startup files (also within five minutes of a change), and the accounts' running programs every 20 seconds (programs from
/tmpor hidden folders, miners, remote shells). - Real-time protection (on by default) checks every file written in a website's folder a moment after it is written, whoever wrote it: the website itself, FTP, SFTP, the File Manager or a deploy. The writer isn't held up. The card counts today's checks, findings and files moved to the quarantine.
- ClamAV runs as a service, with its signatures in memory (often 0.7 to 1.5 GB), only on servers with 3.5 GB of memory or more and while real-time protection is on; otherwise each scan loads the signatures for its duration and real-time checks use APOLO's rules. You can change that in the settings.
- Scans run one at a time, on one thread at the lowest CPU and disk priority. Scan all websites starts one now; a website's own scan is in its row.
The learning week
For the first 7 days after Voyager is enabled, everything found is only reported and nothing is moved, so you can see what it would do and mark harmless files as not a threat. The page shows Learning week until with the date; End it now ends it early. Afterwards, findings are handled as the settings say.
Findings and what to do
- When something is found quarantine certain detections
- Quarantine certain detections, report the others (recommended), Only report, move nothing or Quarantine everything found. Certain means a ClamAV signature of known malware, a known web shell, code that runs what the browser sends, or several warning signs in one file. Changed WordPress files are never moved on their own (the website would stop working): repair WordPress or restore the file from a backup.
- Block PHP files in the uploads folder on
- A PHP file written in
wp-content/uploadsgoes into the quarantine at once, whatever the policy. Plugins' guard pages and data files are left alone.
The tabs Websites, Findings, Quarantine and History show the state per website, the open findings, the moved files and what was closed. A finding shows what was found (the line and an excerpt), the file, who wrote it, the requests for it in the access logs and its versions in the backups, with a comparison. Depending on what it is, its actions are Move to the quarantine, Put back (not a threat), Delete for good, Not a threat, Check it again, Repair WordPress, restoring a version from a backup, Remove the code (from the database rows; what it changes is kept so it can be put back), Take the administrator role away, Stop the program and Turn the line off. The addresses that requested a found file can be blocked in BEDEM for a day, a week, 30 days or for good. Several findings can be chosen at once and marked as not a threat, as files or as their folders (a folder marked that way and everything below it isn't checked any more).
Settings
- How ClamAV runs Automatically
- Automatically (recommended), As a service, For each scan or Off (only APOLO's own rules and the WordPress checks).
- Scheduled scans changed files every night
- At 03:17 in the panel's time zone: Changed files every night, every file on Sundays, Every file on Sundays or Off (only by hand). A scan the panel missed is still started that morning.
- Quarantine 30 days
- Quarantined files are kept 7, 14, 30, 60, 90 or 180 days, then deleted.
- Also checked all on
- WordPress databases, Cron jobs and startup files, The accounts' running programs (certain ones are stopped as the policy says).
- The accounts' owners see their findings
- On the website's Security tab owners can See their websites' findings, also clean them (quarantine, remove code, stop programs, scan), or see nothing. Marking something as not a threat and putting it back stay the administrator's.
- Email the administrators about new findings on
- At most one e-mail every 15 minutes with everything found since the last one. Email the owners about their findings too (off by default) sends each account's own findings to its address.
- Folders that aren't threats
- The folders marked from findings; Check again takes one off the list.
KernelCare
KernelCare by TuxCare (CloudLinux) puts kernel security fixes into the running kernel without a reboot, and applies new ones by itself (its own scheduled job checks every 4 hours). It is a commercial addon with its own licence, installed in Addons (see Addons). The licence is either:
- By this server's IP address: bought for the server's IP from CloudLinux, TuxCare or a reseller. There is nothing to enter; KernelCare finds it by the address.
- With a license key: a key from TuxCare's customer portal (CLN). The server is registered with it, and removing KernelCare releases it for another server.
The KernelCare card shows the state, the installed version, the Running kernel, the kernel it effectively is With the patches, the licence and the last check:
| State | Meaning |
|---|---|
| Patched | The kernel has the newest security patches, without a reboot. |
| New patches | Newer patches are ready. KernelCare applies them within a few hours, or now with Apply patches. |
| Not patched | No patches are applied yet. Apply patches does it now. |
| No license | KernelCare finds no valid licence for this server: buy one for its IP address or enter a key with License. A patched kernel without a licence gets no new patches. |
| Kernel not supported | There are no patches for this kernel. Update the kernel (see System updates) and restart the server. |
KernelCare patches the server's own kernel, so it can't be installed in a container, which runs on its host's kernel.
SELinux
APOLO works with SELinux in enforcing mode, the default on AlmaLinux, Rocky Linux and RHEL; you don't need to turn it off. What APOLO does for it:
- It labels its folders (the websites in
/home/<account>/<domain>, the PHP sockets in/run/apolo-php, the websites' logs and the page cache) and turns on the booleans Nginx and PHP need:httpd_can_network_connect,httpd_enable_homedirs,httpd_read_user_contentandhttpd_can_sendmail. PHP-FPM runs ashttpd_t, also with PHP without root and in the sandbox. - New SSH ports get the type
ssh_port_t; withoutsemanage, APOLO installspolicycoreutils-python-utilsfirst. The swap file getsswapfile_t, and the SFTP confinement turns onselinuxuser_use_ssh_chroot. - BEDEM gets a small module,
apolo_bedem, so Nginx may send to BEDEM's sockets; building it needscheckmodulefrom thecheckpolicypackage, and the Addons page says when it is missing. On AlmaLinux, Rocky Linux and RHEL 9, where the policy treats/runas/var/run, APOLO writes its rules in the form the policy accepts.
When something is refused, look for the denials and tell support what they say:
ausearch -m AVC,USER_AVC,SELINUX_ERR -ts recent
getenforce
Something missing or unclear? Ask support or report a bug.