[GH-ISSUE #63] Listen to 0.0.0.0 #50

Closed
opened 2026-02-26 21:34:11 +03:00 by kerem · 2 comments
Owner

Originally created by @nxmad on GitHub (Dec 2, 2024).
Original GitHub issue: https://github.com/eduardolat/pgbackweb/issues/63

Hi guys. Is there any option to configure host PG Back Web listens to?
I was expecting it will listen to 0.0.0.0 by default since it's not available to reverse proxies like Nginx or Traefik if it listens to localhost inside container.
I'm not familiar with Echo framework, but it seems like if you change this line github.com/eduardolat/pgbackweb@d7612836e6/cmd/app/main.go (L47)
to

if err := app.Start("0.0.0.0:8085"); err != nil {

it ain't gonna break anything and will add support for setups with reverse proxies. Or you could possibly use env variable for that.

Originally created by @nxmad on GitHub (Dec 2, 2024). Original GitHub issue: https://github.com/eduardolat/pgbackweb/issues/63 Hi guys. Is there any option to configure host PG Back Web listens to? I was expecting it will listen to 0.0.0.0 by default since it's not available to reverse proxies like Nginx or Traefik if it listens to localhost inside container. I'm not familiar with Echo framework, but it seems like if you change this line https://github.com/eduardolat/pgbackweb/blob/d7612836e65549d6848c70044f77f56902ddf3d1/cmd/app/main.go#L47 to ```go if err := app.Start("0.0.0.0:8085"); err != nil { ``` it ain't gonna break anything and will add support for setups with reverse proxies. Or you could possibly use env variable for that.
Author
Owner

@eduardolat commented on GitHub (Dec 2, 2024):

I'll add environment variables for host and port in the next release

<!-- gh-comment-id:2510514119 --> @eduardolat commented on GitHub (Dec 2, 2024): I'll add environment variables for host and port in the next release
Author
Owner

@eduardolat commented on GitHub (Feb 6, 2025):

I am pleased to inform you that starting with version v0.4.0 this option is available

PBW_LISTEN_HOST: Host for the server to listen on, default 0.0.0.0 (optional)
PBW_LISTEN_PORT: Port for the server to listen on, default 8085 (optional)

<!-- gh-comment-id:2640305244 --> @eduardolat commented on GitHub (Feb 6, 2025): I am pleased to inform you that starting with version v0.4.0 this option is available PBW_LISTEN_HOST: Host for the server to listen on, default 0.0.0.0 (optional) PBW_LISTEN_PORT: Port for the server to listen on, default 8085 (optional)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pgbackweb#50
No description provided.