Libresonic+Lets encrypt+DynDNS

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Libresonic+Lets encrypt+DynDNS

      Hi again

      I was wondering how to configure libresonic (if that cant be happen for a reason jellyfin is also ok with me)in order to access it from outside my network.
      I have created accound and set up a subdomain. I have installed libre sonic docker and it plays ok from my internal lan.
      Finally, I have set up lets encrypt and tried following the video for lets encrypt and next cloud but trying to do the similar config for libr sonic up until in this video youtube.com/watch?v=TkjAcp8q0W0 get to the point I have to navigate to sharedfodlers/appdata/letsencrypt/nginx/proxycon-fs in order to access the file nextcloud.subdomain.conf.sample. I was searching for something similar inside the folder but for the libresonic with no luck of course. Then I thought to copy that nextcloud conf and make additional changes to point to libresonic path and name-ology but didnt try it because I didnt want to screw everything up since everything work up until the step I mentioned above.

      Any thoughts particular to libresonic or in a different way to access the media server from outside network (tip - I dont want to use plex)

      Thank you
    • Morlan wrote:

      You can experiment with the proxy-confs without any risk. The container re-creates the *.subdomains.conf.default - files on startup when you delete them.
      Ok thanks but that just not solves the main issue which is .... letsencrypt has already many of those files for each docker preconfigured with same default values and libresonic is absent. Maybe libre sonic hasn't any build in ssl credentials and its not compatible with letsencrypt, maybe it doesnt need it at all or needs to be configured completely different.
    • Ok tried it out and got it working.
      Took the linuxserver.io/libresonic repo. named it libresonic, joined it to my letsencrypt docker network via the extra argument --network my-net.
      in the AppData/letsencrypt/nginx/proxy-confs I created a file: libresonic.subdomains.conf

      Source Code

      1. server {
      2. listen 443 ssl;
      3. listen [::]:443 ssl;
      4. server_name choose_a_subdomain_here_which_is_specified_in_your_letsencrypt_container.*;
      5. include /config/nginx/ssl.conf;
      6. client_max_body_size 0;
      7. location / {
      8. include /config/nginx/proxy.conf;
      9. resolver 127.0.0.11 valid=30s;
      10. set $upstream_libresonic libresonic;
      11. proxy_pass http://$upstream_libresonic:4040;
      12. }
      13. }
      Display All
      restarted the letsencrypt - container
    • Morlan wrote:

      Ok tried it out and got it working.
      Took the linuxserver.io/libresonic repo. named it libresonic, joined it to my letsencrypt docker network via the extra argument --network my-net.
      in the AppData/letsencrypt/nginx/proxy-confs I created a file: libresonic.subdomains.conf

      restarted the letsencrypt - container
      After you restarted how did excactly check if it loads the libresonic page? If youwere from a device within you local network doesn't count..... Did you connect with your mobile phone with data instead of wifi and tried typing what ? subdomain_you_entered_in_duckdns.duckdns.org ???? and loaded?? prompting you for user and pass?

      PS Also noticed that if you re enter letsecrypt container and libresonic also you can see that network mode changed from bridge to the name of network you created with the command docket network create network_name_of_your_liking
      Accordingly in libresonic container in extra arguments options do you have the line --network your_network_name_during creation

      The post was edited 2 times, last by ieronymous ().

    • New

      Morlan wrote:

      I can access the login page via my mobile phone with only mobile data enabled. I tried playing music via an android app called Ultrasonic, which also worked. As server: https://mysubdomain.myaccount.duckdns.org
      hm.... mysubdomain (ok) but why .myaccount? in the middle.. Your account if singed in with google account would be something like my_name@gmail.com so you typed

      mysubdomain.myname@gmail.com.duckdns.org???? Never seen a guide mentioning that
    • New

      Morlan wrote:

      Good to know! I didnt dive into the topic of libresonic. Was interested by the challenge to get it to work with letsencrypt.
      I've always used Libresonic (w/o letsencrypt, no need for it), I only found that reddit thread a few months ago when searching out something else. Out of curiosity, I just installed Airsonic. It sets up exactly the same and the GUI is virtually identical.

      If the OP really wants to use Libresonic, I'd wager he could probably take the Airsonic sample, edit and name it appropriately, then save it and it would work fine w/ Libresonic and Letsencrypt
      Air Conditioners are a lot like PC's... They work great until you open Windows.

    • New

      KM0201 wrote:

      Morlan wrote:

      Good to know! I didnt dive into the topic of libresonic. Was interested by the challenge to get it to work with letsencrypt.
      I've always used Libresonic (w/o letsencrypt, no need for it), I only found that reddit thread a few months ago when searching out something else. Out of curiosity, I just installed Airsonic. It sets up exactly the same and the GUI is virtually identical.
      If the OP really wants to use Libresonic, I'd wager he could probably take the Airsonic sample, edit and name it appropriately, then save it and it would work fine w/ Libresonic and Letsencrypt
      You mentioned it first..... I was about to say after watching a video for airsonic that the interface is exactly the same.... its also the jellyfin which has a little more darkly environment, So you can access any of thsi programs remotely just configuring duckdns and the container you want to use? Any guide following?

      PS Since you used Libresonic is there a way to make it output your media library by directory instead of lets say genre/artist/.... I have folders named under genres and inside i have the bands and finally inside the bands have the discography. Best way for me to access them is by genre which the name the parent folder has
    • New

      ieronymous wrote:

      KM0201 wrote:

      Morlan wrote:

      Good to know! I didnt dive into the topic of libresonic. Was interested by the challenge to get it to work with letsencrypt.
      I've always used Libresonic (w/o letsencrypt, no need for it), I only found that reddit thread a few months ago when searching out something else. Out of curiosity, I just installed Airsonic. It sets up exactly the same and the GUI is virtually identical.If the OP really wants to use Libresonic, I'd wager he could probably take the Airsonic sample, edit and name it appropriately, then save it and it would work fine w/ Libresonic and Letsencrypt
      You mentioned it first..... I was about to say after watching a video for airsonic that the interface is exactly the same.... its also the jellyfin which has a little more darkly environment, So you can access any of thsi programs remotely just configuring duckdns and the container you want to use? Any guide following?
      PS Since you used Libresonic is there a way to make it output your media library by directory instead of lets say genre/artist/.... I have folders named under genres and inside i have the bands and finally inside the bands have the discography. Best way for me to access them is by genre which the name the parent folder has
      I would think there's guides out there on Letsencrypt and Airsonic.. but again, it's not something I'm really interested in doing with my music and have never tried. (I don't even keep music on Nextcloud.. it's strictly for personal documents and photos).

      Not sure on your view question either... Only thing I really notice is the drop down menu where you can choose your genre...
      Air Conditioners are a lot like PC's... They work great until you open Windows.

    • New

      KM0201 wrote:

      Not sure on your view question either... Only thing I really notice is the drop down menu where you can choose your genre...
      Yes but it takes the genre by mp3's tag and many times different albums from same artist have another naming scheme for the genre option (rock, hard_rock) and that has an impact of not being able to store same albums from same artist together because ti scatters them with each new word inside genre it finds and creates a mesh you have to look around each time.

      Anyway thank you for the time and answers though
    • New

      ieronymous wrote:

      Morlan wrote:

      I can access the login page via my mobile phone with only mobile data enabled. I tried playing music via an android app called Ultrasonic, which also worked. As server: https://mysubdomain.myaccount.duckdns.org
      hm.... mysubdomain (ok) but why .myaccount? in the middle.. Your account if singed in with google account would be something like my_name@gmail.com so you typed
      mysubdomain.myname@gmail.com.duckdns.org???? Never seen a guide mentioning that
      It depends if you want to connect your duckdns account with only one service or more. When I set up my letsencrypt docker I specified some sub-subdomains for the different services e.g. Nextcloud, emby. So for libresonic the url would like: libresonic.mysubdomain.duckdns.org.
      Does this make sense? Or did I misinterpret your question?

      The post was edited 1 time, last by Morlan ().

    • New

      Morlan wrote:

      It depends if you want to connect your duckdns account with only one service or more. When I set up my letsencrypt docker I specified some sub-subdomains for the different services e.g. Nextcloud, emby. So for libresonic the url would like: libresonic.mysubdomain.duckdns.org.
      Does this make sense? Or did I misinterpret your question?
      No you got it right but your answer or isnt clear for me or I still miss something to fill the puzzle. Ok you made more subdomains its perfectly logical. So libresonic is one of the subdomains (duck dns lets you make 5 of them right?) So typing would be libresonic (which is the subdomain.duckdns.org) The extra subdomain in the middle where do you add that??? Also where is the port to know which docker is it heading? Or inside the docker parameteres you somehow tell it that subsonic goes to your internal ip and not the public.Because duck dns binds a name with the public which changes. ok .. In that public then which is changed to a name how is it bind to a specific satic ip. Inside your home you should have multiple ones. So all videos from techno dad needs an extra parameter in each docker to work from outside?


      PS Just tried something and it worked not sure I can explain it though. So.... in duck dns lets say i have a subdomain called prg1. In port forward i open the specific port 4040 for prg1. Now if I type
      prg1.duckdns.org it doesnt load externally. If I add prg1.duckdns.org:4040 then it loads the prg1 web page. So the only way to open 3-4 programs (prg1,prg2,prg3,prg4) is to type each time prg1.duckdns.org:port1,2,3,4 and changing the number of the port. This way with only one subdomain you get to have access to all the programs with the downside you have to remember the ports. A workaround this would be to rememebr only the port of heimdalle and through that to access whatever container you want.

      If i try to accomplish the above with different subdomains in duck dns I can t see how since all subdomains will bind to my same external ip address. Each like you are trying to access the same page with multiple different names (prg1.duckdns.org, prg2.duckdns.org........http://prg10.duckdns.org will all point to the same web page -if it would work As I mentioned worked only when entered a port which already portforwarded it to my router)

      The post was edited 1 time, last by ieronymous ().

    • New

      I think the piece you are missing is the reverse proxy (nginx) which is part of the letsencrypt docker. You dont need any port forwardings execpt the 443 port for letsencrypt. And you only need one duckdns subdomain (e.g. ieronymous.duckdns.org). When you set up the letsencrypt docker you specify a parameter called SUBDOMAINS. In this field you just enter names which you can set as sub-subdomains before your duckdns-url (e.g. libresonic.ieronymous.duckdns.org). The names you enter in the SUBDOMAINS parameter will just be seperated by , not by a space. Then when you get the letsencrypt certificate also your sub-subdomains will get a valid ssl-certificate.
      After this you have to configure nginx as the reverse proxy in the letsencrypt container. This is done by editing the *.conf - files in the /Appdata/letsencrypt/nginx/proxy-confs/ - folder. Like in the example I mentioned above. Inside the *.conf - file is a line which for example says: server_name libresonic.*; this is the point which lets the reverse proxy know where to guide requests.
      So you now you can have different sub-subdomains for your different dockers (e.g. libresonic.ieronymous.duckdns.org, nextcloud.ieronymous.duckdns.org or emby.ieronymous.duckdns.org). No extra port forwardings needed except the 443 port for letsencrypt. Only make sure that docker containers which are to connected this way are joined in a docker-network (like in the TDL vids).
    • New

      @Morlan
      What got me confused first time was when you wrote: <<I can access the login page via my mobile phone with only mobile data enabled. I tried playing music via an android app called Ultrasonic, which also worked. As server: mysubdomain.myaccount.duckdns.org>> That in my mind seemed like i have in duckdns site have to put my gmail account.my subdomain.duckdns.org, you meant though mysubdomain (configured at ngix and not inside duckdns).my subdomain (the one inside duckdns).duckdns.org.
      Have to go back home and test it again with letsencrypt again. i thought that I could do it with only 2 containers duckdns and the one I m trying to access remotely (well I did but a lot of exposure of individual ports and no ssl at all).
      By the way the 443 port is being used by omv for tdl/ssl connections. Should that option be enabled from the gui of the omv or not?? Then of course 2 programs omv and letsencrypt would share same port and I dont know if that would be a good thing to do.
      Lastly the SUBDOMAINS parameter is set not only in letsencrypt but in the duckdns subdomain also. Do I have there to enter as SUBDOMAINS only the one i set up in the duckdns web page or the same subdomains that I will put in the letsencrypt subdomain parameter . Probably that parameter is case sensitive?
    • New

      ieronymous wrote:

      By the way the 443 port is being used by omv for tdl/ssl connections. Should that option be enabled from the gui of the omv or not?? Then of course 2 programs omv and letsencrypt would share same port and I dont know if that would be a good thing to do.
      Which port exactly? You probably mean you enabled the "secure connection" in the OMV Gui. That means OMV occupies the port 443 on your OMV machine in your local network.
      The port 443 I was talking about is the external facing port 443 on your router. When you set up the letsencrypt container according to @'TechnoDadLife''s video there will be no interferences of ports cause he mapped the letsencrypt on the OMV machine to port 450 and his router settings redirect the external (internet side) port 443 to port 450 on the OMV machine.

      ieronymous wrote:

      Lastly the SUBDOMAINS parameter is set not only in letsencrypt but in the duckdns subdomain also. Do I have there to enter as SUBDOMAINS only the one i set up in the duckdns web page or the same subdomains that I will put in the letsencrypt subdomain parameter . Probably that parameter is case sensitive?
      The names are misleading. For duckdns the subdomain is the part which comes before .duckdns.org which is technically correct (I think).
      When you set up the letsencrypt container you specify the base URL (e.g. ieronymous.duckdns.org). And then with the SUBDOMAINS the names which will come before .ieronymous.duckdns.org. So technically these would be the sub-subdomains.
      If you set up the containers according to @'TechnoDadLife' : duckdns letsencrypt it should be fine!
    • New

      Morlan wrote:

      Which port exactly? You probably mean you enabled the "secure connection" in the OMV Gui. That means OMV occupies the port 443 on your OMV machine in your local network.
      The port 443 I was talking about is the external facing port 443 on your router. When you set up the letsencrypt container according to @'TechnoDadLife''s video there will be no interferences of ports cause he mapped the letsencrypt on the OMV machine to port 450 and his router settings redirect the external (internet side) port 443 to port 450 on the OMV machine.
      Yes that one but then again you re right. The 443 for omv is the internal one as you mentioned. TechnoDad configuration isnt working for me. Even though I have portforwarde portsfor years in different apps and using single port and range port but ALWAYS the external and internal port was the same number or ranger of numbers meaning 443->443, 400-440->400-440. First time I tried the external to be different than internal and none of the ports seems opened with any program I am testing. i f I change the 443->450 in 443->443 or 450->450 alone it will work. I think what TechnoDad did is a combination of forwarding and routing afterwards? See here
      [Blocked Image: http://oi67.tinypic.com/282hx1g.jpg]
      The above forwarding doesnt work (and its not win firewall, comodo firewall fault). As already mentioned if I change the number to both tabs WAN and LAN to be the same is working



      Morlan wrote:

      The names are misleading. For duckdns the subdomain is the part which comes before .duckdns.org which is technically correct (I think).
      When you set up the letsencrypt container you specify the base URL (e.g. ieronymous.duckdns.org). And then with the SUBDOMAINS the names which will come before .ieronymous.duckdns.org. So technically these would be the sub-subdomains.
      If you set up the containers according to @'TechnoDadLife' : duckdns letsencrypt it should be fine!
      So
      in duckdns site set up: ieronymous.duckdns.org for example
      in duckdns container as SUBDOMAINS enter what? ieronymous only or the whole url link (ieronymous probably) ans for TOKEN copy pase from duckdns site its obvious
      in lets encrypt for CONTAINERS enter the names of apps to use for example libresonic,airsonic......(is that case sensitive. Does for instance libresonic has to be as in Appdata directory, or as I typed it inside the libresonic container in order to work? Because there is going to be an entry also to edit in the conf files inside the letsencrypt directory.All the above naming has to be the same????)
    • Users Online 1

      1 Member (1 invisible)