Starter Guide for Setting Up A Linux Server
I’m writing this after setting my first linux server so you’re going to get the leanest setup.
I use the defaults when I can.
If you want to minimize the amount of things you have to learn as you set up your system, my guide intentionally sticks to configurations that work for people coming from MacOS or Windows (because I’m forgetful and have a hard time learning new habits).
I’m also one of those people that naturally have “Marie Kondo mindset”. So I try to remove anything that isn’t completely essential.
In this guide I’m going to give an outline of how went about doing things and call out the configuration decisions I made.
What I’m using my server for
Before we dive in I want to first give a brief overview of what I’m using my linux server for so that you know can decide if this is worth your time.
You gotta set up your server differently depending on the purpose of the server.
The main purpose of my linux server is to run AI Agents in docker containers. No AI will be running on the base operating system.
It will also acting as a Network Attached Storage (NAS) for my media files (photo, video, and audio) so that I have easy access to them to create content with.
I plan to access it through my personal MacAir laptop on my home network and while I’m outside of my house.
The server will be always ON.
Steps to Follow
If your intended purpose is similar to what I just described then let’s dive into it.
Here is the checklist of steps that I followed to get my server up and running.
Create a bootable USB with Linux OS
Find a Physical Location for Server
SSH connection
ssh-copy-id username@your-server-ip
Host server-name
HostName: your-server-ip
User: username
If you want a quick guide on how to set up tmux, here is an article.
Remote SSH from outside home network
Install packages
Because I’m using my server for writing and running code, I installed a lot of packages that are needed for software development.
# ─── 1. System packages
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
bash \
ca-certificates \
coreutils \
curl \
findutils \
gawk \
git \
gnupg \
grep \
htop \
iotop \
jq \
lsof \
ncdu \
net-tools \
procps \
ripgrep \
rsync \
sed \
unzip \
vim \
zip
# ─── 2. Node.js 22.x
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
| sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" \
| sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt-get update && sudo apt-get install -y --no-install-recommends nodejs
git config --global user.email "email"
git config --global user.name "name"
# ─── 4. GitHub CLI
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
| sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
| sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt-get update && sudo apt-get install -y --no-install-recommends gh
Access server directory from your personal laptop
brew install sshfs
sshfs user@your-server:/ ~/mnt/myserver
Pull and start Docker Containers
I haven’t written an article on docker containers but once I do, you can read the article here.
That’s a Wrap
After setting up my linux server I don’t think I can go back to not having one. It’s one of those life improvements like switching from a bicycle to a car.
But to be honest, it is a technical hurdle that would have taken a lot of research and time to learn if I didn’t have AI.
I basically had to ask Claude questions every step of the way. It would feel extremely tedious if I had to look search through webs forums for all of my thousand questions.
And it would have been extremely bothersome to the person helping me if I had a person to ask questions to, but I didn’t.
My server is still evolving.
Right now I’m running docker containers, and hosting my photo, video and audio files.
I’ve attached a 2TB external storage and will attach another 1TB external storage for extra space. There’s still a lot of files to move over and I’ll be slowly doing that over the next couple of weeks, or month but it’s really not high priority so it’ll take as long as it needs to.
It turns out that I really really enjoy organizing things, both on my computer and in real life. It’s weirdly therapeutic for me.
I know, I’m not normal.
