DEV Community

Cover image for How I Set Up My Own Server (and Why You Should Too)
Amélie
Amélie

Posted on

How I Set Up My Own Server (and Why You Should Too)

Two years ago, I switched careers into IT after completing a web development bootcamp. In the meantime, I had learned how to develop smart applications, but there were still many things that I couldn't really get to grips with — especially when it came to hardware. I could code an app, sure, but terms like virtual machine, SSH, and even basic concepts like CPU seemed pretty abstract to me. I often felt like I was stumbling around, able to get stuff done, but always working harder than I needed to because I didn’t have a grasp of the fundamentals.
This feeling was particularly strong when dealing with servers. But there was something exciting about working in the command line — it had that 'Matrix' vibe, and I couldn’t help but feel a little cooler while using it.
So I decided to take the plunge and set up my own home server. At first, it was just to learn, but soon I realised I could have a lot of fun (and do useful things) with it. The problem was that while there were lots of guides, none of them seemed aimed at absolute beginners. So, I figured I’d share my experience and break everything down along the way.

Why have your own server? What can you do with it?

  • Learning: There’s no better way to learn how servers work than by running one yourself.
  • Personal data storage: Keep your files somewhere you control, rather than in the cloud.
  • Custom e-mail address: Get a cool email like firstname@lastname.com.
  • Website hosting: Host your personal projects or websites without relying on third parties.

Physical or Virtual Server?

The first decision you’ll need to make is whether you want a physical server at home or a virtual one hosted by a provider.
Here’s a detailed comparison: Serverspace Virtual vs Physical Servers
But to summarize:

Virtual server pros:

  • No hardware at home: No need for extra space or worrying about where to store it.
  • Easily scalable: Need more space? You can just scale up (or down) with a few clicks.
  • Data safety: The provider handles power supply, cooling, and backups, so your data is safe.
  • Performance: Virtual servers can offer better performance (but this is more relevant for advanced users).

Physical server pros:

  • Full control: You know exactly where your data is, and you’re not relying on a third party.
  • One-time cost: Buy the hardware once, and beyond that, it's just your electricity bill. No monthly fees.

Personally, I went with a virtual server because I didn’t want a chunk of metal gathering dust in my appartment.

Choosing a Provider

I won’t compare hosting companies here, but I ended up going with 1blu because it was affordable and based in Germany. Next, I had to figure out what setup I needed. Thanks to the excellent podcast IT-Berufe, I learned that for a beginner project like mine, 2 CPU cores, 2 GB of RAM, and 500 GB of storage were plenty.
But what do these terms even mean? I had to look them up, so let me save you the trouble.

What is a CPU?

The CPU, or Central Processing Unit, is essentially the brain of your server (or any computer). It handles the instructions that tell your programs what to do — everything from basic arithmetic to more complex logic and control functions.
Wikipedia says

 CPU: **A Central Processing Unit, also called a central processor, main processor, or just processor, is the most important processor in a given computer. Its electronic circuitry executes instructions of a computer program, such as arithmetic, logic, controlling, and input/output (I/O) operations.

Want a quick crash course? Fireship explains it in 100 seconds: How a CPU works in 100 seconds

What is RAM?


RAM, or Random Access Memory, is more than a great Daft Punk album. Here is a short explanation from How to geek:

 When you carry out actions on your computer, like opening a text document, it requires access to the data contained in that file. When you're not working on that document or you click save, the latest copy of that file is saved to the hard drive in long-term storage.
When you're working on the file, however, the most recent data is stored in RAM for quicker access. This is true for spreadsheets, text documents, web pages, and streaming video.

I eventually went with 1Blu’s lightest configuration, which offers 4 CPU-cores, 8GB RAM and 120 GB storage. And if you’ve been paying attention, you’ll know that it’s best to start with a smaller setup— after all, you can always scale up as needed!

Next time I will speak about the server's operating system and how to secure it with SSH and a firewall.

Top comments (0)