The tech stack of mine

The tech stack of mine
Photo by NASA / Unsplash

Ever wonder how websites like this work? I've wondered about that for a long time as well. So, here's a guide that I made. It should be fairly easy to follow and if you just do that, you'll pretty much have the same setup. Okay, I lied, it won't be easy to follow since I won't give exact details but you'll understand the general concept regardless.

So, let's start with the concept of a 'server'. It's a machine, that's hosted in a datacenter somewhere in Earth. To have a simple setup like this you don't have to get a dedicated machine or something. 1 CPU, 2 GB RAM VPS solutions are sufficient. In the time of writing my server runs exactly on this configuration.

So, while selecting the OS for my VPS, I went with Ubuntu 22.04 LTS. Why? Because of a wonderful thing called as Hesita. It's a control panel, it's free and it provides quite literally EVERYTHING you ever need. After following their installation instructions my machine is already running Hestia, and it's single line of command. You just run it, and well, it does everything by itself.

Afterwards there are some basic configuration you may want to do, for example default port isn't protected by SSL. You need run a very small command for that.

v-add-letsencrypt-host this will automagically secure your control panel with a valid certificate. Just make sure to add your domain properly first!

Great, afterwards we need to install Ghost. Honestly, this is the most amazing piece of software I've used after years of dealing with WordPress etc. they're mindblowingly slow compared to Ghost. This is just... nice.

Installation is pretty straight forward, all you need to do is following the damn trai... okay wait, that was a different thing. All you need to do is following this guide by Ghost: How to install Ghost on Ubuntu

Done? Cool. Now just do the correct Nginx reverse proxy configuration and you're golden. I won't share my exact configuration due to security purposes, but let's say that you can do something like this:

location / {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $http_host;
    proxy_pass http://127.0.0.1:2368;
}

client_max_body_size 50m;

Now, if you apply this template to a specific domain, such as my https://rvmb.net domain the page will display Ghost content.

security guard standing on the gray floor
Photo by Collin / Unsplash

Also, on top of that, do you want a "free" VPN? (For personal use, of course.)

There's a neat little software called as Pritunl. Actually, you know what? I'll end this little post here and write a different one about Pritunl later on. All I'll say for now is, you can turn your little cloud server into a multipurpose machine and serve as a VPN for yourself as well. Sure, it will be a single location but better than zero locations, right?