Compare commits

...

50 Commits

Author SHA1 Message Date
notplants 5bb68c6fd7 chore: publish 10.8.1+26.6.4 release 2026-07-07 17:09:01 -04:00
notplants 980cb7693c Merge pull request 'chore: upgrade to 26.6.4' (#36) from upgrade-26.6.4 into master
Reviewed-on: coop-cloud/keycloak#36
2026-07-07 21:06:02 +00:00
autonomic-bot 06338f2f03 chore: upgrade to 26.6.4 2026-07-03 04:05:49 +00:00
notplants 12ac6db8ad Merge pull request 'upgrade-10.8.0+26.6.3' (#34) from upgrade-10.8.0+26.6.3 into master
Reviewed-on: coop-cloud/keycloak#34
2026-06-08 17:14:14 +00:00
notplants 1cfc1ebe22 chore: upgrade to 10.8.0+26.6.3 2026-06-08 17:10:41 +00:00
notplants 70c2551815 chore: upgrade to 10.7.2+26.6.2 2026-06-08 17:10:41 +00:00
trav 666649a6b7 Merge pull request 'chore: upgrade to 10.7.1+26.6.2' (#31) from upgrade-10.7.1+26.6.2 into master
Reviewed-on: coop-cloud/keycloak#31
2026-05-25 19:19:16 +00:00
trav 04400dffd5 chore: upgrade to 10.7.1+26.6.2 2026-05-25 20:03:01 +01:00
notplants bdb189b345 Merge pull request 'chore: upgrade to 10.7.0+26.6.1' (#29) from 10.7.0+26.6.1 into master
Reviewed-on: coop-cloud/keycloak#29
2026-04-27 17:52:45 +00:00
trav 0ea1e3f4ed chore: upgrade to 10.7.0+26.6.1 2026-04-27 13:45:35 -04:00
notplants a5c314f891 Merge pull request '10.6.1+26.5.4: fix backup/restore' (#24) from 10.6.1+26.5.4 into master
Reviewed-on: coop-cloud/keycloak#24
Reviewed-by: ammaratef45 <ammaratef45@proton.me>
2026-02-28 18:56:36 +00:00
notplants 3e6ca4ddc0 Merge pull request 'upgrade to 10.6.0+26.5.4' (#23) from 10.6.0+26.5.4 into master
Reviewed-on: coop-cloud/keycloak#23
Reviewed-by: cyrnel <cyrnel@noreply.git.coopcloud.tech>
Reviewed-by: ammaratef45 <ammaratef45@proton.me>
2026-02-28 18:56:14 +00:00
notplants a69ad2f1d2 bump to 10.6.1+26.5.4 2026-02-26 22:12:39 +00:00
notplants df8d472af4 fix backup/restore hooks: use volume path and correct hook ordering 2026-02-26 22:12:32 +00:00
notplants a8e9862a0e chore: upgrade to 10.6.0+26.5.4 2026-02-26 18:54:39 +00:00
3wordchant f26fcd4c95 chore: publish 10.5.1+26.4.5 release 2025-11-21 11:39:51 -05:00
cyrnel a250244f23 chore: publish 10.5.0+26.4.0 release 2025-10-17 16:18:56 -04:00
cyrnel c225bad91d Merge pull request 'chore: upgrade to v26.4.0' (#22) from 26-4-0 into master
Reviewed-on: coop-cloud/keycloak#22
2025-10-17 19:57:11 +00:00
cyrnel 868a907028 chore: upgrade to v26.4.0 2025-10-13 17:28:37 -04:00
ammaratef45 8864d5f5e8 Merge pull request 'link directly to the integration section of other recipes' (#21) from update_readme into master
Reviewed-on: coop-cloud/keycloak#21
Reviewed-by: decentral1se <decentral1se@noreply.git.coopcloud.tech>
Reviewed-by: 3wordchant <3wordchant@noreply.git.coopcloud.tech>
2025-09-16 18:55:46 +00:00
ammaratef45 a79280b7d6 link directly to the integration section of other recipes 2025-09-16 06:12:45 -07:00
knoflook 4866c6d38e chore: publish 10.4.1+26.3.2 release 2025-07-24 14:28:09 +02:00
3wordchant e66e0556c2 chore: publish 10.4.0+26.3.1 release 2025-07-23 18:12:59 +01:00
mac-chaffee eb5ff04e84 Merge pull request 'Add docs for initial admin user setup' (#20) from docs-n-deprecations into master
Reviewed-on: coop-cloud/keycloak#20
2025-06-24 12:28:52 +00:00
Mac Chaffee 35461d2f59 Convert bootstrap-admin command to one-liner 2025-06-22 09:42:20 -04:00
Mac Chaffee abcc59c07c Add docs for initial admin user setup 2025-06-21 21:56:35 -04:00
Mac Chaffee 2e863fb666 Fix deprecated traefik labels for TLS 2025-06-21 21:56:23 -04:00
cas 2c77a8fced chore: publish 10.3.1+26.2.5 release 2025-06-18 10:25:17 -07:00
3wordchant bd2ec2cd9d chore: publish 10.3.0+26.2.1 release 2025-04-23 18:38:24 +02:00
3wordchant 7af65faa5a chore: publish 10.2.1+26.1.2 release 2025-02-26 12:46:39 -05:00
3wordchant 636e81002d Add missing KC_HTTP_ENABLED 2025-02-26 12:46:02 -05:00
3wordchant d3c9fc4784 chore: publish 10.2.0+26.1.2 release 2025-02-26 12:27:10 -05:00
example 41877e765a chore: publish 10.1.1+26.0.1 release 2025-01-28 17:43:08 +01:00
example c08753a3ff fix: db backup labels 2025-01-28 17:41:20 +01:00
cas 1af583a429 Update .drone.yml 2025-01-08 10:09:13 -08:00
3wordchant ef9fbd5436 Add KC_PROXY_HEADERS to make self-service account URL work 2024-11-30 18:50:30 -05:00
3wordchant 1ee9f5e5d7 chore: publish 10.1.0+26.0.1 release 2024-10-23 14:23:23 -04:00
3wordchant 88b9c3df1d Add caddy support 2024-10-23 14:22:58 -04:00
trav 9050321e50 chore: publish 10.0.1+26.0.1 release 2024-10-23 13:51:04 -04:00
trav d63bb8bc54 fix login http form 2024-10-23 13:49:23 -04:00
trav 6053df415e chore: publish 10.0.0+26.0.1 release 2024-10-23 13:30:11 -04:00
3wordchant ab009bae84 chore: publish 9.0.0+25.0.6 release 2024-10-02 13:30:05 -04:00
3wordchant b02db66093 chore: publish 8.0.1+23.0.6 release 2024-02-08 14:37:28 -03:00
3wordchant a4ce30cc5c chore: publish 8.0.0+23.0.0 release 2023-11-27 12:11:46 +00:00
3wordchant e7360c2a16 chore: publish 7.2.0+22.0.5 release 2023-11-22 15:27:32 +00:00
3wordchant 5b83f487ec Fix compose file version 2023-11-22 15:25:43 +00:00
3wordchant 3d42a26b9e Make persistent theme volume optional 2023-11-22 15:23:27 +00:00
knoflook 6aac16ebd6 chore: publish 7.1.0+22.0.5 release 2023-11-22 16:15:42 +01:00
cas a5aae68446 chore: publish 7.0.2+22.0.5 release 2023-11-09 09:47:55 -08:00
3wordchant 82f6ad5d52 chore: publish 7.0.1+22.0.4 release 2023-10-23 13:56:16 +01:00
7 changed files with 63 additions and 21 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ steps:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
- toolshed/auto-recipes-catalogue-json
trigger:
event: tag
+5
View File
@@ -8,6 +8,11 @@ LETS_ENCRYPT_ENV=production
ADMIN_USERNAME=admin
WELCOME_THEME=keycloak
COMPOSE_FILE="compose.yml"
SECRET_DB_ROOT_PASSWORD_VERSION=v1
SECRET_DB_PASSWORD_VERSION=v1
SECRET_ADMIN_PASSWORD_VERSION=v1
# Enable persistent theme volume, if you want to apply a custom theme
#COMPOSE_FILE="$COMPOSE_FILE:compose.theme.yml"
+27 -3
View File
@@ -20,11 +20,25 @@
1. Set up Docker Swarm and [`abra`][abra]
2. Deploy [`coop-cloud/traefik`][cc-traefik]
3. `abra app new keycloak --secrets` (optionally with `--pass` if you'd like
to save secrets in `pass`)
to save secrets in `pass`). Make sure to note the `admin_password` which is needed for initial setup.
4. `abra app config YOURAPPDOMAIN` - be sure to change `$DOMAIN` to something that resolves to
your Docker swarm box
5. `abra app deploy YOURAPPDOMAIN`
## Replacing the temporary admin user
When you first deploy Keycloak, you will login in as a temporary admin user with the username "admin" and a random password generated in step 3 above. You need to create a real admin user and delete the temp admin user, because the temp admin user has no 2FA and its password is stored in plain text on the server, which is insecure. Here's how to create the real admin user:
1. Click "Users" then "Add user"
2. For "required user actions", I recommend setting "Configure OTP" and "Update Password" to ensure 2FA is enabled.
3. Set a username, then click "Create"
5. Go to the "Role Mapping" tab and click "Assign role"
6. Change the filter from "Filter by clients" to "Filter by realm roles". Select the box for "role_admin" and click "Assign". This makes the user become an admin.
7. Go to the "Credentials" tab. Click "Set password". Set it to something random and save it for the next step. Leave "Temporary" enabled so the user has to change the password on first login.
8. If this is an admin account for you, then log out and back in as the new admin user and complete the password change and OTP steps. If this is an admin account for someone else, securely send the initial username and password to the user. They must complete the password change and OTP setup when they first log in.
Once at least one real admin user is set up, you should then delete the temporary "admin" user.
## How do I setup a custom theme?
Check [this approach](https://git.autonomic.zone/ruangrupa/login.lumbung.space).
@@ -35,12 +49,22 @@ Check [this approach](https://git.autonomic.zone/ruangrupa/login.lumbung.space).
- Create the user and set a temporary password
- Under the `Role Mappings` tab, move `admin` from `Available Roles` into `Assigned Roles`
## What do I do if I lost my admin account credentials?
You can create a new admin account like this:
```
abra app run <domain> app -- bash -c '/opt/keycloak/bin/kc.sh bootstrap-admin user --db-password $(cat /run/secrets/db_password)'
```
Make sure to delete the temp-admin user after you finish recovering.
## How do I configure Keycloak login for..
- [Nextcloud][nextcloud]
- [Peertube][peertube]
[nextcloud]: https://git.coopcloud.tech/coop-cloud/nextcloud
[peertube]: https://git.coopcloud.tech/coop-cloud/peertube
[nextcloud]: https://git.coopcloud.tech/coop-cloud/nextcloud#how-do-i-integrate-with-keycloak-sso
[peertube]: https://git.coopcloud.tech/coop-cloud/peertube#plugins
[abra]: https://git.autonomic.zone/autonomic-cooperative/abra
[cc-traefik]: https://git.autonomic.zone/coop-cloud/traefik
+7
View File
@@ -0,0 +1,7 @@
services:
app:
volumes:
- "themes:/opt/keycloak/themes"
volumes:
themes:
+17 -17
View File
@@ -1,9 +1,6 @@
---
version: "3.8"
services:
app:
image: "keycloak/keycloak:22.0.1"
image: "keycloak/keycloak:26.6.4"
entrypoint: >
bash -c "KEYCLOAK_ADMIN_PASSWORD=\"$$(cat /run/secrets/admin_password)\" KC_DB_PASSWORD=\"$$(cat /run/secrets/db_password)\" /opt/keycloak/bin/kc.sh start"
networks:
@@ -16,11 +13,13 @@ services:
- KC_DB=mariadb
- KC_DB_URL_DATABASE=keycloak
- KC_DB_URL_HOST=db
- KC_HOSTNAME=${DOMAIN}
- KC_HOSTNAME=https://${DOMAIN}
- KC_PROXY=edge
- KC_SPI_CONNECTIONS_JPA_LEGACY_MIGRATION_STRATEGY=update
- KEYCLOAK_ADMIN=${ADMIN_USERNAME}
- KEYCLOAK_WELCOME_THEME=${WELCOME_THEME}
- KC_PROXY_HEADERS=xforwarded
- KC_HTTP_ENABLED=true
# NOTE(3wc): disabled due to missing curl binary, see
# https://git.coopcloud.tech/coop-cloud/keycloak/issues/15
# healthcheck:
@@ -30,7 +29,7 @@ services:
# retries: 10
# start_period: 1m
volumes:
- "themes:/opt/keycloak/themes"
- "providers:/opt/keycloak/providers"
depends_on:
- mariadb
deploy:
@@ -44,12 +43,15 @@ services:
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version=7.0.0+22.0.1"
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectscheme.permanent=true"
- "caddy=${DOMAIN}"
- "caddy.reverse_proxy={{upstreams 8080}}"
- "caddy.tls.on_demand="
- "coop-cloud.${STACK_NAME}.version=10.8.1+26.6.4"
db:
image: "mariadb:10.11"
image: "mariadb:12.3"
environment:
- MYSQL_DATABASE=keycloak
- MYSQL_USER=keycloak
@@ -65,12 +67,10 @@ services:
deploy:
labels:
backupbot.backup: "true"
backupbot.backup.path: "/tmp/dump.sql.gz"
backupbot.backup.post-hook: "rm -f /tmp/dump.sql.gz"
backupbot.backup.pre-hook: "sh -c 'mysqldump -u root -p\"$$(cat /run/secrets/db_root_password)\" keycloak | gzip > /tmp/dump.sql.gz'"
backupbot.restore.pre-hook: "sh -c 'cd /tmp && gzip -d dump.sql.gz'"
backupbot.restore: "true"
backupbot.restore.post-hook: "sh -c 'mysql -u root -p\"$$(cat /run/secrets/db_root_password)\" keycloak < /tmp/dump.sql && rm -f /tmp/dump.sql'"
backupbot.backup.volumes.mariadb.path: "dump.sql.gz"
backupbot.backup.pre-hook: "sh -c 'mariadb-dump -u root -p\"$$(cat /run/secrets/db_root_password)\" keycloak | gzip > /var/lib/mysql/dump.sql.gz'"
backupbot.backup.post-hook: "rm -f /var/lib/mysql/dump.sql.gz"
backupbot.restore.post-hook: "sh -c 'gzip -d /var/lib/mysql/dump.sql.gz && mariadb -u root -p\"$$(cat /run/secrets/db_root_password)\" keycloak < /var/lib/mysql/dump.sql && rm -f /var/lib/mysql/dump.sql'"
networks:
internal:
@@ -90,4 +90,4 @@ secrets:
volumes:
mariadb:
themes:
providers:
+1
View File
@@ -0,0 +1 @@
See here for possible breaking changes: https://www.keycloak.org/docs/latest/upgrading/#migrating-to-26-4-0
+5
View File
@@ -0,0 +1,5 @@
A persistent volume for themes is now optional, and not enabled by default.
If you are using a custom theme, consult the recipe `.env.sample` to see the new
variables you need to add. You can use `abra app check ...` to verify that
they've been added correctly.