# Miles' Home Server Stack This repository contains a fully automated, containerized home server stack. It uses Docker for containerization, Caddy for reverse proxying, and is optimized for access via Tailscale. ## Quick Start (New System) If you are setting this up on a fresh install, follow these three steps: 1. **Prepare the Script**: Run `chmod +x setup.sh` 2. **Run the Setup**: Execute `./setup.sh` (This will install Docker if missing, create all required folders in `/home/miles/`, and set correct permissions.) 3. **Launch**: Choose "Option 1" from the script menu to pull the images and start the services. ## Service Map & Navigation All services are accessible via: `http://raspberrypi.tail46eacb.ts.net:4533` (or your local IP) | Service | Path | Function | |--------------|---------|---------------------------| | Homarr | / | Central Dashboard (Landing Page) | | Code-Server | /edit | VS Code Web IDE | | Gitea | /git | Private Git Server | | Navidrome | /music | Music Streaming | | RomM | /roms | Retro Game Manager | | Trilium | /notes | Knowledge Base / Notes | | Excalidraw | /draw | Digital Whiteboard | | qBittorrent | /tr | Download Manager | | ntfy | /ntfy | Push Notifications | ## Directory Structure The `setup.sh` script automatically manages these paths: - **Configs**: `/home/miles/code-config`, `/home/miles/qbittorrent-config` - **Data**: `/home/miles/gitea-data`, `/home/miles/trilium-data`, `/home/miles/homarr-data` - **Media**: `/home/miles/navidrome-music`, `/home/miles/roms`, `/home/miles/downloads` ## Maintenance via setup.sh Run `./setup.sh` at any time to access the management menu: - **Update Apps**: Option 4 pulls the latest versions and restarts. - **Check Status**: Option 5 shows which containers are running. - **Logs**: Option 3 is vital for debugging startup issues. ## Troubleshooting Guide ### [A] Permissions Issues If a container won't start or says "Access Denied": - Fix: `sudo chown -R 1000:1000 /home/miles/` ### [B] Caddy Routing Problems If you see a "404" or "Blank Page" on a sub-path: - Ensure container names in `Caddyfile` match `docker-compose.yml`. - Run: `docker exec -it caddy caddy validate --config /etc/caddy/Caddyfile` ### [C] Database Locks If an app hangs (Gitea/Trilium), it may have a database lock. - Fix: `docker compose restart [service-name]` ### [D] Networking Conflicts If port 4533 is in use, Caddy will fail. - Check: `sudo netstat -tulpn | grep 4533` ## Important Notes - **Watchtower**: Runs in the background to auto-update apps. - **Security**: Change the code-server password in `docker-compose.yml`. - **Tailscale**: Must be "Connected" for the Gitea URL to work. - **custom domans**: you can use custm domands but you need to use cloudefar tunnel with canday