Beginner

How to Install Froxlor on a VPS

Picture of Richard Sutherland
Richard Sutherland

Introduction

Froxlor is a control panel, free and released as open source, for hosting websites for several customers on one server, each with their own login.

Froxlor suits admins who want a light control panel and like to see what it does to their server, because they choose which services it manages and can read its commands before running them.

Setting it up takes more terminal work than control panels that install everything with a single script, though. Froxlor’s package and web installer get the panel itself running, but you then choose and configure the services it manages. We’ll set Froxlor up for websites with Apache and PHP, and show you how to get a customer’s site live over HTTPS.

What You’ll Need

  • A Debian or Ubuntu VPS you can wipe. Froxlor’s package repository currently supports Debian 11 to 13 and Ubuntu 22.04 and 24.04. This guide uses Froxlor 2.3.16 on Ubuntu 24.04 LTS, running on an STW GP34 (two vCPUs, 4 GB of RAM, 120 GB of storage).
  • Root SSH access. You’ll run the setup commands as root over SSH, and GP3 servers at STW use key-based login, where a key file stands in for the password. Adding a key is covered in STW’s GP3 documentation.
  • DNS control for two subdomains. One names the control panel and the other the website. Replace our examples, froxlor.example.com and site.example.com, and the IP address with your own.

Step 1 — Get the VPS and Its Names Ready

Start from a freshly installed operating system, so the web server and database Froxlor configures are the only ones on the machine. Copy off any sites and database exports you want to keep, then use the STW control panel’s Products → Manage → Reinstallation. Reinstalling erases the disk and the VPS’s snapshots. The first installation guide in this series shows the process.

Once the new system is up, update its packages as root with the following commands. The reboot loads any new kernel the updates brought in.

apt update
apt -y upgrade
reboot

Point two names at the server

Add the DNS records now, so they have time to spread before Step 4 needs them. Froxlor’s certificates come from Let’s Encrypt, a nonprofit service that issues them free. A certificate lets browsers trust that https://site.example.com really is your server. Before issuing one, Let’s Encrypt fetches a test file from your server by that name, so the name must lead to the VPS first.

Type Name Value TTL
A froxlor Your VPS’s IPv4 address 300
A site Your VPS’s IPv4 address 300

TTL (time to live) is how many seconds resolvers may cache the answer. In the STW control panel’s DNS section, pick the domain and add each record with New record → Add as draft. Publish both changes together. Our guide to A records and subdomains shows how subdomain records work.

Published Froxlor panel and website A records in STW's DNS editor, both pointing to the demo VPS.

From your own computer, query Google’s public resolver for both names.

nslookup froxlor.example.com 8.8.8.8
nslookup site.example.com 8.8.8.8

Both answers should show your VPS’s address. If either shows an older address, resolvers are serving a saved copy until the TTL expires, as our explanation of DNS propagation describes.

dig +short froxlor.example.com @8.8.8.8 is the Linux and macOS equivalent and prints only the address. Run the command again with site.example.com.

Give the server its own hostname

A hostname is what a server calls itself. The full version, called the fully qualified domain name (FQDN), adds your domain to it, so a server called froxlor on example.com has the FQDN froxlor.example.com.

hostnamectl set-hostname froxlor.example.com
printf 'preserve_hostname: true\n' > /etc/cloud/cloud.cfg.d/99-preserve-hostname.cfg

The first command sets the name, and the second stops cloud-init, the first-boot setup tool on cloud images, from restoring the provider’s default after a restart.

Then edit /etc/hosts. The server reads this file before asking DNS, and its 127.0.1.1 line maps the hostname back to the machine itself. Change that line to the following.

127.0.1.1 froxlor.example.com froxlor

If your image builds /etc/hosts from a cloud-init template, add that line to /etc/cloud/templates/hosts.debian.tmpl too. Run hostname -f afterwards, and it should print froxlor.example.com.

Snapshot the clean system

Save a restore point before any Froxlor package touches the disk. On the STW control panel’s Snapshots page, click Take Snapshot, use a name like before-froxlor-install, and leave Include RAM unticked, since a clean restore point doesn’t need the server’s running memory. Carry on once the snapshot shows Active.

STW's snapshot form saving the clean server before Froxlor installation, without RAM.

