Managing servers

I recently revisited my entire hosting setup for both client projects and my own websites. After years of bouncing between different solutions ā€” some too complicated, others too limiting ā€” I think Iā€™ve finally found my sweet spot with a combination of Ploi and Hetzner Cloud. In this article I want to share it with you (and also document it for my future self).

FYI: Iā€™ve included affiliate links. If you decide to try them out, Iā€™ll receive a small commission.

Managing expectations

What I want from a hosting setup:

  • Connect a (GitHub) repository
  • Instant deployment on push, ideally with different actions for different branches
  • Free, automatic SSL certificates
  • Play nicely with file-based content management systems like Kirby ā¶
  • Simple (file) backups
  • Modern UI (you wouldnā€™t believe what Iā€™ve seen)

Managed servers or managing servers?

Managed servers

Among others, Iā€™ve used managed servers by Strato, IONOS, All-inkl, DomainFactory, Hostinger and Host Europe. They always felt a bit limited when it comes to deployment and they charge (some, a lot of) money for things like SSL certificates or backups. Not to mention their ancient user interfaces ā· .

Managing servers

On the other hand, Iā€™ve experienced a lot of stress managing servers myself for some years, so I swore Iā€™d never touch that topic ever again. Nothing like waking up on a nice Sunday morning to urgent emails about a server being down to make you question your career choice. It sure is nice to have full control, but not at the expense of this kind of stress.

Something in between?

Iā€™ve searched for ā€œsomething in betweenā€ for a long time ā€” a solution that gives me control without requiring a degree in server administration.

Ploi: the perfect middle ground

As they tell you on their own website, they ā€œ(ā€¦) take all the difficult work out of your handsā€ and I have to say itā€™s true. It bridges that gap between fully managed and self-managed in a way that feels just right.

Iā€™ll show you how it looks when I create a new site. Because Iā€™m a very visual person myself, I took screenshots āø of each step.

1. Creating a server

Most sites donā€™t need a single server for themselves. But for completeness sake, letā€™s create our first server from scratch. This whole workflow is totally focused on my needs and because Iā€™ve settled on Kirby a long time ago, weā€™re going to create a server for a Kirby site.

First, we press the ā€œCreate serverā€ button and choose a provider:

A screenshot of the Ploi interface showing a Select provider form with different server providers like DigitalOcean, Hetzner, and Vultr. Hetzner is selected.

Iā€™m using Hetzner here but there are other options, too. Even a ā€œCustom serverā€ one, but Iā€™m not quite sure how that works.

Now we can configure some server details:

A screenshot of the Ploi interface showing a Details form with input elements for Credentials, Name, Server OS, Server type, Server plan, Server region, Webserver, PHP version and Database.

The first select input is ā€œCredentialsā€, referring to the different API keys you can set up in Profile ā†’ Server providers. This way you can easily use different (client) accounts for the same server provider.

While I enjoy the automatically generated server names ā¹ , you can also choose a custom name.

Server OS and server type I rarely touch, leaving it at the latest Ubuntu and ā€œServerā€ respectively.

Depending on your project and server provider, you want to select a powerful enough server plan. Most of the time I use Hetznerā€™s smallest shared vCPU plan. Iā€™ll go into detail about hosting with Hetzner Cloud further down.

Webserver, PHP version and database depends on your project but so far I always used NGINX, latest PHP and no database.

Now Ploi handles all the technical setup and we just have to wait a bit.

2. Creating a site

After Ploi installed our server we can add our first site. This is where things get interesting:

A screenshot of the Ploi interface showing the New site creation form. The form includes fields for Domain, Web directory, Project directory, Project type, and Webserver template (dropdown showing Kirby selected)

After entering your domain, youā€™ll have to decide whether to use Kirbyā€™s public folder setup or set the web directory to /.

The only setting I touch here is the ā€œWebserver templateā€. Iā€™ve created a Kirby template with the Moritz StĆ¼cklerā€™s NGINX boilerplate in Profile ā†’ Webserver templates. This way I can select ā€œKirbyā€ here and have the same NGINX configuration for every new site.

3. Connecting a repository

Now our site is created and youā€™re presented with this screen:

A screenshot of the Ploi repository installation interface. At the top are four installation options: Install repository, Install WordPress, Install Nextcloud, and Custom deployments. Below, the repository setup form shows GitHub selected as the provider. At the bottom, Use script from your profile as deploy script is checked with Deploy Kirby selected from the script dropdown.

We want to install a GitHub repository so after selecting the first option, there are some additional fields showing up. I think this is all quite self-explanatory and they did a really good job with the UI.

Because I have a custom deploy script for Kirby set up in the Scripts view, I choose it in the last select field. The default deployment script works just fine, but for Kirby sites using the pages cache, I added a command that clears the cache for the site domain using a variable:

cd {SITE_DIRECTORY}
git pull origin main
echo "" | sudo -S service php8.3-fpm reload

# Clear pages cache for site domain
rm -rf {SITE_DIRECTORY}/site/cache/{SITE_DOMAIN}/pages || true

echo "šŸš€ Application deployed!"

Now that we installed our repository we want the site to be deployed every time we push. This is surprisingly easy and we just have to enable ā€œQuick deployā€ in the ā€œRepositoryā€ view:

