Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Selfhosted
  3. set up local DNS using Pi-hole + nginx + audiobookshelf

set up local DNS using Pi-hole + nginx + audiobookshelf

Scheduled Pinned Locked Moved Selfhosted
selfhosted
34 Posts 14 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • samsapti@feddit.dkS [email protected]

    In the compose file for Audiobookshelf, you need to add the service itself to the network you defined at the bottom. Something like:

    services:
      audiobookshelf:
        ...
        networks:
          - default
          - nginx
    

    (The default network is to keep it in the network that is created on docker compose up).

    H This user is from outside of this forum
    H This user is from outside of this forum
    [email protected]
    wrote last edited by
    #25

    thank you! this works!

    1 Reply Last reply
    1
    • pastime0293@discuss.tchncs.deP [email protected]

      Both your containers need share at least one network. It looks like have created a external network. Good job.
      The next step is to configure your container to join the network. Do something like this:

      services:
        nginx-proxy-manager: 
           ....
           networks:
             - nginx-proxy-manager_default # or just nginx
            ...
      
      networks:
        nginx:
          name: nginx-proxy-manager_default
          external: true  
      

      Don't forget to also add the network in your audiobookshelf service.

      Maybe this helps: https://docs.docker.com/compose/how-tos/networking/#use-an-existing-network

      H This user is from outside of this forum
      H This user is from outside of this forum
      [email protected]
      wrote last edited by
      #26

      thank you! this works!

      1 Reply Last reply
      1
      • C [email protected]

        Are you sure both containers (npm and audiobookshelf) are in the same network? I see you don't specify the network in the NPM compose file.

        Check that like this:

        $ docker inspect container-name| grep -A3 Networks
                    "Networks": {
                        "network_name": {
                            "IPAMConfig": null,
                            "Links": null,
        

        See if both your containers are in the same network - they should be.

        H This user is from outside of this forum
        H This user is from outside of this forum
        [email protected]
        wrote last edited by
        #27

        thank you problem solved!

        1 Reply Last reply
        1
        • S [email protected]

          Based on you screenshot from the NPM Dashboard there seems to be something wrong. In the setup window you show that you forward the traffic with http and port 80, in the dashboard screenshot you forward the traffic with https and port 80.

          Just skip http and self signed certificates all together. Modern Browsers make it a pain to use non https sites.
          A simple domain setup with dns acme challenge is a little bit of a hassle but worth the hour(s) of invested time. Especially with npm were it is a set and forget option.

          Does pihole support wildcard dns entries yet? To my knowledge the gui only supports single entries so that you have to enter every subdomain manually in pihole that you want to have forwarded. Workaround would be to use a dnsmasq config file or use something else like addguard.

          H This user is from outside of this forum
          H This user is from outside of this forum
          [email protected]
          wrote last edited by
          #28

          no I don't think pi-hole supports wild card dns, how do you deal with this issue? do you simply use addguard?

          S 1 Reply Last reply
          0
          • M [email protected]

            You're missing the networks section in your audiobookshelf service definition - add networks: [nginx] to your audiobookshelf service to actually connect it to the network (just defining the network at the bottom doesn't automatically attach your service to it, which is why npm can't reach it and gives you that 502 error), and if you're an audiobook fan you might wanna check out the soundleaf app for ios which works great with audiobookshelf.

            H This user is from outside of this forum
            H This user is from outside of this forum
            [email protected]
            wrote last edited by
            #29

            thank you! this works!

            1 Reply Last reply
            0
            • B [email protected]

              default in this example is the actual name of the network, in this case we're modifying the default network. external: true declares that the network has already been created, name: scoobydoo is a way of customizing the name of the default network.

              H This user is from outside of this forum
              H This user is from outside of this forum
              [email protected]
              wrote last edited by
              #30

              thanks a lot!

              1 Reply Last reply
              1
              • B [email protected]

                I don’t see an immediate issue but I do see some general issues.

                Unless you own local.com, don’t use it.

                While you could use .local as your tld, I wouldn’t do that either. You can buy a domain name for cheap and really that’s the way to go.

                Also, reference your FQDN and not your hostname. Don’t expect hosts to fill in the blanks.

                H This user is from outside of this forum
                H This user is from outside of this forum
                [email protected]
                wrote last edited by
                #31

                changed it! thanks a lot!

                1 Reply Last reply
                1
                • R [email protected]

                  Start a console on NPM. See if you can curl or wget the target.

                  Start with IPs and ports. Then move to DNS.

                  NPM's configuration never felt terribly comfortable to me.

                  Another common problem is to unintentionally set your container up where URLs require SSL. When you hit the container page the URL call backs can end up with HTTPS.

                  H This user is from outside of this forum
                  H This user is from outside of this forum
                  [email protected]
                  wrote last edited by
                  #32

                  thanks a lot problem solved

                  1 Reply Last reply
                  1
                  • H [email protected]

                    no I don't think pi-hole supports wild card dns, how do you deal with this issue? do you simply use addguard?

                    S This user is from outside of this forum
                    S This user is from outside of this forum
                    [email protected]
                    wrote last edited by
                    #33

                    I switched to adguard, yes. But you can just give pi-hole a dnsmasq config file. The underlying dns server Pi-Hole uses does support those.

                    Just mount the file via a docker volume. I will have to look up the exact paths. Config would look like

                    address=/domain.tld/192.168.0.1
                    
                    H 1 Reply Last reply
                    0
                    • S [email protected]

                      I switched to adguard, yes. But you can just give pi-hole a dnsmasq config file. The underlying dns server Pi-Hole uses does support those.

                      Just mount the file via a docker volume. I will have to look up the exact paths. Config would look like

                      address=/domain.tld/192.168.0.1
                      
                      H This user is from outside of this forum
                      H This user is from outside of this forum
                      [email protected]
                      wrote last edited by
                      #34

                      thanks a lot

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups