# Docker: Listen on port 80

**URL:** <https://discourse.nodered.org/t/docker-listen-on-port-80/17940>\
**Category:** General\
**Created:** [14 November 2019 10:22 UTC](https://discourse.nodered.org/t/docker-listen-on-port-80/17940 "2019-11-14T10:22:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![techtimo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/techtimo/32/14283_2.png) [@techtimo](https://discourse.nodered.org/u/techtimo)\
**Post date:** [14 November 2019 10:22 UTC](https://discourse.nodered.org/t/docker-listen-on-port-80/17940/1 "2019-11-14T10:22:54Z")

</div>

Hi there,

I'm using the stock NodeRed docker image and I need it to listen to port 80.  
The container is running on Azure container instance. On my localhost I could simply run `docker run -d -p 80:8080 nodered` to map the internal port to 80.  
Though this option is not provided by the azure [equivalent command](https://docs.microsoft.com/en-us/cli/azure/container?view=azure-cli-latest#az-container-create).  
If I set the port 80 in the settings.js, I get the following error:

```auto
[error] Error: listen EACCES: permission denied 0.0.0.0:80
    at Server.setupListenHandle [as _listen2] (net.js:1262:19)
    at listenInCluster (net.js:1327:12)
    at doListen (net.js:1460:7)
    at process._tickCallback (internal/process/next_tick.js:63:19)

```

I think I get this error since nodered has no access to listen to port 80. Is there a good way to get this to work.  
Thanks in advance for your answer.  
Cheers  
Timo

---

<div class="post-metadata">

**Author:** ![techtimo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/techtimo/32/14283_2.png) [@techtimo](https://discourse.nodered.org/u/techtimo)\
**Post date:** [13 January 2020 15:36 UTC](https://discourse.nodered.org/t/docker-listen-on-port-80/17940/2 "2020-01-13T15:36:39Z")

</div>

Just if someone might end up here while using a search engine:

I ended up using an Azure App Service with the official Docker Image from Docker Hub (nodered/node-red) and used a FileShare pointing to /data inside the container.

But to accomplish the task I asked here originally I used the following Dockerfile

```auto
FROM nodered/node-red
USER root
RUN apk add iptables --no-cache
USER root
COPY ./sites-enabled /etc/nginx/sites-enabled/
RUN apk add nginx --no-cache
EXPOSE 80/tcp
COPY ./data /data

```

with ./sites-enabled/node:

```auto
server {
listen 80;
server_name example.com;
    location /ui {
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $http_host;
    proxy_pass "http://127.0.0.1:1880";
    }
}

```

and a directory ./data containing all the npm modules, flows and configuration.
