Skip to content

fix(collaboration): internal traefik entrypoint for collaboration service - #388

Open
maki5 wants to merge 5 commits into
opencloud-eu:mainfrom
maki5:fix/collaboration_fonts_review
Open

maki5 wants to merge 5 commits into
opencloud-eu:mainfrom
maki5:fix/collaboration_fonts_review

Conversation

@maki5

@maki5 maki5 commented Sep 21, 2026

Copy link
Copy Markdown

internal traefik entrypoint for collaboration service access, collabora setting change to access collaboration service directly

needed for: opencloud-eu/opencloud#3572

@micbar

micbar commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

@maki5 @rhafer @butonic
Shouldn't we completely bypass the traefik reverse proxy just using internal docker hostnames?

@maki5

maki5 commented Sep 22, 2026

Copy link
Copy Markdown
Author

@maki5 @rhafer @butonic Shouldn't we completely bypass the traefik reverse proxy just using internal docker hostnames?

from what I understood collabora needs an https connection, right now collaboration service is pure http, in this case we will need to convert it to https

@micbar

micbar commented Nov 13, 2026

Copy link
Copy Markdown
Member

We need a mechanism for the webui core apps which tolerates a custom setting for the app list in the .env file.

@micbar micbar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. It needs to work without traefik as well, see the comments.

Comment thread .env.example Outdated
# Port of the internal (non-published) Traefik entrypoint used for the direct
# collaboration font routes. It is not published to the host and only reachable
# by containers on the opencloud-net network.
#COLLABORATION_FONT_PORT=8443

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment above says not to use ports between 8000 and 9999. Please pick another port or explain why it is fine here.

Comment thread weboffice/collabora.yml Outdated
# serve the collaboration HTTP service on the docker network so that
# collabora can fetch the font configuration and font files directly,
# bypassing the opencloud proxy
COLLABORATION_HTTP_ADDR: "0.0.0.0:9300"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This opens the whole collaboration HTTP service to the docker network, not only the font routes. Is that intended?

Comment thread weboffice/collabora.yml Outdated
COLLABORATION_HTTP_ADDR: "0.0.0.0:9300"
# base URL for the font files; must match the remote_font_config.url
# configured for collabora
COLLABORATION_FONT_BASE_URL: "https://${OC_DOMAIN:-cloud.opencloud.test}:${COLLABORATION_FONT_PORT:-8443}/collaboration/fonts"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only works with our traefik. With an external proxy nothing listens on port 8443, so collabora cannot load the fonts. Same for remote_font_config.url below.

Comment thread weboffice/collabora.yml Outdated
# configured for collabora
COLLABORATION_FONT_BASE_URL: "https://${OC_DOMAIN:-cloud.opencloud.test}:${COLLABORATION_FONT_PORT:-8443}/collaboration/fonts"
# enable the office-settings app that provides the font management UI
WEB_UI_CORE_APPS: "files,search,text-editor,pdf-viewer,external,admin-settings,epub-reader,preview,app-store,rclone-crypt,office-settings"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overwrites a custom WEB_UI_CORE_APPS from the .env. See my comment above, we need a mechanism for that.

Comment thread weboffice/collabora.yml Outdated
Comment on lines +33 to +46
labels:
# internal route for direct font access to the collaboration service;
# only reachable on the internal entrypoint (not published to the host)
- "traefik.http.routers.collab-fonts.entrypoints=internal"
- "traefik.http.routers.collab-fonts.rule=Host(`${OC_DOMAIN:-cloud.opencloud.test}`) && PathPrefix(`/collaboration/fonts`)"
- "traefik.http.routers.collab-fonts.${TRAEFIK_SERVICES_TLS_CONFIG}"
- "traefik.http.routers.collab-fonts.service=collab-fonts"
- "traefik.http.services.collab-fonts.loadbalancer.server.port=9300"

traefik:
environment:
# internal (non-published) entrypoint for the direct font access to the
# collaboration service; reachable only by containers on opencloud-net
- "TRAEFIK_CUSTOM_ARGS=${TRAEFIK_CUSTOM_ARGS:-} --entryPoints.internal.address=:${COLLABORATION_FONT_PORT:-8443}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the external proxy setup. weboffice/collabora.yml must work without traefik, compose now aborts with:

service "traefik" has neither an image nor a build context specified: invalid compose project

Please move the labels and the entrypoint to traefik/collabora.yml.

Comment thread weboffice/collabora.yml Outdated
--o:net.frame_ancestors=${OC_DOMAIN:-cloud.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-}
--o:net.lok_allow.host[14]=${OC_DOMAIN:-cloud.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-}
--o:home_mode.enable=${COLLABORA_HOME_MODE:-false}
--o:remote_font_config.url=https://${OC_DOMAIN:-cloud.opencloud.test}:${COLLABORATION_FONT_PORT:-8443}/collaboration/fonts/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says this must match COLLABORATION_FONT_BASE_URL, but here we have a trailing slash and there not. Is that intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants