Mastodon

Day 7 🚀 Your First Linux Virtual Private Server - steps to freedom

Today we’re about to embark on a marvelous journey of setting up your first Linux Cloud Virtual Machine also known as VPS (Virtual Private Server). If you followed allong with the previous You might be puzzled toat I told you to you buy or install Linux on existing or old hardware. You might be thinking: “Why is he jumping to doing things on a VPS after explicitly telling us to go get some physical hardware?”

Table of contents

There are multiple reasons. First is that you might not have bought any harware nor installed Linux as a main OS. Second, using a VPS is a bridge. We are going to connect our local, physical infrastructure with our VPS later on. Plus, for just $5 a month, we can perform massive amounts of “engineering magic” that would cost hundreds on the “Big 3” cloud providers. Third, you might want a reliable cheap server online to just host a few things and from a security standpoint it’s less of a hassle than exposing a machine from your home which you have yet to learn how to secure

The Dependency Trap

You won’t believe the amount of developers who have no idea how to host and deploy the software they’ve built. We are talking about both backend and frontend engineers with years of experience. Companies have created perfect silos to keep people dependent on proprietary “magic buttons.” Numerous companies have spun up offering these simple and basic services which are so easy to do.

They’d rather pay exorbitant fees to a cloud provider than master a simple $5 machine.

The $5 Proof:

I’ve been running a single $5 VPS with 1GB of RAM for over 15 years. At any given time, I’ve had 20 different apps running on it. If I had used specific managed cloud services for all 20, I would have spent hundreds of dollars per month. Mastering the VPS isn’t just a skill—it’s a massive financial advantage.

Granted, I now have 3 VPS’es and a raspberry PI for my personal projects, but still 2 of them are 1GB RAM and run perfectly with quite some apps and databases. This is because if you optimize carefully, you can do a lot of things. Sure, your Java apps might not run on a 1 GB vps.. Maybe try a GOlang app?:).


Step-by-Step instructions to Provision your virtual private Linux server

You can watch the video HERE, or you can follow along in text format.

1. Choose Your Provider

The video uses Linode (Akamai), but the principles apply to Cloudify, Hetzner, DigitalOcean, or Vultr or anyother cloud provider.

All you need to do is sign-up, and choose the cheapest VPS available.

  • Region: Pick a location closest to you or your customers to minimize latency (e.g., Amsterdam for Europe).
  • OS: Select Debian 13. It is the rock-solid foundation for most professional deployments.
  • Plan: Start with the “Nanode” or the cheapest 1GB RAM plan. You can always scale up, but scaling down is much harder once your disk expands.

2. Set a long Password

Don’t use something easy, don’t try to remember your password, and lastly DO NOT USE A CLOUD password manager! Use a password manager like KeePassXC.

  • Strive for 35+ characters or more, these will become almost impossible to be brutforced.
  • In the provisioning menu, you can also add your SSH Keys (highly recommended for security, as seen at [05:32]).

We’ll get to setting up

3. The First Login

Copy your IP address from the dashboard and open your terminal, if you’re on linux you’ve got everything installed,if you’re on windows you might want to install WSL or download putty.

ssh root@your_server_ip

If you get a “fingerprint” warning, type yes. Once inside, your first move should always be to update the package list:

apt update

🌐 Deploying Your First Web Server (Caddy)

We use Caddy because it is the easiest web server to use, written in Go, and handles HTTPS automatically.

1. Installation

Follow the Caddy installation documentation for Debian to get the binary on your system.

2. Verify the Installation

Once installed, visit your server’s IP in a browser. You should see the “Welcome to Caddy” page [06:52].

3. Live Editing with Vim

To change the page, navigate to the default directory (usually /var/www/html) and edit the index.html:

cd /var/www/html 
vim index.html
  • To Edit: Press i (Insert mode).
  • To Save & Exit: Press Esc, then type :wq! and hit Enter.
  • Note: Learning to exit Vim is a rite of passage for every elite hacker [08:35]. So you need to press
esc :wq!

FAQ

You might have a lot of questions..

🛡️ Important: What’s Next?

Right now, you are logged in as root. This is dangerous for daily use. Apart from my Raspberry Pi at home, I run 3 personal VPS instances and dozens for clients. The secret to managing them all is Hardening.

Your immediate next steps are to follow days 8 and 9:

  1. Day 9 Secure the VPS: Create a non-root user, disable root login, and set up a firewall.
  2. **Day 8 is about Buying a Domain and point that IP address via DNS to your VPS so Caddy can provision an SSL certificate automatically.

Privacy is Peace. Engineering is Freedom. Don’t be dependent on the “Big 3”—build your own cloud.


^3: Referencing my video Easy Way to Configure Your New CHEAP Linux VPS WebServer*