Adding servers

Install a web node, a replica server, a mail server, a DNS server, a backup node or an uptime probe on another server, step by step, with what to run where.

One ScalPanel server runs everything. You can add more servers for websites, mail, DNS, backups or uptime checks. Each is installed with the same installer, install-node.sh, and a role.

RoleWhat it doesWhat you needSteps
Web nodeRuns websites, like the main serverA fresh server, ports 80, 443 and 21 free4, on two servers
Replica serverA web node that also runs copies of websites and takes them overA web node, UDP 51821 open to the other web serversA web node, then 2 in the panel
Mail serverHolds mailboxes and receives mailA fresh server, a host name with A and PTR records, port 25 open4, on two servers
DNS serverA secondary nameserver for every zoneA fresh server, port 53 open4, on two servers
Backup nodeKeeps off-site copies of backupsA fresh server, a host name pointing to it2
Uptime probeChecks your monitors from elsewhereAny server with Docker2

Every role needs Ubuntu 22.04 or 24.04, Debian 12 or 13, or AlmaLinux or Rocky Linux 9 or 10, on x86_64, with root access. The server should have nothing else on it.

There is no separate Redis server: each website's Redis runs next to it, on its web node.

Note: Web nodes, mail servers and DNS servers talk to the main server over a private, encrypted link (WireGuard). Open UDP 51820 to the main server in any firewall in front of it (your provider's, for example). The link lets them reach only what they need on the main server, never each other.

Web node

You run commands on two servers: the new server (here called web2) and the main server. Each step says where.

Step 1 · Admin panel: add the node

Open Servers → Nodes, add a node named web2 with the web role, and copy its enrollment bundle (spe1…). Keep it for step 4.

Warning: The bundle works once and only for one hour. If it expires, remove the node and add it again.

On web2, as root:

curl -fsSL https://scalpanel.scalws.com/install-node.sh | sudo bash -s -- --role web --name web2

You should see Step 1 of 2 is done and a command that starts with sudo scalpanelctl link add web2. Copy that command.

On the main server, run the command step 2 printed. The first time, set up the link first:

sudo scalpanelctl link init
sudo scalpanelctl link add web2 <the key> <web2's public IPv4>

You should see web2 is linked as 10.99.0.2 and a line that starts with --link spl1.. Copy that line.

Note: link init is needed once per main server. It restarts the mail server, MariaDB and the control plane once (about a minute).

Step 4 · New server: start the node

On web2, run the installer again with the bundle from step 1 and the code from step 3:

curl -fsSL https://scalpanel.scalws.com/install-node.sh | sudo SCALPANEL_NODE_BUNDLE='spe1…' bash -s -- --role web --name web2 --link spl1…

You should see The node "web2" runs. Within a minute, Servers → Nodes shows web2 as online.

Then

  • Add web2's public address under Servers → IP addresses, assigned to web2, so the websites placed on it are published there.
  • Open TCP 80, 443 and 21, TCP 30000–30049 (passive FTP) and UDP 443 to web2.
  • The node follows the main server's release by itself, within a few minutes of each update.
  • Where web2 has IPv6, the node uses it too. A node installed before 0.1.46 turns it on with curl -fsSL https://scalpanel.scalws.com/install-node.sh | sudo bash -s -- --ipv6 on web2.
  • To take it out: drain and remove it in Servers → Nodes, then on the main server run sudo scalpanelctl link remove web2.

Replica server

A replica server runs copies of websites and takes them over when their primary server fails. It is a web node with a replica link to the other web servers it shares websites with.

  1. Install it as a web node.
  2. In Servers → Nodes, open it and, under Replica links, choose Link a server… for each web server it shares websites with. A server not linked before gets a name and a private address for the link. Open UDP 51821 between them. The list shows Ready within a minute.
  3. On a web server's website list, choose Replica… on a website, add this server and set the order.

On AlmaLinux or Rocky Linux, a node installed with 0.1.54 needs this once, so that it follows updates under SELinux: semanage fcontext -a -t bin_t '/opt/scalpanel-node/update\.sh' && restorecon -F /opt/scalpanel-node/update.sh. Details: Website replicas.

Mail server

You run commands on two servers: the new server (here mx2) and the main server.

Before you start

  • A host name for the server, such as mx2.example.com, with an A record pointing to it.
  • A reverse DNS (PTR) record for its IPv4 address with the same name, set at your server provider. Without it, many mail providers refuse its mail.
  • Port 25 open both ways. Many providers block it on new servers; ask them to open it.

On mx2, as root:

curl -fsSL https://scalpanel.scalws.com/install-node.sh | sudo bash -s -- --role mail --name mx2 --hostname mx2.example.com

You should see Step 1 of 2 is done and a command that starts with sudo scalpanelctl link add mx2.

On the main server:

sudo scalpanelctl link init
sudo scalpanelctl link add mx2 <the key> <mx2's public IPv4> --mail mx2.example.com

You should see a line that starts with --link spl1. and a line SCALPANEL_MAIL_SECRETS='…'.

Warning: SCALPANEL_MAIL_SECRETS holds the mail server's login to the mail directory and webmail's login. It is shown only once. Copy it straight to mx2; do not paste it into tickets, chats or notes.

Step 3 · New server: start the mail server

On mx2:

curl -fsSL https://scalpanel.scalws.com/install-node.sh | sudo SCALPANEL_MAIL_SECRETS='…' bash -s -- --role mail --name mx2 --hostname mx2.example.com --link spl1…

You should see The mail server "mx2" runs.

Step 4 · Admin panel: move a test domain

link add in step 2 registered mx2 under Email → Mail servers as draining: it takes no new domains yet. Move a test domain to it, send and read a message, then set it active. Its customers see POP3 (995) and port 465 in their mail client settings, as on the main server.

Then

  • Open TCP 25, 80, 110, 465, 587, 993 and 995 to mx2. Port 80 answers only Let's Encrypt's checks: the panel gets mx2's certificate and mx2 picks it up within minutes.
  • Calendars and contacts of mailboxes on mx2 work at the same address as on the main server (port 2080 of the panel); the panel server reaches mx2 over the link. A mail server installed before 0.1.48 needs curl -fsSL https://scalpanel.scalws.com/install-node.sh | sudo bash -s -- --dav on mx2 and sudo scalpanelctl link refresh on the main server.
  • Websites keep sending through the main server's relay.
  • To take it out: move its domains away, then on the main server run sudo scalpanelctl link remove mx2.

DNS server

A secondary nameserver that answers for every zone of the panel, kept in sync by the DNS cluster. You run commands on two servers: the new server (here ns2) and the main server.

On ns2, as root:

curl -fsSL https://scalpanel.scalws.com/install-node.sh | sudo bash -s -- --role dns --name ns2

You should see Step 1 of 2 is done and a command that starts with sudo scalpanelctl link add ns2.

On the main server:

sudo scalpanelctl link init
sudo scalpanelctl link add ns2 <the key> <ns2's public IPv4> --dns

You should see a line that starts with --link spl1., a line SCALPANEL_DNS_SECRETS='…', and that ns2 is a member of the DNS cluster.

Warning: SCALPANEL_DNS_SECRETS holds the key of ns2's PowerDNS API. It is shown only once. Copy it straight to ns2; do not paste it into tickets, chats or notes.

Step 3 · New server: start the nameserver

On ns2:

curl -fsSL https://scalpanel.scalws.com/install-node.sh | sudo SCALPANEL_DNS_SECRETS='…' bash -s -- --role dns --name ns2 --link spl1…

You should see The nameserver "ns2" runs. Within a minute DNS → DNS cluster shows it In sync.

Then

  • Open TCP and UDP 53 to ns2. Its API listens only on the link, for the main server.
  • Name it as a nameserver of your zones: add it to the nameservers in Basic setup (or a reseller's own nameservers) and register the glue record (ns2.example.com → its IPv4) at your registrar.
  • It runs the main server's PowerDNS release. Zones are copied with signed transfers (TSIG), DNSSEC included.
  • To take it out: on the main server run sudo scalpanelctl link remove ns2.

Backup node

A server with enough disk keeps the off-site copies of your backups.

Step 1 · New server: install it

Point a host name such as backup.example.com to the server, open ports 80 and 443, then on the server:

curl -fsSL https://scalpanel.scalws.com/install-node.sh | sudo bash -s -- --role backup --hostname backup.example.com --email [email protected]

You should see an address, a user name and a password.

Step 2 · Admin panel: add it as a destination

Open Backup → Off-site backups → Add destination, choose ScalPanel backup node or restic REST server, and enter the address, user name and password. The password is also kept on the node in /opt/scalpanel-node/credentials (root only).

Uptime probe

A probe checks your uptime monitors from another network and warns you when the main server is down.

Step 1 · Admin panel: add a probe

Open System health → Alerts → Uptime probes and add a probe. Copy the command it shows; it contains the probe's token.

Step 2 · Probe server: run the command

On the other server (no open ports needed), run the command, for example:

curl -fsSL https://scalpanel.scalws.com/install-node.sh | sudo bash -s -- --role probe --panel https://panel.example.com:2087 --token <token> --notify-url <Slack or Discord webhook>

You should see the probe as online in the list within five minutes.

If something goes wrong

What you seeWhat to do
Could not get lock /var/lib/dpkg/lock-frontendA fresh Ubuntu server is installing its own updates; the installer waits up to 10 minutes. Run it again afterwards.
the main server does not answer over the linkUDP 51820 is closed in front of the main server, or link add did not run there.
this server is already a ScalPanel … nodeThe server has another role. Use a fresh server.
port 80 is in use (or another port)Something else runs on the server. Use a fresh server.
The node stays offlineThe enrollment bundle expired (one hour). Remove the node, add it again and run step 4 with the new bundle.