79100118

Date: 2024-10-17 23:41:11
Score: 0.5
Natty:
Report link

I found this thread, in which a fully docker installation is explained.

They used the compose feature 'extra_hosts' to make the servers know each other.

extra_hosts:
  - "code.foo.tld=x1.x2.x3.x4"
  - "nextcloud.foo.tld=y1.y1.y1.y1"

As you are running it all on one docker host, you could probably use the local IP addresses. According to the log, the CODE server was converting your FQDN for the nextcloud server to z.z.z.z instead of y1.y1.y1.y1

Yet, instead of setting this up all by yourself, I do recommend to use nextcloud-aio instead. It comes with Nexcloud, redis and CODE containers already preconfigured. A great setup to start with nextcloud

external CODE server

As I myself have rented a nextcloud server at hetzner, I needed an external CODE server, as hetzner does not install a CODE server and does not allow installation of one due to limited resources of the server running the nextcloud instances.

Hence I am running a CODE docker container on a private vserver, behind a reverse proxy (using nginx proxy manager), which handles the SSL certificate and the encryption.

As I got the same error message "convert-to: Requesting address is denied: x.x.x.x", I ended up in this thread.

Here is my finally working commented compose.yaml - maybe it helps anyone with the same problem:

# the docs: https://sdk.collaboraonline.com/docs/installation/CODE_Docker_image.html

services:  
  collabora_code:
    container_name: code_office
    image: collabora/code:latest
    restart: always

    # "privileged" needs to be set for the collabora server (see docs) but just throws many errors. rather use MKNOD (see below)
    # privileged: true  

    # I have the reverse proxy forwarding the traffic to port 9980, so no need to expose the ports on the public interface of the docker host
    # ports:
      # - '9980:9980' # CODE Ports

    environment:
      server_name: "collabora.mydomain.de"  # the FQDN address this server is reachable at
      cert_domain: "collabora.mydomain.de"  # the FQDN address this server is reachable at
      DONT_GEN_SSL_CERT: true  # do not generate a SSL certificate

      aliasgroup1: https://nc.mydomain.com  # the FQDN of the nextcloud server - access via WOPI
      # aliasgroup1: "https://x.x.x.x"  # try your IPv4 if the FQDN  does not work
      # aliasgroup1: "https://.*:443"  # this allows all hosts to connect via WOPI

      username: "admin"
      password: "mytopsecretpassword"
      dictionaries: "de_DE en_GB en_US"  # the dictionaries for the correction in text files

      # disable ssl as NGINX Reverse Proxy is handling the certification 
      # additionally termination has to be set according to the docs, as the traffic is not encrypted between the docker host and the docker container (http is enough for network traffic within the docker host)
      # also load fonts from the nextcloud server 
      extra_params: "--o:ssl.enable=false --o:ssl.termination=true --o:remote_font_config.url=https://nc.mydomain.com/apps/richdocuments/settings/fonts.json"  

    cap_add:
      # gives additional filesystem access to the container
      - MKNOD

If you fail to open a file or connect the Nextcloud server to the Code server, try the aliasgroup1: "https://.*:443" setting, to allow every host to connect to the CODE server. It might help to see where you are stuck at.

And remember to enable Websocket Support in your reverse proxy!

Reasons:
  • Blacklisted phrase (0.5): I need
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Red