You Should Run Your Own Server

TLDR: Because you know... why not?

We are living in strange times: We are piling abstraction over abstraction, framework over framework, platform over platform and SaaS over SaaS. You get it: It's a giant wobbly pile of... "stuff" and who are you to question its foundation?

I know. It's an old story: Working in tech has always been tough and a you had to keep up. But today...? Seriously? With the advance of micro services, serverless, Jamstack and whatnot, I feel more and more uncomfortable and disconnected from the already awesome basics, that lie underneath.

Now don't get me wrong: Tinkering with all the "lego like" toy boxes offered in the form of PaaS and SaaS is a lot of fun! But does it always lead to the best and appropriate solution?  I haven't seen that happen myself, yet.

What's even worse is, that defaulting to those ready made packages, can even slow you down (integration is also very time consuming) and limit your creativity! To get a fresh view and inspiration, you should sometimes start from scratch - like writing your own database or in this case: Host your own server.

Now if you are trying to run your software on your own bare metal server, you will at least learn a couple of things:
  • You will highly appreciate every piece of managed platforms (as soon as your non redundant, non backed up SSD dies). You will understand why we really need managed platforms or good sysadmins.
  • The right level of platform abstraction: "Do you really need a managed K8s cluster, to host your personal blog? Does it even have to be hosted in the cloud?".
  • The elegance and capability of linux.
  • Bare metal performance can go a long way.

Just like the understanding of runtimes, assembly and circuits, helps you to write better software, a deeper understanding of platforms helps you to "run them better" and probably save some money.

There are many ways to setup a personal server and expose it to the internet: Some are expensive, some are complicated, some are vulnerable. But it is this first step - the "hello world" of administration if you will, that releases that sweet sweet dopamine. It's hard to explain, but even after 18 years of coding I'm still filled with joy, when I see that 
<h1>Hello World!<h1>
is actually served from that tiny black box, that sits under side board in the living room.

Running your own server has something to it, that I can't quite explain. It's like a sanctuary in a world, where ownership and control shifts from individuals to corporations. It's a tiny step to take back the control over the free and open internet. And less dramatically, It's a lot of fun. And you should have it too!

That's why I'm building "Uplink": The fast lane for getting your server connected to the free and open internet. It's a very simple, portable and robust solution, that links a domain name, to a http service, running on your own hardware:

> curl -H "Accept: application/binary" > uplink
> chmod +x uplink
> ./uplink login

Enter your email adress:

Confirmation email sent, waiting for your confirmation...
Saving session to ~/.uplink.

You are logged in! Create your first uplink, with `uplink create`

> ./uplink create --name hello-world --port 8080
Your uplink "hello-world" is now associated with the url:

> ./uplink serve \
  # nc (netcat) is used to host a simple http server here (the capability of linux...)
  & while true; do echo -e "HTTP/1.1 200\n\nHello World\!\n\n" | nc -l 8000; done & echo foo; fg

Uplinks established:

hello-world -> http://localhost:8080

At this point a request to "" will respond with "Hello World" right from your personal server! Custom domain names (using CNAMEs) are no problem, but you will have take care for the SSL certificate on your own (for now):

> ./uplink configure --name hello-world --https-port 8081
Your uplink "hello-world" now handles HTTPS requests for custom domains on port 8081

One of the upsides of this setup is that you can serve from anywhere without a hassle: Let's assume you have a power outage. No power - no router! But you we're smart enough to retrofit an old laptop as home server: It runs on battery and falls back to the built in GSM modem. Uplink simply reconnects you via the LTE network. Problem solved!

In the next post, I will explain the architecture, as well as the pros and cons when hosting with Uplink.

Now get off my lawn.