💾 Archived View for gmi.bacardi55.io › gemlog › 2023 › 01 › 27 › planning-selfhosting-migration captured on 2023-07-22 at 16:30:41. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
Posted on 2023-01-27
Edit: I have migrated this capsule by now, let me know if you find any issue.
Nota: This post is mostly rambling thoughts writen on Wednesday, while sitting in a train, thinking about this migration. Only edits are links I added and correcting a few typos. I appologize if it is even less clear than usual :]
I'm in the Eurostar going to London for the rest of the week (for work), I thought it would be a good time to start procrastinating work and stop procrastinating planning the move of my self hosted services to the "cloud". I said before that me and my partner will move during the first part of 2023 from Paris to the south west French region. This move will happen in multiple steps, and that means that having a full continuity of my self hosted services from one place to the other will probably not be possible. So for me, the best idea is to move my services to the "cloud", and revisit the self hosting ideas when fully settled, and after making sure my ISP will do a better job than my current one (again, sorry all who, too often, notice my {web, gem}log being offline…
I'm not even sure that I'll publish this post, but hopefully it will help me organize my thoughts. Specially because after over estimating the time I had to do so, I can now see that I really don't have much time…
I did a quick `docker stack ls' yesterday and saved the result in a "TODO migrate selfhosted services" task in orgmode. So I do have the list:
Good thing I removed some services over the last year :).
That's the dockerswarm cluster, but I have other things that will just wait too:
Services will be migrated to a droplet I have on digital ocean, hosting already some capsules ([houston], [Tinylog aggregator] and [discogem]), and [my Fediverse instance] via [GoToSocial] and a couple of websites. Everything is thus already on that server to add a couple of gemini capsules and some sites with almost no traffic :). I don't feel too much about the performance of that small droplet as it is underused right not. I just need to be carreful with storage space as GtS is growing and there is no way to clean space properly for now. The next 0.7 version that should be available soon-ish will fix that.
Main difference is that at home I run a dockerswarm cluster, on digital ocean, it is "just" a unique droplet. So no swarm (or k8s) cluster. It simplify (not much) a bit the setup and means I'll only have a few small adjustments to do to `docker-compose.yml' files. All file paths will have to changed though, I think.
Some services will stay untouched until the final move. Namely, the one related to homeautomation (so [Domoticz], [MQTT] and [nodered]). No need to do anything with them. I already know that I would start mostly from scratch (and the help of my [previous blog post about my conf]) to reset everything properly.
Services that will need to migrate are: FreshRSS, bacardi55io, <web> and gemini. Only FreshRSS has a database, and using Sqlite will make the move easy. All others are static sites/capsules.
Both pics and homer services will be removed for now.
previous blog post about my conf
RSS is a huge part of my "daily content dose". I follow many blogs of people or services I like and a must have in my daily workflow (coupled with [wallabag] for reading articles later). I may wrote later on my RSS usage, but that's not the point here.
As of today, I'm using FreshRSS to retrieve and read feeds new items. And I really like it! I've other solutions before and the only one I used for a long period of time before was [TinyTinyRSS]. And one thing I'm missing in FreshRSS is the possibility of using other client via APIs. I really liked that I could use Newsboat or other TUI clients to access my TT-RSS feeds. Reading a content on Newsboat makes it read on TT-RSS. This doesn't seems to be possible with FreshRSS.
While I can't do a RSS reader online comparaison right now, I'm going to do one for me soon because I want to use this migration opportunity to migrate to a better service if any. TT-RSS had its own issue (being heavy was one), so it's not all pink either.
I've seen new readers poped up in my Fediverse or RSS feeds lately, maybe it's time to dig around a little. The great thing is that not only RSS/Atom are standards, but there is also the [OPML] standards that usually makes migrating from one reader to another very easy, we'll see!
One attention point is about TLS certificates.
Regarding gemini capsules, it is easy, I have generated myself the certificate, and both my home server and digital ocean droplet use gemserv as gemini server. I don't expect any issue when copying the different certificated related files to the server.
For the websites, it is a bit different. Traefik is managing them via letsencrypt. It means that to avoid any problem, launching the site on the new server should only be done after the DNS change. Why? Because otherwise, traefik will try to generate the TLS certificate via letsencrypt, but because of DNS still pointing to the previous server, it won't work. Thanks to a/ not having many visitors, and b/ the simplicity of the service I host, I don't believe it will a major difficulty.
First step will be copy-ing data to the server. Rsync is perfect for this so that's what I'm going to use to copy containers definition and data. `docker-compose.yaml' files will have to be updated to remove dockerswarm specific things and change path to files. Permissions will need to be checked on files and directory too.
Gemini capsules will be added to the existing gemserv container as 2 new vhost. Websites will be added to an existing simple nginx container. And freshrss will have its dedicated container too.
Once everything is synchronized, it is time to update DNS records to point to the new server. Because of some issue with my current ISP, the TTL of the DNS record pointing to my home are already low (from 60 to 3600 seconds).
After DNS migration, start the services so that traefik (also used as reverse proxy on this droplet) can manage TLS certificates.
Hopefully, it should be as simple as that… But I'm sure I'll discover issue along the way :).