Home Server Setup
Basic Ubuntu Server
and OpenSSH server
during installation in the Software selection
section/etc/ssh/sshd_config
sudo service ssh restart
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt update
sudo apt install docker-ce
sudo apt install docker-compose
sudo usermod -aG docker $USER #logout and login after this
The backup strategy heavily relies on borgmatic which in turn relies on Borg. Follow the steps below to set it up.
borg >=1.0.8
and rclone
on a remote system
borg
on ubuntu you need to add an additional PPA
sudo add-apt-repository ppa:costamagnagianfranco/borgbackup
sudo apt update
sudo apt install borgbackup
rclone
sudo apt install rclone
# if the version is too old, install via generic install script from https://rclone.org/downloads/
rclone config # and follow guided configuration
# note: $NAME is used for rclone repo by default in backup.sh
.ssh/know_hosts
borgmatic
repos should be initialized.env
accordinglysudo apt install ssmtp
# edit file /etc/ssmtp/ssmtp.conf and add the following content
[email protected]
mailhub=mail.domain.tld:587
[email protected]
FromLineOverride=YES
UseSTARTTLS=YES
[email protected]
AuthPass=secret
# edit file /etc/ssmtp/revaliases and add the following content
root:[email protected]:mail.domain.tld:587
user:[email protected]:mail.domain.tld:587
# test your configuration
echo "Hello World!" | ssmtp [email protected]
crontab -e
# insert the following line to the end of the file
# it writes the output first into a log file and then sends the output to a given mail address
0 4 * * * cd /path/to/setup && ./backup.sh >> ./.logs/$(date -u +"\%Y-\%m-\%dT\%H:\%M:\%SZ").log && cat ./.logs/$(ls -t ./.logs | head -n1) | /usr/sbin/ssmtp [email protected]
docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.CreatedAt}}\t{{.Size}}" | sort -k 4
blocks all domains mapped to local ip addresses by default
to use domains in the local network add them to:
Home Network
> Home Network Overview
> Network Settings
> DNS Rebind Protection
Type | Item | Price |
---|---|---|
CPU | AMD Ryzen 5 3400G 3.7 GHz Quad-Core Processor | Purchased For €149.89 |
CPU Cooler | Noctua NH-L9a-AM4 33.84 CFM CPU Cooler | Purchased For €41.10 |
Memory | Crucial 8 GB (1 x 8 GB) DDR4-2666 Memory | Purchased For €31.54 |
Memory | Crucial 8 GB (1 x 8 GB) DDR4-2666 Memory | Purchased For €31.54 |
Storage | ADATA XPG SX6000 Pro 512 GB M.2-2280 NVME Solid State Drive | Purchased For €78.90 |
Custom | ASRock Deskmini A300 AMD - Case, Motherboard, Power Supply | Purchased For €142.00 |
Total | €474.97 |