The Ouroboros Of Writing About Self-Hosting
Writing is still hard#
I am trying to document the build of a system from inside the system that I am building, while I am teaching myself to build that system. This method is, as the Irish would say, not the best. In the past I bemoaned trying to learn about git, VSCode, markdown, Caddy, and Hugo all at the same time. In the end I decided to abandon learning about git for another day.
In the process of learning about modern hosting and coding, I got mad at the broligarchy and I got this idea of sovereignty in my head. So I have decided that self-hosting is not just anti techno-feudalist, it is anti-capitalist. Which makes self-hosting revolutionary. I started looking at this whole workflow/tool chain/writing desk problem as a form of anarchist skill sharing, so I decided to think smaller about bootstrapping my writing environment.
The day may come when I self-host my writing environment on a Linux container that I can access from anywhere, but it is not this day. I dream of the day I have all my data on a personal cloud like Nextcloud that lets me use online tools the way I used to use Google Docs or Office 365… but it is not this day. On this day, I decided that my virtual writing desk just needs to do two things: write (and spell check) markdown files, and synchronize the file structure of my writing environment. For those tasks I chose two tools: Zettlr and SyncThing.
Zettlr is waaay more than a markdown editor and a spell checker. It’s the front end tool for a whole writing and researching philosophy called Zettelkasten. My only experience with the academic writing process was being married to a PhD for a number of years. So calling it a markdown editor with a spell checker is doing it a great injustice.
But who cares? Zettlr runs on Linux, Mac, and Windows, and there is a portable apps version for Windows. Why is the portable app so important? Because I use several different computers and I like having the tool sync’ed up right alongside the data. I can go into the merits of such a system some other time, but basically, it’s a low tech way to get “cloud” versions of the apps that everyone uses. I used to do this with cloud storage services like Dropbox, but screw big tech. Now I run it my way.
Syncthing is an encrypted peer-to-peer file sync program with no central server. There are “relays” that shuttle your data around, but your data is encrypted in motion. The relays can’t access your data without the keys that your sync clients exchange. With Syncthing you establish relationships between computers, on a folder basis. One of the things I hate about OneDrive and DropBox is how inflexible they can be about where the sync’ed files are stored.
I used the Turnkey Linux Syncthing ISO to create a low powered Virtual Machine, and I connected the VM to my NAS with NFS. In the SyncThing GUI, I created a sub-folder on the NFS mount (/nfs/sync/chris) where all of my data will go.
On my personal [gaming] laptop I have a separate drive for data that I call “The Vault”. In Windows I end up doing a bunch of folder redirection madness to make it accept V:\chris as the place where my Windows user profile actually lives. Then I create a relationship between the Linux VM and my laptop and the contents of V:\chris gets synced to my NAS in the background. I do this because the power of cloud storage systems like OneDrive is that there is something online all the time listening for your data uploads. Just shuttling data between two laptops can be tricky because I generally only use one laptop at a time, so both laptops are probably never going to be both powered on and connected to the Internet at the same time.
Of course OneDrive or Dropbox already let you keep your data in custom locations (like v:\chris instead of c:\users\chris\documents\some stupid chain of folders\Dropbox) this if you fiddle with their settings a bit. But the real power of SyncThing is that you can create per-device sharing relationships. So, on my work laptop, I don’t need 750gb of music, ebooks, and reaction GIFs. I just need a small subset of that stuff. So on my work computer(s) I have a similar folder (c:\chris\writing_env) that just contains my writing environment (which includes portable version of Zettlr).
I keep my “personal” stuff on my work laptop in a folder outside of my Windows user profile. I do this so that it doesn’t get redirected or replicated to a company file server, nor does it get backed up by the network backup system. Also, if I have to sanitize the hard drive of my work computer, like when I hand it in to be replaced, or I leave the company, there is only 1 folder to scrub.
That is my Phase 0 writing desk. Yes, at some point I will have NextCloud and code-server and maybe even a Kasm Workspace but for now, I have a minimal writing environment and a way to organize thoughts and notes and whatever else if/when I ever learn to do that.
I am still tinkering with my build process for publishing my writing. Right now I am still building static sites with Hugo on my laptop and using SCP to copy the generated HTML files to the web server. I am holding off on making major changes at this point so that I can make some modifications to the Caddy config on the VPS.