iTranslated by AI
My Journey Building a Home Server with Ubuntu Server as a Lifelong Windows User
Motivation
I found a laptop at a second-hand shop that didn't have great performance but had an aesthetic I liked. It originally came with Windows installed, but I thought, "Why not turn this into a home server that runs 24/7?"
The immediate motivation was wanting to set up a Minecraft server, but since I was planning to expose it to the internet, I decided to install Ubuntu Server and build it properly to gain experience in real server operations.
Specs of the Laptop Used as a Server
- CPU: Core i3-7100U
- Memory: 16GB (It came with 4GB initially, but I upgraded it)
- Storage: 256GB SSD
While not what you would call high-spec, I judged it sufficient as a server as long as I kept the use cases limited.
Why I Chose Ubuntu Server
- Lightweight without a GUI
- Proven track record for server use
- Had experience with CentOS in college, so I wasn't intimidated by Linux
- Huge amount of information available, making it easy to troubleshoot when I got stuck
I've only ever used Windows, but I decided to choose Ubuntu Server thinking, "This is a great opportunity to properly learn server-side Linux."
First Steps After Installation
1. Network Configuration
- Connected via wired LAN
- Set a static IP address
- Ran into some trouble with netplan
Without a GUI, network configuration was my first hurdle.
2. Enabling SSH Connection
Verified that I could connect via SSH from within my local network.
ssh user@server_ip
3. Preparation for External Access
To access the server from outside my home, I configured the following:
-
Used the free DDNS service provided by my router
-
Opened the SSH port
At this point, I became keenly aware that "exposing to the public equals increased risk."
4. Setting Up SSH Public Key Authentication
Since I planned to expose the server, I felt uneasy about relying on password authentication alone, so I set up SSH public key authentication.
ssh-copy-id user@server_ip
When I executed this, the following message appeared:
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/user/.ssh/id_rsa.pub"
I momentarily wondered if it had frozen, but it was just waiting for the target user's password, which is normal behavior.
Since no characters are displayed while typing the password, it can be a bit confusing the first time.
5. What if you accidentally press Ctrl + C?
If you press Ctrl + C during the process, you might see a message like this:
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
This is the "confirmation phase" to see if you can log in with the copied keys.
Even if you interrupt it, the keys might have already been copied, so it is best to verify with the following command:
ssh user@server_ip
If you can log in without being asked for a password, it was successful.
Actual Use Cases
I currently use it for the following:
- Keeping a Minecraft server running 24/7
- Checking logs via SSH
- Process management using tmux
- Data sharing between different devices via Nextcloud
- Utilizing it as a jump host via VPN by installing Tailscale
While Minecraft and Nextcloud are just some of the use cases, the biggest takeaway is the experience I have gained in operating a server that runs 24/7.
Things I Learned from Using a Laptop as a Server
-
You need to address the issue of the system sleeping when the lid is closed
-
Wi-Fi drivers can be tricky
-
It is "harder to operate a server than it is to set one up"
I learned significantly more from the subsequent configuration and maintenance than from the initial OS installation.
Conclusion
-
Even an old, unused laptop can serve as a sufficient server
-
Ubuntu Server is suitable for both learning and practical use
-
If you are exposing your server to the public, you should prioritize SSH and security measures early on
Moving forward, I would like to tackle:
- Automating Minecraft server operations
- Sharing passwords with Nextcloud
and more.
Discussion