# Debian Deployment Guide This step-by-step guide outlines the process of recreating the `testunit-zalpha` system, a Debian testing-based environment tailored for development, virtualization, container management, and media hosting. ## 1. Initial OS Installation 1. Gather the Debian Testing (forky/sid) installer ISO. 2. Install with the following partitioning scheme: - EFI System Partition (`/boot/efi`) - ~1GB, vfat - Root Partition (`/`) - ~200GB, **btrfs** - Swap Partition (`[SWAP]`) - ~5GB 3. During installation, configure the root filesystem to use `zstd:3` compression. You may need to edit `/etc/fstab` post-install to add the `compress-force=zstd:3` option to the root subvolume (`@rootfs`). ## 2. Post-Install User & Groups After booting into the initial system, add your primary user to the necessary groups for administration and hardware access: ```bash sudo usermod -aG sudo,adm,docker,dialout,plugdev,netdev,systemd-journal $USER ``` If you prefer passwordless sudo for testing environments: ```bash sudo visudo # Add: username ALL=(ALL) NOPASSWD: ALL sudo passwd -d $USER ``` ## 3. Repositories & Pinning ### 3.1 Sources List Configure `/etc/apt/sources.list` for testing, stable, and unstable: ```text deb http://debian.osuosl.org/debian/ testing main non-free-firmware contrib non-free deb http://security.debian.org/debian-security/ testing-security main non-free-firmware contrib non-free deb http://debian.osuosl.org/debian/ testing-updates main non-free-firmware contrib non-free deb http://debian.osuosl.org/debian/ stable main non-free-firmware contrib non-free deb http://debian.osuosl.org/debian/ sid main non-free-firmware contrib non-free ``` ### 3.2 Add Third-Party Repositories **Docker:** ```bash sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc sudo tee /etc/apt/sources.list.d/docker.sources < [Peer] PublicKey = Endpoint = 82.29.54.2:51820 AllowedIPs = 10.8.0.0/24 PersistentKeepalive = 25 ``` Enable and start: ```bash sudo systemctl enable --now wg-quick@wg0 ``` ### 5.4 Swap Configuration Install and configure `zram-tools` to enable the 4GB `zram0` swap device, supplementing the partition swap. ## 6. Final Steps 1. Configure `picom` as your compositor of choice in the session startup. 2. Verify SSH configuration (`/etc/ssh/sshd_config`) has `KbdInteractiveAuthentication no` and `UsePAM yes`. 3. Migrate Dockge stacks into `/opt/stacks` and start them using Dockge UI (`http://:5001`).