Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ DEMO_USERS=
# After the first initialization, the admin password can only be changed via the OpenCloud User Settings UI or by using the OpenCloud CLI.
# Documentation: https://docs.opencloud.eu/docs/admin/resources/common-issues#-change-admin-password-set-in-env
INITIAL_ADMIN_PASSWORD=
# To read the admin password from ./secrets/idm_admin_password instead, add
# secrets/idm-admin-password.yml to COMPOSE_FILE and leave INITIAL_ADMIN_PASSWORD empty.
# Whether clients should check for updates.
# Defaults to "true".
CHECK_FOR_UPDATES=
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@
# exclude the certificates config folder
/config/traefik/dynamic/*
!/config/traefik/dynamic/.gitkeep

# exclude local secrets
/secrets/idm_admin_password
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ Key variables:
|-------------------------------|-------------------------------------------------------|------------------------------|
| `COMPOSE_FILE` | Colon-separated list of compose files to use | (commented out) |
| `OC_DOMAIN` | OpenCloud domain | cloud.opencloud.test |
| `INITIAL_ADMIN_PASSWORD ` | OpenCloud password for the admin user | (no value) |
| `INITIAL_ADMIN_PASSWORD` | OpenCloud password for the admin user | (no value) |
| `OC_DOCKER_TAG` | OpenCloud image tag | latest |
| `OC_CONFIG_DIR` | Config directory path | (Docker volume) |
| `OC_DATA_DIR` | Data directory path | (Docker volume) |
Expand Down Expand Up @@ -427,6 +427,15 @@ For external LDAP servers, the admin password is managed by the LDAP server itse
```
INITIAL_ADMIN_PASSWORD=your-secure-password-here
```
Alternatively, use Docker secrets:

```bash
mkdir -p secrets
printf '%s' 'your-secure-password-here' > secrets/idm_admin_password
COMPOSE_FILE=docker-compose.yml:secrets/idm-admin-password.yml
```

Leave `INITIAL_ADMIN_PASSWORD` empty when using `IDM_ADMIN_PASSWORD_FILE`.

For more details, see the [OpenCloud documentation](https://docs.opencloud.eu/docs/admin/resources/common-issues#-change-admin-password-set-in-env).

Expand Down
11 changes: 11 additions & 0 deletions secrets/idm-admin-password.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
services:
opencloud:
environment:
IDM_ADMIN_PASSWORD_FILE: /run/secrets/idm_admin_password
secrets:
- idm_admin_password

secrets:
idm_admin_password:
file: ./secrets/idm_admin_password