Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe โ weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Self Host?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/johnalbertini14-glitch-self-host)
---
name: Self-Host
description: Deploy and maintain self-hosted services with security, backups, and long-term reliability.
metadata: {"clawdbot":{"emoji":"๐ฅ๏ธ","requires":{"anyBins":["docker","podman"]},"os":["linux","darwin","win32"]}}
---
# Self-Hosting Rules
## Before Installing Anything
- Backups first โ decide where data lives and how it's backed up before deploying, not after data exists
- Check resource requirements โ many services need more RAM than expected, OOM kills corrupt data
- Verify the project is actively maintained โ abandoned projects become security liabilities
## Docker Fundamentals
- Always use named volumes or bind mounts for persistent data โ anonymous volumes are lost on container removal
- Pin image versions (`nginx:1.25.3` not `nginx:latest`) โ latest changes unexpectedly and breaks setups
- Set restart policy (`unless-stopped` or `on-failure`) โ containers don't auto-start after reboot by default
- Use `docker compose down` not `docker compose rm` โ down handles networks and volumes properly
## Networking
- Never expose database ports to the internet โ only the reverse proxy should be public
- Use a reverse proxy (Traefik, Caddy, Nginx Proxy Manager) โ handles SSL, routing, and security in one place
- Create Docker networks per project โ default bridge network lacks DNS resolution between containers
- Bind admin interfaces to localhost only (`127.0.0.1:8080:8080`) โ not all traffic needs to be public
## SSL and Domains
- Use automatic SSL with Let's Encrypt โ Caddy and Traefik do this natively
- For local/LAN access, use a real domain with DNS challenge โ avoids browser certificate warnings
- Wildcard certificates simplify multi-service setups โ one cert for *.home.example.com
## Security Essentials
- Change all default passwords immediately โ bots scan for default credentials within hours
- Enable automatic security updates for the host OS โ unpatched systems get compromised
- Use fail2ban or equivalent โ brute force attacks are constant
- Keep services behind authentication (Authelia, Authentik) โ not everything has built-in auth
- Disable root SSH, use key-only authentication โ password SSH is a vulnerability
## Backups
- Test restores, not just backups โ untested backups are wishful thinking
- 3-2-1 rule: 3 copies, 2 different media, 1 offsite โ local RAID is not backup
- Automate backup schedules โ manual backups get forgotten
- Back up Docker volumes, not containers โ containers are ephemeral, data is not
## Monitoring
- Set up uptime monitoring (Uptime Kuma is self-hostable) โ know when services die before users tell you
- Monitor disk space โ full disks cause silent failures and corruption
- Log rotation is mandatory โ Docker logs grow forever by default, fill disks
- Consider resource monitoring (Netdata, Prometheus) โ spot problems before they're critical
## Maintenance
- Schedule regular update windows โ services need updates, plan for downtime
- Document everything you deploy โ future you won't remember why that container exists
- Keep a compose file repo โ reproducibility matters when hardware fails
- Test updates on staging when possible โ production surprises are painful
## Home Server Specifics
- Dynamic DNS if ISP doesn't provide static IP โ Cloudflare, DuckDNS work well
- UPS protects against power loss corruption โ especially important for databases
- Consider power consumption โ some hardware costs more in electricity than cloud hosting
- Port forwarding exposes your home network โ use VPN (WireGuard, Tailscale) instead when possible
## Common Mistakes
- Putting everything on one machine with no redundancy โ single point of failure for all services
- Ignoring updates for months โ security vulnerabilities accumulate
- No firewall rules โ assuming "nobody knows my IP" is security
- Storing secrets in docker-compose.yml committed to git โ use .env files, exclude from version control
- Over-engineering from day one โ start simple, add complexity when needed