I just set up my first docker in my Synology NAS. Now figuring out out of home access. reddit / selfhosted ---------------------------------------------------------------------- angrycatmeowmeow · 2023-11-17 21:36 I've never played with Docker but some well written how-to's and YT vids did the job. I just set up audiobookshelf on a DS220+, and now obviously I want to stream these books when I'm not home. The internet is full of info on this, but there's a lot of verbiage I'm not too familiar with yet. I do know there are already some services I am already using or are available. It seems everything I google is a sea of acronyms and terms I'm not yet familiar with. The main goal is to be able to log my mom's phone in to the ABS app without her having to run a VPN on her phone. I already have a quickconnect domain through Synology I already have DDNS set up on my Asus router and a domain (mydomain. asuscomm. com) I have Asus instant guard available to me to VPN into my own network, but I don't want to use that all the time and would make sharing books with my mom a pain. ​ Can I use one of the first two to access my ABS? Is it just a matter of port forwarding? ---------------------------------------------------------------------- j0nathanr · 2023-11-17 22:48 Find out what port(s) is used by ABS to serve the audiobooks (if your not sure look at their documentation).Assuming it's https (port 443), log into your router and port forward 443 from the IP of your ABS instance. Test the connection from a device off your network by using your public IP address as the server name (you may have to specify the port you forwarded depending on the client software. e.g: yourpublicip:443). Once you confirm the connection works, now you have to test it using your domain name. Why? Because you won't be able to access your ABS instance while on your local network using your public IP, you have to use the local one. This is where domain names and dns comes into play and makes things a whole lot more complicated (but that's the fun of it :D). Accessing your ABS instance externally using your domain name is easy, all you have to do is create an A record for example "ABS" and point it to your public IP address. So now [abs.yourdomain.com](https://abs.yourdomain.com) will resolve to your public IP address (sounds like you already have done this with DDNS just make sure to create your desired A record). Using [abs.yourdomain.com](https://abs.yourdomain.com) as the server name for you ABS instance should now work off your local network. Internally, you need a DNS server to resolve [abs.yourdomain.com](https://abs.yourdomain.com) to it's local IP address (a simple DNSmasq server would work fine). Then you need to point your client devices to use your internal dns server for dns requests (this can be done manually from the device or from your router's dhcp server). Now requests to [abs.yourdomain.com](https://abs.yourdomain.com) will resolve to ABS' local IP address while on your local network so both internal and external access should work seamlessly. ---------------------------------------------------------------------- angrycatmeowmeow · 2023-11-17 23:00 Wow. Thank you. It looks like it's HTTP port 80, but I do recall seeing instructions somewhere to switch it to HTTPS. I'm already running a DNS server in Adguard Home on my Home Assistant instance. ---------------------------------------------------------------------- j0nathanr · 2023-11-17 23:16 Nice. In that case you install NGINX proxy manager (NPM) on HA (or synology if they have it) so it can take care of SSL for you. You'll need port 80 and 443 open on whatever system you install it on, but it will simply cert management and port forwarding for any other services you run. It proxies HTTP or HTTPS services, encrypts it with the configured SSL cert (it can use let's encrypt for free trusted certs) and serves them to incoming requests based on domain name. Instead of port forwarding 443 or 80 to your ABS IP, forward both ports to NPM's IP. ---------------------------------------------------------------------- angrycatmeowmeow · 2023-11-17 23:39 So I guess there's no way to simplify this using my asuscomm address? Like example. asuscomm. com:13378 which already has a cert? It seems like I've already got so much of this puzzle solved, but I'm missing something big. ---------------------------------------------------------------------- j0nathanr · 2023-11-18 01:11 Domain names simply resolve to IP addresses there's no other function they serve. That being said, your asuscomm domain doesn't have a cert, you might be running a service that the domain resolves to that has a cert but the domain itself is just pointing to an IP address. So there's no technical problem in using your asuscomm domain here. All of what I said above still applies. ---------------------------------------------------------------------- angrycatmeowmeow · 2023-11-18 02:56 I followed [this](https://www.smartlab.at/secure-your-home-assistant- with-https-using-synology-reverse-proxy/) guide and tweaked it for ABS instead of HA. I forwarded external port 8000 for my NAS in my Asus router settings (TCP/UDP) I set up a reverse proxy with a domain of https://abs..direct.quickconnect.to, port 8000, and the destination for that is my NAS IP port 13378, which is where ABS is. I created the websocket it wants under that reverse proxy rule. Still cannot access it locally or on 5G on my phone using that address or my WAN IP, but port checker says port 8000 is open. ---------------------------------------------------------------------- j0nathanr · 2023-11-18 05:03 Hmm, sounds like you did everything correctly. What http error are you getting in your browser? I'm not familiar with Synology's reverse proxy or with how their quick connect domain works. Any reason you don't want to go with NPM on HA? I'd confirm that your quickconnect domain is resolving to your WAN IP externally, and to your reverse proxy's IP internally. You can also try and look trough any logs Synology offers to confirm whether traffic is even reaching the proxy. ---------------------------------------------------------------------- angrycatmeowmeow · 2023-11-18 12:40 I looked into setting up NPM on HA but it also required Maria DB and and as a novice at all this stuff I'm just introducing more possible failure points. It looked like Synology already had everything I needed baked in and since that's where ABS lives it seemed like a no- brainer. This is really a one-off project so it seemed like a big investment with a lot of moving parts to do one thing for one app. https://abs.mydomain.direct.quickconnect.to:8000 gives a plain "could not connect" error https://abs.mydomain.direct.quickconnect.to gives me a not secure warning and when you proceed past that I get a Synology error page saying "cannot connect to abs. cannot connect due to network issues". I **did** assign the the quickconnect certificate in Synology to my new reverse proxy. I'll check the resolving and logs when I get home today. Thanks. ---------------------------------------------------------------------- j0nathanr · 2023-11-18 23:59 NPM doesn't require any separate database, but it can be used with one. I haven't used the NPM add-on in HA so it's possible that specific add-on requires one. Anyhow, I get what your saying for a one off project Synology should work fine. Take a look at their docker hub page, they have instructions for reverse proxies. I don't know what Synology's reverse proxy uses under the hood but perhaps it can be of some help: [https://hub.docker.com/r /advplyr/audiobookshelf](https://hub.docker.com/r/advplyr/audiobookshe lf) It's strange that appending 8000 to the hostname doesn't connect, if the source port in the reveres proxy is 8000 then it should work. Not appending 8000 means your using 443 and that actually gives you a readable error? I would start with a simple http proxy and lose the certificate to simplify things. See if your able to reach abs using http without any ssl cert. You can try this locally of course so you don't have to expose http traffic to the web.