A screenshot of Ploi's Quick Deploy settings panel showing the feature description, a delay field set to 0 seconds, and a red Disable Quick Deploy button at the bottom right.

The branch youā€™ve installed will now listen for the push event and deploy the site immediately. As someone who likes to surprise clients and partners by how quickly some changes can be made, I really appreciate the speed.

4. Setting up a SSL certificate

Encrypting your site with a free Letā€™s Encrypt certificate is super simple. Just click on the SSL tab in your site and enter the domains you want to encrypt. It will then automatically renew:

A screenshot of Ploi's SSL certificate setup interface showing Let's Encrypt selected as the certificate type and an empty domain input.

Thatā€™s it

Congrats, youā€™ve created a new server, a new site, connected a repository and installed an SSL certificate. Additional sites are super easy now.

Pricing

Ploi starts at 8,00Ā ā‚¬ per month with 5 servers included. Iā€™m now at the ā€œUnlimitedā€ plan which has some advanced features I need āŗ and costs 30,00Ā ā‚¬ per month.

If you want, you can use my affiliate link for signing up.

Sending emails with MailerSend

While you can setup sendmail in Ploi, I wouldnā€™t recommend it. As they mention in their docs, your mails will probably just end up in spam folders. If you want to send emails, you need a service specialized in that. Iā€™m currently using MailerSend by a recommendation of Tobi and it works great with my server setup.

Setting up domains

To use a service like MailerSend, youā€™ll need to verify your domain first. This involves adding some DNS records to prove you own the domain. I liked the ā€œautomaticā€ verification they offer, even allowing you to forward an email with instructions to your client or their service provider:

A screenshot of the MailerSend interface showing how domain verification works.

Using MailerSend in Kirby

After verifying a domain, you get SMTP credentials (username and password) that you can then use to send emails. In Kirby, itā€™s super easy to set up your transport configuration globally in the config:

'email' => [
    'transport' => [
        'type' => 'smtp',
        'host' => 'smtp.mailersend.net',
        'port' => 587,
        'security' => 'tls',
        'auth' => true,
        'username' => 'ā€¦', 
        'password' => 'ā€¦'
    ]
],

Now every form you set up will use the MailerSend transport settings and you even get some nice statistics about how well your clients are doing (and how many emails get rejected):

A screenshot of the MailerSend dashboard showing email statistics for multiple domains. Domain names are blurred for privacy.

This feels like a very robust setup now. Relying on sendmail, I sometimes had breaking changes on servers that I didnā€™t even notice, breaking contact forms for my clients šŸ˜±.

Pricing

MailerSend is free for 3,000 emails per month, with additional 1,000 email costing $1.00 each. For 50,000 emails youā€™re paying $28 per month in the ā€œStarterā€ plan. Thatā€™s the one Iā€™m currently using.

If youā€™re interested, you can use my affiliate link to sign up and try it out.

Hosting with Hetzner Cloud

Now, finally something about the actual servers. After trying various providers, Iā€™ve settled on Hetzner Cloud for several reasons:

  1. Price-to-performance ratio
  2. European data centers
  3. Reliability
  4. Simple, pretty interface
  5. Easy team management for client servers

Connecting Hetzner to Ploi

If you want to use Hetzner Cloud with Ploi, youā€™ll just have to create an account there and generate an API token for your account:

A screenshot of Hetzner Cloud's API tokens interface showing the Security section. The

After entering these credentials in Ploi, it can now create servers and manage them in your name. Youā€™ll almost never look at the Hetzner Cloud UI, which is a shame because I think itā€™s really pretty.

Choosing a plan

For most Kirby projects, I use their CAX11 plan with 2 vCPUs, 4GB RAM, and 40GB NVMe SSD storage. This is more than enough for most Kirby projects with very good performance. Iā€™ve run sites with thousands of daily visitors without breaking a sweat.

Fun fact: I once migrated a client from an expensive 25,00Ā ā‚¬ per month managed hosting to this plan, and their site load time decreased significantly.

Pricing

Hetznerā€™s CAX11 plan costs just 4,59Ā ā‚¬ per month. They have various other plans if you need more power, but for most Kirby sites, this entry-level plan is more than sufficient.

Hereā€™s an affiliate link with 20,00Ā ā‚¬ cloud credits if you want to try it out.

Final thoughts

This setup has transformed how I approach hosting for both client projects and my own sites. Itā€™s a good balance between control and convenience ā€” I can focus on building websites without worrying about server management headaches.

Whatā€™s your current hosting setup? Have you tried any of these services? Iā€™d love to hear about your experiences or answer any questions over on Mastodon.

  1. There are hosting providers with incredibly slow hard disks, unsuitable for a file-based content management system like Kirby. I also encountered servers with weird caching issues that need special configuration for every single site.
  2. Iā€™m always getting laughed at by programmer friends about the fact I prioritize how software looks, but itā€™s quite important to me. Sure, most importantly it should ā€œworkā€, but it doesnā€™t hurt if the UI doesnā€™t hurt my eyes.
  3. If youā€™re stumbling over this article in the future and notice that some screenshots look outdated, please let me know.
  4. Two of my favourites: ā€œdreamy-squirrelā€ and ā€œsassy-chipmunkā€.
  5. Among others: Unlimited servers, automatic file backups, team management and site monitoring.