{"id":31618083,"url":"https://github.com/pawan67/selfhost-infra-docker","last_synced_at":"2026-04-21T09:32:42.801Z","repository":{"id":315466353,"uuid":"1059624864","full_name":"pawan67/selfhost-infra-docker","owner":"pawan67","description":"A flexible Docker Compose setup for hosting self-hosted applications with Traefik as the reverse proxy and Authelia for authentication.","archived":false,"fork":false,"pushed_at":"2025-09-28T15:42:01.000Z","size":4432,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-06T13:47:27.543Z","etag":null,"topics":["authelia","docker","docker-compose","glance","homelab","n8n","self-host","traefik"],"latest_commit_sha":null,"homepage":"https://glance.000427.xyz","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pawan67.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-18T17:45:03.000Z","updated_at":"2025-09-28T15:42:04.000Z","dependencies_parsed_at":"2025-09-18T21:01:17.415Z","dependency_job_id":"d7ebaa2c-6f9b-490d-a408-79dcc2fd3469","html_url":"https://github.com/pawan67/selfhost-infra-docker","commit_stats":null,"previous_names":["pawan67/selfhost-infra-docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pawan67/selfhost-infra-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawan67%2Fselfhost-infra-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawan67%2Fselfhost-infra-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawan67%2Fselfhost-infra-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawan67%2Fselfhost-infra-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pawan67","download_url":"https://codeload.github.com/pawan67/selfhost-infra-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawan67%2Fselfhost-infra-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32085480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T06:27:27.065Z","status":"ssl_error","status_checked_at":"2026-04-21T06:27:21.250Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authelia","docker","docker-compose","glance","homelab","n8n","self-host","traefik"],"created_at":"2025-10-06T13:45:26.205Z","updated_at":"2026-04-21T09:32:42.774Z","avatar_url":"https://github.com/pawan67.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selfhost Infra with Docker\r\n\r\nThis repository contains my personal **Docker Compose setup** for self-hosting applications on a VPS.\r\nIt uses **Traefik** as a reverse proxy and **Authelia** for authentication.\r\n\r\nThe stack is modular — you can add or remove services as you like.\r\n\r\n## Screenshots\r\n\r\n### Glance Overview\r\n![Glance Overview](apps/glance/screenshots/glance-green.png)\r\n\r\n---\r\n\r\n## Prerequisites\r\n\r\n- A VPS with Docker and Docker Compose installed\r\n- Ports **80** and **443** open\r\n- A domain or subdomains pointing to your VPS IP\r\n\r\n  - Free domains from [DuckDNS](https://www.duckdns.org/) or [Afraid.org](https://afraid.org/) also work\r\n\r\n- (Optional but recommended) Cloudflare for DNS — lets you use the included Cloudflare DDNS to automatically manage records\r\n\r\n---\r\n\r\n## Setup\r\n\r\n### 1. Install Docker\r\n\r\n```bash\r\ncurl -fsSL https://get.docker.com | sh\r\n```\r\n\r\n### 2. Clone this repository\r\n\r\n```bash\r\ncd /opt\r\ngit clone https://github.com/pawan67/selfhost-infra-docker.git\r\ncd selfhost-infra-docker\r\n```\r\n\r\n### 3. Set proper permissions\r\n\r\nYou can change the permissions of the `/opt/selfhost-infra-docker` directory to your user using the following command:\r\n\r\n```bash\r\nsudo chown $(id -u):$(id -g) -R /opt/selfhost-infra-docker\r\n```\r\n\r\nThis will allow you to edit files in the directory without needing to use `sudo`.\r\n\r\n### 4. Configure environment variables\r\n\r\n- Copy `.env.example` files into `.env` for each app you want to run\r\n- Edit values with your domain, secrets, tokens, etc.\r\n\r\n#### Using nano (command line):\r\n```bash\r\nnano apps/audiobookshelf/.env\r\n```\r\n\r\n#### Using VS Code (recommended):\r\n```bash\r\n# Install VS Code if not already installed\r\ncurl -fsSL https://code.visualstudio.com/sha/download?build=stable\u0026os=linux-deb-x64 -o vscode.deb\r\nsudo dpkg -i vscode.deb\r\n\r\n# Open the project in VS Code\r\ncode /opt/selfhost-infra-docker\r\n```\r\n\r\n**VS Code Benefits:**\r\n- Syntax highlighting for configuration files\r\n- Easy file navigation\r\n- Multiple files open in tabs\r\n- Built-in terminal\r\n- Extensions for Docker and YAML support\r\n\r\n### 5. Start the core services (**Traefik** + **Authelia**)\r\n\r\n```bash\r\ndocker compose --profile required up -d\r\n```\r\n\r\n### 6. Enable more services\r\n\r\n- Add them to the `COMPOSE_PROFILES` variable in the root `.env`\r\n- Or run them on demand with:\r\n\r\n  ```bash\r\n  docker compose --profile grafana --profile audiobookshelf up -d\r\n  ```\r\n\r\n### 7. Check your setup\r\n\r\n- Make sure you're in the repo root (`pwd` should show `/opt/selfhost-infra-docker`)\r\n- Run all enabled profiles:\r\n\r\n  ```bash\r\n  docker compose up -d\r\n  ```\r\n\r\n---\r\n\r\n## 🐳 Docker Management\r\n\r\n### Common Commands\r\n\r\n#### View running containers\r\n```bash\r\ndocker compose ps\r\n```\r\n\r\n#### View logs\r\n```bash\r\n# All services\r\ndocker compose logs\r\n\r\n# Specific service\r\ndocker compose logs traefik\r\n\r\n# Follow logs in real-time\r\ndocker compose logs -f authelia\r\n```\r\n\r\n#### Restart services\r\n```bash\r\n# Restart all services\r\ndocker compose restart\r\n\r\n# Restart specific service\r\ndocker compose restart traefik\r\n\r\n# Restart with profile\r\ndocker compose --profile grafana restart\r\n```\r\n\r\n#### Stop services\r\n```bash\r\n# Stop all services\r\ndocker compose stop\r\n\r\n# Stop specific service\r\ndocker compose stop audiobookshelf\r\n\r\n# Stop and remove containers\r\ndocker compose down\r\n```\r\n\r\n#### Update services\r\n```bash\r\n# Pull latest images\r\ndocker compose pull\r\n\r\n# Restart with new images\r\ndocker compose up -d\r\n```\r\n\r\n#### Clean up\r\n```bash\r\n# Remove stopped containers, unused networks, and dangling images\r\ndocker system prune\r\n\r\n# Remove unused volumes (be careful!)\r\ndocker volume prune\r\n```\r\n\r\n### Service Management\r\n\r\n#### Add a new service\r\n1. Enable the profile in your root `.env` file:\r\n   ```bash\r\n   COMPOSE_PROFILES=required,grafana,audiobookshelf,newservice\r\n   ```\r\n2. Start the new service:\r\n   ```bash\r\n   docker compose up -d\r\n   ```\r\n\r\n#### Remove a service\r\n1. Stop and remove the service:\r\n   ```bash\r\n   docker compose stop servicename\r\n   docker compose rm servicename\r\n   ```\r\n2. Remove from `COMPOSE_PROFILES` in `.env`\r\n\r\n### Troubleshooting\r\n\r\n#### Check service health\r\n```bash\r\n# View container status\r\ndocker compose ps\r\n\r\n# Check specific service logs\r\ndocker compose logs servicename\r\n\r\n# Enter container shell for debugging\r\ndocker compose exec servicename /bin/bash\r\n# or\r\ndocker compose exec servicename /bin/sh\r\n```\r\n\r\n#### Resource usage\r\n```bash\r\n# View resource usage\r\ndocker stats\r\n\r\n# View disk usage\r\ndocker system df\r\n```\r\n\r\n---\r\n\r\n## 📝 Configuration Tips\r\n\r\n### Editing Configuration Files\r\n\r\n**Command Line:**\r\n```bash\r\n# Using nano\r\nnano apps/service-name/.env\r\n\r\n# Using vim\r\nvim apps/service-name/.env\r\n```\r\n\r\n**VS Code (Recommended):**\r\n- Install the Docker extension for better Docker Compose support\r\n- Install the YAML extension for better syntax highlighting\r\n- Use `Ctrl+Shift+P` → \"Docker: Compose Up\" for GUI management\r\n\r\n### Environment Variables\r\n\r\nEach service has its own `.env` file in `apps/{service-name}/`. Common variables include:\r\n- `DOMAIN` - Your domain name\r\n- `SUBDOMAIN` - Service subdomain\r\n- `TIMEZONE` - Your timezone (e.g., `America/New_York`)\r\n- `PUID` and `PGID` - User/Group IDs (run `id` to get yours)\r\n\r\n\r\n---\r\n\r\n## Notes\r\n- Using Cloudflare DDNS is recommended check .env\r\n- Some services need extra steps (like adding API keys or editing configs) — check their `README.md` inside `apps/{service}`\r\n- Ports **80** and **443** must stay open\r\n- Always run commands from the repository root directory (`/opt/selfhost-infra-docker`)\r\n- Use `docker compose logs servicename` to troubleshoot issues\r\n- Keep your `.env` files secure and never commit them to version control\r\n\r\n---\r\n\r\n## 🆘 Support\r\n\r\n- Check individual service documentation in `apps/{service}/README.md`\r\n- Review Docker Compose logs for error messages\r\n- Ensure DNS records are properly configured\r\n- Verify firewall settings allow ports 80 and 443","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpawan67%2Fselfhost-infra-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpawan67%2Fselfhost-infra-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpawan67%2Fselfhost-infra-docker/lists"}