Setting up Bookstack Turned out to be pretty simple. deployment.secrets.bookstack-app-key = { source = "../private/bookstack/app-key"; destination = "/var/lib/bookstack/app-key"; owner = { user = "bookstack"; group = "bookstack"; }; permissions = "0700"; }; services.bookstack = { enable = true; hostname = "wiki.slightly.tech"; maxUploadSize = "10G"; appKeyFile = "/var/lib/bookstack/app-key"; nginx = { enableACME = true; forceSSL = true; }; database = { createLocally = true; }; }; Server was running an old version of NixOS, 23.05, where MySQL doesn't work in a VPS (anymore). Upgraded the whole thing to 24.11 and then it Just Worked. Afterwards, run: bookstack bookstack:create-admin ... in a terminal on the server to set up the primary administrator account. Done.