/logs - self-hosting | wireguard | pm2
The self-hosting rabbit hole just sucks you in, eh...
I'll be travelling out of the country soon, but still need to make some payments. Problem is, my bank does not allow access to online banking from outside the region. Worse, it doesn't work when using most commercial VPNs either. Rolling my own seemed to be the only choice. Well, nothing like a do-or-die situation to overcome your past mishaps!
Fun fact: Wireguard itself doesn't log anything, although if you host it on a VPS like I do, you never know what they'll do...
This time though, I went with a Dockerized wrapper over Wireguard, to make my life easier. Minutes later, I'm up and running! So that's that. Long live containers.
I host Actual Budget for my (measly) finances, which is a NodeJS application. pm2 is a good process manager for Node processes. I'd already set it up, but there was one hitch: I still had to manually restart my processes on reboot. It does have a feature to generate a startup script, but it required sudo permissions, which I refused to give it.
Instead, I dived into the source and got the template and understood how the command itself worked. Then I managed to set it up myself as a user service, rather than a system service, eliminating the need for sudo permissions. Voila! Auto-restart, just like every other service I'm running.