[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AYFJWXFA3SAW2K6GKQ39T6":3,"skill-same:01M7AYFJWXFA3SAW2K6GKQ39T6":60},{"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":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":6,"ownerHtmlUrl":36,"ownerBlogUrl":37,"ownerDescription":38,"updatedAt":39,"install":40,"resources":53},"01M7AYFJWXFA3SAW2K6GKQ39T6","keycloak-docker",null,"Deploy, configure, and troubleshoot Keycloak in Docker containers. Covers realm-as-code, proxy configuration, single-node optimizations, and common pitfalls.","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\u002Fdevops\u002Fkeycloak-docker\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: keycloak-docker\ndescription: Deploy, configure, and troubleshoot Keycloak in Docker containers. Covers realm-as-code, proxy configuration, single-node optimizations, and common pitfalls.\ntriggers:\n  - keycloak deployment\n  - keycloak docker\n  - keycloak troubleshooting\n  - realm import failed\n  - keycloak proxy headers\n  - keycloak admin bootstrap\n---\n\n# Keycloak Docker Deployment\n\nDeploy and operate Keycloak as a Docker container. Covers configuration, realm management, proxy setup, and the most common pitfalls that cause deployment failures.\n\n## When to Use\n\n- Deploying Keycloak for the first time in Docker\n- Troubleshooting Keycloak container crashes or startup failures\n- Configuring Keycloak behind a reverse proxy (Nginx, Cloudflare)\n- Managing realm configuration as code (JSON export\u002Fimport)\n\n## Prerequisites\n\n- Docker + Docker Compose\n- PostgreSQL (shared or dedicated)\n- Reverse proxy (Nginx) if exposing externally\n- Realm JSON file (if importing on startup)\n\n## Deployment\n\n### Docker Compose Template\n\n```yaml\nservices:\n  keycloak:\n    image: quay.io\u002Fkeycloak\u002Fkeycloak:latest\n    container_name: flowero-guard\n    ports:\n      - \"127.0.0.1:8001:8080\"   # Always bind to localhost behind reverse proxy\n    environment:\n      KC_DB: postgres\n      KC_DB_URL: jdbc:postgresql:\u002F\u002F\u003Cpg-container>:5432\u002F\u003Cdb-name>\n      KC_DB_USERNAME: \u003Cdb-user>\n      KC_DB_PASSWORD: ${KC_DB_PASSWORD}\n      KC_BOOTSTRAP_ADMIN_USERNAME: ${KC_BOOTSTRAP_ADMIN_USERNAME}  # NOT KEYCLOAK_ADMIN (deprecated in KC 26+)\n      KC_BOOTSTRAP_ADMIN_PASSWORD: ${KC_BOOTSTRAP_ADMIN_PASSWORD}\n      KC_HOSTNAME: \u003Cexternal-domain>\n      KC_HTTP_ENABLED: \"true\"\n      KC_PROXY_HEADERS: xforwarded   # NOT KC_PROXY=edge (deprecated)\n      KC_CACHE: local                # Required for single-node deployments\n    command: [\"start\", \"--import-realm\"]\n    volumes:\n      - .\u002Frealm.json:\u002Fopt\u002Fkeycloak\u002Fdata\u002Fimport\u002Frealm.json:ro\n    networks:\n      - shared-network\n    restart: unless-stopped\n    deploy:\n      resources:\n        limits:\n          memory: 1G\n\nnetworks:\n  shared-network:\n    external: true\n    name: db-network  # Or whatever the shared network is called\n```\n\n### Key Environment Variables\n\n| Variable | Value | Notes |\n|----------|-------|-------|\n| `KC_DB` | `postgres` | Database vendor |\n| `KC_DB_URL` | `jdbc:postgresql:\u002F\u002F\u003Ccontainer>:5432\u002F\u003Cdb>` | Use container name on Docker network, NOT `host.docker.internal` |\n| `KC_BOOTSTRAP_ADMIN_USERNAME` | `admin` | Creates TEMPORARY admin (KC 26+). Use Post Install to create permanent admin. |\n| `KC_BOOTSTRAP_ADMIN_PASSWORD` | *(from .env)* | Never commit |\n| `KC_HOSTNAME` | `auth.example.com` | Must match reverse proxy `server_name` |\n| `KC_HTTP_ENABLED` | `true` | Accept HTTP internally (proxy handles TLS) |\n| `KC_PROXY_HEADERS` | `xforwarded` | Trust X-Forwarded-* headers from proxy |\n| `KC_CACHE` | `local` | **Critical for single-node** — disables JGroups clustering |\n\n## Nginx Reverse Proxy\n\n```nginx\nserver {\n    server_name auth.example.com;\n    client_max_body_size 10M;  # Keycloak POST bodies can be large\n\n    location \u002F {\n        proxy_pass http:\u002F\u002F127.0.0.1:8001;\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 https;  # HARDCODE https when behind Cloudflare\n        proxy_set_header X-Forwarded-Host $host;\n    }\n}\n```\n\n**Critical:** When behind Cloudflare Tunnel, Nginx receives HTTP (Cloudflare terminates TLS). `$scheme` would be `http`, causing Keycloak to reject requests with \"HTTPS required\". Hardcode `X-Forwarded-Proto: https`.\n\n## Realm Management\n\n### Import on Startup\n\nMount realm JSON to `\u002Fopt\u002Fkeycloak\u002Fdata\u002Fimport\u002F` and use `--import-realm` flag:\n```yaml\ncommand: [\"start\", \"--import-realm\"]\nvolumes:\n  - .\u002Frealm.json:\u002Fopt\u002Fkeycloak\u002Fdata\u002Fimport\u002Frealm.json:ro\n```\n\n### Export After Changes\n\nAfter ANY change in Admin Console:\n1. Admin Console → Realm Settings → Action → Partial Export\n2. Check \"Include groups and roles\" + \"Include clients\"\n3. Save JSON to version control\n\n### Realm JSON Rules\n\n- `\"sslRequired\": \"none\"` when behind proxy that handles TLS\n- Remove `default-roles-panomete` composite client role references (Keycloak creates defaults automatically)\n- `optionalClientScopes` must reference scopes that exist in `clientScopes` array\n- No plaintext passwords in JSON\n\n## Common Pitfalls\n\nSee `references\u002Fpitfalls.md` for detailed error messages and fixes.\n\n1. **Docker creates directory instead of file** — If realm JSON doesn't exist on host when container starts, Docker auto-creates a directory at the bind mount path\n2. **JGroups clustering timeout** — Without `KC_CACHE=local`, single-node deployments waste 20+ seconds on cluster JOIN attempts\n3. **Deprecated env vars** — `KC_PROXY=edge` → `KC_PROXY_HEADERS=xforwarded`; `KEYCLOAK_ADMIN` → `KC_BOOTSTRAP_ADMIN_USERNAME`\n4. **HTTPS required error** — Nginx must hardcode `X-Forwarded-Proto: https` when behind Cloudflare\n5. **Temporary admin warning** — By design in KC 26+. Create permanent admin via Admin Console, delete temporary one.\n6. **Composite role import failure** — Remove client role references from `default-roles-panomete` in realm JSON\n7. **curl not in JRE images** — Health checks using `curl` fail in minimal JRE images. Install curl in Dockerfile.\n\n## Post Install (First Deploy)\n\n1. Log in with temporary admin (`KC_BOOTSTRAP_ADMIN_USERNAME`)\n2. Users → Create new user → set credentials (Temporary: OFF) → assign `admin` role\n3. Log out, log in with permanent admin\n4. Delete temporary admin\n5. Update `.env` to document new username (password in password manager only)\n\n## Verification\n\n```bash\n# Health\ncurl -sf http:\u002F\u002Flocalhost:8001\u002Fhealth\u002Fready\n\n# OIDC Discovery\ncurl -sf https:\u002F\u002Fauth.example.com\u002Frealms\u002F\u003Crealm>\u002F.well-known\u002Fopenid-configuration | jq .issuer\n\n# JWKS\ncurl -sf https:\u002F\u002Fauth.example.com\u002Frealms\u002F\u003Crealm>\u002Fprotocol\u002Fopenid-connect\u002Fcerts | jq '.keys | length'\n\n# Admin Console\ncurl -sf -o \u002Fdev\u002Fnull -w '%{http_code}' https:\u002F\u002Fauth.example.com\u002Fadmin\u002F\n# 302 = redirect to login = working\n```\n","# Keycloak Docker Deployment\n\nDeploy and operate Keycloak as a Docker container. Covers configuration, realm management, proxy setup, and the most common pitfalls that cause deployment failures.\n\n## When to Use\n\n- Deploying Keycloak for the first time in Docker\n- Troubleshooting Keycloak container crashes or startup failures\n- Configuring Keycloak behind a reverse proxy (Nginx, Cloudflare)\n- Managing realm configuration as code (JSON export\u002Fimport)\n\n## Prerequisites\n\n- Docker + Docker Compose\n- PostgreSQL (shared or dedicated)\n- Reverse proxy (Nginx) if exposing externally\n- Realm JSON file (if importing on startup)\n\n## Deployment\n\n### Docker Compose Template\n\n```yaml\nservices:\n  keycloak:\n    image: quay.io\u002Fkeycloak\u002Fkeycloak:latest\n    container_name: flowero-guard\n    ports:\n      - \"127.0.0.1:8001:8080\"   # Always bind to localhost behind reverse proxy\n    environment:\n      KC_DB: postgres\n      KC_DB_URL: jdbc:postgresql:\u002F\u002F\u003Cpg-container>:5432\u002F\u003Cdb-name>\n      KC_DB_USERNAME: \u003Cdb-user>\n      KC_DB_PASSWORD: ${KC_DB_PASSWORD}\n      KC_BOOTSTRAP_ADMIN_USERNAME: ${KC_BOOTSTRAP_ADMIN_USERNAME}  # NOT KEYCLOAK_ADMIN (deprecated in KC 26+)\n      KC_BOOTSTRAP_ADMIN_PASSWORD: ${KC_BOOTSTRAP_ADMIN_PASSWORD}\n      KC_HOSTNAME: \u003Cexternal-domain>\n      KC_HTTP_ENABLED: \"true\"\n      KC_PROXY_HEADERS: xforwarded   # NOT KC_PROXY=edge (deprecated)\n      KC_CACHE: local                # Required for single-node deployments\n    command: [\"start\", \"--import-realm\"]\n    volumes:\n      - .\u002Frealm.json:\u002Fopt\u002Fkeycloak\u002Fdata\u002Fimport\u002Frealm.json:ro\n    networks:\n      - shared-network\n    restart: unless-stopped\n    deploy:\n      resources:\n        limits:\n          memory: 1G\n\nnetworks:\n  shared-network:\n    external: true\n    name: db-network  # Or whatever the shared network is called\n```\n\n### Key Environment Variables\n\n| Variable | Value | Notes |\n|----------|-------|-------|\n| `KC_DB` | `postgres` | Database vendor |\n| `KC_DB_URL` | `jdbc:postgresql:\u002F\u002F\u003Ccontainer>:5432\u002F\u003Cdb>` | Use container name on Docker network, NOT `host.docker.internal` |\n| `KC_BOOTSTRAP_ADMIN_USERNAME` | `admin` | Creates TEMPORARY admin (KC 26+). Use Post Install to create permanent admin. |\n| `KC_BOOTSTRAP_ADMIN_PASSWORD` | *(from .env)* | Never commit |\n| `KC_HOSTNAME` | `auth.example.com` | Must match reverse proxy `server_name` |\n| `KC_HTTP_ENABLED` | `true` | Accept HTTP internally (proxy handles TLS) |\n| `KC_PROXY_HEADERS` | `xforwarded` | Trust X-Forwarded-* headers from proxy |\n| `KC_CACHE` | `local` | **Critical for single-node** — disables JGroups clustering |\n\n## Nginx Reverse Proxy\n\n```nginx\nserver {\n    server_name auth.example.com;\n    client_max_body_size 10M;  # Keycloak POST bodies can be large\n\n    location \u002F {\n        proxy_pass http:\u002F\u002F127.0.0.1:8001;\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 https;  # HARDCODE https when behind Cloudflare\n        proxy_set_header X-Forwarded-Host $host;\n    }\n}\n```\n\n**Critical:** When behind Cloudflare Tunnel, Nginx receives HTTP (Cloudflare terminates TLS). `$scheme` would be `http`, causing Keycloak to reject requests with \"HTTPS required\". Hardcode `X-Forwarded-Proto: https`.\n\n## Realm Management\n\n### Import on Startup\n\nMount realm JSON to `\u002Fopt\u002Fkeycloak\u002Fdata\u002Fimport\u002F` and use `--import-realm` flag:\n```yaml\ncommand: [\"start\", \"--import-realm\"]\nvolumes:\n  - .\u002Frealm.json:\u002Fopt\u002Fkeycloak\u002Fdata\u002Fimport\u002Frealm.json:ro\n```\n\n### Export After Changes\n\nAfter ANY change in Admin Console:\n1. Admin Console → Realm Settings → Action → Partial Export\n2. Check \"Include groups and roles\" + \"Include clients\"\n3. Save JSON to version control\n\n### Realm JSON Rules\n\n- `\"sslRequired\": \"none\"` when behind proxy that handles TLS\n- Remove `default-roles-panomete` composite client role references (Keycloak creates defaults automatically)\n- `optionalClientScopes` must reference scopes that exist in `clientScopes` array\n- No plaintext passwords in JSON\n\n## Common Pitfalls\n\nSee `references\u002Fpitfalls.md` for detailed error messages and fixes.\n\n1. **Docker creates directory instead of file** — If realm JSON doesn't exist on host when container starts, Docker auto-creates a directory at the bind mount path\n2. **JGroups clustering timeout** — Without `KC_CACHE=local`, single-node deployments waste 20+ seconds on cluster JOIN attempts\n3. **Deprecated env vars** — `KC_PROXY=edge` → `KC_PROXY_HEADERS=xforwarded`; `KEYCLOAK_ADMIN` → `KC_BOOTSTRAP_ADMIN_USERNAME`\n4. **HTTPS required error** — Nginx must hardcode `X-Forwarded-Proto: https` when behind Cloudflare\n5. **Temporary admin warning** — By design in KC 26+. Create permanent admin via Admin Console, delete temporary one.\n6. **Composite role import failure** — Remove client role references from `default-roles-panomete` in realm JSON\n7. **curl not in JRE images** — Health checks using `curl` fail in minimal JRE images. Install curl in Dockerfile.\n\n## Post Install (First Deploy)\n\n1. Log in with temporary admin (`KC_BOOTSTRAP_ADMIN_USERNAME`)\n2. Users → Create new user → set credentials (Temporary: OFF) → assign `admin` role\n3. Log out, log in with permanent admin\n4. Delete temporary admin\n5. Update `.env` to document new username (password in password manager only)\n\n## Verification\n\n```bash\n# Health\ncurl -sf http:\u002F\u002Flocalhost:8001\u002Fhealth\u002Fready\n\n# OIDC Discovery\ncurl -sf https:\u002F\u002Fauth.example.com\u002Frealms\u002F\u003Crealm>\u002F.well-known\u002Fopenid-configuration | jq .issuer\n\n# JWKS\ncurl -sf https:\u002F\u002Fauth.example.com\u002Frealms\u002F\u003Crealm>\u002Fprotocol\u002Fopenid-connect\u002Fcerts | jq '.keys | length'\n\n# Admin Console\ncurl -sf -o \u002Fdev\u002Fnull -w '%{http_code}' https:\u002F\u002Fauth.example.com\u002Fadmin\u002F\n# 302 = redirect to login = working\n```\n",{"name":5,"triggers":24,"description":7},[25,26,27,28,29,30],"keycloak deployment","keycloak docker","keycloak troubleshooting","realm import failed","keycloak proxy headers","keycloak admin bootstrap","main","2988869c5a7d7be2225c9ea7a54a4a56a59b0d45","workflow\u002Fdevops\u002Fkeycloak-docker",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":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add oat431\u002Fhermes_config_backup --skill keycloak-docker",{"tool":46,"command":47},"bunx","bunx skills add oat431\u002Fhermes_config_backup --skill keycloak-docker",{"tool":49,"command":50},"pnpm","pnpm dlx skills add oat431\u002Fhermes_config_backup --skill keycloak-docker","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fdevops\u002Fkeycloak-docker\u002FSKILL.md",true,[54],{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fpitfalls.md","REFERENCE","参考文档",5819,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fdevops\u002Fkeycloak-docker\u002Freferences\u002Fpitfalls.md",[61,69,76,83,90,97],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"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":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"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":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"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":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"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":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"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":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"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",[],[]]