{"id":29047980,"url":"https://github.com/nbsp1221/dockerized-code-server","last_synced_at":"2026-04-25T08:36:18.504Z","repository":{"id":301362666,"uuid":"1008349475","full_name":"nbsp1221/dockerized-code-server","owner":"nbsp1221","description":"💻 Production-ready code-server with Caddy reverse proxy","archived":false,"fork":false,"pushed_at":"2025-06-26T12:52:46.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-06T01:36:40.433Z","etag":null,"topics":["caddy","code-server","docker-compose"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/nbsp1221.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}},"created_at":"2025-06-25T12:06:48.000Z","updated_at":"2025-06-26T12:52:50.000Z","dependencies_parsed_at":"2025-06-26T13:44:16.453Z","dependency_job_id":"32c62732-81b5-42fa-bab0-15a1ba27e8f6","html_url":"https://github.com/nbsp1221/dockerized-code-server","commit_stats":null,"previous_names":["nbsp1221/dockerized-code-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nbsp1221/dockerized-code-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbsp1221%2Fdockerized-code-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbsp1221%2Fdockerized-code-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbsp1221%2Fdockerized-code-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbsp1221%2Fdockerized-code-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nbsp1221","download_url":"https://codeload.github.com/nbsp1221/dockerized-code-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbsp1221%2Fdockerized-code-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32255745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T04:23:17.126Z","status":"ssl_error","status_checked_at":"2026-04-25T04:21:53.360Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["caddy","code-server","docker-compose"],"created_at":"2025-06-26T17:36:23.918Z","updated_at":"2026-04-25T08:36:18.498Z","avatar_url":"https://github.com/nbsp1221.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dockerized code-server\n\nA complete Docker-based code-server setup using LinuxServer.io image with Caddy reverse proxy for authentication and automatic HTTPS.\n\n## Quick Start\n\n1. **Setup Environment**:\n   ```bash\n   cp .env.example .env\n   # Edit .env with your values\n   ```\n\n2. **Generate Password Hash**:\n   ```bash\n   ./hash-password.sh \"your-password\"\n   # Copy the hash to AUTH_PASSWORD_HASH in .env\n   ```\n\n3. **Start Services**:\n   ```bash\n   docker-compose up -d\n   ```\n\n4. **Access**:\n   - Local: http://code-server.localhost (or your DOMAIN)\n   - Production: https://your-domain.com\n\n## Features\n\n- 🔐 **Secure Authentication**: Caddy Basic Auth with bcrypt password hashing\n- 🔒 **SSL/HTTPS Support**: Automatic HTTPS with Let's Encrypt\n- 🚀 **Service Worker Support**: Properly configured to handle VS Code service workers\n- 🐳 **Docker Integration**: Docker-in-Docker support for development\n- 📦 **LinuxServer Image**: Uses stable LinuxServer.io code-server image\n- ⚡ **Minimal Setup**: Simple .env configuration\n\n## Configuration\n\n### Environment Variables (.env)\n\n```bash\n# Domain Configuration\nDOMAIN=code-server.localhost\nHTTP_PORT=80\nHTTPS_PORT=443\n\n# Authentication (for Caddy Basic Auth)\nAUTH_USERNAME=admin\nAUTH_PASSWORD_HASH=your-bcrypt-hash\n\n# Code-Server Sudo Password\nSUDO_PASSWORD=your-sudo-password\n```\n\n### Directory Structure\n\n```\ndockerized-code-server/\n├── docker-compose.yaml     # Main orchestration\n├── Caddyfile              # Caddy configuration\n├── hash-password.sh       # Password hash generator\n├── .env.example          # Environment template\n├── .env                  # Your environment (gitignored)\n└── code-server/          # Code-server data\n    └── workspace/        # Your workspace\n```\n\n## Usage\n\n### Password Management\n\nGenerate a new password hash:\n```bash\n./hash-password.sh \"mynewpassword\"\n```\n\nUpdate your `.env` file:\n```bash\nAUTH_PASSWORD_HASH=your-generated-hash\n```\n\n### Docker Commands\n\n```bash\n# View all service logs\ndocker-compose logs -f\n\n# View specific service logs\ndocker-compose logs -f code-server\ndocker-compose logs -f caddy\n\n# Restart services\ndocker-compose restart\n\n# Stop services\ndocker-compose down\n\n# Update images\ndocker-compose pull \u0026\u0026 docker-compose up -d\n\n# Access code-server container\ndocker-compose exec code-server bash\n```\n\n## Troubleshooting\n\n### Service Worker Errors\n- VS Code service workers are configured to bypass authentication\n- Ensure `/stable-*/static/*` paths work without auth\n\n### Connection Issues\n- Check if ports are available: `netstat -tlnp | grep :80`\n- Verify environment variables in `.env`\n- Check container logs: `docker-compose logs -f`\n\n### Permission Issues\n- Code-server runs as user 1000:1000\n- Ensure proper ownership: `sudo chown -R 1000:1000 code-server/`\n\n### SSL/HTTPS Issues\n- Caddy automatically handles Let's Encrypt certificates\n- For custom domains, ensure DNS points to your server\n- Local development uses HTTP on specified ports\n\n## Architecture\n\n- **LinuxServer Code-Server**: Runs on port 8443 (internal)\n- **Caddy Reverse Proxy**: Handles HTTP/HTTPS and authentication\n- **Docker Network**: Internal bridge network for communication\n- **Authentication**: Disabled in code-server, handled by Caddy Basic Auth\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnbsp1221%2Fdockerized-code-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnbsp1221%2Fdockerized-code-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnbsp1221%2Fdockerized-code-server/lists"}