|
2 | 2 |
|
3 | 3 | A self-contained Cryptomator Hub stack with pinned image versions for trying Hub on your machine. [`compose.yaml`](compose.yaml) is the only file you need; it does not reference anything else in this repository. |
4 | 4 |
|
5 | | -Requirements: Docker Compose ≥ 2.23.1 (inline `configs.content`). |
| 5 | +Requirements: Docker Compose ≥ 2.23.1. |
6 | 6 |
|
7 | | -## Quick start |
| 7 | +1. Download [`compose.yaml`](compose.yaml) into an empty directory. |
| 8 | +2. `docker compose up` |
| 9 | +3. Wait until all services are `healthy` (Keycloak imports the realm on first start), then open Hub at <http://localhost:8080> or the Keycloak admin console at <http://localhost:8180>, both `admin` / `admin`. |
8 | 10 |
|
9 | | -Download [`compose.yaml`](compose.yaml) (or copy it from this directory) and start the stack: |
| 11 | +Everything runs on plain HTTP with well-known passwords — for evaluation only. To change ports or hostnames, follow the comments in `compose.yaml`; the realm is imported on Keycloak's first boot only, so `docker compose down -v` to start over after changing URLs. |
10 | 12 |
|
11 | | -```bash |
12 | | -docker compose up |
13 | | -``` |
14 | | - |
15 | | -Wait until all three services report `healthy` (about a minute on first start, Keycloak imports the realm), then open: |
16 | | - |
17 | | -| URL | Credentials | |
18 | | -|---|---| |
19 | | -| Hub: <http://localhost:8080> | `admin` / `admin` | |
20 | | -| Keycloak admin console: <http://localhost:8180> | `admin` / `admin` | |
21 | | - |
22 | | -On first login Hub asks for a license. Any Hub license works for testing; see <https://cryptomator.org/hub/> on how to obtain one. Afterwards, add users and groups in Keycloak (realm `cryptomator`) — Hub syncs them every minute. To connect a Cryptomator desktop or mobile app, create a vault in Hub and follow the instructions shown there. |
23 | | - |
24 | | -## What the stack contains |
25 | | - |
26 | | -- `postgres` with two databases (`hub`, `keycloak`), persisted in the named volume `postgres-data`. |
27 | | -- `ghcr.io/cryptomator/keycloak` — the stock Keycloak image plus the Cryptomator login theme and `curl` for the health check. A minimal `cryptomator` realm (one admin user, the OIDC clients `cryptomatorhub`, `cryptomator` and `cryptomatorhub-system`) is embedded in the compose file and imported on first boot. It matches what the Helm chart renders in `chart/templates/_realm.tpl`. |
28 | | -- `ghcr.io/cryptomator/hub` — the Hub application, configured through environment variables; the same settings the Helm chart uses. |
29 | | - |
30 | | -## Changing ports or hostnames |
31 | | - |
32 | | -The two published ports (`8080` for Hub, `8180` for Keycloak) appear in several places that must stay consistent: the `ports` mappings, `KC_HOSTNAME`, `HUB_KEYCLOAK_PUBLIC_URL`, `QUARKUS_OIDC_TOKEN_ISSUER`, the `connect-src` entry of the Content Security Policy, and the `redirectUris` / `frame-ancestors` of the embedded realm. Update all of them together. |
33 | | - |
34 | | -> [!TIP] |
35 | | -> Keycloak imports the realm **only on first boot** — `--import-realm` never overwrites an existing realm. If you change URLs after the first start, Keycloak keeps the old redirect URIs and login fails with `Invalid parameter: redirect_uri`. Either edit the `cryptomatorhub` client in the Keycloak admin console, or reset everything with `docker compose down -v` (this deletes the database, including all vaults). |
36 | | -
|
37 | | -## Not for production |
38 | | - |
39 | | -This file is meant for evaluation only: |
40 | | - |
41 | | -- All passwords (`admin`, `hub`, `keycloak`, `top-secret`) are well-known defaults. |
42 | | -- Everything runs on plain HTTP on `localhost`; no TLS is configured. Hub's crypto happens in the browser and requires a secure context, which browsers grant to `localhost` but not to other plain-HTTP hosts. |
43 | | -- No backups, resource limits or upgrade strategy. |
44 | | - |
45 | | -For real deployments use the Helm chart, see [`../../helm/prod/`](../../helm/prod/README.md) — it generates secrets, supports external PostgreSQL/Keycloak and terminates TLS at the ingress. |
46 | | - |
47 | | -## Upgrading |
48 | | - |
49 | | -Image versions are pinned in `compose.yaml`. To upgrade, change the tags and run `docker compose up -d`. Hub applies database migrations automatically at start; Keycloak upgrades follow the [Keycloak upgrade guide](https://www.keycloak.org/docs/latest/upgrading/). Always back up the `postgres-data` volume first. |
50 | | - |
51 | | -PostgreSQL minor updates (e.g. `18.6` → `18.7`) are drop-in. A major update (`18` → `19`) is not: the data directory must be migrated with `pg_upgrade` or a dump/restore, see the [PostgreSQL upgrade notes](https://www.postgresql.org/docs/current/upgrading.html). The same applies to a `postgres-data` volume created by an earlier version of this stack that still ran PostgreSQL 17 — either dump it before switching images, or start fresh with `docker compose down -v`. |
| 13 | +For real deployments see [`../prod/`](../prod/README.md) or [`../../helm/prod/`](../../helm/prod/README.md); for everything else — license, user management, connecting Cryptomator apps — see <https://docs.cryptomator.org/hub/>. |
0 commit comments