Synology
Synology provides NAS storage and hosts virtual machines for the homelab. It is used for centralized file storage, running VMs (Ubuntu, Flatcar), hosting Docker containers, and automating tasks with Ansible and scripts.
Key technologies: Synology DSM, Synology VMM, Docker, Ansible, SOPS.
Ubuntu VM Installation
-
Download Ubuntu Server live 23.10 ISO.
-
Create a VM with 4 cores, 16GB RAM, 100GB SSD, VGA graphics.
-
Install Ubuntu to disk:
- Set keyboard layout
- Set username/password
- Enable OpenSSH Server
- Leave other settings default
- Reboot
-
Shutdown the VM and unmount the ISO.
-
Install QEMU Guest Agent:
sudo -i
apt-get -y install qemu-guest-agent
shutdown -h now -
Set a fixed IP via DHCP.
-
Prepare the VM:
sudo -i
swapoff -a && sed -i '/ swap / s/^/#/' /etc/fstab && rm /swap.img
apt-get -y install nfs-commonInstall k3s:
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--flannel-backend=none --disable-network-policy --disable traefik" sh -(Optional) Add Docker registry credentials and reload k3s as needed.
Flatcar VM Installation
-
Set a password for the
coreuser:sudo passwd core -
SSH in as
core. -
Create an ignition config (
flatcar.ign) or generate one from Butane:Example ignition config:
{
"ignition": { "version": "3.3.0" },
"storage": {
"files": [
{
"overwrite": true,
"path": "/etc/flatcar/update.conf",
"contents": { "compression": "", "source": "data:,REBOOT_STRATEGY%3Doff%0A" },
"mode": 272
}
]
},
"passwd": {
"users": [
{ "name": "core", "sshAuthorizedKeys": ["<id_rsa.pub>"] }
]
}
}Or generate with Butane:
variant: flatcar
version: 1.0.0
passwd:
users:
- name: core
ssh_authorized_keys:
- <replace-me-with-public-ssh-key>Generate ignition file:
podman run --interactive --rm quay.io/coreos/butane:release --pretty --strict flatcar.bu flatcar.ign -
Install Flatcar to disk:
sudo flatcar-install -d /dev/sda -i flatcar.ign
shutdown -h now