aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2026-09-13 11:20:58 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2026-09-13 11:20:58 +0200
commit3384c87351bb65ca925601baa41cf7a3d08e802a (patch)
tree40a85c163d5b971a3d4f707715fb54cc9da8c38e
parent014f13ada8339ba990909f3b9810c29394795aa5 (diff)
downloadsebastiano.tronto.net-3384c87351bb65ca925601baa41cf7a3d08e802a.tar.gz
sebastiano.tronto.net-3384c87351bb65ca925601baa41cf7a3d08e802a.zip
New blog postHEADmaster
Diffstat (limited to '')
-rw-r--r--src/blog/2026-09-05-cgit/cgit.md4
-rw-r--r--src/blog/2026-09-13-host-migration/host-migration.md172
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
87more practical but loosing the security benefits. But at this point, 87more practical but loosing the security benefits. But at this point,
88I decided I wanted to try out a different stack - new VPS provider, new 88I decided I wanted to try out a different stack - new VPS provider, new
89OS, new web server. This is something I had been thinking about for 89OS, new web server. This is something I had been thinking about for
90about a year at this point, and I'll talk about the reasons in the 90about a year at this point, and I'll talk about the reasons in [my
91next post. 91next post](../2026-09-13-host-migration).
92 92
93But if you plan to host cgit on OpenBSD, do not be discouraged! 93But if you plan to host cgit on OpenBSD, do not be discouraged!
94Everything can be set up with just a little manual work. 94Everything 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
3Since this website went online in 2022, It has lived
4in a virtual machine on server 14 at [OpenBSD
5Amsterdam](https://openbsd.amsterdam). This is a small, independent
6VPS provider that donates large part of their profit to the
7[OpenBSD foundation](https://www.openbsdfoundation.org). They
8are pretty cool, and their service worked quite well for me.
9
10Nonetheless, I have recently migrated to another provider, and I
11am not going to renew my OpenBSD Amsterdam subscription next year.
12There are a few reasons for this.
13
14## Why switch?
15
16First of all, I want to make clear that I did not have any issue
17with OpenBSD Amsterdam. In fact, I think it was the right choice for
18me 4 years ago, and I can strongly recommend it.
19
20OpenBSD as well was a great OS choice, at the beginning.
21The 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
25well-documented was big. But OpenBSD is also an
26[opinionated](https://www.merriam-webster.com/dictionary/opinionated)
27piece of software,
28and some of its "opinions" started feeling a bit restrictive.
29
30For example, OpenBSD nudges you into using separate
31[partitions](https://en.wikipedia.org/wiki/Disk_partitioning) for
32different system folders, for security reasons. This is how the 50GB
33of my OpenBSD Amsterdam VM are currently allocated:
34
35```
36[pizoc ~] $ df -h
37Filesystem 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
49My websites are in `/var/www`, and as you can see that partition
50is almost full. I also use `/home` extensively - my git repositories
51are in `/home/git` and a shared
52[syncthing](https://syncthing.net) folder is in `/home/sebastiano`.
53I have plenty of space still available in `/home`, but I can't
54esily 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
57Another downside of httpd is that it is not as feature-complete
58as other web server. This can be considered an advantage, but
59occasionally it requires some extra setup for certain use cases.
60For example, [until
61recently](https://undeadly.org/cgi?action=article;sid=20260725103657)
62it did not support custom HTTP headers, so I had to combine it
63with relayd when I wanted to experiment with a [web
64application](https://h48.tronto.net) I was working on - see also
65[my post on WebAssembly](../2025-06-06-webdev/) for context.
66Once again, this was not a showstopper, but
67it was unnecessary additional friction.
68
69Lastly, my provider was a bit more expensive than I would have
70liked: 71€ per year for a VM with 1GB of RAM and 50GB of
71storage. For comparison, I am now paying 22€ per year for
72a VM with the same RAM and 30GB of storage. To be fair,
73OpenBSD Amsterdam is a small, independent provider, and they
74donate a most of their revenuw to the OpenBSD foundation; I was
75happy to support them. But I am also happy to save 49€
76per year.
77
78## The new stack
79
80My new provider is [netcup](https://www.netcup.com/en), an established
81German company. I don't personally know anyone hosting there,
82but their prices are good and the reviews are positive. Their [smallest
83VPS](https://www.netcup.com/en/server/vps-lite) is only 1.87€ per
84month, and it is enough for my needs.
85
86They support any operating system that can boot from a
87[Qcow](https://en.wikipedia.org/wiki/Qcow) image, as you can upload your
88own; so technically I could have stayed with OpenBSD. But I wanted
89to change the OS for the reasons I gave in the previous section, so I
90went with [Alpine Linux](https://alpinelinux.org), a lightweight
91Linux distribution that I have been pleasantly using on my laptop for a
92while now.
93
94As for the web server, I did not give it much thought.
95[Lighttpd](https://www.lighttpd.net) seems fairly lightweight and it
96does what I need it to do, so I went with that.
97
98## Migration hiccups
99
100I initially planned to migrate my [git server](../2026-09-05-cgit)
101and this website one at the time, but soon I realized that it would have
102been less work and less risk to do everything at once. So I set aside
103a full Sunday afternoon to move everything over.
104
105Unfortunately, I had some issues. The biggest one, that took me over
106three hours to work around, was related to setting up my SSL
107certificates - the "S" in [HTTPS](https://en.wikipedia.org/wiki/HTTPS).
108I wanted to use the same software I was using on OpenBSD,
109[acme-client](https://man.openbsd.org/acme-client.1), but something
110went wrong. I kept getting an HTTP 409 error with the following
111explanation:
112
113```
114acme-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)
119acme-client: bad exit: netproc(31648): 1
120```
121
122Searching online, I found out that I was [not the only
123one](https://www.reddit.com/r/openbsd/comments/1vz4mcg/acmeclient_bad_http_409)
124with this problem, so I decided to use [certbot](https://certbot.eff.org)
125as a temporary workaround. But I still want to go back to
126acme-client at some point.
127
128The other issue was AI. And I am not talking about OpenAI's and
129Anthropic's bots accessing my git pages every 0.9 seconds (that
130is not an exaggeration, I `tail -f`'d the log file). I am
131talking about actually trying to use these chatbots for their
132intended purpose. Namely, instead of reading the manual pages
133for lighttpd and writing a configuration file from scratch,
134I asked AI (either [duck.ai](https://duck.ai)) or
135[Kagi Assistant](https://kagi.com/assistant/), I forgot which one)
136to translate my httpd configuration file to a lighttpd one. Then
137I could look up the documentation for just the settings I was
138using, saving some time. Or so I thought.
139
140First of all, the initial response had more stuff than
141I wanted. The bot just allucinated features that were not included
142in the original configuration. But that's alright, it's just how
143the slop machine works.
144
145But then there were also errors, in particular with setting
146up 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",
150but somehow the bots could
151never come up with a working configuration. I ended up fixing
152it by hand like a caveman, as I should have done from the
153beginning. What a waste of time.
154
155But by the end of the afternoon, almost everything was working
156as intended.
157
158## My experience so far
159
160So far everything is working smoothly. Once in a while I notice
161a minor mistake I made during the setup and I fix it - for example,
162I have just noticed this morning that lighttpd's access log was
163eating most of my storage, so I disabled it. But everything is now
164up and running, and this page you are reading is served by my new
165stack - unless you are reading it years after I published this
166post and I have changed my setup again in the meantime.
167
168The only real difference I noticed is that when I use `rsync`
169to update my website, the whole process is much, much faster
170- like 10x faster. I don't know if this is because the new
171server has a much faster hard drive or because OpenBSD's `rsync`
172was much slower. In any case, it is a nice surprise!

Generated with cgit - Back to sebastiano.tronto.net