Step 2 — Install Froxlor From Its Package Repository

Froxlor publishes its own APT repository, a package source that Ubuntu’s package manager installs and updates from, and its signing key lets APT check that each package really comes from Froxlor.

apt -y install apt-transport-https lsb-release ca-certificates curl gnupg
curl -fsSLo /usr/share/keyrings/deb.froxlor.org-froxlor.gpg \
  https://deb.froxlor.org/froxlor.gpg
echo "deb [signed-by=/usr/share/keyrings/deb.froxlor.org-froxlor.gpg] https://deb.froxlor.org/ubuntu $(lsb_release -sc) main" \
  > /etc/apt/sources.list.d/froxlor.list
apt update
apt -y --no-install-recommends install froxlor php-fpm

Froxlor’s package depends on Apache, MariaDB (a drop-in replacement for MySQL), and PHP, so APT installs those too. Its recommended extras are mail, FTP, and DNS servers, and --no-install-recommends is the flag that leaves them out.

It’s worth naming php-fpm too. Left to choose, APT would pick Apache’s built-in PHP module, which runs every site’s code as the web server’s user. Every site can then read and change every other site’s files, so one hacked site can spread to the rest. PHP-FPM (FastCGI Process Manager) runs PHP as a separate service, and Froxlor gives each customer a pool of PHP processes running under their own Linux account.

Connect Apache to PHP-FPM

Apache needs the proxy_fcgi module to pass .php requests to PHP-FPM, plus a short configuration file saying where PHP-FPM listens. On Ubuntu, PHP-FPM is already running after installation, but Apache’s side of the connection starts switched off. Run the following commands.

a2enmod proxy_fcgi setenvif
a2enconf php8.3-fpm

The 8.3 in php8.3-fpm is the PHP version Ubuntu 24.04 installs. On a system with a different version, the name changes to match, so run ls /etc/apache2/conf-available/ to find the right file (for example php8.2-fpm.conf) and use its name without .conf.

If the browser shows PHP code or downloads a file when you open the installer in Step 3, Apache isn’t handing PHP to PHP-FPM. Check that a2enconf used your PHP version and that systemctl status php8.3-fpm shows the service active, and fix it before typing any passwords.

Step 3 — Run the Web Installer

The installer needs a MariaDB account that can create databases and users for Froxlor’s customers. Ubuntu’s MariaDB root account uses Unix socket authentication, admitting you because you’re logged in to Linux as root, so it has no password Froxlor could use.

Start the MariaDB client as root by typing mariadb, then run these statements. Use a long, random password in place of the example.

CREATE USER 'froxroot'@'localhost' IDENTIFIED BY 'REPLACE_WITH_A_LONG_RANDOM_PASSWORD';
GRANT ALL PRIVILEGES ON *.* TO 'froxroot'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

WITH GRANT OPTION lets froxroot give each customer database its own login.

Why two database users? Froxlor runs its own panel database through a second, unprivileged account, keeping froxroot for jobs that need its power. Give website applications their own database users too. A WordPress site holding the froxroot password could delete every database on the server.

Open the installer

From your own computer, visit http://froxlor.example.com/froxlor/. The installer runs over plain HTTP, because the panel doesn’t have a certificate yet, and until you finish it, anyone who finds the page could complete it with their own details. So run it straight after installing the package and finish it in one sitting. You’ll change the administrator password once the panel has HTTPS.

Want no exposure at all? You can reach the installer through an SSH tunnel instead, which carries your browser’s connection inside the encrypted SSH session. Run ssh -N -L 18080:127.0.0.1:80 root@froxlor.example.com on your own computer, then visit http://127.0.0.1:18080/froxlor/. Through the tunnel, the installer shows 127.0.0.1 as the server’s IP address, so replace it with the public one when you reach that screen.

Fill in the installer

After the system check, choose Start install → Start installation. The Create database and user screen asks for both database accounts.

Field Value
MySQL-Server localhost
Privileged database user froxroot
Password for privileged user The password you created above
Unprivileged database user froxlor
Password for unprivileged user A different long password
Database name froxlor

Froxlor's database setup distinguishing the existing privileged user from the panel database user the installer will create.

