bajsicki.com/content/blog/vps-is-my-new-friend.md

87 lines
5.6 KiB
Markdown
Raw Normal View History

2024-11-18 18:28:17 +01:00
+++
title = "VPS is my new friend"
publishDate = 2022-10-07T00:00:00+02:00
2024-12-08 03:38:16 +01:00
lastmod = 2024-12-08T03:38:14+01:00
2024-11-18 18:28:17 +01:00
tags = ["vps", "sysadmin", "servers", "ssh", "sshfs", "foss", "vendorlock"]
categories = ["tech"]
draft = false
meta = true
type = "list"
[menu]
[menu.posts]
weight = 3006
identifier = "vps-is-my-new-friend"
+++
Over the past month and a half, I have migrated all of my services over to a VPS that I am renting from [Netcup.de](https://netcup.de). Unsurprisingly, I am very happy with it.
<!--more-->
To start with, I bought the lowest package, but I had some performance issues with the number of things I set up on it: caddy, nginx, MariaDB, Wordpress, all paled in the face of running an email server for myself.
And then I wanted to add GitLab for backing up my agenda (in org-mode, of course), notes, and other such things. So I upgraded a tier up, at a very reasonable price. The upgrade was seamless, and I'm frankly delighted.
I have not noticed any downtime, no connectivity issues, and my sshfs connection (through which I am editing this document) has been rock-solid.
So my current workflow for all my text editing, writing, and organization looks like so:
I use Emacs for nearly everything that has to do with text (aside from work, which requires that I type into Google Chrome).
{{< marginnote >}}
I have sshfs set up to log in with keys, so the command I run (through an alias) is:
```bash
sshfs \
[user]@[ip]:/srv/ ~/remote/ \
-p [port] \
-o identityFile=[id-file] \
-o reconnect
```
I rarely if ever have issues with my internet connection at home, but I still keep the reconnect option just in case.
{{< /marginnote >}}
I have my _srv_ directory mounted into ~/remote on my local PC through sshfs. I don't have it as a permanent mount, since I don't use it often enough, however I have created aliases in fish, `vpssh` and `vpsshu`, which let me mount and unmount through `sshfs`.
For git, I use magit. It has made using git simple and easy for me. I was reluctant to head that way at first, but I found that using git in the terminal was just too much typing when I wanted to push an update.
I _want_ to move my email reading to emacs, too, but every time I look at something like Wonderlust or mu4e, I find myself faced with another cliff to climb. Not that it wouldn't be a wonderful learning experience, but for something as mission-critical to me as email, I'm not quite yet willing to roll the dice.
Fundamentally, I am happy. This set-up makes me happy. It sparks joy. It's wonderfully simple, easy to maintain, and simply _superior_ to any shared hosting solution I've seen yet.
And it's almost as cheap. It was cheaper than shared hosting I had before, on the smaller VPS tier, but even with this (4 cores, 4GB RAM), it's very, very affordable, and infinitely more flexible.
I can't, at this point in time, see anything advantageous about choosing shared hosting. The only advantage it has is that it's easy and has pretty graphics. But it also limits the customer in ways that are outrageous... while also being much more expensive for what's on offer.
Worse still, many web hosts don't let you choose what version of PHP you can run, whether you get shell access into your account, or let you set up custom Apache/ nginx configurations for your websites.
And true enough, that way anyone can set up a WordPress website in minutes... but that's all you're really getting. A fancy GUI that'll give you an instance of whatever pre-packaged framework you desire. If it's on the list. For the price of an actual VPS that can do **everything**.
Why buy a slice of cake, when you can have a whole, better, juicier cake for the same price?
The only answer I can come up with is convenience, a'la "I don't want to learn new things."
Way I think of it is, if what you don't have is time, then fair enough. But if you have money, you can literally hire someone to set one up for you, and go from there, with much smaller ongoing cost and more flexibility.
If what you don't have is money, a VPS **is** the most cost-effective solution.
If what you don't have is both money and time, you can get **free** hosting for your website (and e-mail) from many, many vendors all over the web. You can get shell accounts, too, if you need them. I've used an account on [hashbang.sh](https://hashbang.sh) for a while, and found it perfectly acceptable for the vast majority of applications. That can work well for taking notes and keeping your agenda in an accessible place - you can ssh into your account from anywhere, on any device.
In any case, choosing a shared hosting provider has ONE advantage, and that's its click-and-go nature.
On the other hand, it's more expensive, and limits your ability to actually **do things** other than running a simple website.
It's a shame that shared hosting is the norm. I can't help but wonder... would there be interest in a VPS service that offers pre-installed and pre-set up servers?
What I'm envisioning here is a service where you simply check some boxes for what you want on your server while placing your order, and a new VPS is spun up with exactly those packages, already configured and ready to go. _Does this already exist?_
It seems like such an obvious solution - bypass the set-up part, maybe give the user some scripts that will guide them through the process of setting up their passwords, permissions, hardening their VPS, setting up domain names and all, mailboxes, etc...
Most VPS providers already give access to a TTY from a web interface, this could easily be the 'second step', after the order is placed.
Ideas, ideas.
In conclusion: VPS's are awesome and I'm kicking myself for not getting one sooner.
[Join the FSF.](https://my.fsf.org/join)