# PiHole & Vaultwarden port 80 conflict

**URL:** <https://vaultwarden.discourse.group/t/pihole-vaultwarden-port-80-conflict/2833>\
**Category:** Help\
**Created:** [August 1, 2023, 3:35am UTC](https://vaultwarden.discourse.group/t/pihole-vaultwarden-port-80-conflict/2833 "2023-08-01T03:35:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dane](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@Dane](https://vaultwarden.discourse.group/u/Dane)\
**Post date:** [August 1, 2023, 3:35am UTC](https://vaultwarden.discourse.group/t/pihole-vaultwarden-port-80-conflict/2833/1 "2023-08-01T03:35:08Z")

</div>

Hi,

I have been using pihole for about 1 year with no problems. Last night i got vaultwarden setup on the same RPI using nginx for the reverse proxy, and nginx is stealing the port 80 from pihole. I can run either app alone, but not both at the same time. I was wondering if there is an easy way for a noob to make these 2 apps play nice together. I have pihole running in docker and nginx is just normal version on raspberry pi.

TIA  
Dane

---

<div class="post-metadata">

**Author:** ![stefan0xC](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/stefan0xc/32/1765_2.png) [@stefan0xC](https://vaultwarden.discourse.group/u/stefan0xC)\
**Post date:** [August 1, 2023, 9:21am UTC](https://vaultwarden.discourse.group/t/pihole-vaultwarden-port-80-conflict/2833/2 "2023-08-01T09:21:50Z")

</div>

Seems like PiHole is using lighttpd (see [Prerequisites - Pi-hole documentation](https://docs.pi-hole.net/main/prerequisites/#ports)) so you can either run that [on a different port](https://docs.pi-hole.net/guides/webserver/caddy/#modifying-lighttpd-configuration) (this Guide is using Caddy as reverse proxy but you could theoretically also configure nginx to do the same) or disable `lighttpd` and use an [nginx configuration like this](https://docs.pi-hole.net/guides/webserver/nginx/).

I’d recommend looking/asking in the [Pi-hole userspace](https://discourse.pi-hole.net/) for further support.

---

<div class="post-metadata">

**Author:** ![Dane](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@Dane](https://vaultwarden.discourse.group/u/Dane)\
**Post date:** [August 2, 2023, 2:40am UTC](https://vaultwarden.discourse.group/t/pihole-vaultwarden-port-80-conflict/2833/3 "2023-08-02T02:40:28Z")

</div>

You are right, it is using lighttpd. i got into the config for it inside docker and changed it to listen on port 81. that fixed pihole, but broke nginx. I am thinking of running nginx in a docker container so I would have more control over the ports, but i dont know enough about docker to be able to get my revere proxy config into the container.

---

<div class="post-metadata">

**Author:** ![kja999](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kja999](https://vaultwarden.discourse.group/u/kja999)\
**Post date:** [August 2, 2023, 8:54am UTC](https://vaultwarden.discourse.group/t/pihole-vaultwarden-port-80-conflict/2833/4 "2023-08-02T08:54:03Z")

</div>

I posted docker-compose and nginx.conf on this other thread yesterday, which might give some hints:

> [@Need help setting up my vaultwarden with duckdns](https://vaultwarden.discourse.group/t/need-help-setting-up-my-vaultwarden-with-duckdns/2504):
>
> Hello, I tried now 10 hours to get this running. my docker-compose version: '3' services: vaultwarden: image: vaultwarden/server:latest container\_name: vaultwarden restart: always volumes: - ./vw-data:/data environment: WEBSOCKET\_ENABLED: "true" # Enable WebSocket notifications. caddy: image: caddy:2 container\_name: caddy restart: always ports: - 80:80 # Needed for the ACME HTTP-01 challenge. - 443:443 volumes: …

Change the listen port there for nginx and should all work…(you can skip the duckdns parts)

---

<div class="post-metadata">

**Author:** ![Dane](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@Dane](https://vaultwarden.discourse.group/u/Dane)\
**Post date:** [August 4, 2023, 1:56am UTC](https://vaultwarden.discourse.group/t/pihole-vaultwarden-port-80-conflict/2833/5 "2023-08-04T01:56:20Z")

</div>

I think it is all working except for the nginx conf file. I dont know to get it into the nginx container, so the reverse proxy isnt working. I decided to keep the duckdns parts so it will be easier to access from outside my network. Also for anyone else wanting to use this compose file, the spacing is off on the sections starting with line 16 and 29. Thanks for your help getting me this far.

Dane

---

<div class="post-metadata">

**Author:** ![kja999](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kja999](https://vaultwarden.discourse.group/u/kja999)\
**Post date:** [August 14, 2023, 8:35am UTC](https://vaultwarden.discourse.group/t/pihole-vaultwarden-port-80-conflict/2833/6 "2023-08-14T08:35:07Z")

</div>

On the docker host you can use the command for “docker cp” to copy a host file to the container.

---

<div class="post-metadata">

**Author:** ![Dane](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@Dane](https://vaultwarden.discourse.group/u/Dane)\
**Post date:** [August 15, 2023, 2:15am UTC](https://vaultwarden.discourse.group/t/pihole-vaultwarden-port-80-conflict/2833/7 "2023-08-15T02:15:13Z")

</div>

nginx didnt work for me no matter what i tried. im going to try traefik or caddy and see if i have any better luck. thank you for trying
