nginx with pihole, nextcloud, openhab - only error 503
See original GitHub issuei like to run pihole, openhab and nextcloud with mariadb with ssl encryption on my homeserver but i dont get it to run probably.
i know there are some 503 error issues already but nothing helful for me. i hope someone can help me and tell me what i am doing wrong
i always get only an 503 error, i tried it with and without lets encrypt and with https redirection and without
here is my compose file
version: '3.7'
services:
nginx:
image: jwilder/nginx-proxy:alpine
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"
container_name: nginx
ports:
- 80:80
- 443:443
networks:
- nginx_network
volumes:
- /home/server/docker/nginx/conf.d:/etc/nginx/conf.d
- /home/server/docker/nginx/vhost.d:/etc/nginx/vhost.d
- /home/server/docker/nginx/html:/usr/share/nginx/html
- /home/server/docker/nginx/certs:/etc/nginx/certs:ro
- /home/server/docker/nginx/htpasswd:/etc/nginx/htpasswd
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
environment:
- DEFAULT_HOST=pihole.domain1.de
- HTTPS_METHOD=noredirect
restart: always
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt
depends_on:
- nginx
networks:
- nginx_network
volumes:
- /home/server/docker/nginx/certs:/etc/nginx/certs:rw
- /home/server/docker/nginx/vhost.d:/etc/nginx/vhost.d:rw
- /home/server/docker/nginx/html:/usr/share/nginx/html:rw
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: always
mariadb:
image: mariadb
container_name: mariadb
restart: always
networks:
- nginx_network
volumes:
- /home/server/docker/mariadb/mysql:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
environment:
- MYSQL_ROOT_PASSWORD=root_password
- MYSQL_PASSWORD=mysql_password
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
nextcloud:
image: nextcloud:latest
container_name: nextcloud
restart: always
depends_on:
- letsencrypt
- nginx
- mariadb
networks:
- nginx_network
volumes:
- /home/server/docker/nextcloud/html:/var/www/html
- /home/server/docker/nextcloud/config:/var/www/html/config
- /home/server/docker/nextcloud/custom_apps:/var/www/html/custom_apps
- /media/Daten/Nextcloud:/var/www/html/data
- /home/server/docker/nextcloud/themes:/var/www/html/themes
- /etc/localtime:/etc/localtime:ro
environment:
- VIRTUAL_HOST=mycloud.domain1.de,mycloud.domain2.de
- VIRTUAL_PROTO=https
- VIRTUAL_PORT=443
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=mycloud.domain1.de,mycloud.domain2.de
- LETSENCRYPT_EMAIL=my@email.address
pihole:
image: pihole/pihole:latest
container_name: pihole
restart: always
depends_on:
- letsencrypt
- nginx
networks:
- nginx_network
volumes:
- /home/server/docker/pihole/log/pihole.log:/var/log/pihole.log
- /home/server/docker/pihole:/etc/pihole
- /home/server/docker/pihole/dnsmasq.d:/etc/dnsmasq.d
#net: host
cap_add:
- NET_ADMIN
environment:
- TZ=Europe/Berlin
- WEBPASSWORD=pihole
- DNS1=46.182.19.48
- DNS2=194.150.168.168
- DNSMASQ_LISTENING=all
- ServerIP=192.168.13.5
- PROXY_LOCATION=pihole
- VIRTUAL_HOST=pihole.domain1.de,pihole.domain2.de
- VIRTUAL_PROTO=https
- VIRTUAL_PORT=443
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=pihole.domain1.de,pihole.domain2.de
- LETSENCRYPT_EMAIL=my@email.address
openhab:
image: openhab/openhab:2.3.0-amd64-debian
container_name: openhab
restart: always
depends_on:
- letsencrypt
- nginx
networks:
- nginx_network
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /home/server/docker/openhab/addons:/openhab/addons
- /home/server/docker/openhab/conf:/openhab/conf
- /home/server/docker/openhab/userdata:/openhab/userdata
environment:
#OPENHAB_HTTP_PORT=8080
#OPENHAB_HTTPS_PORT=8443
- USER_ID=9001
- GROUP_ID=9001
- VIRTUAL_HOST=openhab.domain1.de,,openhab2.domain2.de
- VIRTUAL_PROTO=https
- VIRTUAL_PORT=443
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=openhab.domain1.de,,openhab2.domain2.de
- LETSENCRYPT_EMAIL=my@email.address
networks:
nginx_network:
driver: bridge
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
nginx with pihole, nextcloud, openhab - only error 503 #1169
For reference, I am using my pihole instance to define static DNS entries for all the servers I run in my docker environment...
Read more >HTTP 503 Error - installation - Nextcloud community
Hello, I have a problem when I try to install Nextcloud. I use NGINX, with the Owncloud vhost. I changed directories to match...
Read more >Config Openhabian + Pihole + Nginx all on one device
I know its not recommended to install multiple things on on device, but hardware is much faster nowadays. So I´ve setup and configured ......
Read more >503 Error on Ingress with pi-hole [HELP] : r/kubernetes - Reddit
You probably have the IP wrong. The guide is confusing but you need to get the IP of the node that you're NGINX...
Read more >Index of Unsupported Software - Gentoo Forums
Page:1 · "Error installing application with Lutris" Page:1 · "Dantrell's GNOME Without Systemd ... "Install mod_pagespeed under nginx on gentoo" Page:1 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rlue:
No, I put the file
02-custom.conf
file inside thednsmasq.d
folder. Pihole automatically parses it in, which is why I set the file name to02-...
, that it will not clash with the main config file.The hostnames are mapped to LAN IPs, for example:
They are are resolving to the same LAN IP, because of the
nginx-proxy
setup.As I understand it,
PROXY_LOCATION
is used when pihole is run behind ajwilder/nginx-proxy
setup, but I am not certain. All I know is that it does not hurt being there.Brilliant, thanks! I’ve fiddled with so many things, I can’t even tell what’s necesssary and what’s not anymore, but I think I got away with:
02-custom.conf
file at all,ServerIP
environment variable on the pihole container to the pihole machine’s LAN IP, andVIRTUAL_HOST
environment variable on the pihole container is notpi.hole
.With this, it looks like all the dockerized web services behind my nginx proxy are accessible both on the local network and on the Internet. I suspect that if these were LAN-only addresses, I’d need either the
02-custom.conf
file or theextra_hosts
docker compose option. (Honestly not sure if one can stand in for the other; I just see that you use the former, and this sample docker compose file uses the latter.)