Skip to content

Installing the panel ​

How to install the MoorCP Shared control plane on the panel server: the command, what the installer sets up, the result, the TLS certificate, and how to reset the admin password. For the panel and hosting on one server, see Panel + hosting (all-in-one).

Before you start ​

  • A clean server with AlmaLinux, Rocky, RHEL, or CloudLinux 9.
  • An FQDN hostname and a DNS A record that points to this server.
  • Root access.

See Server preparation.

Install steps ​

  1. Log in to the panel server as root (or a user with sudo).

  2. Run the installer:

    bash
    curl -fsSL https://get-shared.moorcp.com | sudo bash -s -- panel --hostname panel.example.com --email admin@example.com
  3. Wait until Done: MoorCP Shared vX.Y.Z appears.

  4. Note the admin password from the summary at the end.

  5. Open https://panel.example.com:8443/ and sign in. Continue with First login and 2FA.

WARNING

Mind the -- after bash -s. Without it, bash reads --hostname and the other options as its own options and fails with bash: --: invalid option. The first word after -- is the mode: panel, agent, dns, or upgrade.

INFO

Without --channel, the installer uses the stable channel. Add --channel rc only if you want release candidates. See Channels and versions.

You can leave out --hostname if hostname -f already returns the panel name. If you already bought a license, add --license MOOR-XXXX-XXXX-XXXX-XXXX to activate it during the install. All options are in Installer options.

TIP

Don't want to build the command yourself? Use the generator at releases-shared.moorcp.com/install.html, choose Panel only, fill in the hostname and email, then copy the command.

What the installer does ​

The installer checks the OS and architecture, then downloads the release and verifies its signature. After that it installs and sets up:

  1. PostgreSQL 16 with the moorcp database and role. Local access is switched to scram-sha-256.
  2. The system user moorcp and the directories /etc/moorcp-shared and /var/lib/moorcp-shared.
  3. restic for panel backups. If it cannot be installed, the installer only prints a warning.
  4. /etc/moorcp-shared/env with configuration and random secrets (bootstrap API key, signing keys, database password).
  5. The binaries moorcp-shared and moorctl in /usr/local/bin, the admin panel in /usr/share/moorcp-shared/admin, and the agent downloads for amd64 and arm64 from the same release.
  6. The internal CA for agent mTLS in /etc/moorcp-shared/pki.
  7. Database migrations.
  8. The TLS certificate: Let's Encrypt, or self-signed if that fails (see below).
  9. firewalld: opens 8443, 2083, 2085, 2086, and 80.
  10. The first admin account with the email from --email, if there is no staff yet.
  11. The systemd service moorcp-shared, then it waits until the panel answers /v1/health on port 8443. The moorcp-shared-upgrade.path unit is installed too, so the panel can be upgraded from Settings › Updates.
  12. The license: with --license, the installer activates that key at license.moorcp.com. Without it, the panel looks up a license registered for the server's public IP, or starts the 30-day trial there. If the license server cannot be reached, the panel runs on a local 30-day trial and keeps trying every 24 hours. A license failure never stops the install. See License.

The installed version, channel, and mirror are recorded in /etc/moorcp-shared/release. The upgrade mode uses this record.

The result ​

The installer ends with a summary like this:

