diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-09-13 11:20:58 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-09-13 11:20:58 +0200 |
| commit | 3384c87351bb65ca925601baa41cf7a3d08e802a (patch) | |
| tree | 40a85c163d5b971a3d4f707715fb54cc9da8c38e /src | |
| parent | 014f13ada8339ba990909f3b9810c29394795aa5 (diff) | |
| download | sebastiano.tronto.net-3384c87351bb65ca925601baa41cf7a3d08e802a.tar.gz sebastiano.tronto.net-3384c87351bb65ca925601baa41cf7a3d08e802a.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/blog/2026-09-05-cgit/cgit.md | 4 | ||||
| -rw-r--r-- | src/blog/2026-09-13-host-migration/host-migration.md | 172 |
2 files changed, 174 insertions, 2 deletions
diff --git a/src/blog/2026-09-05-cgit/cgit.md b/src/blog/2026-09-05-cgit/cgit.md index 53c00bd..29d92ba 100644 --- a/src/blog/2026-09-05-cgit/cgit.md +++ b/src/blog/2026-09-05-cgit/cgit.md | |||
| @@ -87,8 +87,8 @@ Alternatively, one may configure httpd to chroot at `/`, making things | |||
| 87 | more practical but loosing the security benefits. But at this point, | 87 | more practical but loosing the security benefits. But at this point, |
| 88 | I decided I wanted to try out a different stack - new VPS provider, new | 88 | I decided I wanted to try out a different stack - new VPS provider, new |
| 89 | OS, new web server. This is something I had been thinking about for | 89 | OS, new web server. This is something I had been thinking about for |
| 90 | about a year at this point, and I'll talk about the reasons in the | 90 | about a year at this point, and I'll talk about the reasons in [my |
| 91 | next post. | 91 | next post](../2026-09-13-host-migration). |
| 92 | 92 | ||
| 93 | But if you plan to host cgit on OpenBSD, do not be discouraged! | 93 | But if you plan to host cgit on OpenBSD, do not be discouraged! |
| 94 | Everything can be set up with just a little manual work. | 94 | Everything can be set up with just a little manual work. |
diff --git a/src/blog/2026-09-13-host-migration/host-migration.md b/src/blog/2026-09-13-host-migration/host-migration.md new file mode 100644 index 0000000..72a26ef --- /dev/null +++ b/src/blog/2026-09-13-host-migration/host-migration.md | |||
| @@ -0,0 +1,172 @@ | |||
| 1 | # Host migration | ||
| 2 | |||
| 3 | Since this website went online in 2022, It has lived | ||
| 4 | in a virtual machine on server 14 at [OpenBSD | ||
| 5 | Amsterdam](https://openbsd.amsterdam). This is a small, independent | ||
| 6 | VPS provider that donates large part of their profit to the | ||
| 7 | [OpenBSD foundation](https://www.openbsdfoundation.org). They | ||
| 8 | are pretty cool, and their service worked quite well for me. | ||
| 9 | |||
| 10 | Nonetheless, I have recently migrated to another provider, and I | ||
| 11 | am not going to renew my OpenBSD Amsterdam subscription next year. | ||
| 12 | There are a few reasons for this. | ||
| 13 | |||
| 14 | ## Why switch? | ||
| 15 | |||
| 16 | First of all, I want to make clear that I did not have any issue | ||
| 17 | with OpenBSD Amsterdam. In fact, I think it was the right choice for | ||
| 18 | me 4 years ago, and I can strongly recommend it. | ||
| 19 | |||
| 20 | OpenBSD as well was a great OS choice, at the beginning. | ||
| 21 | The convenience of having many of the services I needed - such as | ||
| 22 | [httpd](https://man.openbsd.org/httpd), | ||
| 23 | [rsync](https://man.openbsd.org/openrsync), | ||
| 24 | [ssh](https://man.openbsd.org/ssh) - included in the base system and | ||
| 25 | well-documented was big. But OpenBSD is also an | ||
| 26 | [opinionated](https://www.merriam-webster.com/dictionary/opinionated) | ||
| 27 | piece of software, | ||
| 28 | and some of its "opinions" started feeling a bit restrictive. | ||
| 29 | |||
| 30 | For example, OpenBSD nudges you into using separate | ||
| 31 | [partitions](https://en.wikipedia.org/wiki/Disk_partitioning) for | ||
| 32 | different system folders, for security reasons. This is how the 50GB | ||
| 33 | of my OpenBSD Amsterdam VM are currently allocated: | ||
| 34 | |||
| 35 | ``` | ||
| 36 | [pizoc ~] $ df -h | ||
| 37 | Filesystem Size Used Avail Capacity Mounted on | ||
| 38 | /dev/sd0a 986M 111M 825M 12% / | ||
| 39 | /dev/sd0k 17.4G 3.9G 12.6G 24% /home | ||
| 40 | /dev/sd0d 3.2G 8.0K 3.0G 1% /tmp | ||
| 41 | /dev/sd0f 5.2G 1.7G 3.3G 34% /usr | ||
| 42 | /dev/sd0g 986M 545M 392M 59% /usr/X11R6 | ||
| 43 | /dev/sd0h 6.7G 184M 6.2G 3% /usr/local | ||
| 44 | /dev/sd0j 5.8G 2.0K 5.5G 1% /usr/obj | ||
| 45 | /dev/sd0i 1.9G 2.0K 1.8G 1% /usr/src | ||
| 46 | /dev/sd0e 5.0G 4.4G 423M 92% /var | ||
| 47 | ``` | ||
| 48 | |||
| 49 | My websites are in `/var/www`, and as you can see that partition | ||
| 50 | is almost full. I also use `/home` extensively - my git repositories | ||
| 51 | are in `/home/git` and a shared | ||
| 52 | [syncthing](https://syncthing.net) folder is in `/home/sebastiano`. | ||
| 53 | I have plenty of space still available in `/home`, but I can't | ||
| 54 | esily use it for hosting websites, because of httpd's chroot. See | ||
| 55 | [my previous post](../2026-09-05-cgit) for details on what this means. | ||
| 56 | |||
| 57 | Another downside of httpd is that it is not as feature-complete | ||
| 58 | as other web server. This can be considered an advantage, but | ||
| 59 | occasionally it requires some extra setup for certain use cases. | ||
| 60 | For example, [until | ||
| 61 | recently](https://undeadly.org/cgi?action=article;sid=20260725103657) | ||
| 62 | it did not support custom HTTP headers, so I had to combine it | ||
| 63 | with relayd when I wanted to experiment with a [web | ||
| 64 | application](https://h48.tronto.net) I was working on - see also | ||
| 65 | [my post on WebAssembly](../2025-06-06-webdev/) for context. | ||
| 66 | Once again, this was not a showstopper, but | ||
| 67 | it was unnecessary additional friction. | ||
| 68 | |||
| 69 | Lastly, my provider was a bit more expensive than I would have | ||
| 70 | liked: 71€ per year for a VM with 1GB of RAM and 50GB of | ||
| 71 | storage. For comparison, I am now paying 22€ per year for | ||
| 72 | a VM with the same RAM and 30GB of storage. To be fair, | ||
| 73 | OpenBSD Amsterdam is a small, independent provider, and they | ||
| 74 | donate a most of their revenuw to the OpenBSD foundation; I was | ||
| 75 | happy to support them. But I am also happy to save 49€ | ||
| 76 | per year. | ||
| 77 | |||
| 78 | ## The new stack | ||
| 79 | |||
| 80 | My new provider is [netcup](https://www.netcup.com/en), an established | ||
| 81 | German company. I don't personally know anyone hosting there, | ||
| 82 | but their prices are good and the reviews are positive. Their [smallest | ||
| 83 | VPS](https://www.netcup.com/en/server/vps-lite) is only 1.87€ per | ||
| 84 | month, and it is enough for my needs. | ||
| 85 | |||
| 86 | They support any operating system that can boot from a | ||
| 87 | [Qcow](https://en.wikipedia.org/wiki/Qcow) image, as you can upload your | ||
| 88 | own; so technically I could have stayed with OpenBSD. But I wanted | ||
| 89 | to change the OS for the reasons I gave in the previous section, so I | ||
| 90 | went with [Alpine Linux](https://alpinelinux.org), a lightweight | ||
| 91 | Linux distribution that I have been pleasantly using on my laptop for a | ||
| 92 | while now. | ||
| 93 | |||
| 94 | As for the web server, I did not give it much thought. | ||
| 95 | [Lighttpd](https://www.lighttpd.net) seems fairly lightweight and it | ||
| 96 | does what I need it to do, so I went with that. | ||
| 97 | |||
| 98 | ## Migration hiccups | ||
| 99 | |||
| 100 | I initially planned to migrate my [git server](../2026-09-05-cgit) | ||
| 101 | and this website one at the time, but soon I realized that it would have | ||
| 102 | been less work and less risk to do everything at once. So I set aside | ||
| 103 | a full Sunday afternoon to move everything over. | ||
| 104 | |||
| 105 | Unfortunately, I had some issues. The biggest one, that took me over | ||
| 106 | three hours to work around, was related to setting up my SSL | ||
| 107 | certificates - the "S" in [HTTPS](https://en.wikipedia.org/wiki/HTTPS). | ||
| 108 | I wanted to use the same software I was using on OpenBSD, | ||
| 109 | [acme-client](https://man.openbsd.org/acme-client.1), but something | ||
| 110 | went wrong. I kept getting an HTTP 409 error with the following | ||
| 111 | explanation: | ||
| 112 | |||
| 113 | ``` | ||
| 114 | acme-client: transfer buffer: [{ | ||
| 115 | "type": "urn:ietf:params:acme:error:conflict", | ||
| 116 | "detail": "Unable to update challenge :: failed to mark authz as processing: Authorization is already being validated. This may indicate your client attempted the same challenge multiple times, possibly due to a client bug.", | ||
| 117 | "status": 409 | ||
| 118 | }] (296 bytes) | ||
| 119 | acme-client: bad exit: netproc(31648): 1 | ||
| 120 | ``` | ||
| 121 | |||
| 122 | Searching online, I found out that I was [not the only | ||
| 123 | one](https://www.reddit.com/r/openbsd/comments/1vz4mcg/acmeclient_bad_http_409) | ||
| 124 | with this problem, so I decided to use [certbot](https://certbot.eff.org) | ||
| 125 | as a temporary workaround. But I still want to go back to | ||
| 126 | acme-client at some point. | ||
| 127 | |||
| 128 | The other issue was AI. And I am not talking about OpenAI's and | ||
| 129 | Anthropic's bots accessing my git pages every 0.9 seconds (that | ||
| 130 | is not an exaggeration, I `tail -f`'d the log file). I am | ||
| 131 | talking about actually trying to use these chatbots for their | ||
| 132 | intended purpose. Namely, instead of reading the manual pages | ||
| 133 | for lighttpd and writing a configuration file from scratch, | ||
| 134 | I asked AI (either [duck.ai](https://duck.ai)) or | ||
| 135 | [Kagi Assistant](https://kagi.com/assistant/), I forgot which one) | ||
| 136 | to translate my httpd configuration file to a lighttpd one. Then | ||
| 137 | I could look up the documentation for just the settings I was | ||
| 138 | using, saving some time. Or so I thought. | ||
| 139 | |||
| 140 | First of all, the initial response had more stuff than | ||
| 141 | I wanted. The bot just allucinated features that were not included | ||
| 142 | in the original configuration. But that's alright, it's just how | ||
| 143 | the slop machine works. | ||
| 144 | |||
| 145 | But then there were also errors, in particular with setting | ||
| 146 | up the redirects from my `http://*.tronto.net` domains to their | ||
| 147 | `https://` counterparts. I went through various iterations of | ||
| 148 | "this does not work, it does X instead of Y, please fix" and | ||
| 149 | "You are absolutely right! Here is the fixed version", | ||
| 150 | but somehow the bots could | ||
| 151 | never come up with a working configuration. I ended up fixing | ||
| 152 | it by hand like a caveman, as I should have done from the | ||
| 153 | beginning. What a waste of time. | ||
| 154 | |||
| 155 | But by the end of the afternoon, almost everything was working | ||
| 156 | as intended. | ||
| 157 | |||
| 158 | ## My experience so far | ||
| 159 | |||
| 160 | So far everything is working smoothly. Once in a while I notice | ||
| 161 | a minor mistake I made during the setup and I fix it - for example, | ||
| 162 | I have just noticed this morning that lighttpd's access log was | ||
| 163 | eating most of my storage, so I disabled it. But everything is now | ||
| 164 | up and running, and this page you are reading is served by my new | ||
| 165 | stack - unless you are reading it years after I published this | ||
| 166 | post and I have changed my setup again in the meantime. | ||
| 167 | |||
| 168 | The only real difference I noticed is that when I use `rsync` | ||
| 169 | to update my website, the whole process is much, much faster | ||
| 170 | - like 10x faster. I don't know if this is because the new | ||
| 171 | server has a much faster hard drive or because OpenBSD's `rsync` | ||
| 172 | was much slower. In any case, it is a nice surprise! | ||
