Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can't get Nginx to get a SSL certificate with mikrotik router

Featured Replies

I'm using 6.10.3 and have no errors. Plex is working in a container and I have a variety of other dockers running just fine. I am trying to set up a reverse proxy with Nginx to be able to access overseerr. I have the domain setup on cloudflare and the cloudflare dynamic dns app working. My ISP has long leases. I am using a mikrotik rb2011 router and, as I mentioned, I was able to do the appropriate port forwarding to get plex to work great. 

 

the Nginx log says that it fails http-01 test. It does not seem to matter what I do. I was trying to use ports 1980 and 19443 with nginx and forwarding those. I followed a number of nginx youtube videos but was not able to make it work. I am convinced that I am missing something with the network that Nginx is on but I have tried all of them. On some networks I am not able to access the gui. 

 

There is a very strong possibility that my router settings are off. I tried following the same ones that work for the plex port but it did not work. This included forwarding ports 80 and 443 which basically made my network unable to access the internet. I started trying different versions of the Nginx app but i still cant get a certificate set. 

 

I am aware given this information there are only about 1,000,000 things that it could be that are tripping me up but any help would be great. 

If I had to guess, 1980 and 19443 are non standard ports.  Since it fails on http-01 test I am assuming it defaults to port 80.  Which it cannot connect to.  Check the docs of the container you are using for the SSL cert and see if you can pass a different port to use.

  • Author

Honestly, I would be fine making it work with standard ports but I am out of my depth quite a bit. I have two ports forwarded, one for plex. and one for unraid management access which is 19443 to [unraid address]:443. These both work. when I try to forward other ports like 443 to 19443 and 80 to 1980 it makes my internet not work and i have to delete the forward for the 19443 to 443 and the other rules to make it work. The NGINX docker is set to 19443 for https.

  • Author

Double post but I fixed it mostly. I figured out the filter rules and nat for my router adding 80 to 1880 and 443 to 18443 for both tcp and udp. I had to turn off the proxy for the domain in cloudflare but I got the certificate! And it works!! I turned the proxy back on and it still works!! Mostly. The only problem is that I get a bad gateway error (502) if nginx is set to https. 

 

To get 80/443 to go to unraid properly, you will have to change the ports unraid gui listens on.  This can be done under settings-management access.  I have a feeling once that cert expires you are going to have the same issue again.  Not completely sure though

  • Author

I changed the ports for the unraid gui and forwarded the new port, remote access is green. Still getting 502 with https. Locally I can access overseerr with http only.

 

Edited by toastghost

8 hours ago, toastghost said:

I changed the ports for the unraid gui and forwarded the new port, remote access is green. Still getting 502 with https. Locally I can access overseerr with http only.

 

 

what is your nginx config for overseerr?

  • Author

I am not sure where that file is.

 

I have some progress.. I learned a lot more about routerOS and setup hairpin nat and dynamic WAN following some guides. I have cloudflare set for the domain with the domain proxied and was able to get a certificate for another host. I still have some troubling quirks. To make it work I had to set the NPM scheme for the proxy host to http instead of https. It is SSL and works but there are a few concerns.

 

1. Local (lan) with http://domain.name still works but external switches to https with the domain name. This seems like it is what should happen. 

2. Local (lan) connection with https ip results in SSL_ERROR_RX_RECORD_TOO_LONG

3. Local lan connection with Http:// ip or domain.name both work

 

I am not sure if this is normal or not.

 

 

 

 

 

Edited by toastghost
breakthrough?

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.