Building My First Server
When I reread the notes I took while building my first Ubuntu server, they seem inscrutable, and filled with technical jargon I only vaguely remember the meaning of. They seem like the notes of a madman lost in obsession over a project.
I can't count the number of individual Standard Notes entries I have under the main tag 'server', but there are over 40 subcategories, with headings like 'apache2,' 'mysql,' 'phpadmin,' and of course 'questions' and issues.' The subcategory 'maintenance' seems to appear twice, which is telling of what's involved.
I opened up some of those individual notes, and was struck by an odd feeling they were written by someone else. Here's a random impression of words and phrases:
- basic config nginx reverse proxy file
- Nginx as reverse proxy for Apache2 with Nextcloud
- LAMP server
I remember the basic concepts of a reverse proxy or a database, but I have lost detailed knowledge of the specifics. Like Charlie Gordon in Daniel Keyes' sci fi classic Flowers for Algernon, I feel a strange sense of vertigo of not being able to understand something I wrote myself not that long ago.
What was I trying to do?
All of this started with a very old upright desktop PC that was sitting unused in my basement. I felt I should either wipe the drive and give it to charity, or do something with it. When I looked into options for the latter, I discovered software called 'Ubuntu Server'.
I learned that Ubuntu Server was a fairly light operating system that doesn't have a graphical interface, so I had to get familiar with the command line terminal if I wanted to try it out.
I learned that you can 'build' your own local server, which you can then add practical applications on top of. With a server, you can stream music and video files to other devices, even your television. You can use a server to 'host' your own instances of software programmes, such as Nextcloud, which is a bit like the Google suite, and even your own WordPress blog!
Lastly, I learned it was possible to make your home server public by opening up 'ports' on your modem, which enables establishing your own little data corner on the Internet.
What did I learn from the experience?
While the possibilities seem magical and endless, none of it was straightforward to set up. My collection of garbled, jargon-filled notes results from spending a lot of time on tutorial sites (see below).
What is interesting to me now is that looking back, though the precise meanings of specific technical words and phrases may be lost, building my first Ubuntu Server resulted in some really important insights that I still rely on today. These aided a better understanding of digital security and online privacy.
- that you don't need a fast PC or a modern SSD hard drive to build a working server
- that you can access your modem and change its settings
- the difference between 'local' and 'public' networks, and that it is a convention to open the same two ports (80 and 443) on modems everywhere
- What an IP address is and that you or your modem can assign local IP addresses
- the difference between a local IP address and a public one
- that taking dilligent notes helps (at least while working on the project)
- that you can wipe the slate clean and start over
- that 'UFW' stands for 'Uncomplicated Firewall', and what a firewall does
- that there are so many great tutorials and glossaries to help you come to terms with Linux commands
- that you can use the 'ssh' command to connect from one computer to another on your network
- why people use a 'reverse proxy' as a defence against attacks, and how to set one up (and that it is complicated)
- the difference between http and https, and how to request an SSL certificate to secure your own website
- what domain names are, and how to buy and connect one to your server
- that in the Linux communities, there are often several solutions to the same problem (docker, snap)
- that usernames and their passwords are stored in databases
- that being an administrator gives you a lot of power
- that you really can host great apps like WordPress yourself
- that server maintenance takes time and concentration
- that it can be a bit scary when things go wrong
- that it helps to know one real-life mentor who is willing to help
- that most of our online experiences today are server-based
While the specific technical know-how is now forgotten, the big concepts stuck. This is why I would recommend building a server at home, no matter what your beginning skill level.
The main issue is time. If you are a technically savvy person, this may sound like an exaggeration, but believe me when I say that a beginner who is learning command line from scratch, while trying to secure Ubuntu Server publicly may need 3 months or more to get it set up and working properly.
Another is the headache that comes with maintenance. Once your server is up-and-running, that's not the end of it. A simple thing like an update can 'break' things, and then you may lose another week trying to figure out how to fix that without having to start all over.
The journey may be more interesting than the result. I was determined to get WordPress running, but then once I got it working, found I had nothing to write about, so it just kind of sat there. A shared media library can be a powerful thing, but if friends don't use it, then it loses its purpose.
Concerns about security was the reason I finally shut it down. I had a public-facing https domain, but I never felt like I really knew fully what was going on under the hood. I didn't know how to read and interpret the logs, nor would I have known how to respond in case of a breach. I was also worried that opening up ports on your modem could lead to general Internet security weaknesses in our home. I never had full confidence in what I'd built.
A server computer is another device that is switched on, uses up electricity and makes fan noise. From a digital minimalism perspective, it felt better to switch the old PC off, wipe the drive and pass it on to a charity shop.
Current use and looking ahead
Reading over my server documentation for this post, my eye caught one innocuous note-to-self: '*could try Nextcloud snap.' As it turns out, that was a much easier approach that I came back to several years later. I am currently running a new server with Nextcloud snap, and this time, I am actually using it. But without having tried the more traditional setup first, I wouldn't be able to appreciate these more streamlined, user-friendly solutions for what they are.
Learning how to build a server lowered the barrier of resistance to other projects, including Monero mining. I would not have the confidence to begin on such projects without my prior server experience and having built up some familiarity with the command line.
In the past, when I got stuck, I used to wipe the whole drive and start over. My mentor friend was always puzzled by this. Nowadays, I am more confident about trouble-shooting and rarely wipe the slate clean anymore, so that's progress.
In conclusion, there are two important lessons I learned from the experience of building my first server:
- Creating your own server gives insight into how many of our online experiences work. Almost everything we do online works on the principle of a database with usernames and passwords. These can give different levels of access to data on a remote server (Youtube, TikTok, Netflix) or allow you to edit and modify files (likes, comments, posts on social media). Perhaps this is an oversimplification, but I don't see much more than that happening on the Internet today.
- The combination of pushing your understanding of tutorials and published documentation to the limit, and then being able to bring the questions you are left with to a real person, an IT mentor, who is interested and willing to help, is golden. It's a great model for learning.
Examples of Digital Ocean's excellent free written tutorials:
- Initial Server Setup with Ubuntu 22.04
- How To Install Linux, Apache, MariaDB, PHP (LAMP) stack on Debian 10
Examples of Learn Linux TV's excellent video tutorials:
- Essential First Steps for Every New Linux Server Build
- OpenSSH Full Guide - Everything you need to get started!
Ubuntu Server download - to install on a real computer, you'll need the 'manual server installation' software.
Finally, here's an article I wrote recently where I defend time spent 'tinkering' with software and hardware, even if you are a total beginner.
--------------------Discuss on Reddit--------------------
Subscribe to my blog via email or RSS feed.
Back to Blog