diff --git a/src/shadowbox/server/main.ts b/src/shadowbox/server/main.ts index 40c8a642..2b533ca2 100644 --- a/src/shadowbox/server/main.ts +++ b/src/shadowbox/server/main.ts @@ -138,7 +138,9 @@ async function main() { logging.info('Starting...'); const prometheusPort = await portProvider.reserveFirstFreePort(9090); - const prometheusLocation = `localhost:${prometheusPort}`; + // Use 127.0.0.1 instead of localhost for Prometheus because it's resolving incorrectly for some users. + // See https://github.com/Jigsaw-Code/outline-server/issues/341 + const prometheusLocation = `127.0.0.1:${prometheusPort}`; const nodeMetricsPort = await portProvider.reserveFirstFreePort(prometheusPort + 1); exportPrometheusMetrics(prometheus.register, nodeMetricsPort);