noran

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by noran

  1. Hi Guys, I am trying to setup a reverse proxy to connect to my home emby docker remotely. And I am having a few issues and maybe a lack of understanding. I couldn’t find this question or problem anywhere, that’s why I’m posting it here (not sure if it's an emby or a letsencrypt problem). Please excuse that I’m just a beginner and don’t understand everything. Here is my situation: I followed these tutorials from spaceinvaderone: https://www.youtube.com/watch?v=I0lhZc25Sro https://www.youtube.com/watch?v=AS0HydTEuA4 I have rented a domain (domain.com) at godaddy and changed the name servers to my cloudflare account. At my cloudflare I have setup two cnames (nextcloud and emby) both with with the same target (sub.duckdns.org). This duckdns URL is connected to the duckdns docker running on my server. (As far as I know this should work) My router is configured to forward port 443 and port 80 to port 1443 and port 180 on my unraid machine. The ports for the letsencrypt docker are changed respectively. When I view the log of letsencrypt it reads ‘Server ready’ at the bottom. Then in the letsencrypt -> nginx -> poxy-confs folder I saved the emby.subdomain.conf.sample file as emby.subdomain.conf. Where ‘server_name’ is ‘emby.*;’, because I want to access my emby through that subdomain. This conf file has a few comments at the top: # make sure that your dns has a cname set for emby, if emby is running in bridge mode, the below config should work as is, although, The cname is setup, but emby is not running in bridge mode. I have setup a custom net, as shown in the spaceinvaderone video, but now I don’t know what to change in the conf file. # the container name is expected to be "emby", if not, replace the lines "set $upstream_emby emby;" with "set $upstream_emby <containername>;" As my container name is ‘Emby’ I changed that. But Emby is only the display name in Unraid, in the appdata folder there’s an EmbyServer folder, so to what should I change it in the conf? # for host mode, replace the lines "proxy_pass http://$upstream_emby:8096;" with "proxy_pass http://HOSTIP:8096;" HOSTIP being the IP address of emby What other mode than host mode is there for emby? And what is the IP address of emby? When I go to the emby settings, there are two addresses on the dashboard site. None of them work. Not In-Home nor Remote. This is probably because I didn’t setup port forwarding in my router settings. But to my understanding that’s how it’s supposed to be, as everything should be routed through letsencrypt. I tried with different IP addresses for HOSTIP, but nothing did work and I don’t know what I’m missing. Or is it my unraid machine's ip? Because I can access emby using that. # in emby settings, under "Advanced" change the public https port to 443, leave the local ports as is, set the "external domain" to your url, Again I’m not sure what to put here. I communicate to letsencrypt through port 1443, so should I put that here as well? And is emby.domain.com my url or is it domain.com?? I still don’t really get how it works that two cnames point to the same ip (sub.duckdns.org), but letsencrypt is supposed to know when to connect to my nextcloud docker and when to my emby docker. Any help regarding this will really be appreciated. Thanks SOLUTION: Okay so I have just solved the issue and will show my steps for future people with a similar problem; It doesn't matter if emby is running in bridge mode or not, but I think it has to be in the same network mode as letsencrypt. (Not sure if mandetory, but works for me) Also for <containername> choose the display name, not the folder's name. HOSTIP should be the local IP address (the right one from the emby docker at the unraid docker tab). Don't forward port 8096 in your router, because then you will have an additional exposed port, and then you wouldn't need letsencrypt. Inside the emby settings set public https port to 443 even if you changed the letsencrypt port like I did (letsencrypt handles my incoming port 1443 as port 443 in the internal proxynet). Don't forget your subdomain for your "external domain"! I still don't really get how exactly cnames work, but at this point I don't care anymore. It just works and I am happy about it. It's possible that my explanations aren't quite correct, because I didn't exactly know what I was doing, so please keep that in mind. In the end I think it was a cloudflare problem, because when I would try to connect firefox always showed a "not properly redirected error" and I had to disable proxy in my dns settings in cloudflare.