{"id":26681281,"url":"https://github.com/notyusheng/open-webui_keycloak","last_synced_at":"2026-01-06T06:13:28.494Z","repository":{"id":284290574,"uuid":"953737032","full_name":"NotYuSheng/open-webui_keycloak","owner":"NotYuSheng","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-25T06:27:43.000Z","size":2,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T06:27:56.550Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NotYuSheng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-03-24T01:53:58.000Z","updated_at":"2025-03-25T06:27:46.000Z","dependencies_parsed_at":"2025-03-25T06:38:01.851Z","dependency_job_id":null,"html_url":"https://github.com/NotYuSheng/open-webui_keycloak","commit_stats":null,"previous_names":["notyusheng/open-webui_keycloak"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotYuSheng%2Fopen-webui_keycloak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotYuSheng%2Fopen-webui_keycloak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotYuSheng%2Fopen-webui_keycloak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotYuSheng%2Fopen-webui_keycloak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotYuSheng","download_url":"https://codeload.github.com/NotYuSheng/open-webui_keycloak/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245605710,"owners_count":20643030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-03-26T07:15:10.342Z","updated_at":"2026-01-06T06:13:28.489Z","avatar_url":"https://github.com/NotYuSheng.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# open-webui_keycloak\n\nA Docker Compose setup that integrates [Keycloak](https://www.keycloak.org/getting-started/getting-started-docker) (an open-source identity and access management solution) with the [open-webui](https://github.com/open-webui/open-webui) interface. This project provides a ready-to-run environment for managing authentication via OAuth and OpenID Connect.\n\n## Prerequisites\n- Docker\n- Docker Compose\n\n## Installation\n1. **Clone the Repository**\n   ```bash\n   git clone https://github.com/notyusheng/open-webui_keycloak.git\n   cd open-webui_keycloak\n   ```\n2. **Configure Environment Variables**\n   \n   An example environment file (`example.env`) is provided. It contains variables for both the Keycloak and open-webui services. Update the file as needed:\n\n   Rename or copy `example.env` to `.env` (or use it directly with the Docker Compose command):\n   ```bash\n   cp example.env .env\n   ```\n\n3. **Run Docker Compose**\n   Start the services with:\n   ```bash\n   docker compose up -d\n   ```\n   Docker Compose will automatically load the environment variables from the `.env` file.\n\n## Post-Installation Keycloak Setup\n\nAfter starting your containers, follow these steps to configure Keycloak for integration with open-webui:\n\n1. **Create a Client in Keycloak:**\n   - **Log In:** Access the Keycloak admin console using your bootstrap admin credentials.\n   - **Navigate to Clients:** Click on the **Clients** section in the left-hand menu.\n   - **Create a Client:** Click the **Create client** button.\n     - **Client ID:** Define a unique client ID (e.g., `open-webui`).\n     - **Client Protocol:** Select **OpenID Connect** as the client type.\n     - Click **Next** to proceed.\n\n![General Settings](documentation/setup01.png)\n\n2. **Configure Client Capabilities:**\n   - **Client Authorization:** In the capability configuration section, toggle **Client authorization** to **ON**.\n   - Click **Next** to continue.\n\n![Capability Config](documentation/setup02.png)\n\n3. **Set Login Settings:**\n   - **Valid Redirect URIs:** In the Login Settings tab, update the **Valid redirect URIs** field with your open-webui callback URL. For example:\n     ```\n     http://your-open-webui-domain/oauth/oidc/callback\n     ```\n   - **Optional Settings:** Optionally, set the **Root URL** or **Home URL** for your Keycloak instance.\n\n![Login settings](documentation/setup03.png)\n\n4. **Save and Record Credentials:**\n   - **Client Credentials:** After saving the client configuration, note down the client ID you defined.\n   - **Client Secret:** Navigate to the **Credentials** tab to retrieve the client secret.\n   - **Update Environment:** Paste the client ID and client secret into your `.env` file so that open-webui can authenticate with Keycloak.\n\n5. **Create a User for open-webui:**\n   - **Navigate to Users:** In the Keycloak admin console, go to the **Users** section.\n   - **Add a User:** Click **Add user** and complete the required details for the new user.\n   - **Set Password \u0026 Permissions:** Configure the user’s password and assign any necessary roles or permissions required for open-webui access.\n\n6. **Verify Your Setup:**\n   - Visit the open-webui login page.\n   - Attempt to log in with the newly created user credentials.\n   - A successful login and redirection to open-webui confirms that your Keycloak configuration is working as expected.\n  \n## Reference\nThis project takes references from the step-by-step guide from Joshua Stock.\n\nFor more information, please check out the original guide:\n[Getting Started with Authentik or Keycloak and Open Web UI – A Step-by-Step Guide](https://blog.joshuastock.net/getting-started-with-authentik-or-keycloak-and-open-web-ui-a-step-by-step-guide)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotyusheng%2Fopen-webui_keycloak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotyusheng%2Fopen-webui_keycloak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotyusheng%2Fopen-webui_keycloak/lists"}