Floyddo
Floyddo
HHomarr
Created by Floyddo on 3/27/2025 in #💬・get-help
Run on different port
We can set the port by overriding the NGINX config at /etc/nginx/templates/nginx.conf with a bind volume like below (docker compose).
volumes:
- ./HOMARRNGINX.conf:/etc/nginx/templates/nginx.conf
networks:
lan: # your ipvlan or macvlan network
volumes:
- ./HOMARRNGINX.conf:/etc/nginx/templates/nginx.conf
networks:
lan: # your ipvlan or macvlan network
./HOMARRNGINX.conf: (just change the port from this file, keep in mind this will not upgrade this file with updates at it will just keep overriding it!)
events {
worker_connections 1024;
}

http {
server {
listen YOURPORTHERE;

# Route websockets traffic to port 3001
location /websockets {
proxy_pass http://${HOSTNAME}:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
}

# Route all other traffic to port 3000
location / {
proxy_pass http://${HOSTNAME}:3000;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
}
}
}
events {
worker_connections 1024;
}

http {
server {
listen YOURPORTHERE;

# Route websockets traffic to port 3001
location /websockets {
proxy_pass http://${HOSTNAME}:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
}

# Route all other traffic to port 3000
location / {
proxy_pass http://${HOSTNAME}:3000;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
}
}
}
9 replies
HHomarr
Created by Floyddo on 3/27/2025 in #💬・get-help
Run on different port
homarr uses nginx as a reverse proxy to serve the next.js page and is hardcoded to be listening at port 7575 https://github.com/homarr-labs/homarr/blob/ac77bdd84cba47a43d1952725a9c7feccd972766/nginx.conf#L4
9 replies
HHomarr
Created by Floyddo on 3/27/2025 in #💬・get-help
Run on different port
Version 1.12.0
9 replies
HHomarr
Created by Floyddo on 3/27/2025 in #💬・get-help
Run on different port
homarr:
container_name: homarr
image: ghcr.io/homarr-labs/homarr:latest
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${USERDIR}/docker/homarr/appdata:/appdata
- /etc/localtime:/etc/localtime:ro
- /usr/share/zoneinfo:/usr/share/zoneinfo:ro
environment:
- TZ=${TZ}
- SECRET_ENCRYPTION_KEY=${HOMARR_KEY} # <--- can be generated with `openssl rand -hex 32`
- PORT=80
networks:
comm:
lan:
ipv4_address: 192.168.1.29
homarr:
container_name: homarr
image: ghcr.io/homarr-labs/homarr:latest
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${USERDIR}/docker/homarr/appdata:/appdata
- /etc/localtime:/etc/localtime:ro
- /usr/share/zoneinfo:/usr/share/zoneinfo:ro
environment:
- TZ=${TZ}
- SECRET_ENCRYPTION_KEY=${HOMARR_KEY} # <--- can be generated with `openssl rand -hex 32`
- PORT=80
networks:
comm:
lan:
ipv4_address: 192.168.1.29
9 replies