Isolation
Exactly how ScalPanel keeps websites and accounts apart (runtime, limits, quotas, network, PHP, web server, mail, databases, files) and what isolation does not protect against.
This page answers the questions a hosting provider asks before trusting a panel with many customers on one server. Every answer describes the code as it is today.
Units of isolation
- A website is the unit of isolation. Each website has its own container, its own Linux user ID and its own directory.
- An account groups websites. It has an aggregate limit on CPU, memory, processes and disk I/O over all its websites.
- Two websites of the same account are isolated from each other like websites of different accounts: different user IDs, different containers, no network path between them.
At a glance
| Question | Answer |
|---|---|
| Container runtime | Docker Engine with runc, started through ScalPanel's own OCI runtime (scalpanel-oci), which adds the user namespace. On the all-in-one server, websites run in a nested Docker Engine 29 inside the privileged node container. Requires cgroup v2. |
| User per website | Yes. A unique UID and GID from 200000–999999, never reused. Never root inside the container. |
| User namespaces | Yes, one per website. The website's UID U is host UID 1000000000 + U, the container's root is host UID 2000000000 + U; neither has rights on the host. Files keep UID U on disk (idmapped mounts). Needs Linux 5.12+ with ext4 or xfs; without it websites run as before; Admin → Nodes → a node shows which ("Website isolation"). |
| Capabilities | All dropped (effective, permitted and bounding sets are empty). |
no-new-privileges | Yes. setuid binaries cannot raise privileges. |
| Seccomp | Yes. Docker's default profile with 37 more system calls removed, including mount, unshare, setns, ptrace, bpf, chroot and quotactl. io_uring, keyctl and userfaultfd stay denied. |
| AppArmor / SELinux | On Ubuntu and Debian, every website process (its sessions too) runs under ScalPanel's AppArmor profile scalpanel-site: no mounts, no raw or packet sockets, no writes to kernel settings under /proc and /sys, no tracing of other processes. Admin → Nodes → a node shows it ("Website AppArmor profile"). AlmaLinux and Rocky Linux have no AppArmor. There SELinux stays enforcing on the main server and on separate nodes and confines ScalPanel's services (container_t); websites run inside the node container, which SELinux does not confine (spc_t), so no SELinux policy applies to website processes (ADR-0234 addendum). |
| Root filesystem | Read-only. Writable: the website's own directory and a 64 MB /tmp (noexec, nosuid, nodev). |
| Process visibility | Private PID namespace. A website sees only its own processes. |
| Shared memory | Private IPC namespace. |
| Docker socket | Never mounted into a website. |
| CPU | Per website (cpu quota) and per account (cpu.max on the account's cgroup). |
| Memory | Per website and per account (memory.max). No swap. Over the limit, the kernel kills a process in that website. |
| Processes | Per website (pids limit) and per account (pids.max). A fork bomb stops at the limit. |
| Disk I/O | Per account (io.max), when you set a limit. Unlimited by default. Best effort: skipped where the device or kernel does not allow it. |
| Disk space | Per website, enforced by the kernel when the site filesystem has project quotas. Otherwise a soft limit checked by the panel. |
| Files (inodes) | Per website, only with project quotas. |
| Network between websites | Blocked. |
| Network to private ranges | Blocked: private, CGNAT, link-local (cloud metadata), loopback and multicast ranges. |
| Outgoing internet traffic | TCP to the allowed ports (80 and 443 by default), over IPv4 and IPv6 alike. UDP only to the ports you allow (none by default). |
| PHP-FPM per website | Yes, inside the website's container, as the website's user. |
| Web server per website | Yes, inside the website's container. A shared edge nginx per node is in front of them. |
| One shared mail server. Separated by authentication, not by containers. | |
| Databases | One shared database server per engine. Separated by per-database users and grants. |
The rest of this page explains each answer.
Container runtime
- Docker Engine. The agent creates website containers through the Docker Engine API. There is no other runtime driver today, and no gVisor or Kata option.
- All-in-one server. The installer installs Docker CE from Docker's own repository if Docker and its Compose plugin are missing. The installer does not check the Docker version of an existing installation. The platform runs as containers on that Docker.
- Nested Docker. Websites do not run on the host's Docker. They run on a second Docker Engine (version 29) inside the
nodecontainer, which is privileged because it acts as the web server host: it runs the website containers, their firewall rules and the edge. - Supported systems. Ubuntu 22.04 and 24.04, Debian 12 and 13, on x86_64. These releases use cgroup v2 by default, which the limits require.
Users and files
- Each website's files are in
/srv/scalpanel/sites/<site id>, owned by the website's UID with mode0750, inside a parent directory with mode0711. Other websites' UIDs cannot list or read them. - That directory is the only host directory mounted into the website's container, at
/srv/site. The generated web server configuration is mounted read-only. - The file manager works through a short-lived helper container per website: the website's UID, only its directory, no network. It opens every path relative to the website's root and refuses to follow symbolic links, so a planted link cannot lead it elsewhere.
- SSH and SFTP sessions, cron jobs, backups, restores and website exports each run in their own short-lived container with the website's UID and the same restrictions as the website (no capabilities, seccomp, read-only system).
- SSH sessions are limited to 128 processes and 512 MB of memory.
- Cron jobs are limited to 128 processes and are killed at their timeout (at most 540 seconds).
- Account home directories (
/home/<account name>) are owned by root and never mounted into a website.
Resource limits
All limits come from the package policy, set in Admin → Packages or with Admin → Isolation & resource plans.
| Limit | Policy key | Default | Applies to |
|---|---|---|---|
| CPU (1000 = one core) | limit.cpu_millicores | 1000 | Each website, and the account in total |
| Memory (MiB) | limit.memory_mb | 1024 | Each website, and the account in total |
| Processes | limit.pids | 256 | Each website, and the account in total |
| Disk read / write (MB/s) | limit.io_read_mbps, limit.io_write_mbps | Unlimited | The account |
| Disk operations per second | limit.io_iops | Unlimited | The account |
| Disk space (MiB) | limit.disk_mb | Unlimited | See below |
| Files and folders | limit.inodes | Unlimited | Each website |
| Monthly data transfer (MiB) | limit.bandwidth_mb_month | Unlimited | The account; bytes the edge served |
- How the per-website and account limits relate. Each website gets the account's values as its own limit, and the account's cgroup caps the sum. One website can therefore use the whole account allowance, but the account can never exceed it.
- Very small I/O and inode values are raised so websites keep working: 1 MiB/s, 10 operations per second, 10 000 files.
- Data transfer counts the bytes the edge served. It does not limit a website's own outgoing traffic.
Note: Disk space, files, disk I/O and monthly transfer are unlimited by default. Set them in your packages before you sell hosting.
Disk quotas
ScalPanel has two levels of disk limit.
Soft limit (always)
- The agent measures each website directory every 10 minutes (by default), without following symbolic links.
- The account's usage is the sum of its websites and its databases.
- Over the limit, the panel refuses uploads, new folders and restores into new folders with
QUOTA_EXCEEDED. Deleting and moving are never refused. - An alert fires at 90% and again over 100%.
- The website's own processes (PHP, cron, SSH) can still write past the limit until the next measurement.
Hard limit (with project quotas)
- When
/srv/scalpanel/sitesis on ext4 with project quotas or XFS, mounted withprjquota, each website becomes its own quota project. - The kernel then refuses writes past the limit (
Disk quota exceeded), whatever process writes. - Each website is capped at the account's whole disk limit. The account-wide sum stays a soft limit.
- The file limit is
limit.inodes, or one file per 4 KiB of the disk limit (at least 10 000) when you set none. - Websites cannot leave their quota project: the seccomp filter denies the two
ioctlcalls that change a file's project or its inherit flag. - A standard installation does not have project quotas. See Hardening to set them up. The node page shows whether a node enforces them.
Network isolation
- One private bridge per node. All website containers on a node share the bridge
10.88.0.0/16. Docker's inter-container communication is turned off, and an nftables rule drops any traffic from the bridge to the bridge. Websites cannot connect to each other, even within one account. - No private destinations. Traffic from websites to private (
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16), CGNAT, link-local (including cloud metadata at169.254.169.254), loopback and multicast ranges is dropped. This also keeps websites away from the control-plane network. - Outgoing ports. Websites may open TCP connections to the internet only on the ports in
security.outbound_ports(default 80 and 443), set in Admin → Isolation & resource plans. Outgoing UDP is dropped unless its port is insecurity.outbound_udp_ports(empty by default; for example 123 for NTP or 443 for QUIC). Private, link-local and loopback destinations stay blocked for both, over IPv4 and IPv6: for IPv6 also unique local, multicast and the ranges that lead back to IPv4 (IPv4-mapped, NAT64, 6to4, Teredo). Where the server has IPv6, websites reach the internet over it through NAT66. Name resolution goes through Docker's built-in resolver. - Port 25 is closed unless you add it. Websites send mail through the relay (below).
- The node itself. From the bridge, a website can reach only these services on the gateway address
10.88.0.1, and nothing else on the node (including the agent):- 587: the mail relay;
- 3306–3315: MariaDB proxies;
- 5432–5441: PostgreSQL proxies;
- 27017–27026: MongoDB proxies.
- The rules are checked before use. The agent validates every ruleset with
nft -cand replaces it atomically, so a bad ruleset never replaces the active one.
Note: The outgoing port list is one list for the whole server: ScalPanel takes it from the provider's own settings, so a reseller or package cannot open more ports for some websites.
Web server and PHP
- Each website has its own web server inside its container, as the website's user, on port 8080. The provider chooses one for the whole platform in Admin → Web server: nginx (default), Apache, nginx + Apache, OpenLiteSpeed, LiteSpeed, ScalWS, or a custom web server image.
- **Under nginx,
.htaccessis compiled** into nginx rules by a separate, sandboxed compiler process (no privileges, its own user, memory, CPU and time limits). Its output is only used by that website's own nginx, afternginx -tpasses in a throwaway container. A rule that cannot be translated safely is rejected rather than dropped, when dropping it could widen access. - PHP-FPM runs per website, inside the container, as the website's user. The number of PHP workers is derived from the website's memory limit.
- PHP defaults:
exec,passthru,pcntl_exec,popen,proc_open,putenv,shell_execandsystemare disabled (security.php_disabled_functions), andopen_basediris/srv/site/:/tmp/. These are defense in depth; the container is the real boundary. - The edge (nginx, or ScalWS when chosen) in front of all websites on a node terminates TLS and routes by host name. It never serves website files, and website configuration never reaches it. Its configuration is generated by the agent, checked (
nginx -torscalwsctl check) and swapped atomically. - The database proxies and the mail relay on
10.88.0.1run in their own process,scalpanel-relay, as an unprivileged user with only the right to open low ports and no way to regain privileges. Each website reaches only its own database server and mail server, with per-website connection limits. The mail relay trusts only the website's own mail server's certificate.
- One mail server for all accounts. Postfix, Dovecot and Rspamd run in one
mailcontainer. You can add more mail servers and move domains between them, but each server is shared by the domains on it. - Mailboxes are separated by authentication. All mailboxes are stored under one mail system user. Dovecot opens a mailbox only after its own password check (argon2id hashes), and suspended mailboxes cannot sign in.
- Websites send through a relay, not directly:
- each website gets its own SMTP credential (32 random characters), valid only on the relay, not for reading mail;
- it may send only as addresses of its own account's active mail domains;
- the default rate is 100 messages per hour per website (
limit.site_mail_per_hour); - the node wraps the connection in TLS to the mail server and verifies its certificate.
- Shared reputation. All accounts send from the same IP address. One account's spam can get that address blocklisted for everyone. Sending limits and the automatic suspension of mailboxes that look compromised make this less likely, and a critical alert tells you when the address is listed.
Databases
- One database server per engine serves every account. A standard installation has one MariaDB server. PostgreSQL and MongoDB servers can be added in Admin → Database servers.
- Per-database users. Each database user gets a generated 32-character password and privileges only on its own databases, from two fixed privilege profiles. No global privileges and no
GRANT OPTION. - Reached only through the node. Websites connect to
localhostor10.88.0.1; the node proxies the connection to the database server. The database network itself is not reachable from websites. - Remote access (ports 13306–13315, 15432–15441, 37017–37026 on the server) admits only the networks the account allows.
- The database server's CPU, memory and connections are shared. A heavy query from one account slows others on the same server.
SSH, SFTP and FTP
- SSH and SFTP go through the gateway on port 2222. Access is by public key only, for 1 to 10 source networks, and expires unless policy allows permanent access. The gateway re-checks every session each minute and closes it when access is revoked or the account is suspended.
- FTP is off by default. When the provider turns it on, it runs inside the node, requires FTPS by default, and each FTP account is limited to one website's folder.
What isolation does not protect against
Be clear about these limits before you host customers who do not trust each other.
- Kernel exploits. All containers share the host's Linux kernel. A kernel bug reachable through the allowed system calls can lead out of the container. Each website's user namespace means such a process lands on an unprivileged host UID of its own, but ScalPanel does not use gVisor or virtual machines. Keep the host kernel patched.
- An escape is a full server compromise. On the all-in-one server, website containers run inside the privileged
nodecontainer, which can read the platform's secret files. A process that breaks out of its container is an unprivileged user that owns nothing outside its website; one that also gains root (for example through a kernel bug) reaches every account on the server and the control plane. - Shared services. A vulnerability in a shared component (edge nginx, the FTP server, the mail server, the database server, PowerDNS) affects every account it serves. Load on them is shared too.
- A compromised website is fully compromised. An attacker who runs code in a website controls all of that website's files, its database credentials (if they are in its configuration), and its mail sending quota. Other websites stay protected, including those of the same account.
- Stolen panel credentials. An attacker with an account user's password and second factor can do anything that user can do. Require two-factor authentication.
- Provider staff and the control plane. Provider administrators can see and change everything. A compromise of the control plane or of the server's root account is a compromise of all tenants.
- Soft limits. Without project quotas, disk limits are soft. I/O is unlimited unless you set it. Database servers, mail and outgoing bandwidth have no per-account resource limits.
- Resource contention. Limits cap use, but neighbours still share CPU caches, disk bandwidth and network. Overselling a server means websites will slow each other.
- IP reputation. Websites share outgoing IP addresses for web requests and mail.
- Application security. ScalPanel does not patch your customers' WordPress plugins. It has no built-in malware scanner or web application firewall in the core product.