Skip to content

Conversation

@kw217
Copy link

@kw217 kw217 commented Dec 30, 2025

This PR adds the ability to add extra entries to /etc/hosts on the nextcloud-aio-collabora container.

I need this to work around an issue that I haven't yet fully resolved, to do with Collabora (in response to a request coming via coolwsd) attempting to retrieve config from my instance's external domain, rather than the internal domain. (This may be nextcloud/richdocuments#4906.) I intend to properly debug this and provide a PR later. But this functionality could be useful to others, e.g., #2395.

I didn't understand the function of update-yaml.sh, nor do I understand what the configName is for, so please let me know if I have missed anything.

This would probably be better if it was generalised to allow specifying for any container rather than only nextcloud-aio-collabora. But I didn't know the best way to represent this in config.

Thanks!

Signed-off-by: Keith Wansbrough <keithw@lochan.org>
Copy link
Collaborator

@szaimen szaimen left a comment

Choose a reason for hiding this comment

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

Hi, please check #1358 first before we dive into this

@szaimen szaimen added 2. developing Work in progress enhancement New feature or request labels Jan 5, 2026
@szaimen szaimen marked this pull request as draft January 5, 2026 08:49
@kw217
Copy link
Author

kw217 commented Jan 6, 2026

Thanks for the nudge. Going through that again and thinking some more means I may have got a step closer. See my original post and my update in this thread: nextcloud/richdocuments#4906 (comment) . Thanks.

@kw217
Copy link
Author

kw217 commented Jan 6, 2026

@szaimen if you would prefer to avoid the COLLABORA_EXTRA_HOSTS approach, then I'd like to have a way to set the net.proto=IPv6 for Collabora under AIO.

Looking at containers.json in AIO, it looks like there's no way to pass arbitrary options from compose.yaml to Collabora - the only configurable option is currently the seccomp one.

I can think of a couple of approaches, both of which could be done as modifications of this present PR:

  1. Provide a general COLLABORA_OPTIONS env var.
  2. Provide a specific COLLABORA_NET_PROTO which is enforced to be one of all/IPv4/IPv6.

Or perhaps there is some way I can get my system working without any of these changes.

Happy to proceed on whichever of these paths would be preferable to you.

@szaimen
Copy link
Collaborator

szaimen commented Jan 7, 2026

There is

<h3>Additional Collabora options</h3>
{% if collabora_additional_options == "" %}
<p>You can configure additional options for collabora below.</p>
<p>(This can be used for configuring the net.content_security_policy and more. Make sure to submit the value!)</p>
<form method="POST" action="api/configuration" class="xhr">
<input type="text" name="collabora_additional_options" />
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input type="submit" value="Submit additional collabora options" />
</form>
<p>You need to make sure that the options that you enter are valid. An example is <strong>--o:net.content_security_policy=frame-ancestors *.example.com:*;</strong>.</p>
. Maybe that works for you?

@kw217
Copy link
Author

kw217 commented Jan 28, 2026

It didn't help - I think the net.proto=IPv6 thing was just coincidence, and did not fix it. So I'm back to needing the extra host added. For now I've set up a cron job on the host which does the following, but it's not a very pretty solution. Long term I would like to fix the code so it doesn't try to retrieve the config from the external domain, but I'm not sure if I'll be able to. In the short term, my original request would help - but for now I'll just keep doing this.

docker exec -u root nextcloud-aio-collabora bash -c 'grep cloud.example.org /etc/hosts || echo 2001:db8::1 cloud.example.org >> /etc/hosts'

(IP and hostname redacted obviously).

@kw217
Copy link
Author

kw217 commented Jan 29, 2026

Cool, I'll try again once I have #7481 - thank you!

@szaimen
Copy link
Collaborator

szaimen commented Jan 30, 2026

Cool, I'll try again once I have #7481 - thank you!

This is now released with v12.6.0 Beta. Testing and feedback is welcome! See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel

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

Labels

2. developing Work in progress enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants