Skip to content

fix(server): use SITE_URL in bootstrap startup message#5436

Merged
akhilmhdh merged 1 commit intoInfisical:mainfrom
themavik:fix/bootstrap-message-use-site-url
Feb 11, 2026
Merged

fix(server): use SITE_URL in bootstrap startup message#5436
akhilmhdh merged 1 commit intoInfisical:mainfrom
themavik:fix/bootstrap-message-use-site-url

Conversation

@themavik
Copy link
Contributor

Summary

Fixes #5295 and #4268.

The bootstrap check message in boot-strap-check.ts always displays http://localhost:{PORT} as the URL for accessing the admin panel and server. When using Docker port mapping (e.g. -p 80:8080) or a reverse proxy, the internal container port (8080) doesn't match the externally accessible port/domain, causing confusion.

Fix

Use SITE_URL from the environment configuration when available, falling back to http://localhost:{PORT} only when SITE_URL is not configured. SITE_URL is already a standard configuration option that self-hosted users set to their externally accessible URL.

Test Plan

  • Verified the startup message renders correctly with SITE_URL set
  • Verified the fallback to localhost:{PORT} when SITE_URL is not set

The bootstrap check message always displays http://localhost:{PORT},
which is incorrect when using Docker port mapping (e.g. 80:8080) or a
reverse proxy. Users see a URL like http://localhost:8080 that doesn't
resolve, while the actual service is on a different port or domain.

Use SITE_URL from the environment when available, falling back to
localhost:{PORT} only when SITE_URL is not configured.

Fixes #5295
Fixes #4268

Co-authored-by: Cursor <cursoragent@cursor.com>
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 11, 2026

Greptile Overview

Greptile Summary

This PR updates the bootstrap/startup message so it prefers SITE_URL (when configured) over hardcoding http://localhost:{PORT}, reducing confusion in Docker/reverse-proxy deployments where the container port doesn’t match the externally reachable address.

Confidence Score: 4/5

  • Mostly safe to merge, with a small but user-visible URL formatting bug to address.
  • Change is localized to a startup console message and doesn’t affect request handling, but it can print malformed links when SITE_URL includes a trailing slash (a common configuration pattern).
  • backend/src/server/boot-strap-check.ts

Important Files Changed

Filename Overview
backend/src/server/boot-strap-check.ts Startup message now prefers SITE_URL over http://localhost:{PORT}; main concern is SITE_URL with a trailing slash producing //admin links in the printed output.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@maidul98
Copy link
Collaborator

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@akhilmhdh
Copy link
Member

Looks good! Thank you for your contribution

@akhilmhdh akhilmhdh merged commit f619fdf into Infisical:main Feb 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bootstrap message shows incorrect port when using Docker port mapping

3 participants