NextCloud Local Access not working. LocalDNS setup already, but still struggling to point to the port

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • NextCloud Local Access not working. LocalDNS setup already, but still struggling to point to the right place

      Hi There

      Defining some Terminology in advance...
      • ServerAddress => place holder for my server's ip address
      • NextCloudPort => port I can use with ServerAddress to get into Nextcloud e.g. ServerAddress:NextCloudPort
      • => example of my nextcloud website

      After following TDL video on setting NextCloud Remotely, I managed to get it to work. Can access remotely with certification.

      However, like some people, local access bombs out. (Not exactly sure of the reason, but it seems like it's trying to go to my wan ip instead of redirecting it locally to ip)

      Researching online, the solution is to either try edit your host file to point to ServerAddress or to use a LocalDNS and point to ServerAddress.

      So, I setup a LocalDNS using DNSMASQ (built in plugin), and mapped to SeverAddress. But that will only take you to the landing page of the WebGUI of OMV.

      I've been trying to mess around with my settings so that I can get to point to ServerAddress:NextCloudPort.

      Does anyone know what I should do?

      (This is my first post, so if I'm missing any important information, I apologise in advance)

    • OKAY. After many trial and errors, I managed to work get it to work via nginx reverse proxy. (if someone may be so kind to explain how it worked, I would greatly appreciate it)

      For those who encounter something similar i.e. their router doesn't support NAT Lookup
      • This is only for people who followed TDL video and can connect to their nextcloud container remotely, but can't connect using their local area network.
      • Ensure that you have setup up a local dns OR edit your host file and map to your server address.
      • I remapped my OMV WEBGUI port away from port 80 (e.g. can be like port 82 or 81 etc) [TBH, not sure if I needed to do this or not. I just didn't want to block myself out if I messed up]
      • Then ensure you have allowed SSL connection under "General Settings" and keep the default https port 443.
      • then I used the nginx plugin in OMV4, to setup a server to perform the reverse proxy. The below is the configuration I used.

      And then in the extra options box (which I got from this link…5108-nginx-Reverse-proxy/). Thanks @Havoc and @antipiot)

      Source Code

      1. location / {
      2. proxy_headers_hash_max_size 512;
      3. proxy_headers_hash_bucket_size 64;
      4. proxy_set_header Host $host;
      5. proxy_set_header X-Forwarded-Proto $scheme;
      6. proxy_set_header X-Real-IP $remote_addr;
      7. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      8. add_header Front-End-Https on;
      9. proxy_pass;
      10. }

      And BAM. you can now nextcloud locally and remotely, using

      Happy to try assist noobs (like me) who are struggling to get this to work :D

      The post was edited 1 time, last by yoyowu1000 ().