Full Docker-Compose setup with Authentik OIDC and Caddy reverse proxy #1830
Replies: 3 comments 7 replies
-
|
Huge thanks! This helped me setting up my instance. I also emphasize the fact that roles are needed, not only groups. That's what I was stuck on. |
Beta Was this translation helpful? Give feedback.
-
|
Big Thanks of all here. It runs on Authentik 2025.10.2 |
Beta Was this translation helpful? Give feedback.
-
|
This is brilliant! Thank you all!!!! For future reference. I was getting stuck at a redirect URL. I ended up adding this to the Authentik provider.
But I was playing with Confidential vs. Public at the time. I may have been my own worse enemy there, but adding that doesn't break anything so I left it in. I am also using external Traefik instead of Caddy. Meaning my OpenCloud server is on a different VM than my Traefik server. To get Traefik working I am using: .env
Added a http:
routers:
opencloud-router:
rule: "Host(`cloud.example.com`)" # <--- change this URL
tls:
certResolver: letsencrypt # <--- change this certResolver
entryPoints:
- websecure
priority: 10
service: opencloud-lb
collabora-router:
rule: "Host(`collabora.example.com`)" # <--- change this URL
tls:
certResolver: letsencrypt # <--- change this certResolver
entryPoints:
- websecure
priority: 10
service: collabora-lb
wopiserver-router:
rule: "Host(`wopiserver.example.com`)" # <--- change this URL
tls:
certResolver: letsencrypt # <--- change this certResolver
entryPoints:
- websecure
priority: 10
service: wopiserver-lb
services:
opencloud-lb:
loadBalancer:
servers:
- url: http://<OC LAN IP>:9200 # <--- change this IP/URL
collabora-lb:
loadBalancer:
servers:
- url: http://<OC LAN IP>:9980 # <--- change this IP/URL
wopiserver-lb:
loadBalancer:
servers:
- url: http://<OC LAN IP>:9300 # <--- change this IP/URLYou can use the IP address of the OpenCloud server or an internally resolvable FQDN. In providers:
docker:
exposedByDefault: false
endpoint: 'unix:///var/run/docker.sock'
watch: true
file:
directory: /etc/traefik/
watch: trueWith a volume linking rules to a location Traefik will watch.
|
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
After (happily!) spending a lot of time tweaking all the environment variables, I think I have gotten to a satisfying state of things and can now start using / testing opencloud. I pulled together knowledge from many different places and wanted to put it all together if anyone else is interested.
Please let me know if this is not relevant / should be posted somewhere else.
Questions and ideas for improvements are welcome !
Setup Overview
Opencloud
To setup OIDC, I've created a new
oidc-authentik.ymlfile within theidmfolder. It expands the original compose file without having to touch it directly:Within the
config/opencloudfolder, add the Authentik domain tocsp.yamlunder connect-src:Within the
config/opencloudfolder, add the Authentik group to Opencloud role mapping toproxy.yaml(right at the top):Finally, here is the full .env file. Note that at the bottom, the OIDC values are set:
Caddy
The caddy setup is very simple. Here is the relevant portion of the caddyfile:
The caddy container needs to be on the same network as the opencloud containers. The following lines are therefore added to the caddy
compose.yml. This allows the caddyfile to reference the other containers as hosts.Authentik
First, create groups that will give access to opencloud, with a specific role:
Then create an application with provider. Here are the relevant settings:
slug: opencloud
Provider type: Oauth2 / OpenID
Client type: Public
Redirect URIs / Origins:
Scopes:
Policy / Group / User Bindings: Add the three groups previously created
Other providers
While not in use, here are the client IDs and redirect URIs / Origins for the other client types:
Android:
iOS:
Desktop:
EDIT 2025-11-22: Added caddy container to the opencloud-net network for direct intercontainer networking without the host. This is now necessary as the standard external-proxy compose files only bind the port to the container localhost. Removed limitation about apps as they now work (Thank you Ni0ki for the guidance!)
Beta Was this translation helpful? Give feedback.
All reactions