Skip to content
Merged
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
6 changes: 2 additions & 4 deletions index.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
"source": "https://github.com/n8n-io/n8n",
"icon": "https://avatars.githubusercontent.com/u/45487711?s=200&v=4",
"website": "https://n8n.io",
"installation": "Queue mode with Postgres, Valkey, and a worker. With Load demo data enabled, first boot creates owner demo@stackblaze.local / changeme and three sample workflows. Without it, complete the one-time owner setup at your app URL, then sign in. AI Assistant uses a bundled n8n sandbox and SearXNG for web search; add an Anthropic, OpenAI, or OpenRouter key in n8n AI settings or set N8N_INSTANCE_AI_MODEL_API_KEY. Optional: set INSTANCE_AI_BRAVE_SEARCH_API_KEY to prefer Brave over SearXNG.",
"installation": "Queue mode with Postgres, Valkey, and a worker. With Load demo data enabled, first boot creates owner demo@stackblaze.local / changeme and three sample workflows. Without it, complete the one-time owner setup at your app URL, then sign in. AI Assistant searches the web through a bundled SearXNG companion app (the n8n code sandbox is not included: it needs privileged containers); add an Anthropic, OpenAI, or OpenRouter key in n8n AI settings or set N8N_INSTANCE_AI_MODEL_API_KEY. Optional: set INSTANCE_AI_BRAVE_SEARCH_API_KEY to prefer Brave over SearXNG.",
"architecture": [],
"categories": [
"work",
Expand Down Expand Up @@ -11952,9 +11952,7 @@
"https://unomi.apache.org/manual/latest/index.html",
"https://github.com/apache/unomi/tree/master/docker"
],
"addons": [
"Valkey"
],
"addons": [],
"stars": 600,
"forks": 60,
"watchers": 600,
Expand Down
340 changes: 159 additions & 181 deletions services/cryptomator/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ metadata:
kubero.dev/template.description: Self-hosted key management and access control
server for sharing Cryptomator-encrypted vaults across teams.
kubero.dev/template.icon: https://raw.githubusercontent.com/stackblaze/stack-templates/main/services/cryptomator/icon.png
kubero.dev/template.installation: Bundled PostgreSQL (CloudNativePG) and Cryptomator
Keycloak (ghcr.io/cryptomator/keycloak) with a seed realm for smoke-test boot.
Rotate default cryptomator/cryptomator credentials and HUB_KEYCLOAK_SYSTEM_CLIENT_SECRET
before exposing publicly. External /kc ingress routing to Keycloak may require
an additional reverse-proxy path rule beyond the Hub web ingress. Use cryptomator.org/hub/self-hosted
Setup Wizard output to customize realm/clients for production.
kubero.dev/template.installation: Deploys Cryptomator Hub with PostgreSQL (CloudNativePG)
and a Cryptomator Keycloak companion app (ghcr.io/cryptomator/keycloak) seeded
with a cryptomator realm for a smoke-test boot. Keycloak gets its own public
URL; after the first deploy set HUB_KEYCLOAK_PUBLIC_URL on the Hub app to that
URL (browsers sign in there) and redeploy. Keycloak stores its data in a separate
`keycloak` database that the PostgreSQL add-on creates on a dedicated cluster;
on shared zones that database is not provisioned. Rotate the seed realm credentials
(admin/cryptomator, client secret cryptomator, HUB_KEYCLOAK_SYSTEM_CLIENT_SECRET)
before exposing publicly. Use the cryptomator.org/hub/self-hosted Setup Wizard
output to customize realm/clients for production.
kubero.dev/template.links: '["https://docs.cryptomator.org/hub/", "https://docs.cryptomator.org/hub/deployment/"]'
kubero.dev/template.screenshots: '[]'
kubero.dev/template.source: https://github.com/cryptomator/hub
Expand Down Expand Up @@ -82,194 +86,27 @@ spec:
stringData:
username: cryptomator
password: cryptomator
keycloakConfig:
apiVersion: v1
kind: ConfigMap
metadata:
name: '{{KUBERO_APP_NAME}}-config'
data:
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://{{KUBERO_APP_NAME}}-postgresql:5432/keycloak
KC_DB_USERNAME: cryptomator
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_HEALTH_ENABLED: 'true'
KC_METRICS_ENABLED: 'true'
KC_HTTP_ENABLED: 'true'
KC_PROXY_HEADERS: xforwarded
KC_HOSTNAME_STRICT: 'false'
KC_HOSTNAME_BACKCHANNEL_DYNAMIC: 'true'
QUARKUS_TRANSACTION_MANAGER_ENABLE_RECOVERY: 'false'
keycloakSecret:
apiVersion: v1
kind: Secret
metadata:
name: cryptomator-keycloak-secret
type: Opaque
stringData:
kc_admin_password: cryptomator
kc_db_password: cryptomator
realm.json: "{\n \"realm\": \"cryptomator\",\n \"displayName\": \"Cryptomator\
\ Hub\",\n \"loginTheme\": \"cryptomator\",\n \"enabled\": true,\n \
\ \"sslRequired\": \"external\",\n \"defaultRole\": { \"name\": \"user\"\
, \"description\": \"User\" },\n \"roles\": {\n \"realm\": [\n \
\ { \"name\": \"user\", \"description\": \"User\", \"composite\": false\
\ },\n { \"name\": \"create-vaults\", \"description\": \"Can create\
\ vaults\", \"composite\": false },\n {\n \"name\": \"admin\"\
,\n \"description\": \"Administrator\",\n \"composite\"\
: true,\n \"composites\": {\n \"realm\": [\"user\", \"\
create-vaults\"],\n \"client\": { \"realm-management\": [\"realm-admin\"\
] }\n }\n }\n ]\n },\n \"users\": [\n {\n \"\
username\": \"admin\",\n \"enabled\": true,\n \"credentials\"\
: [{ \"type\": \"password\", \"value\": \"cryptomator\", \"temporary\"\
: true }],\n \"requiredActions\": [\"UPDATE_PASSWORD\"],\n \"\
realmRoles\": [\"admin\"]\n },\n {\n \"username\": \"system\"\
,\n \"email\": \"system@localhost\",\n \"enabled\": true,\n\
\ \"serviceAccountClientId\": \"cryptomatorhub-system\",\n \"\
clientRoles\": {\n \"realm-management\": [\"realm-admin\", \"view-system\"\
]\n }\n }\n ],\n \"scopeMappings\": [{ \"client\": \"cryptomatorhub\"\
, \"roles\": [\"user\", \"admin\"] }],\n \"clients\": [\n {\n \
\ \"clientId\": \"cryptomatorhub\",\n \"serviceAccountsEnabled\"\
: false,\n \"publicClient\": true,\n \"name\": \"Cryptomator\
\ Hub\",\n \"enabled\": true,\n \"redirectUris\": [\"*\"],\n\
\ \"webOrigins\": [\"+\"],\n \"bearerOnly\": false,\n \"\
frontchannelLogout\": false,\n \"protocol\": \"openid-connect\",\n\
\ \"attributes\": { \"pkce.code.challenge.method\": \"S256\" }\n\
\ },\n {\n \"clientId\": \"cryptomator\",\n \"serviceAccountsEnabled\"\
: false,\n \"publicClient\": true,\n \"name\": \"Cryptomator\
\ App\",\n \"enabled\": true,\n \"redirectUris\": [\"*\"],\n\
\ \"webOrigins\": [\"+\"],\n \"protocol\": \"openid-connect\"\
,\n \"attributes\": { \"pkce.code.challenge.method\": \"S256\" }\n\
\ },\n {\n \"clientId\": \"cryptomatorhub-system\",\n \
\ \"serviceAccountsEnabled\": true,\n \"publicClient\": false,\n\
\ \"name\": \"Cryptomator Hub System\",\n \"enabled\": true,\n\
\ \"clientAuthenticatorType\": \"client-secret\",\n \"secret\"\
: \"cryptomator\",\n \"standardFlowEnabled\": false\n }\n ]\n\
}\n"
keycloakService:
apiVersion: v1
kind: Service
metadata:
name: cryptomator-idp
spec:
type: ClusterIP
selector:
app: cryptomator-idp
ports:
- name: http
port: 8080
targetPort: 8080
- name: management
port: 9000
targetPort: 9000
keycloakDeployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: cryptomator-idp
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: cryptomator-idp
template:
metadata:
labels:
app: cryptomator-idp
spec:
containers:
- name: keycloak
image: ghcr.io/cryptomator/keycloak:26.6.2
imagePullPolicy: Always
command:
- /opt/keycloak/bin/kc.sh
- start
- --optimized
- --import-realm
ports:
- name: http
containerPort: 8080
- name: management
containerPort: 9000
envFrom:
- configMapRef:
name: '{{KUBERO_APP_NAME}}-config'
env:
- name: KC_DB_PASSWORD
valueFrom:
secretKeyRef:
name: cryptomator-keycloak-secret
key: kc_db_password
- name: KC_BOOTSTRAP_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: cryptomator-keycloak-secret
key: kc_admin_password
startupProbe:
httpGet:
path: /health/started
port: management
initialDelaySeconds: 15
periodSeconds: 5
failureThreshold: 36
readinessProbe:
httpGet:
path: /health/ready
port: management
periodSeconds: 5
failureThreshold: 6
livenessProbe:
httpGet:
path: /health/live
port: management
periodSeconds: 10
failureThreshold: 6
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: '1'
memory: 768Mi
volumeMounts:
- name: tmp
mountPath: /tmp
subPath: tmp
- name: data
mountPath: /opt/keycloak/data
- name: realm
mountPath: /opt/keycloak/data/import/realm.json
subPath: realm.json
readOnly: true
volumes:
- name: tmp
emptyDir: {}
- name: data
emptyDir: {}
- name: realm
secret:
secretName: cryptomator-keycloak-secret
items:
- key: realm.json
path: realm.json
envVars:
- name: QUARKUS_HTTP_PORT
value: '8080'
- name: QUARKUS_DATASOURCE_JDBC_URL
value: 'jdbc:postgresql://$(PGHOST):$(PGPORT)/$(PGDATABASE)'
- name: QUARKUS_DATASOURCE_USERNAME
value: cryptomator
value: '$(PGUSER)'
- name: QUARKUS_DATASOURCE_PASSWORD
value: cryptomator
value: '$(PGPASSWORD)'
- name: HUB_PUBLIC_ROOT_PATH
value: /
- name: HUB_PUBLIC_URL
value: '{{KUBERO_APP_URL}}'
# Browser-facing Keycloak URL: set it to the public URL of the
# cryptomator-keycloak app once that app has one (see installation notes).
- name: HUB_KEYCLOAK_PUBLIC_URL
value: '{{KUBERO_APP_URL}}/kc'
# The Keycloak companion app below; sibling apps of a catalog group are
# reached as <nameHint>-<suffix>-kuberoapp on port 80.
- name: HUB_KEYCLOAK_LOCAL_URL
value: http://cryptomator-idp:8080
value: http://cryptomator-keycloak-{{KUBERO_NAME_SUFFIX}}-kuberoapp
- name: HUB_KEYCLOAK_REALM
value: cryptomator
- name: HUB_KEYCLOAK_SYSTEM_CLIENT_ID
Expand All @@ -281,7 +118,7 @@ spec:
- name: HUB_KEYCLOAK_OIDC_CRYPTOMATOR_CLIENT_ID
value: cryptomator
- name: QUARKUS_OIDC_AUTH_SERVER_URL
value: http://cryptomator-idp:8080/realms/cryptomator
value: http://cryptomator-keycloak-{{KUBERO_NAME_SUFFIX}}-kuberoapp/realms/cryptomator
- name: QUARKUS_OIDC_CLIENT_ID
value: cryptomatorhub
- name: QUARKUS_OIDC_TOKEN_ISSUER
Expand Down Expand Up @@ -317,3 +154,144 @@ spec:
run:
securityContext:
readOnlyRootFilesystem: false
# Keycloak for Hub sign-in, as its own app (it was a Deployment + Service
# baked into the Postgres add-on's resourceDefinitions, which the server
# refuses: #136). It shares the Hub's Postgres add-on (usePrimaryAddons
# injects PGHOST/PGPORT/PGUSER/PGPASSWORD) and uses the `keycloak` database
# the add-on's initdb creates. The command writes the seed realm from
# CRYPTOMATOR_REALM_JSON into Keycloak's import folder, then starts it
# (the image ships bash, which kc.sh needs anyway).
# exposeInternet is left unset on purpose: the dashboard then gives this
# companion its own public URL (browsers must reach Keycloak to sign in)
# without making it the group's public entry, so the Hub stays public too.
templateServices:
- id: keycloak
nameHint: cryptomator-keycloak
serviceType: web
usePrimaryAddons: true
image:
repository: ghcr.io/cryptomator/keycloak
tag: 26.6.2
containerPort: '8080'
command:
- /bin/bash
- -c
- |
mkdir -p /opt/keycloak/data/import
printf '%s' "$CRYPTOMATOR_REALM_JSON" > /opt/keycloak/data/import/realm.json
exec /opt/keycloak/bin/kc.sh start --import-realm
envVars:
- name: KC_DB
value: postgres
- name: KC_DB_URL_HOST
value: '$(PGHOST)'
- name: KC_DB_URL_PORT
value: '$(PGPORT)'
- name: KC_DB_URL_DATABASE
value: keycloak
- name: KC_DB_USERNAME
value: '$(PGUSER)'
- name: KC_DB_PASSWORD
value: '$(PGPASSWORD)'
- name: KC_BOOTSTRAP_ADMIN_USERNAME
value: admin
- name: KC_BOOTSTRAP_ADMIN_PASSWORD
value: '{{KUBERO_GEN_ALNUM:24}}'
- name: KC_HEALTH_ENABLED
value: 'true'
- name: KC_METRICS_ENABLED
value: 'true'
- name: KC_HTTP_ENABLED
value: 'true'
- name: KC_PROXY_HEADERS
value: xforwarded
- name: KC_HOSTNAME_STRICT
value: 'false'
- name: QUARKUS_TRANSACTION_MANAGER_ENABLE_RECOVERY
value: 'false'
- name: CRYPTOMATOR_REALM_JSON
value: |
{
"realm": "cryptomator",
"displayName": "Cryptomator Hub",
"loginTheme": "cryptomator",
"enabled": true,
"sslRequired": "external",
"defaultRole": { "name": "user", "description": "User" },
"roles": {
"realm": [
{ "name": "user", "description": "User", "composite": false },
{ "name": "create-vaults", "description": "Can create vaults", "composite": false },
{
"name": "admin",
"description": "Administrator",
"composite": true,
"composites": {
"realm": ["user", "create-vaults"],
"client": { "realm-management": ["realm-admin"] }
}
}
]
},
"users": [
{
"username": "admin",
"enabled": true,
"credentials": [{ "type": "password", "value": "cryptomator", "temporary": true }],
"requiredActions": ["UPDATE_PASSWORD"],
"realmRoles": ["admin"]
},
{
"username": "system",
"email": "system@localhost",
"enabled": true,
"serviceAccountClientId": "cryptomatorhub-system",
"clientRoles": {
"realm-management": ["realm-admin", "view-system"]
}
}
],
"scopeMappings": [{ "client": "cryptomatorhub", "roles": ["user", "admin"] }],
"clients": [
{
"clientId": "cryptomatorhub",
"serviceAccountsEnabled": false,
"publicClient": true,
"name": "Cryptomator Hub",
"enabled": true,
"redirectUris": ["*"],
"webOrigins": ["+"],
"bearerOnly": false,
"frontchannelLogout": false,
"protocol": "openid-connect",
"attributes": { "pkce.code.challenge.method": "S256" }
},
{
"clientId": "cryptomator",
"serviceAccountsEnabled": false,
"publicClient": true,
"name": "Cryptomator App",
"enabled": true,
"redirectUris": ["*"],
"webOrigins": ["+"],
"protocol": "openid-connect",
"attributes": { "pkce.code.challenge.method": "S256" }
},
{
"clientId": "cryptomatorhub-system",
"serviceAccountsEnabled": true,
"publicClient": false,
"name": "Cryptomator Hub System",
"enabled": true,
"clientAuthenticatorType": "client-secret",
"secret": "cryptomator",
"standardFlowEnabled": false
}
]
}
healthcheck:
enabled: true
path: /realms/cryptomator
startupSeconds: 600
timeoutSeconds: 10
periodSeconds: 15
Loading