[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AYPJN9X3T4AR7MEA47RF2E":3,"skill-same:01M7AYPJN9X3T4AR7MEA47RF2E":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M7AYPJN9X3T4AR7MEA47RF2E","homelab-infrastructure",null,"Set up and maintain a homelab server from bare metal to production-ready — SSH hardening, UFW, Docker, reverse proxy, Cloudflare Tunnel, Tailscale, databases, and service deployment.","oat431\u002Fhermes_config_backup","oat431","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F54722120?v=4","01M7AYD07EH8SYPMYY8CGZKS22","Oralita","01M7AYD0816QDF77E3TWCRSQC9",1,"Unlicense","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhomelab-infrastructure\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: homelab-infrastructure\ndescription: Set up and maintain a homelab server from bare metal to production-ready — SSH hardening, UFW, Docker, reverse proxy, Cloudflare Tunnel, Tailscale, databases, and service deployment.\ntriggers:\n  - homelab setup\n  - server configuration\n  - reverse proxy setup\n  - cloudflare tunnel\n  - tailscale setup\n  - docker compose for self-hosted\n  - nginx subdomain config\n  - database container setup\n---\n\n# Homelab Infrastructure\n\nSet up a homelab server from fresh Ubuntu install to production-ready stack. Covers SSH hardening, firewall, Docker, reverse proxy, Cloudflare Tunnel, Tailscale, databases, and service deployment.\n\n## Architecture Pattern\n\n```\nPublic (anyone)    → Cloudflare Tunnel → Nginx (:80) → service\nPrivate (you only) → Tailscale → direct access by port\n```\n\n- Cloudflare Tunnel handles HTTP\u002FHTTPS only (no TCP\u002FUDP)\n- Tailscale handles SSH, management UIs, game servers, any port\n- Nginx routes by Host header, all services bind to `127.0.0.1`\n- DNS wildcard (`*.domain.com`) → tunnel — no per-subdomain DNS changes needed\n\n## Setup Order\n\n1. SSH key setup (no passphrase for automation keys)\n2. SSH hardening (`PasswordAuthentication no`, `PermitRootLogin no`, `AllowUsers`)\n3. UFW firewall (default deny, allow SSH only)\n4. Fail2ban\n5. Docker + Docker Compose\n6. Tailscale (install on server + all client devices)\n7. Cloudflare Tunnel (`cloudflared tunnel create`, wildcard routing)\n8. Nginx reverse proxy (one config per subdomain)\n\n## Key Pitfalls\n\n### SSH ed25519 with passphrase fails for automation\nOn Windows MINGW64, ed25519 keys with passphrase fail silently in non-interactive mode (`sign_and_send_pubkey: we did not send a packet`). Use RSA with `-N \"\"` for automation keys.\n\n### SSH_ASKPASS for password-based SSH on Windows\n```bash\ncat > \u002Ftmp\u002Fssh_pass.sh \u003C\u003C 'SCRIPT'\n#!\u002Fbin\u002Fbash\necho 'password'\nSCRIPT\nchmod +x \u002Ftmp\u002Fssh_pass.sh\nexport SSH_ASKPASS=\"\u002Ftmp\u002Fssh_pass.sh\" SSH_ASKPASS_REQUIRE=force DISPLAY=\":0\"\nssh -o StrictHostKeyChecking=no user@host \"command\" \u003C \u002Fdev\u002Fnull\n```\n\n### Nginx can't read files in \u002Fhome\u002Fuser\nNginx runs as `www-data`. Home directory is `750` (owner-only).\n```bash\nsudo usermod -aG flowero www-data\nchmod -R g+rX \u002Fhome\u002Fflowero\u002Fpath\u002Fto\u002Fsite\n# MUST restart nginx (not reload) for group change to take effect\nsudo systemctl restart nginx\n```\n\n### HTTPS vs HTTP proxy_pass\n- Portainer (9443) = HTTPS → `proxy_pass https:\u002F\u002F` + `proxy_ssl_verify off`\n- Most services = HTTP → `proxy_pass http:\u002F\u002F`\n- SeaweedFS, AdGuard, etc. = HTTP → `proxy_pass http:\u002F\u002F`\n\n### Cloudflare Tunnel only does HTTP\u002FHTTPS\nGame servers, custom TCP\u002FUDP ports → use Tailscale directly, not Cloudflare Tunnel.\n\n### DNS for game servers \u002F custom ports\nCreate A record → Tailscale IP, **proxy OFF** (DNS only \u002F gray cloud). Orange cloud breaks non-HTTP traffic.\n\n### SeaweedFS v4.40 breaking changes\n- `-master` flag on S3 gateway changed to `-filer`\n- `security.toml` with JWT signing key causes \"wrong jwt\" on Filer UI\n- Solution: remove security.toml, use simple s3.json config without signing key\n\n### AWS CLI v2.36 + Python 3.14 bug\n`expected string or bytes-like object, got 'NoneType'` with non-AWS S3 endpoints. Use rclone or MinIO client (`mc`) instead.\n\n### Group membership needs nginx restart\n`usermod -aG` + `systemctl reload nginx` is NOT enough. Must `systemctl restart nginx` for group changes to take effect (workers keep old groups until restarted).\n\n## Port Convention\n\n| Range | Purpose |\n|-------|---------|\n| 7000–8000 | Self-hosted apps (AdGuard, Portainer) |\n| 8000–9000 | Personal projects (Gateway, Keycloak) |\n| Default ports | Databases (Postgres 5432, Valkey 6379, MongoDB 27017) |\n\n## Docker Network Pattern\n\nCreate one shared network for databases:\n```bash\ndocker network create db-network\n```\n\nIn every compose file:\n```yaml\nnetworks:\n  shared-network:\n    external: true\n    name: db-network\n```\n\nApps connect to databases by container name: `postgres:\u002F\u002Fuser@local-postgres:5432\u002Fdb`\n\n## Nginx Subdomain Template\n\n```nginx\nserver {\n    server_name service.domain.com;\n    location \u002F {\n        proxy_pass http:\u002F\u002F127.0.0.1:PORT;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n    }\n}\n```\n\nEnable: `sudo ln -s \u002Fetc\u002Fnginx\u002Fsites-available\u002Fservice.conf \u002Fetc\u002Fnginx\u002Fsites-enabled\u002F && sudo nginx -t && sudo systemctl reload nginx`\n\n## References\n\n- `references\u002Fcloudflare-tunnel-setup.md` — install, config, service setup, pitfalls\n- `references\u002Frclone-onedrive-setup.md` — OAuth token flow, drive_id, usage commands\n\n## Public vs Private Decision\n\n| Service has... | Route via |\n|----------------|----------|\n| Its own auth (login page) | Cloudflare Tunnel (public) |\n| No auth | Tailscale only (private) |\n| Database | SSH tunnel (localhost binding) |\n| S3 API | Cloudflare (credentials in code) |\n","# Homelab Infrastructure\n\nSet up a homelab server from fresh Ubuntu install to production-ready stack. Covers SSH hardening, firewall, Docker, reverse proxy, Cloudflare Tunnel, Tailscale, databases, and service deployment.\n\n## Architecture Pattern\n\n```\nPublic (anyone)    → Cloudflare Tunnel → Nginx (:80) → service\nPrivate (you only) → Tailscale → direct access by port\n```\n\n- Cloudflare Tunnel handles HTTP\u002FHTTPS only (no TCP\u002FUDP)\n- Tailscale handles SSH, management UIs, game servers, any port\n- Nginx routes by Host header, all services bind to `127.0.0.1`\n- DNS wildcard (`*.domain.com`) → tunnel — no per-subdomain DNS changes needed\n\n## Setup Order\n\n1. SSH key setup (no passphrase for automation keys)\n2. SSH hardening (`PasswordAuthentication no`, `PermitRootLogin no`, `AllowUsers`)\n3. UFW firewall (default deny, allow SSH only)\n4. Fail2ban\n5. Docker + Docker Compose\n6. Tailscale (install on server + all client devices)\n7. Cloudflare Tunnel (`cloudflared tunnel create`, wildcard routing)\n8. Nginx reverse proxy (one config per subdomain)\n\n## Key Pitfalls\n\n### SSH ed25519 with passphrase fails for automation\nOn Windows MINGW64, ed25519 keys with passphrase fail silently in non-interactive mode (`sign_and_send_pubkey: we did not send a packet`). Use RSA with `-N \"\"` for automation keys.\n\n### SSH_ASKPASS for password-based SSH on Windows\n```bash\ncat > \u002Ftmp\u002Fssh_pass.sh \u003C\u003C 'SCRIPT'\n#!\u002Fbin\u002Fbash\necho 'password'\nSCRIPT\nchmod +x \u002Ftmp\u002Fssh_pass.sh\nexport SSH_ASKPASS=\"\u002Ftmp\u002Fssh_pass.sh\" SSH_ASKPASS_REQUIRE=force DISPLAY=\":0\"\nssh -o StrictHostKeyChecking=no user@host \"command\" \u003C \u002Fdev\u002Fnull\n```\n\n### Nginx can't read files in \u002Fhome\u002Fuser\nNginx runs as `www-data`. Home directory is `750` (owner-only).\n```bash\nsudo usermod -aG flowero www-data\nchmod -R g+rX \u002Fhome\u002Fflowero\u002Fpath\u002Fto\u002Fsite\n# MUST restart nginx (not reload) for group change to take effect\nsudo systemctl restart nginx\n```\n\n### HTTPS vs HTTP proxy_pass\n- Portainer (9443) = HTTPS → `proxy_pass https:\u002F\u002F` + `proxy_ssl_verify off`\n- Most services = HTTP → `proxy_pass http:\u002F\u002F`\n- SeaweedFS, AdGuard, etc. = HTTP → `proxy_pass http:\u002F\u002F`\n\n### Cloudflare Tunnel only does HTTP\u002FHTTPS\nGame servers, custom TCP\u002FUDP ports → use Tailscale directly, not Cloudflare Tunnel.\n\n### DNS for game servers \u002F custom ports\nCreate A record → Tailscale IP, **proxy OFF** (DNS only \u002F gray cloud). Orange cloud breaks non-HTTP traffic.\n\n### SeaweedFS v4.40 breaking changes\n- `-master` flag on S3 gateway changed to `-filer`\n- `security.toml` with JWT signing key causes \"wrong jwt\" on Filer UI\n- Solution: remove security.toml, use simple s3.json config without signing key\n\n### AWS CLI v2.36 + Python 3.14 bug\n`expected string or bytes-like object, got 'NoneType'` with non-AWS S3 endpoints. Use rclone or MinIO client (`mc`) instead.\n\n### Group membership needs nginx restart\n`usermod -aG` + `systemctl reload nginx` is NOT enough. Must `systemctl restart nginx` for group changes to take effect (workers keep old groups until restarted).\n\n## Port Convention\n\n| Range | Purpose |\n|-------|---------|\n| 7000–8000 | Self-hosted apps (AdGuard, Portainer) |\n| 8000–9000 | Personal projects (Gateway, Keycloak) |\n| Default ports | Databases (Postgres 5432, Valkey 6379, MongoDB 27017) |\n\n## Docker Network Pattern\n\nCreate one shared network for databases:\n```bash\ndocker network create db-network\n```\n\nIn every compose file:\n```yaml\nnetworks:\n  shared-network:\n    external: true\n    name: db-network\n```\n\nApps connect to databases by container name: `postgres:\u002F\u002Fuser@local-postgres:5432\u002Fdb`\n\n## Nginx Subdomain Template\n\n```nginx\nserver {\n    server_name service.domain.com;\n    location \u002F {\n        proxy_pass http:\u002F\u002F127.0.0.1:PORT;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n    }\n}\n```\n\nEnable: `sudo ln -s \u002Fetc\u002Fnginx\u002Fsites-available\u002Fservice.conf \u002Fetc\u002Fnginx\u002Fsites-enabled\u002F && sudo nginx -t && sudo systemctl reload nginx`\n\n## References\n\n- `references\u002Fcloudflare-tunnel-setup.md` — install, config, service setup, pitfalls\n- `references\u002Frclone-onedrive-setup.md` — OAuth token flow, drive_id, usage commands\n\n## Public vs Private Decision\n\n| Service has... | Route via |\n|----------------|----------|\n| Its own auth (login page) | Cloudflare Tunnel (public) |\n| No auth | Tailscale only (private) |\n| Database | SSH tunnel (localhost binding) |\n| S3 API | Cloudflare (credentials in code) |\n",{"name":5,"triggers":24,"description":7},[25,26,27,28,29,30,31,32],"homelab setup","server configuration","reverse proxy setup","cloudflare tunnel","tailscale setup","docker compose for self-hosted","nginx subdomain config","database container setup","main","2988869c5a7d7be2225c9ea7a54a4a56a59b0d45","workflow\u002Fhermes-main-profile\u002Fhomelab-infrastructure",0,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup","https:\u002F\u002Fgithub.com\u002Foat431","https:\u002F\u002Fpanomete.com\u002F","Hope and Luck is not a part of the strategy, \r\n\r\nSoftskill produces plan Hard skill produce product.","2026-11-03 00:43:08",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add oat431\u002Fhermes_config_backup --skill homelab-infrastructure",{"tool":48,"command":49},"bunx","bunx skills add oat431\u002Fhermes_config_backup --skill homelab-infrastructure",{"tool":51,"command":52},"pnpm","pnpm dlx skills add oat431\u002Fhermes_config_backup --skill homelab-infrastructure","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhomelab-infrastructure\u002FSKILL.md",true,[56,62],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fcloudflare-tunnel-setup.md","REFERENCE","参考文档",1307,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhomelab-infrastructure\u002Freferences\u002Fcloudflare-tunnel-setup.md",{"path":63,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Frclone-onedrive-setup.md",1441,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhomelab-infrastructure\u002Freferences\u002Frclone-onedrive-setup.md",[67,75,82,89,96,103],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":71,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7AYZ2JY3NFKAPQSC39N5F3F","project-spec-docs","Fill\u002Fupdate project_spec docs (templates, MM handoffs).","MIT","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fui-ux\u002Fproject-spec-docs\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":71,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7AYYRZPE7HQX7778558X52S","penpot-mcp","Penpot MCP: connect, verify, and fix streaming via nginx.","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fui-ux\u002Fpenpot-mcp\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7AYYNKP61CN2281VMJDXMB5","nginx-streaming-proxy","Configure nginx for streaming endpoints (SSE, MCP, WS).","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fui-ux\u002Fnginx-streaming-proxy\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":71,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7AYYJP0MDV1D3WVEEZB3SGA","branding-ci","Use for brand\u002FCI identity, style guides, and brand docs.","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fui-ux\u002Fbranding-ci\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7AYYGCXVT97DDTCM0ZJT6F6","yuanbao","Yuanbao (元宝) groups: @mention users, query info\u002Fmembers.","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fshared-skills\u002Fyuanbao\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M7AYYC2Y65NMGMD4GQXAZMMS","slidev","Create and present web-based slidedecks for developers using Slidev with Markdown, Vue components, code highlighting, animations, and interactive features. Use when building technical presentations, conference talks, code walkthroughs, teaching materials, or developer decks.","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fshared-skills\u002Fslidev\u002FSKILL.md",[],[]]