berth

Getting started

Installing Berth

Install Berth on a fresh server with the signed one-line command, a deb or rpm package, a release directory or an offline bundle, choose which parts to install, and claim the panel with the setup code.

Updated 9 min readinstall · installation · setup · berth install · offline · unattendedView as Markdown

On this page
  1. Choosing a method
  2. Installing with the one-line command
  3. Installing from a deb package (Debian, Ubuntu)
  4. Installing from an rpm package (AlmaLinux, Rocky Linux)
  5. Installing from a release directory
  6. Installing without internet
  7. Choosing what to install
  8. Giving the panel its own name
  9. Claiming the panel with the setup code
  10. Checking the installation
  11. Troubleshooting
  12. Removing Berth
  13. Next step

This page takes you from a fresh server to a running panel. Every installation method ends in the same command, berth install, which sets up the whole web stack and can safely be run again: what is already there stays, and what is missing is repaired. Check the system requirements first; in particular, the server needs a working VPN interface before you start.

Choosing a method

MethodWhenUpdating afterwards
One-line command with a licenceThe usual way: a fresh server with internet and a licence codeberth update
deb packageDebian or Ubuntu, if you prefer an apt repositoryapt-get update && apt-get install berth
rpm packageAlmaLinux or Rocky Linux 10install the newer package with dnf
Release directoryYou have the directory with the Berth binariesberth update --from …
Offline bundleIsolated networks without interneta newer signed bundle

All methods need root (or sudo), and you should be logged in through the VPN.

Installing with the one-line command

  1. Log in to the server through the VPN.
  2. Copy the installation command from your licence email or the licence download page, which has your licence code filled in and a copy button, and paste it into the shell.
  3. Wait until the installation finishes. The last lines show a setup code: write it down, you need it for the first sign-in.

The command downloads the installer and its signature, checks the signature against the Berth release key that is written into the command itself, and only then runs the installer. The installer in turn fetches the release manifest for your architecture, verifies its Ed25519 signature, checks the size and SHA-256 of the program archive against the manifest, records your licence and runs berth install. If any signature or checksum does not match, it stops and nothing on the server changes.

Options go after --code "$code" on the last line of the command:

OptionMeaning
--code CODEYour licence code (already filled in).
--email ADDRESSOnly for a licence that is tied to an email address.
--hostname NAMEFully qualified name of the server. Default: the output of hostname -f.
--php LISTPHP versions, for example 8.3,8.2. Default 8.3.
--no-mailWithout a mail server.

Without a licence you can still install from a package or a release directory; the server then runs as a 30-day trial with every feature. See Licence and trial.

Installing from a deb package (Debian, Ubuntu)

Berth is also available as a deb package in a signed apt repository. The repository address is supplied separately, together with its public key.

  1. Put the repository's public key in /usr/share/keyrings/berth.asc.
  2. Add the repository in /etc/apt/sources.list.d/ with signed-by=/usr/share/keyrings/berth.asc.
  3. Install the package and set up the server (the package does not do the setup itself on first install):

``bash apt-get update apt-get install berth berth install --hostname server.example.nl --php 8.3 ``

  1. Record the licence: berth license activate --code <CODE>.

Later package upgrades reconfigure the server by themselves, with the choices of the first installation.

Installing from an rpm package (AlmaLinux, Rocky Linux)

There is an rpm package for x86_64 and aarch64 with the same content:

dnf install ./berth-<version>-1.<arch>.rpm
berth install --hostname server.example.nl --php 8.3
berth license activate --code <CODE>

Installing a newer package on a server that already runs Berth reconfigures it straight away with the previous choices.

Installing from a release directory

If you have the directory with the Berth programs (berth, berthd, berth-agent, berth-probe), copy it to the server and start the installation from there:

sudo /root/berth/berth install --hostname server.example.nl --php 8.3,8.2

berth install places the programs and creates the systemd services berth-agent and berthd.

Installing without internet

For isolated networks, build one file with everything the installation needs on a server with internet that runs the same OS version and architecture as the target:

sudo berth offline-bundle create --out berth-offline.tar --php 8.3,8.2
berth offline-bundle verify berth-offline.tar

The bundle contains the packages of the whole web stack with their dependencies (including BIND, Node.js and Python), the Berth programs, wp-cli, the ClamAV virus definitions of that server, the latest WordPress (--apps adds Joomla, Drupal, Nextcloud or Matomo) and a manifest with the SHA-256 of every file. Install ClamAV and let it fetch definitions on the connected server first, or the mail virus scan and realtime malware scan cannot start offline.

On the target server:

tar xf berth-offline.tar
sudo ./berth-offline/bin/berth install --offline berth-offline.tar --php 8.3,8.2

The installer checks the OS, the architecture and every file against the manifest, and uses the bundle as its only package source, also for later --reconfigure runs. A bundle signed with the Berth release key is verified against the key pinned in Berth. A bundle without that signature installs only with --offline-unsigned, and then nothing in it is checked for origin. Updating from a bundle (berth update --offline) always requires a signed one.

