Why I host my own site

I run this site on my own server instead of a free host. Here is the setup and what I learned.

Tags: #selfhosting#docker#caddy

To be honest, I was not sure I wanted my own server. But I wanted a server I could control to the fullest, so I tried it.

The setup

I made the site with Astro. A small Docker container serves it. Caddy sits in front of the container and handles HTTPS. The whole thing runs on one small VPS.

How I deploy

One script does every release. It runs the checks first: tests, the build, a link check and a privacy check. If anything fails, nothing ships. After the checks it copies the build to the server and starts a new container. Then it tests the new container. If the test fails, the script tries to restore the last verified version.

That rollback is the part I trust most, but it can fail too. If it does, I have to fix the site myself.

What went wrong

Setting up DNS for the first time was the hardest part. I could not tell what to connect to what, or which settings I needed. Each guide assumed I already knew that. It took a lot of trial and error before the domain pointed at my server.

What I would tell you

I recommend setting up your own server, even though there is a lot to prepare. Doing it and not doing it are very different. You learn things a free host hides from you.

See you in the next post.