# Keycloak

## Export and import

```
kc.sh -Djgroups.bind.port=7801 export --dir /tmp/backup --realm oceanbox --users same_file
kubectl cp -n keycloak oceanbox-realm.json prod-keycloak-0:/tmp/backup/oceanbox-realm.json
kubectl cp -n keycloak oceanbox-users-0.json prod-keycloak-0:/tmp/backup/oceanbox-users-0.json
kc.sh -Djgroups.bind.port=7801 import --dir /tmp/backup
```

## Theme

The keycloak theme is maintained at [git.oceanbox.io/platform/keycloak-theme](https://git.oceanbox.io/platform/keycloak-theme) and is deployed via an init container using the `git.oceanbox.io/platform/keycloak-theme` image.