The next screen creates Froxlor’s administrator, so pick a login you use nowhere else. On Details about your server, pick your distribution and set Server name to froxlor.example.com. Check that Primary IPv4 address shows the VPS’s public IPv4 address, which Froxlor binds its websites to. Then choose Apache 2.4, PHP-FPM, and Enable SSL usage.

Froxlor installation settings with the Ubuntu distribution, public IPv4 address, dedicated panel hostname, Apache, PHP-FPM, and SSL enabled.

The installer’s final screen offers a root command that installs and configures every service to match your answers, overwriting their existing configuration. Instead, select I will manually configure the services, just take me to the login, then Finish setup », so you can choose the services yourself in Step 4. Sign in at http://froxlor.example.com/froxlor/, where a System not configured yet banner is expected for now.

Step 4 — Choose the Services Froxlor Manages

At this point Froxlor’s interface works, but it isn’t managing anything yet. Apache and PHP-FPM still run on Ubuntu’s standard configuration, and Froxlor hasn’t written a single file for them. In this step you tell Froxlor which services to take over, and it generates their configuration.

Under System → Settings → froxlor VirtualHost settings, direct hostname access, Let’s Encrypt, and PHP-FPM should already be on. Switch on Enable SSL-redirect for the froxlor vhost and save. A vhost, short for virtual host, is the block of web-server configuration for one name, so this setting makes the panel’s own address send HTTP visitors to HTTPS.

Pick the services

Open System → Configuration, check that the distribution matches your server, and select Apache 2.4 under HTTP. Under SYSTEM, select these five.

  • PHP-FPM runs each customer’s PHP under that customer’s own account.
  • libnss-extrausers lets Linux recognise the customer accounts Froxlor creates, so files and PHP processes can belong to them.
  • Logrotate compresses and removes old log files before they fill the disk.
  • goaccess builds traffic reports from the web server’s logs.
  • Cronjob for froxlor runs the scheduled job that applies your changes.

Leave DNS, mail, antispam, and FTP at Don’t (re)configure.

Froxlor's configuration page selecting Apache and supporting system services while leaving mail, DNS, and FTP unconfigured.

Click Proceed, and Froxlor shows a root command. This command rewrites the real configuration files of every service you picked. Wait for All services have been configured.

Apply the queue and move to HTTPS

The cron job is now installed, but your settings changes are still queued. Run it by hand to apply them now.

cd /var/www/html/froxlor
bin/froxlor-cli froxlor:cron --force

Froxlor writes the panel’s Apache configuration, requests its certificate, and reloads Apache. On your own computer, open https://froxlor.example.com/. The panel should load on its own name over trusted HTTPS, with no /froxlor path or special port. Check a fresh sign-in from a private window too. It should reach your administrator dashboard over HTTPS.

Then change the administrator password, because the first one crossed the internet unencrypted. Open your username menu, choose My profile, and use the Change password form.

Changes take a few minutes to appear. Saving a form updates Froxlor’s database and queues a task, and the cron job works through the queue every five minutes by default. If a new domain doesn’t answer straight away, wait a few minutes.

Step 5 — Close the Installer Path

The panel now runs on its own HTTPS address, but two leftovers from setup remain. Apache’s original default site, which served the installer, is still switched on, and Froxlor’s generated configuration still grants access to its files at the old /froxlor path, which nothing needs any more. These commands block that path for everyone, disable the default site, then check the configuration and apply it.

cat > /etc/apache2/conf-available/froxlor-setup.conf <<'EOF'
<Location /froxlor>
    Require all denied
</Location>
EOF
a2enconf froxlor-setup
a2dissite 000-default
apache2ctl configtest
systemctl reload apache2

Step 6 — Host a Website Under Its Own Customer

A Froxlor customer is a hosting account with its own Linux user, login, and resource allowances. Every website in Froxlor belongs to a customer, so you create the customer before the domain.

Open Resources → Customers → Create customer and enter a username like frxsite with its own password. Switch off Create standard subdomain?, which would otherwise add an automatic subdomain under the server’s hostname, and switch off Send password. Keep Store default index-file to customers docroot? on, so the site starts with a placeholder page you can test.

For a single small site, 5120 MiB of webspace, 100 GiB of traffic, five subdomains, and one database are a sensible starting point. Set the email and FTP allowances to 0 with their unlimited boxes cleared, and switch off E-mail IMAP and E-mail POP3.

