# QNAP Docker installation nginx error

**URL:** <https://gramps.discourse.group/t/qnap-docker-installation-nginx-error/6930>\
**Category:** Gramps Web\
**Created:** [February 5, 2025, 7:52pm UTC](https://gramps.discourse.group/t/qnap-docker-installation-nginx-error/6930 "2025-02-05T19:52:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![KratosZG123](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@KratosZG123](https://gramps.discourse.group/u/KratosZG123)\
**Post date:** [February 5, 2025, 7:52pm UTC](https://gramps.discourse.group/t/qnap-docker-installation-nginx-error/6930/1 "2025-02-05T19:52:57Z")

</div>

Hi to all!

I have QNAP NAS TS-251A. Since I would like to give Grampsweb access to my family members I tried to install it using docker compose script provided on Grampsweb wiki page. First I installed Container station, then Portainer, then using ssh and vim created yml file containing aforementioned script:  
[docker-compose-letsencrypt/docker-compose.yml](https://raw.githubusercontent.com/gramps-project/gramps-web-docs/main/examples/docker-compose-letsencrypt/docker-compose.yml)

I have ran it unchanged. I don’t know if I had to change some fileds (maybe VIRTUAL\_HOST: or LETSENCRYPT\_EMAIL:)  
Anyway, without any changes I got an error after running docker-compose up -d:

```python
 Creating network "default_proxy-tier" with the default driver

Creating volume "default_acme" with default driver

Creating volume "default_certs" with default driver

Creating volume "default_conf" with default driver

Creating volume "default_dhparam" with default driver

Creating volume "default_vhost.d" with default driver

Creating volume "default_html" with default driver

Pulling proxy (docker.io/nginxproxy/nginx-proxy:)...

latest: Pulling from nginxproxy/nginx-proxy

af302e5c37e9: Pull complete

207b812743af: Pull complete

841e383b441e: Pull complete

0256c04a8d84: Pull complete

38e992d287c5: Pull complete

9e9aab598f58: Pull complete

4de87b37f4ad: Pull complete

0205854e9b2e: Pull complete

1c0be1073d86: Pull complete

6a958a2b3887: Pull complete

9eb3c94da7d3: Pull complete

06184f50c7af: Pull complete

4f4fb700ef54: Pull complete

Digest: sha256:d6fe13a07286a656df18ac66aa0b4662633d46e4d8e844d1c2cb75bf47183b1f

Status: Downloaded newer image for nginxproxy/nginx-proxy:latest

Pulling acme-companion (docker.io/nginxproxy/acme-companion:)...

latest: Pulling from nginxproxy/acme-companion

1f3e46996e29: Pull complete

d1378c72c795: Pull complete

16addf0bfa14: Pull complete

649bc449c7ed: Pull complete

d68479c64da9: Pull complete

39481f41fa4c: Pull complete

4f4fb700ef54: Pull complete

Digest: sha256:3269c6369c22ea0dd729c3f5b2bf67c73d7ecbdfd716633f165d84e1180a54ef

Status: Downloaded newer image for nginxproxy/acme-companion:latest

Creating grampsweb_redis ...

Creating nginx-proxy ...

Creating nginx-proxy ... error

WARNING: Host is already in use by another container

ERROR: for nginx-proxy Cannot start service proxy: driver failed programming ex

Creating grampsweb_redis ... done

5674a9c27bec4d43b8da2d09302d7): listen tcp4 0.0.0.0:443: bind: address already i

Creating grampsweb ... done

Creating grampsweb_celery ... done

ERROR: for proxy Cannot start service proxy: driver failed programming external connectivity on endpoint nginx-proxy (911387b28ba783557acb04d2536e1b53a535674a9c27bec4d43b8da2d09302d7): listen tcp4 0.0.0.0:443: bind: address already in use

ERROR: Encountered errors while bringing up the project. 

```

All installed container appear to be running according to Portainer (although I don’t know how to access this Grampsweb I installed :)) EXCEPT nginx and when I try to restart it gives an error port 443 bind error.

I have looked all over internet for 3 days and I just can’t find a solution. Some of the commands I have found somewhere don’t work in SSH terminal.  
I don’t know what to do anymore because frankly I don’t understand a lot of the talk but I try to follow by Googling some of the to me unknown terms…

I ran

```python
netstat -pna | grep 443

```

and got results which state PLEX Media Server, apache proxys and dhcpd

Should I remove all containers and edit the script somehow?  
Should I try to edit it by chaging to some other port instead 443 (as I understand that is standard HTTPS port)?

Please help!  
I really have no idea what to do!  
Please answer for total noob 🙂 I can ssh to NAS and run some commands and paste output here if needed.

Thank you very much!

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [February 5, 2025, 8:11pm UTC](https://gramps.discourse.group/t/qnap-docker-installation-nginx-error/6930/2 "2025-02-05T20:11:10Z")

</div>

Not pertinent to this question about configuring **Gramps Web _for servers_** on a QNAP NAS, there’s a 2022 thread about setting up **Gramps _for desktops_** on that device. (The thread is for a one-user-at-a-time configuration and pre-dates Gramps Web.)

Just posting this to link the 2 threads.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [February 5, 2025, 8:17pm UTC](https://gramps.discourse.group/t/qnap-docker-installation-nginx-error/6930/3 "2025-02-05T20:17:45Z")

</div>

**passing your message log through Perplexity.ai yields the following interpretation:**

Based on the error messages, it appears that the main issue is a port conflict. The nginx-proxy container is unable to start because port 443 is already in use on your system. Here are the suggested next steps:

1. Check if any other service is using port 443:  
Run the command `sudo lsof -i :443` to see what process is currently using this port.

2. Stop the conflicting service:  
If you find a service using port 443, stop it or configure it to use a different port.

3. Ensure no other Docker containers are using port 443:  
Run `docker ps` to list all running containers and check their port mappings.

4. If you can’t stop the conflicting service, modify your Docker Compose file:  
Change the port mapping for the nginx-proxy service to use a different external port, e.g., “444:443”.

5. Clean up and try again:  
Run `docker-compose down -v` to remove all containers and volumes, then attempt to start the services again with `docker-compose up -d`.

If these steps don’t resolve the issue, you may need to investigate further by checking Docker logs or consulting the Gramps Web documentation for troubleshooting advice[7][8].

Citations:  
[1] [Try out locally - Gramps Web](https://www.grampsweb.org/install_setup/quickstart/)  
[2] [Deploy with Docker - Gramps Web](https://www.grampsweb.org/install_setup/deployment/)  
[3] [Gramps Web droplet: docker-compose: not found | DigitalOcean](https://www.digitalocean.com/community/questions/gramps-web-droplet-docker-compose-not-found)  
[4] [How to Install Gramps Web on Your Synology NAS – Marius Hosting](https://mariushosting.com/how-to-install-gramps-web-on-your-synology-nas/)  
[5] [ERROR installing via docker · gramps-project/gramps-web · Discussion #382 · GitHub](https://github.com/gramps-project/gramps-web/discussions/382)  
[6] [Getting Started - Gramps Web](https://www.grampsweb.org/install_setup/setup/)  
[7] [Get Help - Gramps Web](https://www.grampsweb.org/help/help/)  
[8] [docker-setup with Multi-Tree support fails to start the web container · Issue #510 · gramps-project/gramps-web-api · GitHub](https://github.com/gramps-project/gramps-web-api/issues/510)

---

<div class="post-metadata">

**Author:** ![DavidMStraub](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davidmstraub/32/7_2.png) [@DavidMStraub](https://gramps.discourse.group/u/DavidMStraub)\
**Post date:** [February 5, 2025, 8:29pm UTC](https://gramps.discourse.group/t/qnap-docker-installation-nginx-error/6930/4 "2025-02-05T20:29:41Z")

</div>

Well if you see `...` followed by a comment with “e.g.” - yes you better replace it with your own values…

---

<div class="post-metadata">

**Author:** ![KratosZG123](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@KratosZG123](https://gramps.discourse.group/u/KratosZG123)\
**Post date:** [February 28, 2025, 5:45pm UTC](https://gramps.discourse.group/t/qnap-docker-installation-nginx-error/6930/5 "2025-02-28T17:45:10Z")

</div>

Hi!

As I said I am a real noob for this code stuff, and all I can do I have found out through Google search, so thank you for your patience 🙂

So, I edited yml file with domain which I got from [duckdns.org](http://duckdns.org) and I have put it in lines VIRTUAL\_HOST and LETSENCRYPT\_HOST lines and under LETSENCRYPT\_EMAIL i have put my gmail mail address.

Later I still had errors for ports 443 and 80, so I edited yml files as ChatGPT suggested and now ports in the proxy: block state “80:80” and “8443:443”. Then when I ran the script with docker-compose up -d command I got all green “done” messages. Are those port numbers ok (left side:right side)?

I have forwarded ports on my router with pointing to NAS IP with external port 8443 and internal port 443. Is this ok?

Now I tried accessing my Gramps instance through web browser  
[https://xy.duckdns.org:8443](https://xy.duckdns.org:8443) (xy changed to real value)  
And I don’t get anything.  
Can anyone suggest what is wrong now? Is it too soon to try? Should I get some email from Letsencrypt?

Thank you for the help!

---

<div class="post-metadata">

**Author:** ![KratosZG123](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@KratosZG123](https://gramps.discourse.group/u/KratosZG123)\
**Post date:** [March 1, 2025, 6:45pm UTC](https://gramps.discourse.group/t/qnap-docker-installation-nginx-error/6930/6 "2025-03-01T18:45:32Z")

</div>

Hi all,

Today I had some time and went back and forth with ChatGPT to try to figure this thing out, and why I can’t get to GrampsWeb. The docker-compose.yml I used is here: [https://raw.githubusercontent.com/gramps-project/gramps-web-docs/main/examples/docker-compose-letsencrypt/docker-compose.yml](https://raw.githubusercontent.com/gramps-project/gramps-web-docs/main/examples/docker-compose-letsencrypt/docker-compose.yml)

These are the findings so far:

**Finding 1**  
Using this command we saw there are errors in nginx-proxy:

`# docker logs nginx-proxy --tail 50`

This is the result:

```python
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26674800
nginx.1 | 2025/02/28 21:16:05 [crit] 7001#7001: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26674900
nginx.1 | 2025/02/28 21:16:05 [crit] 7002#7002: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26675000
nginx.1 | 2025/02/28 21:16:05 [crit] 7003#7003: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26675100
nginx.1 | 2025/02/28 21:16:05 [crit] 7004#7004: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26675200
nginx.1 | 2025/02/28 21:16:05 [crit] 7005#7005: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26675300
nginx.1 | 2025/02/28 21:16:05 [crit] 7006#7006: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26675400
nginx.1 | 2025/02/28 21:16:06 [crit] 7007#7007: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26675500
nginx.1 | 2025/02/28 21:16:06 [crit] 7008#7008: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26675600
nginx.1 | 2025/02/28 21:16:06 [crit] 7009#7009: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26675700
nginx.1 | 2025/02/28 21:16:06 [crit] 7010#7010: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26675800
nginx.1 | 2025/02/28 21:16:06 [crit] 7011#7011: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26675900
nginx.1 | 2025/02/28 21:16:06 [crit] 7012#7012: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26676000
nginx.1 | 2025/02/28 21:16:06 [crit] 7013#7013: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26676100
nginx.1 | 2025/02/28 21:16:06 [crit] 7014#7014: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26676200
nginx.1 | 2025/02/28 21:16:06 [crit] 7015#7015: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26676300
nginx.1 | 2025/02/28 21:16:06 [crit] 7016#7016: pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
nginx.1 | nginx: [crit] pread() "/etc/nginx/conf.d/my_proxy.conf" failed (21: Is a directory)
forego | starting nginx.1 on port 26676400

```

**Finding 2**  
ChatGPT suggest that the file my\_proxy.conf should be a file and not a directory but with the lines in docker-compose.yml file state this:

> ```
> volumes:
> - ./nginx_proxy.conf:/etc/nginx/conf.d/my_proxy.conf:ro
> - conf:/etc/nginx/conf.d
> 
> ```

ChatGPT says the the bind in line 2 is overridden by line 3 which mounts a directory, and that this script actually creates a directory my\_proxy.conf instead of a file my\_proxy.conf. And that the errors from finding 1 would be solved if we delete this my\_proxy.conf directory. We have confirmed that it really is a directory and not a file using  
`[/] # docker exec -it nginx-proxy ls -la /etc/nginx/conf.d/`  
which gave a result:

```python
total 16
drwxr-xr-x 3 root root 4096 Mar 1 08:35 .
drwxr-xr-x 1 root root 4096 Feb 28 17:13 ..
-rw-r--r-- 1 root root 5497 Mar 1 08:18 default.conf
drwxr-xr-x 2 root root 40 Mar 1 08:35 my_proxy.conf

```

I can’t delete this folder inside the container even if the nginx-proxy is stopped. So ChatGPT suggested accessing it and deleting it using “alpine” container which also resulted in an error.

Then ChatGPT suggested to delete the folder

> /share/CACHEDEV1\_DATA/Container/container-station-data/lib/docker/volumes/default\_conf/\_data/my\_proxy.conf

because it figured that was the folder on the host outside the container by using the results form this command:  
`# docker inspect nginx-proxy | grep -A 5 'Mounts'`  
After deleting it there were same errors as in Finding 1

Can someone confirm that this is correct? There is “default.conf” file which could be enough? And what changes in the docker-compose.yml should be made to repair this?

**Finding 3.**  
Command

`curl http://172.29.4.3:5000`

gives this result:

`<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><meta name="description" content="Gramps Web - research &amp; organize your family tree together"><base href="/"><link rel="stylesheet" href="fonts/fonts.css"><link rel="stylesheet" href="tippy.css"><link rel="icon" href="images/favicon.ico"><link rel="manifest" href="manifest.json" crossorigin="use-credentials"><meta name="theme-color" content="#6D4C41"><meta name="mobile-web-app-capable" content="yes"><meta name="application-name" content="Gramps"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar" content="#6D4C41"><meta name="apple-mobile-web-app-title" content="Gramps"><link rel="apple-touch-icon" sizes="192x192" href="images/icon192.png"><style>body,html{margin:0;padding:0;height:100%}</style><title>Gramps Web</title><link rel="preload" href="./f78fa77f.js" as="script" crossorigin="anonymous"></head><body><gramps-js></gramps-js><script src="config.js"></script><script type="module" src="./f78fa77f.js"></script><script>"serviceWorker"in navigator&&window.addEventListener("load",(function(){navigator.serviceWorker.register("sw.js").then((function(){console.log("ServiceWorker registered.")})).catch((function(e){console.log("ServiceWorker registration failed: ",e)}))}))</script></body></html>`

But I cannot access it through the browser, not even from computer in the same network and trying:  
[http://NASIP:80](http://NASIP:80)  
[http://NASIP:5000](http://NASIP:5000)  
[http://NASIP:443](http://NASIP:443)  
[http://xy.duckdns.org:80](http://xy.duckdns.org:80)  
[https://xy.duckdns.org:443](https://xy.duckdns.org:443)  
[https://xy.duckdns.org:8443](https://xy.duckdns.org:8443) (edited docker-compose.yml in the line “443:443” to “8443:443” because port 443 was in use. Later I figured out that on my NAS “Enable secure connection (HTTPS)” was enabled, so I disabled it. Now that port is free)

All the above give no results.

What can I try next?  
If editing docker-compose.yml file is the answer please let me know what to put in.

Thank you for the help!

---

<div class="post-metadata">

**Author:** ![KratosZG123](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@KratosZG123](https://gramps.discourse.group/u/KratosZG123)\
**Post date:** [March 18, 2025, 9:12pm UTC](https://gramps.discourse.group/t/qnap-docker-installation-nginx-error/6930/7 "2025-03-18T21:12:15Z")

</div>

Hi all!  
Just wanted to let anyone who ends up in situation as myself that I managed to get it working. Finally! 🙂  
If I can, anyone can.

So there is something called [CG NAT](https://en.wikipedia.org/wiki/Carrier-grade_NAT). Basically, whichever Dynamic DNS service you try to use and you copy paste your public IP address it doesn’t work. Why? Because it is not you behind that address, but a group of routers from your ISP. I called my ISP and said I need them to get me out of CG NAT and that resolved part of the problem.  
Now I could connect from inside LAN on port 5000 (for what reason this affects LAN I really don’t know), and from outside but only on port 80.

Then using ChatGPT I troubleshooted the problem, and it turns out that the container “nginx-proxy-acme” which is responsible for LetsEncrypt certificate option could not resolve any web addresses like it didn’t have the right DNS nameservers. This was resolved with updating the /etc/resolv.conf within the container, but that option is not persistent (it stops working after the container restarts).  
ChatGPT proposed to remove the container and recreate it with some options but I wasn’t sure if there are some volume binds or some other thing important so I searched for some other option. Then ChatCPT proposed to update /etc/docker/daemon.json with dns nameserver addresses but this file was non existent in my system and I guess was not used and this option did not work.

So I tried something else: In Portainer in nginx-proxy-acme container option I added this container to “bridge” network and magically the problem was solved 😃

I don’t know if someone should update the [docker-compose.yml](https://raw.githubusercontent.com/gramps-project/gramps-web-docs/main/examples/docker-compose-letsencrypt/docker-compose.yml) file in the network section for this container so other noobs like me don’t at least have this problem 🙂

Thank you and have fun!
