Assign a fixed IP
Once the server is ready, we need to assign a fixed IP to the server, as the router assigns IP addresses dynamically to connected devices, and we do not want to have a dynamic IP address to the server. So, we tell the router to allocate a fixed IP to the server by adding an Address Reservation entry in the router’s DHCP Server settings. This will map the MAC address of the server to a fixed IP. I have assigned 192.168.0.153.

Move Docker Volume
I moved my Docker volume to the data partition (/mnt/data) to accommodate the increasing size of the volumes.
-
Stop the Docker service
sudo systemctl stop docker -
Create/Edit the
/etc/docker/daemon.jsonconfiguration file with the location of the new data directory{ "data-root": "/mnt/data/docker" } -
[Optional] I also added this DNS entry to fix some issues with network unreachable errors for some containers while installing
"dns": ["192.168.0.1", "8.8.8.8", "8.8.4.4"]This entry can also be added individually to a particular container. Adding here makes the default for all containers.
-
Move the existing volumes’ data to the new folder
rsync -aP /var/lib/docker/ /mnt/data/docker/ -
To be safe, instead of deleting the old volume data, we will rename it
mv /var/lib/docker /var/lib/docker.bak -
Start Docker service
sudo systemctl start docker -
Once done, we can verify by checking other containers or running this hello world command
docker run --rm hello-world -
If no errors, the volume move is complete, and we can safely delete the old Docker directory
sudo rm -rf /var/lib/docker.bak
Automount drives
By default, Linux does not automount external drives. We can run mount command to manually mount a disk. To automate the mounting every time the system reboots, we need to add entries to the /etc/fstab file.
-
Get the UUID
lsblk -fThis will show all drives, including the unmounted ones.

-
Grab the UUID of the drive (A12B-8FFC) and make an entry to fstab. Open the fstab file
sudo vim /etc/fstab -
Create the mount directory where the drive will be mounted
mkdir /mnt/extern-hdd1 -
Add this line at the end of the file
UUID=A12B-8FFC /mnt/extern-hdd1 ext4 defaults,nofail,x-systemd.device-timeout=10s,x-systemd.automount 0 2See fstab documentation for fstab options. The option
x-systemd.automountis used to mount the drive on boot. -
Repeat this process for other external drives.
-
Mount all drives in fstab
sudo mount -a