NAS - post OS installation steps
So, you've got your server running and now want to install all the cool stuff on it that you can do. For that, you need to install and configure some stuff, these are the things that I do after I make a fresh install on my server:
0. Prerequisites
To install new applications on your machine, you will use a package manager. This differs from Linux distro to distro, some use apt
, others yum
or dnf
. Just google which one your OS uses. In this post, since I have Debian on my system (I switched from Ubuntu server because of some complicated kernel issues that I wasnt able to figure out) I will use apt
.
1. Configure SSH
Installation
SSH is the way you will connect to your server via the Commandline, Powershell or whatever you use as your terminal on your personal computer or laptop.
To start, check with
sudo service sshd status
or sudo systemctl status sshd
depending on your system (you should remember the first part, the services tool is quite handy in many situations to check logs of applications) if you have it already installed. If not, use
sudo apt update; sudo apt install openssh-server -y
to install it.
Afterwards, check again using the method above. Now you should be able to connect to your machine from your laptop or whatever using the terminal with ssh user@ipaddress
(using your configured username and IP address of course). For me its ssh server@192.168.0.2
. It should ask you for the user password and you should be good to go.
SSH keys
To ensure that your server is secure, you should early on learn that you NEVER NEVER EVER use ssh using the password. What you want it an ssh key that you configure on all your machines and add that to the server. Here they will tell you quite well how to to that. It's also just two steps:
- Generate a ssh key pair
- Add the .pub key to your server using
ssh-copy-id
or manually
Now you can go into /etc/ssh/sshd_config
and search for the line
PasswordAuthentication yes
and change that to no
. This will ensure that noone can connect to the server without the correct SSH key. This also means that you will not be able to connect to it from any other computer but the configured ones of course, so add all the necessary keys.
2. Configure docker
If you don't know what docker is, make sure to understand it first. On youtube there's many tutorials, the first one I found is here
I will not go into details about the installation steps, it is explained endless times by people that are way smarter than me
I used
If you're at the point where you can put
docker run hello-world
(without sudo) in the terminal and it gives you the welcome screen, congrats! You can now use docker and host all the lovely applications that are out there!