Lighttpd Going back to port 80 when I have it set to 8081 on pihole

April 3, 2024, 21:45

dailytinker

So I run Pihole on Synology NAS and everytime I update the container Lighttpd which is supposed to be on port 8081 is back on port 80 and then it fails because port 80 is used on my Synology NAS for web server which is on https://athernas.net and it gets annoying because It makes my internet experience slow and not work half the time if you need more let me know

k9t33n

docker compose file?

dailytinker


dailytinker

here is the compose file
docker
docker run -d --name=pihole \
-e WEB_PORT=8081 \
-e WEBPASSWORD=mypassword \
-e WEB_BIND_ADDR=192.168.90.1 \
-e TZ=timezone \
-e DNSMASQ_USER=root \
-e DNSMASQ_LISTENING=local \
-v /volume1/docker/pihole/dnsmasq.d:/etc/dnsmasq.d \
-v /volume1/docker/pihole/pihole:/etc/pihole \
--net=host \
--restart always \
pihole/pihole

dailytinker

192.168.90.0 subnet is a WebBridge that connects containers from docker to pihole

dailytinker

192.168.1.200 and so on is a local MacVlan that connects docker containers to nginx proxy manager to my local network

dailytinker

and I have 90.0 subnet so I can set up containers for my actual site

dailytinker

k9t33n

ill have to help you tommorow my brains not working enough for this

dailytinker

alright

oops.se

This is NOT a "docker compose" file, this is a "docker command line". The docker compose file has a yaml structure. Example of a comppose.yaml:
yaml
services:
  frontend:
    image: example/webapp
    ports:
      - "443:8043"
    networks:
      - front-tier
      - back-tier
    configs:
      - httpd-config
    secrets:
      - server-certificate

oops.se

The standard way to do it is to map the hosts port (your NAS) to the containers port like this: -p 8080:80 This will map port 8080 on the docker host (your NAS) to port 80 in the docker container (PiHole).

oops.se

And I would advice you to look in to "Docker compose" as it easier to maintain and read, for me anyway as it is a structured file.