NextCloud w\Swag & CloudFlare DDNS - Error 522


rlentz2022

Recommended Posts

For several days, I have been trying to set up NextCloud on testing rig first to make sure it works then I would set it up on my main server. I have been following a series of tutorials from Spaceinvader One (See Below) and I have been following word for word except for the parameters that correspond to me. When I tried to make sure the Reverse Proxy is working after doing the port forwarding in my router, I should see the Swag Instance screen, but instead I'm getting Cloudflare error 522. I followed the tips on Cloudflare's community page so far with no luck. Then I saw a similar post from a few years ago with a different reverse proxy and someone suggested going under the management access and changing the HTTP & HTTPS ports and adding them into the router settings to if that helped. I tried that and all I could bring up was Unraid login screen. I switched them back and now I'm back to Error 522.

 

Please if anyone can help, it would be greatly appreciated. On a scale 1 thru 10 of how much I know Unraid, I'm basically 2-3 (newbie). The only thing I have working properly is Plex for my library. 

 

SpaceInvader One's videos that I have been using:

https://youtu.be/y4UdsDULZDg (This one was more of a refresher since it had been a while.)

https://youtu.be/CS72kN2c6hU

https://youtu.be/id4GcVZ5qBA

 

Edited by rlentz2022
Link to comment
  • 3 weeks later...

I also have been having the same issues. Same skill level as well... I have tried going through nginx and that seems to be a way more seamless set up and I prefer that over Swag which Spaceinvader One is using. 

 

I am using an AT&T Fiber router and originally thought that was the issue due to the restrictions they place on it. So I did a IP pass through and switched to pfsense with no luck. I removed all restrictions I can think of to see if I can get it to respond with no traction. I went back to the AT&T router because pfsense was causing way too much lag and connectivity issues. (other problems i need to solve down the road). I went through every config file... Every setting in Unraid.. Followed all the guides and forum posts i could find on the issue with no luck. I just updated to 6.11.0 (thinking maybe this will fix some underlying issue i cant find) and nope, same problem.. 

 

Could the issue be in the hardware we are using? Is there something in BIOS for peets sake that isn't allowing us to connect back to the server? That is about the only thing I can think of at this point for all the issues I've been having...

 

To offer some more info to maybe be help speed the process along, just like rlentz2022, I am trying to get NextCloud to run off of a reverse proxy so i can access it from anywhere. I am using nginx to ease of use but am willing to switch back to swag if that will help fix the issue. I have a cloudflare domain directing back to a duckdns.org url to my home IP which should then be port forwarded to nginx and that will tell which docker to connect to. I get back error 522. If there is anything i am missing in this process, please correct me. I truly don't know how to fix this issue. 

Link to comment
  • 1 month later...
On 9/27/2022 at 8:51 PM, princenickolas said:

I also have been having the same issues. Same skill level as well... I have tried going through nginx and that seems to be a way more seamless set up and I prefer that over Swag which Spaceinvader One is using. 

 

I am using an AT&T Fiber router and originally thought that was the issue due to the restrictions they place on it. So I did a IP pass through and switched to pfsense with no luck. I removed all restrictions I can think of to see if I can get it to respond with no traction. I went back to the AT&T router because pfsense was causing way too much lag and connectivity issues. (other problems i need to solve down the road). I went through every config file... Every setting in Unraid.. Followed all the guides and forum posts i could find on the issue with no luck. I just updated to 6.11.0 (thinking maybe this will fix some underlying issue i cant find) and nope, same problem.. 

 

Could the issue be in the hardware we are using? Is there something in BIOS for peets sake that isn't allowing us to connect back to the server? That is about the only thing I can think of at this point for all the issues I've been having...

 

To offer some more info to maybe be help speed the process along, just like rlentz2022, I am trying to get NextCloud to run off of a reverse proxy so i can access it from anywhere. I am using nginx to ease of use but am willing to switch back to swag if that will help fix the issue. I have a cloudflare domain directing back to a duckdns.org url to my home IP which should then be port forwarded to nginx and that will tell which docker to connect to. I get back error 522. If there is anything i am missing in this process, please correct me. I truly don't know how to fix this issue. 

I have the same issue with swag/unraid/ATT Fiber/Cloudflare.  I believe it is a ATT and Cloudflare issue. When I bypass the domain specificied in cloudflare and directly browse to the https domain site specified in duckdns, it shows the swag webpage.

 

{SOLVED} - To anybody trying this and receiving error 522: make sure your SSL settings in CloudFlare (domain > SSL tab on your left) is set to "full", this is defaulted to "flexible".  This fixed the issue.

Edited by MDUnraid
  • Like 1
  • Upvote 1
Link to comment
  • 1 month later...
On 11/1/2022 at 6:02 PM, MDUnraid said:

I have the same issue with swag/unraid/ATT Fiber/Cloudflare.  I believe it is a ATT and Cloudflare issue. When I bypass the domain specificied in cloudflare and directly browse to the https domain site specified in duckdns, it shows the swag webpage.

 

{SOLVED} - To anybody trying this and receiving error 522: make sure your SSL settings in CloudFlare (domain > SSL tab on your left) is set to "full", this is defaulted to "flexible".  This fixed the issue.

Wow, thanks so much for this little tip! This solved my problem and it's working now. I was wasting hours trying to figure this one out and you helped me solve it in two minutes! You're amazing!!!

Link to comment
On 11/2/2022 at 12:02 AM, MDUnraid said:

I have the same issue with swag/unraid/ATT Fiber/Cloudflare.  I believe it is a ATT and Cloudflare issue. When I bypass the domain specificied in cloudflare and directly browse to the https domain site specified in duckdns, it shows the swag webpage.

 

{SOLVED} - To anybody trying this and receiving error 522: make sure your SSL settings in CloudFlare (domain > SSL tab on your left) is set to "full", this is defaulted to "flexible".  This fixed the issue.

Jeez, thanks a lot for this tip! I was starting to doubt my "portforwarding skills". Thank you!

Link to comment
  • 11 months later...
On 11/1/2022 at 7:02 PM, MDUnraid said:

I have the same issue with swag/unraid/ATT Fiber/Cloudflare.  I believe it is a ATT and Cloudflare issue. When I bypass the domain specificied in cloudflare and directly browse to the https domain site specified in duckdns, it shows the swag webpage.

 

{SOLVED} - To anybody trying this and receiving error 522: make sure your SSL settings in CloudFlare (domain > SSL tab on your left) is set to "full", this is defaulted to "flexible".  This fixed the issue.

Thanks for this! This was bugging me for months. Weirdly my iPhone was unable to connect to aything from a remote location, yet a Roku stick offsite had no issue connecting to Emby.

At the time of writing, the SSL/TLS Encryption Mode setting in Cloudflare is under the SSL/TLS -> Overview menu. 

Link to comment

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.