Nextcloud Bad Gateway

    • Official Post

    I'm sure there's a way, I just have absolutely no idea how to do it. Are yo using the same ports on both the internal and external router? I could probably see that not working.


    Maybe I am totally off base here (most likely, as I've obviously never tried this)... but reference post 13.


    Quote

    Should have clarified that...


    That is correct, 457 and 91 are internal, 443 and 80 are external.

    So using 91 and 80 above .... I'm wondering if you could forward port 80, to port 91 (on the DMZ Router B), then 91 would forward back to 80 and presumably make it out to the Internet?


    I'm probably missing something here, but that's all I can come up with.

  • This intrigues me for sure. Before I go that crazy. I set up IIS on port 80 on my desktop. Theoretically then if I forward 80 to 80 any on both the DMZ router (FIOS providing the WAN) and the real router (USG) and got port 80 open is that progress?


    So far, I have been stuck forwarding a port from the USG into the FIOS router and getting that router to forward it out to the world sadly.

  • Hey I got this ALMOST working by forwarding 80 and 443 back to the main router from the Verizon one. So, progress.


    Only issue is the docker compose script huge RIGHT at the end after "Server ready" - everything looks to be running but the compose didn't end gracefully. Did I miss a step or a command on my compose up or compose.yml file?

    • Official Post

    Hey I got this ALMOST working by forwarding 80 and 443 back to the main router from the Verizon one. So, progress.


    Only issue is the docker compose script huge RIGHT at the end after "Server ready" - everything looks to be running but the compose didn't end gracefully. Did I miss a step or a command on my compose up or compose.yml file?

    Is the swag container showing errors? That is usually the one that will throw an error (can't receive certificate or something to that effect).


    If you want to PM me your docker-compose file I'd be glad to take a look at it (or post it here if it doesn't bother you)

  • I got it, thanks again for the post. I'm having a lot of other issues with Nextcloud regarding uploads and downloads of large files, but I am trying to work through all the manual config and issues that seem to need done here. I'm not really effectively seeing great logging yet so trying to turn all that on as well.


    What happened with the docker-compose is just that it never quit at the end of the script, I just ended the ssh window and it was fine (instead of doing a CTRL-C which deleted all the containers).


    All in all, things are up and running anyway. I just need to now figure out the speed issues and more importantly the manual config changes needed so that files larger than 1 GB that I am trying to share out via sharelinks don't fail at the recipient end. There must be a reason that's happening and a config change I am missing, even though I have added a lot of stuff from help guides on resolving such issues.


    Thanks again for getting me this far, your post was the easiest and best to use I have seen to get all this running quickly.

    • Official Post

    Hmm, interesting. I've never had a big problem with speed and Nextcloud after the initial setup.. which goes abysmally slow. Granted... I'm usually just tossing pics or documents on there.. nothing remotely close to 1gb. Obviously you having access to both routers was necessary here... where the other guy I helped who ran into this issue.


    Glad it helped.

    • Official Post

    By the way, for anyone still following along here.. .I've gotten quite a few PM's over that compose file I posted w/ questions, etc.. (I think because it differs pretty heavily from the TechnoDad video and others out there)... It wasn't really my intention to write a how to, was just trying to help the OP find where he was going wrong. I'm going to do some editing to it to try and make it a little more clear.


    Reality is if you don't have some weird setup, etc... That should really have Nextcloud up and running with a subdomain in about 20-25min tops.

  • I'll share this link here for anyone who stumbles upon my issue. This info helped me fix my issue with large file sizes. I believe it has to do with timeouts set on nginx either on the letsencrypt side or the nextcloud side.


    https://help.nextcloud.com/t/2…tsenrcypt-unraid/71375/10


    What is not mentioned in many tutorials for newbs (like me) is that these are 3 separate apps here, and all 3 have their own cofig files buried deep in the docker appdata folders. So if you are having trouble, make sure you are in the right config file for the right docker. This one is (1) nextcloud (2) mariadb and (3) swag. Both nextcloud and swag have some manual config file work to do to speed it up and fix some other issues, and I may tweak some more but I've learned that getting into these files and making some changes can be very helpful.


    I think we just need to make sure we are clear with which dockers' configs are changed, you did a pretty good job at that in your walkthrough, I have seen some areas that just say "modify the nginx proxy config" instead of being very clear what the file path and filename would be, etc, that kind of stuff is always helpful!


    KM0201, thank you again!

    • Official Post

    I think we just need to make sure we are clear with which dockers' configs are changed, you did a pretty good job at that in your walkthrough, I have seen some areas that just say "modify the nginx proxy config" instead of being very clear what the file path and filename would be, etc, that kind of stuff is always helpful!


    KM0201, thank you again!

    I strongly agree w/ this... the tutorials, while many of them work perfectly to a slightly more than novice user. If you're dealing with a total novice, or worse.. a novice that English is not his first language.. it's quite possible they will not understand why their paths don't look like your paths, etc. (see the other thread where I had a volume mapped with /etc/localtime and he replaced the volume with TZ=something).


    IF we went to using Symlinks (which is very easy with the plugin).. You could make the tutorial say (for example)... Create a folder called Config in the webUI. Create a Symlink for Config to /NAS/Config then any docker-compose that got posted, it would just be /NAS/Config/whatever. Do the same for where actual data is stored (say, /NAS/Media/Movies, /NAS/Media/Nextcloud, whatever)... and that is where you'd map those data directories for nextcloud, plex, etc... Again, the docker-compose/stack files, would almost write themselves for more than a few popular containers. If a container required editing of it's files (say, nextcloud).... the instructions would be able to tell them exactly where to go.. /NAS/Config/nextcloud/../config.php)... So many people are just cutting and pasting from here, or trying to cut and paste from what they see on videos... its why we see directories improperly created under /srv frequently here (usually a typo in a path or something, so it gets created when the compose file/stack is ran)


    Can't really unring a bell I guess, but I think that would have been good to do from the beginning.

  • I think you did a good job. Plus there are so many permutations of server out there and they all have their issues. I am using OpenMediaVault which is seems has some of its own quirks.


    I'm having a few issues that maybe you can clue me in on. I'm new to the world of port forwarding and I have a weird double router situation going on but I am having some strange issues with my local IP when I try and access nextcloud.


    All I am trying to really do is access it locally, without having to use my DuckDNS, and that seems to be failing for some reason after running these container scripts. I am sure this is user error.


    I figured I'd go to https://LOCALIP:457 and see my NextCloud admin backend. I just see a "welcome to your swag instance" page. I believe that also happens when I go to https://DUCKDNSADDRESS:457. I can't seem to find ANY way to get back to the nextcloud admin backend (only the standard settings screen you see as an admin USER if that makes sense).


    I also figured I'd go to http://LOCALIP:80 or just https://LOCALIP and browse my nextcloud locally. That also doesn't work. This must be a port forwarding issue here.

  • Wonderful tutorial, which I encountered quite late. Considering all the energy and time I spend, I slap myself why I haven't seen this post before.


    Although I already had a working Nextcloud, I came across your simple tutorial and installed it from scratch on uSD to try it out.

    I read many articles, watched many youtube, now I feel sorry for my lost time and energy.

    This tutorial deserves a separate topic.

    A treasure for very novice, rookies like me.

    Please make this tutorial more visible!!!

    • Official Post

    Glad it helped... As I said, I didn't originally write it to be a tutorial, was just trying to help the OP figure out where he went wrong... then once I started getting PM's on it I tweaked it more into a tutorial.


    I think the other tutorials on Nextcloud are pretty solid, but will consider linking it in one of the other threads.

    • Official Post

    If you're just trying to access it locally, you don't need to do anything with your router... It's even easier to set up as you only need to follow about 7 steps. Again, assuming you have a basic understanding of command line, etc.. it's very easy to set up locally.


    1. Create all the directories and make all adjustments you need in the stack (you might want to delete old directories from previous attempts if you've been at this several times), then deploy the stack.

    2. When done, go to nextcloud UI (https://your.omv.ip:450 , must use https and accept security risk)

    3. Enter an admin user/password

    4. Click setup database then mysql database

    user root

    password (see docker-compose, line 24 above)

    database name: nextcloud

    localhost: nextclouddb

    5. Click Finish (this will take a few minutes as it downloads apps and sets up the database, be patient)


    That's it.

    • Official Post

    Hard question then. :)

    I am inexperienced as I am using Nextcloud for the first time.

    I cannot use it with the link https://subdomain.duckdns.org in the LAN. If I want to access Nextcloud in the LAN, I have to use the 192.168.1.36:450 connection.

    Is this normal?

    Unless you want it that way... if you want to use a subdomain.... Go back and start at step 6 (since you seem to have it working locally).. and make sure your ports are forwarded in your router. (450 and 91 are internal, 443 and 80 are external)

  • Unless you want it that way... if you want to use a subdomain.... Go back and start at step 6 (since you seem to have it working locally).. and make sure your ports are forwarded in your router. (457 and 91 are internal, 443 and 80 are external)

    I did these, I already have WAN usage.

    I forwarded the ports.

    If I turn off Wi-Fi on the phone, I get to the Nexcloud Clipboard.

    But when I am in the LAN, the xxx.duckdns.org link directs me to the modem.


    I have the same problem in macom 's tutorial and your tutorial. Of course if this is a problem :)



    I would like to express my gratitude to macom m again, it helped me a lot. Nexcloud would have been completely out of my life if macom and Soma hadn't helped. Thanks again.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!