Jump to content

Resolved - DNS Issues with NextCloud, OnlyOffice, Swag


Recommended Posts

Posted (edited)

Hi all, apologies if this has been posted in the wrong section.

I'm new to unraid and linux but am trying to get Nextcloud and Onlyoffice integration working for the past week with no luck.
I have followed a bunch of Spaceinvader One videos (massive thanks to him as well as his videos are easy to follow).
I have managed to get Swag setup and can successfully bring up the Nextcloud and Onlyoffice browser pages via FQDN (nextcloud.domain.tld, documentserver.domain.tld - both with valid certificates) and also https://192.168.1.3:containerport (not secure warning).

 

The issue begins when I try to make them talk to each other, specifically when I try to enter the FQDN into Nextcloud > Onlyoffice app > Document Editing Service address. It continuously loads - nextcloud logging shows cURL error 28: Connection timed out after 60001 milliseconds.

The same thing happens when I curl -v <fqdn of any docker containers> from the unraid terminal
results in trying <publicip:443>, and eventually times out.

I'll try to include as much information that I can. Have also attached my diagnostics file as I've seen this has been requested when people are having similar issues to me.

My LAN:
Router (not an ISP router) = 192.168.1.1, DHCP on (.1.100-.1.199) GW 192.168.1.1 DNS 192.168.1.1
Port forwarding via "Virtual Server", 80 and 443 int/ext > 192.168.1.3

Connects to WAN via DHCP

 

Unraid:
192.168.1.3/24 GW 192.168.1.1, DNS is currently mixed with 192.168.1.1 8.8.8.8, I have tried setting 192.168.1.1 and also 8.8.8.8 and 8.8.4.4 respectively with no changes to the above issue.
I had my Unraid server reversed via mac address to 192.168.1.3, and have now changed it to static (192.168.1.3) in the Settings > Network settings page.
Web interface is not on the default port.
Swag is running on ports 80 and 443 (I did try 180/1443 and updated my port fowarding, same issue - it's back to 80/443 now).

Domain:
In Google Domains, I have 2x A records;
ddns.domain.tld
domain.tld
CNAMES are setup as follows
www > ddns.domain.tld
nextcloud > ddns.domain.tld
documentserver > ddns.domain.tld

ddclient is setup to update the two A records.

Containers:
Created a docker network called proxynet, driver is set to bridge
swag (80,443), nextcloud (172.18.0.3:443/TCP 192.168.1.3:444) and onlyoffice (172.18.0.9:443/TCP 192.168.1.3:4430 172.18.0.9:80/TCP 192.168.1.3:8080) are all set to proxynet
I also have some other dockers on the same network, such as Ombi.

Pihole is installed on br0 192.168.1.2 but is currently stopped while I try to figure all of this out, no DNS is pointing towards it either.

 

Any help would be greatly appreciated

tmserver-diagnostics-20210501-1048.zip

Edited by h1dden_proc3ss
updated title
  • h1dden_proc3ss changed the title to Resolved - DNS Issues with NextCloud, OnlyOffice, Swag
Posted (edited)

Resolved:
I ended up enabling PiHole and adding local dns records for:
documentserver.domain.tld to 192.168.1.3
nextcloud.domain.tld to 192.168.1.3

Setting my router's LAN DHCP to use PiHole as the DNS
Setting Unraid DNS to use PiHole
 
Switching back once again to Spaceinvader One's onlyoffice proxy-conf for letsencrypt/swag from this video - I just renamed everything from onlyoffice to documentserver.

That at least got curl and wget to work from the nextcloud container to the onlyoffice fqdn.

I then had an issue with another error message in NextCloud, in which I added my onlyoffice fqdn (documentserver.domain.tld) to the trusted_domains list
  'trusted_domains' => 
  array (
    0 => '192.168.1.3:444',
1 => 'nextcloud.domain.tld,
2 => 'documentserver.domain.tld',
  ),

 

Edited by h1dden_proc3ss
  • 2 years later...
Posted

Hey!

 

I am following up spaceinvader tutorial on youtube to set up nextcloud with onlyoffice using swag, it's been quite easy so far but I am having problems with swag and the proxy configuration file for onlyoffice, every time I put up the config file for the proxy for onlyoffice I loose access to everything configured through swag, but as soon as I disable the proxy config file I get access again, meaning that I have a problem in the proxy file for onlyoffice.

 

I took as example the proxy file that spaceinvader has on his youtube video and started tweaking from there, but obviously there must be a problem because neither the basic config file nor the tweaking I've done works so far

 

Would you be able to share your proxy config file for onlyoffice?

 

This is how I have configured mine (removed sensitive info):

 

# only office doc server


server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name documentserver.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;


    location / {
		include /config/nginx/proxy.conf;
		include /config/nginx/resolver.conf;
		set $upstream_app 192.168.1.108;
		set $upstream_port 4430;
		set $upstream_proto https;
        set $upstream_docs OnlyOfficeDocumentServer;
		proxy_pass $upstream_proto://$upstream_docs:$upstream_port;
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $server_name;
        proxy_set_header X-Forwarded-Proto $scheme;
        }
}
Spoiler

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...