Choosing what to install

berth install installs the full hosting stack by default. The most useful options:

OptionMeaning
--hostname NAMEServer name for mail and the server certificate.
--php 8.3,8.2PHP versions to install, from 5.6 to 8.5. Default 8.3.
--profile hosting or appshosting (default) installs everything. apps is a server for applications only: agent, panel, MariaDB, apps, containers, monitoring, updates and vulnerability management, without Apache, PHP-FPM, mail, FTP, webmail, WAF and Adminer.
--with / --withoutAdd or leave out parts by name: adminer, auditd, fail2ban, ftp, mail, mail-antivirus, malware, malware-realtime, resolver, spam, waf, web, webmail, wordpress.
--no-mail, --no-spam, --no-webmail, --no-waf, --no-ftp, --no-malware, --no-adminer, --no-wordpress, --no-fail2ban, --no-auditd, --no-resolver, --no-webLeave a part out. Without the local resolver there is no DANE for outbound mail.
--mail-antivirusScan incoming mail with ClamAV. On by default on a new installation when clamd already runs for the upload or realtime scan.
--malware-realtime, --upload-scanRealtime malware scan of webspaces and scanning of uploads through the WAF. On by default with enough memory; afterwards the choice under Security → Malware applies.
--firewallSwitch on the panel firewall on an existing server that has no firewall choice yet. A new installation always switches it on.
--admin-login, --admin-email, --admin-password-fileUnattended: create the first administrator straight away (password from a file, or - for stdin). No setup code is printed then.
--psacln-gid, --psaserv-gid, --popuser-uid, --popuser-gidGroup and user numbers, only for a migration where the numbers of the old server must be kept. See On-disk layout.
--reconfigureRun again with the choices of the previous installation; options you give now take precedence.

A profile is only a starting point: parts can be added later with --with or under System → Software, without reinstalling.

To add a PHP version later without losing the other choices:

berth install --reconfigure --php 8.3,8.2,7.4

Unattended installation, for example from cloud-init or Ansible:

printf '%s\n' "$PASSWORD" | berth install --hostname server.example.nl \
  --admin-login beheer --admin-email beheer@example.nl --admin-password-file -

Giving the panel its own name

The panel needs its own name with a valid certificate: for password reset by mail, for passkeys (which require https) and for ACME delegation. Point an A record (and AAAA) for the name at the server, wait until it resolves, then:

berth panel hostname set panel.example.nl --tls --email admin@example.nl

The panel is now at https://panel.example.nl/. You can also do this later under Settings → Panel, card Panel address. Webmail and Adminer never run on the panel's own address; see First steps.

Mail clients and FTP use the certificate of the server host name, which is self-signed until you request a real one:

berth tls issue --domain server.example.nl --email admin@example.nl

Claiming the panel with the setup code

As long as there is no administrator, the installation ends with a twelve-character setup code. Only someone with that code can claim the panel.

  1. Open the panel in a browser. Every page leads to Welcome to Berth.
  2. Enter the Setup code.
  3. Choose your own User name, Email address and Password (at least 12 characters; a sentence works well). Easily guessed names such as root, admin and superadmin are refused.
  4. Optionally fill in where server notifications go and a contact address for Let's Encrypt.
  5. Click Set up panel. You are now signed in as administrator.

Lost the code? Create a new one on the server with berth admin setup-code; this works only while there is no administrator. Prefer the command line? Create the administrator directly:

printf '%s\n' "$PASSWORD" | berth admin create --login beheer --email beheer@example.nl

The same welcome page also offers Restore from an external backup for a replacement server after a disaster; see Disaster recovery.

Checking the installation

berth doctor

berth doctor checks the OS, accounts, directories, services, config tests, the agent, the API, the panel database and the SSH guard on port 22, and prints OK, WARN or FAIL with what to do. The same checks run daily in the panel under System → Diagnosis. See Services and diagnostics.

Troubleshooting

ProblemWhat to do
The OS is refusedOnly the versions in the requirements are supported. Use a clean installation of one of them.
The installer refuses because there is no VPN interfaceSet up Tailscale or WireGuard first and connect through it.
/etc/resolv.conf is managed by systemd-resolved or TailscaleThe installer leaves it alone and says what to do. With Tailscale: tailscale set --accept-dns=false, then run the same berth install again. Without the local resolver, DANE for outbound mail does not work and the spam filter's DNS blocklists refuse public resolvers.
The panel certificate failsThe name must already point at the server and port 80 must be reachable. The panel stays on http in the meantime.
Something else failsRun the same berth install again (it is safe; after a successful install berth install --reconfigure also works), then berth doctor.

Removing Berth

berth uninstall shows what would be removed; berth uninstall --yes removes the panel's daemons, timers, firewall, include files, rendered configuration and programs, so websites and mail are no longer served. Customer data always stays: webspaces, Maildirs, customer databases and backups; as long as the panel database is kept, installing Berth again puts every subscription back. Only --purge also removes the panel database and /etc/berth, including certificates and DKIM keys.

Next step

Continue with First steps.