SelfHosting things
- Shell 100%
| Containers | ||
| .gitignore | ||
| README.md | ||
| start_all.sh | ||
| stop_all.sh | ||
| stop_very_all.sh | ||
Selfhosting personnal repo
My very simple self-hosting setup. On my new mini-pc. Gettings things simpler & simpler overtime. Check branch : archive_01 for old setup.
Not 100% reproductible (Maybe one day NixOs?), some light debugging & manual adjust when migrating. See random dump at the end
Hardware & OS
- Origimagic C2 Neo Mini PC
- N95 Alder Lake
- 12gb ddr5
- 512gb internal nvme
- 1 To external USB SSD (For nextcloud files)
Stack
- Debian13
- Tailscale (VPN)
- Docker (with compose)
Networking
For private apps :
- Heavy use of Tailscale sidecar (see network_mode: "service:myapp-ts")
For publics apps :
- Forgejo on a cloudflare tunnel
- Nextcloud and Navidrome on a pangolin tunnel
Services
- Forgejo (git repo management)
- Nextcloud (google drive replacement)
- Navidrome (Music streaming)
- Beszel (Server monitoring)
- RSSHub (RSS feed generator)
- FreshRSS (RSS feed agregator)
- Metube (Media downloader)
- PangolinNewt (Tunneling to a cheap VPS)
CI
- Forgejo runners on an old laptop.
Backup
Done with restic (encrypted backup), inside family NAS. Managed via root crontab :
0 6 * * * restic -r /mnt/backup/usb-ssd-01 --password-file /root/.restic-pass backup /mnt/usb-ssd-01 && restic -r /mnt/backup/usb-ssd-01 --password-file /root/.restic-pass forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune >> /var/log/restic.log 2>&1
0 5 * * * restic -r /mnt/backup/self-hosting --password-file /root/.restic-pass backup /home/mini-pc-01/SelfHosting && restic -r /mnt/backup/self-hosting --password-file /root/.restic-pass forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune >> /var/log/restic.log 2>&1
Random dump / doc
Nextcloud
group & user : 33, chown nextcloud folders
Music folder owned by 1000 (for navidrome access) But I want nextcloud to also be able to move those files (easy access & add)
Solution :
sudo apt install acl
sudo setfacl -R -m u:33:rwx /.../.../Music
Also Nextcloud crontab thingy
sudo crontab -e
*/5 * * * * docker exec -u www-data nextcloud php /var/www/html/cron.php
Forgejo
postgres complaining when networking change : Check pg_hba.conf, change it if needed
Navidrome
Because external mess, Nextcloud can modify files etc...
[scanner]
PurgeMissing = "always"
TODO / Random vaguely related projects
- Old laptop as test server (probably on new branch)
- Maybe graphana things one day