[GH-ISSUE #5387] [bug]: Enterprise Edition (self-hosted) :3170/v1/onboarding/config API not retrieving values from the .env file #2066

Closed
opened 2026-03-16 23:03:33 +03:00 by kerem · 7 comments
Owner

Originally created by @klewitzke on GitHub (Sep 17, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5387

Originally assigned to: @mirarifhasan on GitHub.

Is there an existing issue for this?

  • I have searched existing issues and this bug hasn't been reported yet

Platform

Web App

Browser

Edge

Operating System

Windows

Bug Description

We deployed Enterprise Edition using docker-compose.yml file below:

services:
  frontend:
    image: hoppscotch/hoppscotch-enterprise-frontend:latest
    restart: unless-stopped
    env_file:
      - .env
    ports:
      - 3000:3000
    depends_on:
      - backend

  backend:
    image: hoppscotch/hoppscotch-enterprise-backend:latest
    restart: unless-stopped
    env_file:
      - .env
    ports:
      - 3170:3170
    depends_on:
      - db

  admin:
    image: hoppscotch/hoppscotch-enterprise-admin:latest
    restart: unless-stopped
    env_file:
      - .env
    ports:
      - 3100:3100
    depends_on:
      - backend

  db:
    image: postgres:latest
    restart: unless-stopped
    environment:
      POSTGRES_DB: hoppscotch
      POSTGRES_USER: [redacted]
      POSTGRES_PASSWORD: [redacted]
    volumes:
      - pgdata:/var/lib/postgresql/data

volumes:
  pgdata:

We are able to access the frontend portal and admin portal over ports 3000 and 3100 respectively (see attached screenshots).

Image Image

After clicking "Start Onboarding" and then going to configure the SMTP settings, upon entering the settings and clicking "Save Auth Config" button we immediately receive the HTTP 400 Bad Request error in the console as shown below.

Image

Pointing the browser to :3170/v1/onboarding/config returns the JSON response below (all values null), although these values are configured in the .env file.

{"VITE_ALLOWED_AUTH_PROVIDERS":null,"GOOGLE_CLIENT_ID":null,"GOOGLE_CLIENT_SECRET":null,"GOOGLE_CALLBACK_URL":null,"GOOGLE_SCOPE":null,"GITHUB_CLIENT_ID":null,"GITHUB_CLIENT_SECRET":null,"GITHUB_CALLBACK_URL":null,"GITHUB_SCOPE":null,"GITHUB_AUTHORIZATION_URL":null,"GITHUB_TOKEN_URL":null,"GITHUB_USER_PROFILE_URL":null,"GITHUB_USER_EMAIL_URL":null,"IS_GITHUB_ENTERPRISE_ENABLED":null,"MICROSOFT_CLIENT_ID":null,"MICROSOFT_CLIENT_SECRET":null,"MICROSOFT_CALLBACK_URL":null,"MICROSOFT_SCOPE":null,"MICROSOFT_TENANT":null,"MAILER_SMTP_ENABLE":null,"MAILER_USE_CUSTOM_CONFIGS":null,"MAILER_ADDRESS_FROM":null,"MAILER_SMTP_URL":null,"MAILER_SMTP_HOST":null,"MAILER_SMTP_PORT":null,"MAILER_SMTP_SECURE":null,"MAILER_SMTP_USER":null,"MAILER_SMTP_PASSWORD":null,"MAILER_TLS_REJECT_UNAUTHORIZED":null,"SAML_ISSUER":null,"SAML_AUDIENCE":null,"SAML_CALLBACK_URL":null,"SAML_CERT":null,"SAML_ENTRY_POINT":null,"SAML_WANT_ASSERTIONS_SIGNED":null,"SAML_WANT_RESPONSE_SIGNED":null,"OIDC_PROVIDER_NAME":null,"OIDC_ISSUER":null,"OIDC_AUTH_URL":null,"OIDC_TOKEN_URL":null,"OIDC_USER_INFO_URL":null,"OIDC_CLIENT_ID":null,"OIDC_CLIENT_SECRET":null,"OIDC_CALLBACK_URL":null,"OIDC_SCOPE":null}

Below is our .env file:

#-----------------------Backend Config-----------------------------------------------#
# Enterprise License Key
# Get your license key from https://enterprise.hoppscotch.com
ENTERPRISE_LICENSE_KEY=[redacted]

# Prisma Config
DATABASE_URL=postgresql://[redacted]@db:5432/hoppscotch

# Enable/Disable Horizontal Scaling
# Set to 'true' to enable horizontal scaling across multiple backend instances
# When enabled, Redis is required for session management and data synchronization
HORIZONTAL_SCALING=false

# Redis Config
# Note: Configure Redis only if HORIZONTAL_SCALING is set to true
# REDIS_URL=

# Sensitive Data Encryption Key while storing in Database (32 character)
DATA_ENCRYPTION_KEY=[redacted]

# Whitelisted origins for the Hoppscotch App.
# This list controls which origins can interact with the app through cross-origin comms.
# - localhost ports (3170, 3000, 3100): app, backend, development servers and services
# - app://localhost_3200: Bundle server origin identifier
#   NOTE: `3200` here refers to the bundle server (port 3200) that provides the bundles,
#   NOT where the app runs. The app itself uses the `app://` protocol with dynamic
#   bundle names like `app://{bundle-name}/`
WHITELISTED_ORIGINS=http://localhost:3170,http://localhost:3000,http://localhost:3100,app://localhost_3200,app://hoppscotch,http://[redacted]:3170,http://[redacted]:3000,http://[redacted]:3100,http://[redacted]:3170,http://[redacted]:3000,http://[redacted]:3100,http://[redacted]:3170,http://[redacted]:3000,http://[redacted]:3100

#-----------------------Frontend Config-----------------------------------------------#

# Base URLs
VITE_BASE_URL=http://[redacted]:3000
VITE_SHORTCODE_BASE_URL=http://[redacted]:3000
VITE_ADMIN_URL=http://[redacted]:3100

# Backend URLs
VITE_BACKEND_GQL_URL=http://[redacted]:3170/graphql
VITE_BACKEND_WS_URL=wss://[redacted]:3170/graphql
VITE_BACKEND_API_URL=http://[redacted]:3170/v1

#OAuth Providers
VITE_ALLOWED_AUTH_PROVIDERS=EMAIL
MAILER_SMTP_ENABLE=true
MAILER_USE_CUSTOM_CONFIGS=true
MAILER_ADDRESS_FROM=[redacted]
MAILER_SMTP_HOST=[redacted]
MAILER_SMTP_PORT=25
MAILER_SMTP_SECURE=false
MAILER_TLS_REJECT_UNAUTHORIZED=true

# Terms of Service and Privacy Policy Links (Optional)
VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms
VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy

# Set to `true` for subpath based access
ENABLE_SUBPATH_BASED_ACCESS=false

# Optional: Local Proxy Server Config
# Enables a local proxy server for routing API requests.
# This will only work if ENABLE_SUBPATH_BASED_ACCESS is set to `true`.
LOCAL_PROXY_SERVER_ENABLE=false

# Optional: Route all API requests via a proxy server for added security.
# Set your proxy server URL here, or remove this variable to send requests directly.
# PROXY_APP_URL=

Deployment Type

Self-hosted (on-prem deployment)

Version

2025.8.1

Originally created by @klewitzke on GitHub (Sep 17, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5387 Originally assigned to: @mirarifhasan on GitHub. ### Is there an existing issue for this? - [x] I have searched existing issues and this bug hasn't been reported yet ### Platform Web App ### Browser Edge ### Operating System Windows ### Bug Description We deployed Enterprise Edition using docker-compose.yml file below: ``` services: frontend: image: hoppscotch/hoppscotch-enterprise-frontend:latest restart: unless-stopped env_file: - .env ports: - 3000:3000 depends_on: - backend backend: image: hoppscotch/hoppscotch-enterprise-backend:latest restart: unless-stopped env_file: - .env ports: - 3170:3170 depends_on: - db admin: image: hoppscotch/hoppscotch-enterprise-admin:latest restart: unless-stopped env_file: - .env ports: - 3100:3100 depends_on: - backend db: image: postgres:latest restart: unless-stopped environment: POSTGRES_DB: hoppscotch POSTGRES_USER: [redacted] POSTGRES_PASSWORD: [redacted] volumes: - pgdata:/var/lib/postgresql/data volumes: pgdata: ``` We are able to access the frontend portal and admin portal over ports 3000 and 3100 respectively (see attached screenshots). <img width="1918" height="935" alt="Image" src="https://github.com/user-attachments/assets/f09a4fa1-5f18-4fbc-b4de-a18a1bdd61bc" /> <img width="1913" height="723" alt="Image" src="https://github.com/user-attachments/assets/276fab6b-2666-4779-8d2f-2a9e911c0d8e" /> After clicking "Start Onboarding" and then going to configure the SMTP settings, upon entering the settings and clicking "Save Auth Config" button we immediately receive the HTTP 400 Bad Request error in the console as shown below. <img width="1908" height="766" alt="Image" src="https://github.com/user-attachments/assets/b4abeb3a-05d3-4adc-b7e4-d26802a8e059" /> Pointing the browser to :3170/v1/onboarding/config returns the JSON response below (all values null), although these values are configured in the .env file. `{"VITE_ALLOWED_AUTH_PROVIDERS":null,"GOOGLE_CLIENT_ID":null,"GOOGLE_CLIENT_SECRET":null,"GOOGLE_CALLBACK_URL":null,"GOOGLE_SCOPE":null,"GITHUB_CLIENT_ID":null,"GITHUB_CLIENT_SECRET":null,"GITHUB_CALLBACK_URL":null,"GITHUB_SCOPE":null,"GITHUB_AUTHORIZATION_URL":null,"GITHUB_TOKEN_URL":null,"GITHUB_USER_PROFILE_URL":null,"GITHUB_USER_EMAIL_URL":null,"IS_GITHUB_ENTERPRISE_ENABLED":null,"MICROSOFT_CLIENT_ID":null,"MICROSOFT_CLIENT_SECRET":null,"MICROSOFT_CALLBACK_URL":null,"MICROSOFT_SCOPE":null,"MICROSOFT_TENANT":null,"MAILER_SMTP_ENABLE":null,"MAILER_USE_CUSTOM_CONFIGS":null,"MAILER_ADDRESS_FROM":null,"MAILER_SMTP_URL":null,"MAILER_SMTP_HOST":null,"MAILER_SMTP_PORT":null,"MAILER_SMTP_SECURE":null,"MAILER_SMTP_USER":null,"MAILER_SMTP_PASSWORD":null,"MAILER_TLS_REJECT_UNAUTHORIZED":null,"SAML_ISSUER":null,"SAML_AUDIENCE":null,"SAML_CALLBACK_URL":null,"SAML_CERT":null,"SAML_ENTRY_POINT":null,"SAML_WANT_ASSERTIONS_SIGNED":null,"SAML_WANT_RESPONSE_SIGNED":null,"OIDC_PROVIDER_NAME":null,"OIDC_ISSUER":null,"OIDC_AUTH_URL":null,"OIDC_TOKEN_URL":null,"OIDC_USER_INFO_URL":null,"OIDC_CLIENT_ID":null,"OIDC_CLIENT_SECRET":null,"OIDC_CALLBACK_URL":null,"OIDC_SCOPE":null}` Below is our .env file: ``` #-----------------------Backend Config-----------------------------------------------# # Enterprise License Key # Get your license key from https://enterprise.hoppscotch.com ENTERPRISE_LICENSE_KEY=[redacted] # Prisma Config DATABASE_URL=postgresql://[redacted]@db:5432/hoppscotch # Enable/Disable Horizontal Scaling # Set to 'true' to enable horizontal scaling across multiple backend instances # When enabled, Redis is required for session management and data synchronization HORIZONTAL_SCALING=false # Redis Config # Note: Configure Redis only if HORIZONTAL_SCALING is set to true # REDIS_URL= # Sensitive Data Encryption Key while storing in Database (32 character) DATA_ENCRYPTION_KEY=[redacted] # Whitelisted origins for the Hoppscotch App. # This list controls which origins can interact with the app through cross-origin comms. # - localhost ports (3170, 3000, 3100): app, backend, development servers and services # - app://localhost_3200: Bundle server origin identifier # NOTE: `3200` here refers to the bundle server (port 3200) that provides the bundles, # NOT where the app runs. The app itself uses the `app://` protocol with dynamic # bundle names like `app://{bundle-name}/` WHITELISTED_ORIGINS=http://localhost:3170,http://localhost:3000,http://localhost:3100,app://localhost_3200,app://hoppscotch,http://[redacted]:3170,http://[redacted]:3000,http://[redacted]:3100,http://[redacted]:3170,http://[redacted]:3000,http://[redacted]:3100,http://[redacted]:3170,http://[redacted]:3000,http://[redacted]:3100 #-----------------------Frontend Config-----------------------------------------------# # Base URLs VITE_BASE_URL=http://[redacted]:3000 VITE_SHORTCODE_BASE_URL=http://[redacted]:3000 VITE_ADMIN_URL=http://[redacted]:3100 # Backend URLs VITE_BACKEND_GQL_URL=http://[redacted]:3170/graphql VITE_BACKEND_WS_URL=wss://[redacted]:3170/graphql VITE_BACKEND_API_URL=http://[redacted]:3170/v1 #OAuth Providers VITE_ALLOWED_AUTH_PROVIDERS=EMAIL MAILER_SMTP_ENABLE=true MAILER_USE_CUSTOM_CONFIGS=true MAILER_ADDRESS_FROM=[redacted] MAILER_SMTP_HOST=[redacted] MAILER_SMTP_PORT=25 MAILER_SMTP_SECURE=false MAILER_TLS_REJECT_UNAUTHORIZED=true # Terms of Service and Privacy Policy Links (Optional) VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy # Set to `true` for subpath based access ENABLE_SUBPATH_BASED_ACCESS=false # Optional: Local Proxy Server Config # Enables a local proxy server for routing API requests. # This will only work if ENABLE_SUBPATH_BASED_ACCESS is set to `true`. LOCAL_PROXY_SERVER_ENABLE=false # Optional: Route all API requests via a proxy server for added security. # Set your proxy server URL here, or remove this variable to send requests directly. # PROXY_APP_URL= ``` ### Deployment Type Self-hosted (on-prem deployment) ### Version 2025.8.1
kerem 2026-03-16 23:03:33 +03:00
Author
Owner

@mirarifhasan commented on GitHub (Sep 17, 2025):

Hello @klewitzke,

We only load a limited set of environment variables from the .env file to keep the configuration clean (see referance)

Because of this, SMTP settings need to be configured through the Admin dashboard during the onboarding process.

Since you’re encountering a 400 Bad Request on POST /onboarding/config, could you please share the backend container error logs generated when making that API call? This will help us better understand the issue.

<!-- gh-comment-id:3301435453 --> @mirarifhasan commented on GitHub (Sep 17, 2025): Hello @klewitzke, We only load a limited set of environment variables from the `.env` file to keep the configuration clean (see [referance](https://docs.hoppscotch.io/documentation/self-host/enterprise-edition/install-and-build#configuring-the-environment)) Because of this, SMTP settings need to be configured through the Admin dashboard during the onboarding process. Since you’re encountering a `400 Bad Request` on `POST /onboarding/config`, could you please share the backend container error logs generated when making that API call? This will help us better understand the issue.
Author
Owner

@klewitzke commented on GitHub (Sep 17, 2025):

could you please share the backend container error logs generated when making that API call?

@mirarifhasan Yes, can you please let me know how/where the backend container error logs are stored?

<!-- gh-comment-id:3302732200 --> @klewitzke commented on GitHub (Sep 17, 2025): > could you please share the backend container error logs generated when making that API call? @mirarifhasan Yes, can you please let me know how/where the backend container error logs are stored?
Author
Owner

@mirarifhasan commented on GitHub (Sep 17, 2025):

You can find the logs inside the Docker container by running the following command:
docker logs <backend_container_id>

<!-- gh-comment-id:3302783267 --> @mirarifhasan commented on GitHub (Sep 17, 2025): You can find the logs inside the Docker container by running the following command: `docker logs <backend_container_id>`
Author
Owner

@klewitzke commented on GitHub (Sep 17, 2025):

@mirarifhasan please find the complete log here: hoppscotch_backend_logs_250917_0844.txt

Each time the "Save Auth Config" button is clicked, the following entry is added to the log:

Backend Server | [Infra Validation Failed] Key: MAILER_SMTP_URL
Backend Server | ::1 POST /v1/onboarding/config 400 - 1.284 ms
<!-- gh-comment-id:3302865001 --> @klewitzke commented on GitHub (Sep 17, 2025): @mirarifhasan please find the complete log here: [hoppscotch_backend_logs_250917_0844.txt](https://github.com/user-attachments/files/22385451/hoppscotch_backend_logs_250917_0844.txt) Each time the "Save Auth Config" button is clicked, the following entry is added to the log: ``` Backend Server | [Infra Validation Failed] Key: MAILER_SMTP_URL Backend Server | ::1 POST /v1/onboarding/config 400 - 1.284 ms ```
Author
Owner

@mirarifhasan commented on GitHub (Sep 17, 2025):

Thanks for sharing the logs, @klewitzke 🙏

On the backend, we validate the SMTP URL that gets entered. Could you share the SMTP URL you’re using? That will help us adjust the validation logic for our upcoming release.

In the meantime, since you already have the custom values, you can also try configuring them directly with the following:

Image
#OAuth Providers
MAILER_ADDRESS_FROM=[redacted]
MAILER_SMTP_HOST=[redacted]
MAILER_SMTP_PORT=25
MAILER_SMTP_SECURE=false
MAILER_TLS_REJECT_UNAUTHORIZED=true
<!-- gh-comment-id:3302924935 --> @mirarifhasan commented on GitHub (Sep 17, 2025): Thanks for sharing the logs, @klewitzke 🙏 On the backend, we validate the SMTP URL that gets entered. Could you share the SMTP URL you’re using? That will help us adjust the validation logic for our upcoming release. In the meantime, since you already have the custom values, you can also try configuring them directly with the following: <img width="1021" height="576" alt="Image" src="https://github.com/user-attachments/assets/b3bd22ba-cd22-4ef8-9c4e-89969c6ac5ab" /> ``` #OAuth Providers MAILER_ADDRESS_FROM=[redacted] MAILER_SMTP_HOST=[redacted] MAILER_SMTP_PORT=25 MAILER_SMTP_SECURE=false MAILER_TLS_REJECT_UNAUTHORIZED=true ```
Author
Owner

@klewitzke commented on GitHub (Sep 17, 2025):

@mirarifhasan good to know, thank you! Sure, the SMTP URL is in the format: http://mail-xx.xxx.state.xx.us (It's an internal URL so I appreciate your understanding in not posting it completely, but each letter has been swapped out with an 'x'.)

I did attempt using the values as shown below, but the issue is still occurring.

Image
<!-- gh-comment-id:3302989905 --> @klewitzke commented on GitHub (Sep 17, 2025): @mirarifhasan good to know, thank you! Sure, the SMTP URL is in the format: http://mail-xx.xxx.state.xx.us (It's an internal URL so I appreciate your understanding in not posting it completely, but each letter has been swapped out with an 'x'.) I did attempt using the values as shown below, but the issue is still occurring. <img width="805" height="582" alt="Image" src="https://github.com/user-attachments/assets/4dfa973c-70ad-4cce-91df-c7619223e742" />
Author
Owner

@klewitzke commented on GitHub (Sep 17, 2025):

@mirarifhasan - I have no idea what happened, but it is working now! I did select "Use Custom Configs" I will close this Issue. Thank you for your help.

<!-- gh-comment-id:3303451831 --> @klewitzke commented on GitHub (Sep 17, 2025): @mirarifhasan - I have no idea what happened, but it is working now! I did select "Use Custom Configs" I will close this Issue. Thank you for your help.
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/hoppscotch#2066
No description provided.