text
==> Done: MoorCP Shared vX.Y.Z
   Admin GUI      : https://panel.example.com:8443/
   Client panel   : https://panel.example.com:2083/
   TLS            : Let's Encrypt
   Admin login    : admin@example.com
   Admin password : RANDOM_PASSWORD   (enable 2FA in Profile)
     A copy is in /etc/moorcp-shared/initial-admin-password; delete it after logging in: rm /etc/moorcp-shared/initial-admin-password
   Configuration  : /etc/moorcp-shared/env (contains secrets; back it up)
   Panel backup   : enable it in Settings › Panel backup, then download the recovery kit
   License        : Instance ID INSTANCE_ID
     status: trial
     plan: trial
     trial: until YYYY-MM-DD
     (buy or renew at member.moorcp.com with this Instance ID or this server's IP; the panel picks it up within 24 hours)
   Hosting server : Servers › Add server in the admin GUI, or
     curl -fsSL https://get-shared.moorcp.com | sudo bash -s -- agent --channel stable --panel https://panel.example.com:8443 --token <TOKEN>

In short: the admin and client panel URLs, the TLS type, the admin login and password (turn on 2FA in your profile; a copy is in /etc/moorcp-shared/initial-admin-password, delete it after you sign in), the configuration file (contains secrets; back it up), a reminder to enable the panel backup, the Instance ID with the license status and plan, and how to add hosting servers. When a license is found for the server's IP, the license lines show that license instead of the trial.

AddressFor
https://panel.example.com:8443/Admin panel and API
https://panel.example.com:2083/Client panel

First admin password ​

The admin password is generated at random and saved in /etc/moorcp-shared/initial-admin-password (readable by root only). The first line holds the email, the second line the password. As long as the file exists, the summary shows the password again every time you re-run the installer.

To see it again:

bash
sudo cat /etc/moorcp-shared/initial-admin-password

After you have signed in and changed the password, delete the file:

bash
sudo rm /etc/moorcp-shared/initial-admin-password

TLS certificate ​

The --tls option decides the panel certificate:

ValueBehavior
auto (default)Try Let's Encrypt; if that fails, use a temporary self-signed certificate and retry Let's Encrypt automatically
letsencryptLet's Encrypt required; the installer stops if it fails
self-signedUse a self-signed certificate right away

The installer issues the Let's Encrypt certificate with the built-in ACME client (moorcp-shared hostcert issue); certbot is not needed. The domain must point to the server and port 80 must be open. The certificate is stored in /etc/letsencrypt/live/<hostname>/, then the deploy hook /etc/letsencrypt/renewal-hooks/deploy/moorcp-shared-deploy-hook.sh copies it to /etc/moorcp-shared/tls. The panel loads a changed certificate within a minute without a restart.

Renewal is automatic: moorcp-hostcert.timer runs moorcp-shared hostcert renew at 03:00 and 15:00 (with up to 1 hour of random delay) and renews when less than 30 days remain. moorcp-shared hostcert status shows the expiry date.

INFO

Older installs that issued the panel certificate with certbot keep renewing with certbot. hostcert never touches a hostname managed by certbot.

WARNING

With a self-signed certificate, browsers show a warning, and hosting servers need --panel-ca when you install the agent. Switch to Let's Encrypt as soon as DNS is ready.

Installing Let's Encrypt after DNS is ready ​

If the installer fell back to self-signed with --tls auto, the TLS line of the summary reads:

text
TLS            : self-signed (Let's Encrypt is retried automatically twice a day once DNS points here; now: moorcp-shared hostcert renew)

The timer retries twice a day for 7 days, and the deploy hook installs the certificate in the panel as soon as it is issued. To issue it right away once DNS points to the server:

bash
moorcp-shared hostcert renew

After 7 days without success, retries stop. Run issue again, as below.

With --tls self-signed, the summary shows the command to run once DNS is ready (self-signed (once DNS is ready: moorcp-shared hostcert issue --domain HOST --email EMAIL)). Installers from earlier releases did not write /etc/moorcp-shared/certbot-domain in that mode. If the file is empty, write the panel hostname there first, so the deploy hook knows which certificate to copy:

bash
echo panel.example.com > /etc/moorcp-shared/certbot-domain
bash
moorcp-shared hostcert issue --domain panel.example.com --email admin@example.com

The same command works on an all-in-one install, where port 80 is already used by the hosting web server: hostcert uses the ACME webroot or stops the web server for a few seconds. Step-by-step guide, including DNS checks and common errors: SSL for the panel hostname.

Resetting the admin password ​

Forgot the admin password? Create a new one from the panel server:

bash
P=$(openssl rand -base64 18 | tr -d '/+=' | cut -c1-20)
echo "$P" | (set -a; . /etc/moorcp-shared/env; set +a; runuser -u moorcp --preserve-environment -- /usr/local/bin/moorcp-shared staff passwd --email admin@example.com)
echo "New password: $P"

Changing the password revokes all sessions of that staff member. These commands print in English; add MOORCP_LANG=id for Indonesian output.

If the 2FA device is lost, reset 2FA the same way:

bash
(set -a; . /etc/moorcp-shared/env; set +a; runuser -u moorcp --preserve-environment -- /usr/local/bin/moorcp-shared staff reset-2fa --email admin@example.com)

The staff member sets up 2FA again at the next sign-in. See also CLI.

Re-running the installer ​

Running the same command again is safe:

  • an existing /etc/moorcp-shared/env is kept;
  • an existing TLS certificate is kept;
  • the admin account is not created again if staff already exist;
  • the internal CA is not created again.

To move to a new version, use Settings › Updates in the panel or the upgrade mode. See Upgrading.

After installing ​

See also ​

MoorCP Shared, a shared hosting panel for server fleets.