Server setup

From a bare Debian machine to a complete Phlo server: FrankenPHP with vhosts, MariaDB, the daemon, firewall, fail2ban, and optionally a full mail server. Assemble your server below and get one bash script that sets everything up.

How it works

  • Fill in the configuration and generate the script; everything is in that one setup.sh, nothing is sent afterwards
  • Run it as root on a fresh Debian 13 (or 12); rerunning is safe, existing files will get a backup
  • Passwords and DKIM keys are generated on the server itself, in the phlo-secrets/ folder where you run the script; this site never sees them
  • At the end, you will receive a DNS checklist (A-records, MX, SPF, DKIM, DMARC) and a smoke test of all components

Server

Role

The role determines the preferred mode for new sites. Dev builds from the source on every request; production runs the release in worker-mode. Both is also possible: dev sites and production sites on one machine.

Sites

For each site, there is a vhost block in /srv/control/sites/. The folder name is the folder under /srv/; the first host is canonical, additional hosts are redirected. Production blocks for apps that have not yet been deployed are prepared as comments.

Components

Mail

The script asks for the login credentials for the relay while running; they are not in the script.

The mail module requires Debian 13. DKIM keys are generated per domain on the server; the corresponding DNS records are stored in phlo-secrets/dns-records.txt.

setup.sh

Next steps

We use essential cookies to make this site work. With your permission we also use analytics to improve the site.