Customer resource allowances in Froxlor, with webspace and database access enabled and email and FTP allowances set to zero.

Leave PHP enabled? on with Default Config selected, and save the customer. To check the customer’s side, sign in as frxsite from a private window. Their menu covers only their own databases, domains, and traffic, and the dashboard shows their usage against the limits you just set.

Add the domain

Under Resources → Domains → Create domain, enter site.example.com, assign it to your customer, and switch off Emaildomain. Set DocumentRoot, the directory Apache serves the site from, to /var/customers/webs/frxsite/site.example.com/ with your own username and domain.

Select the VPS’s port-80 address and choose No alias for ServerAlias value for the domain. Then turn on Enable usage of SSL, select the port-443 address, and turn on SSL redirect and Use Let’s Encrypt before saving.

Froxlor domain settings enabling SSL, the HTTPS redirect, and an automatically renewed Let's Encrypt certificate.

Check it from outside

Open https://site.example.com/, and Froxlor’s Domain Default Page should appear with no certificate warning.

Froxlor's default domain page in a browser with the full trusted HTTPS website address visible.

The page is an ordinary index.html in the document root, ready to replace. Then test the redirect from your own computer, which also checks the DNS and firewall path a visitor takes.

curl -IL http://site.example.com/

-I asks for headers only, and -L follows redirects. The first response should carry status 301 and a Location header naming https://site.example.com/, and the last should be 200. Curl rejects untrusted certificates by default, so a final 200 also vouches for the certificate. In Windows PowerShell, type curl.exe, because curl can be an alias for a different command.

Optional Security Measures

Froxlor’s administrator account controls the configuration of every service Froxlor manages, so protect that login and limit what the internet can reach before you host real content. None of the three below is needed for the site to work. We’d start with a second login factor and a firewall, then add a fixed-address rule if your connection allows it.

Use an authenticator for login (optional)

Two-factor authentication (2FA) adds a code from an authenticator app on your phone to each sign-in, so a stolen password isn’t enough on its own. We recommend it for the administrator account.

Each Froxlor account switches 2FA on separately. Open your username menu, choose 2FA options, select Authenticator, and click Activate 2FA. Add the QR code to your authenticator app, then enter the code it generates to confirm. Store the manual setup key privately as well, since it rebuilds the codes on a new phone.

Froxlor confirming successful activation of two-factor authentication for the administrator.

Some sensitive Froxlor settings, such as the commands it uses to restart services, only accept changes after you enter a 2FA code.

Limit incoming connections with UFW (optional)

Froxlor doesn’t need UFW to run, but a firewall limits which services the internet can reach. UFW (Uncomplicated Firewall) is one option; STW’s Ubuntu image includes it but leaves it switched off. Allow SSH before enabling it, or the firewall will cut off your own connection, and use your SSH port in place of 22 if you’ve changed it.

ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
ufw status

Keep panel access to one fixed address (optional)

If your own connection has a fixed public IP, letting only that address reach the panel adds real protection. A UFW rule would hide the websites too, because they share port 443 with the panel, but Froxlor’s own vhost settings can restrict the panel alone. Under Resources → IPs and Ports, edit the port-443 entry and add these lines to Own SSL vHost-settings, with your public IP in place of the example.

<Location />
    Require ip 198.51.100.25
</Location>

After the next cron run, other addresses get 403 Forbidden from the panel while the websites stay public. Leave Default SSL vHost-settings for every domain container untouched, because it applies to every customer site, and keep root SSH working so you can remove the rule from a new address.

Conclusion

Every domain or customer you add from here follows the same path as this first site.

Froxlor updates arrive through APT, so your routine apt upgrade covers the panel along with Ubuntu. Backups are yours to arrange, because the customer data export is for handing data over and doesn’t protect the server. Our guide to securing, updating, and backing up a VPS control panel deals with off-server backups and other upkeep.

Next steps:

Success!

If you found this tutorial helpful, please consider giving it a like and sharing it with others in the community.

Scroll to Top

Share

Share this link via

Or copy link

https://stw.no/en/tutorials/control-panels-for-web-hosting-on-vps/how-to-install-froxlor-on-vps/Copied!

Share Your Feedback