This is the configuration and documentation for caturday, the server that will be hosting Wurstmineberg's Minecraft servers, website, and other infrastructure in the future.
Warning
Following these steps will create a linode and an image on your Linode account. Please familiarize yourself with Linode's pricing before you start.
Follow these steps to get a server that's configured as an identical copy of caturday. You will need a backup of the database, which can be created using sudo -u postgres pg_dump -Cc --if-exists wurstmineberg > backup.sql.
- On any NixOS system, run
assets/bootstrap.shfrom a clone of this repo - Create a linode from the
caturdayimage (the “Linode 2 GB” plan or better is required to avoid NixOS upgrades being OOM killed; see https://wurstmineberg.de/about#hosting for the current plan) - Wait for the linode to finish provisioning (ensures configuration is correct)
- Delete the image to stop it from continuing to accrue charges
- Power off the linode
- On the Storage tab, increase swap to 2048 MB
- On the Configurations tab, edit the default configuration:
- Change the kernel to
GRUB2(notGRUB (Legacy)) - Disable the filesystem/boot helpers
- Change the kernel to
- Power on the linode
- Wait until the linode has finished switching to the full system config. You can open LISH to monitor the progress.
- You can now access the linode via SSH (assuming your user account and SSH pubkey exist in
flake.nixin this repo). You can open LISH to view the host key fingerprint. - Restore the database from your backup (
cat backup.sql | sudo -u postgres psql -q)
- Make sure you have an
ssh-ed25519pubkey inassets/authorized-keys.nix - Edit
secrets.nixto add the filename (e.g.foo.age) to the list marked with the comment nix run github:ryantm/agenix -- -e secrets/foo.age- Undo the change to
secrets.nix
- Make sure you have an
ssh-ed25519pubkey inassets/authorized-keys.nix - Make sure an existing admin has run
nix run github:ryantm/agenix -- -rsince your key was added nix run github:ryantm/agenix -- -e secrets/foo.age