Scripts and notes I use to set up and look after my own Ubuntu servers. The scripts are Bash. The vuln-watch email is built with Python 3. Tested on Ubuntu 24.04, should mostly work on other Debian-based systems (paths like PHP config locations can differ).
| Path | What it does |
|---|---|
| monitoring/ubuntu-vuln-watch | Daily check of recent Ubuntu security notices against installed package versions. Emails only what actually affects the host, and whether the fix can be installed yet. |
| monitoring/server-monitoring | Cron script that mails when load, disk or RAM go over a limit, at most once an hour while the problem lasts. |
| backup/database-backup | Timestamped, gzipped mysqldumps with local retention. |
| backup/restic-vault | restic copies of the dumps to off-server storage. |
| user/create-user.sh | New sudo user with generated password and passphrase-protected SSH key. |
| user/setup-github-deploy-key.sh | Separate passphrase-free key for GitHub Actions deploys. |
| web/setup-app-directory.sh | App directory under /var/www owned by the deploy user and www-data. |
| web/setup-fastcgi-cache | nginx FastCGI cache for WordPress/Bedrock sites. |
| docs | Notes on server hardening, UFW, Postfix relay and remote MySQL access. |
Pushing to master pulls the latest version onto my servers through a GitHub Actions workflow (.github/workflows/sync-servers.yml), so the copy on each host stays in sync with this repo.
MIT