Skip to content

[Bug]: NEXT_PUBLIC_HELICONE_JAWN_SERVICE is not passed from docker-compose into env.js in self-hosted Helicone #5551

@seniyakk

Description

@seniyakk

What happened?

In the self-hosted Helicone setup, the environment variable NEXT_PUBLIC_HELICONE_JAWN_SERVICE is defined in docker-compose.yml for the Helicone service, but it is not propagated into env.js in the running application.

Because this variable is missing in env.js, the frontend does not work correctly.

For example, when I try to add an API key via the UI, the frontend sends a request to:
http://localhost:8585/v1/key/generateHash
instead of using my configured URL from NEXT_PUBLIC_HELICONE_JAWN_SERVICE.

Image

ENV.js data
window.__ENV = {"NEXT_PUBLIC_IS_ON_PREM":"true","NEXT_PUBLIC_BETTER_AUTH":"true","NEXT_PUBLIC_RANDOM_VARIABLE_TO_TEST":"true","NEXT_PUBLIC_HELICONE_JAWN_SERVICE":"http://localhost:8585","NEXT_PUBLIC_SLACK_CLIENT_ID":"1234567890","NEXT_PUBLIC_BASE_PATH":"https://oai.helicone.ai/v1","NEXT_PUBLIC_APP_URL":"https://helicone.test.com"};

My docker-compose.yml

services:
  helicone:
    image: helicone/helicone-all-in-one:latest
    container_name: helicone
    hostname: helicone
    restart: unless-stopped
    labels:
      traefik.enable: true
      traefik.http.services.helicone-ui.loadbalancer.server.port: 3000
      traefik.http.routers.helicone-ui-https.rule: Host(`helicone.test.com`)
      traefik.http.routers.helicone-ui-https.entrypoints: https
      traefik.http.routers.helicone-ui-https.tls: true
      traefik.http.routers.helicone-ui-https.service: helicone-ui
      traefik.http.services.helicone-api.loadbalancer.server.port: 8585
      traefik.http.routers.helicone-api-https.rule: Host(`https://jawn.helicone.test.com`)
      traefik.http.routers.helicone-api-https.entrypoints: https
      traefik.http.routers.helicone-api-https.tls: true
      traefik.http.routers.helicone-api-https.service: helicone-api
    environment:
      TZ: $TZ
      SITE_URL: https://helicone.test.com
      BETTER_AUTH_URL: https://helicone.test.com
      BETTER_AUTH_SECRET: PHptaLNg8lEmJQqQRgDVjwa9WagyavEA1XV7hMgSYjvGk9F1B91J5NnSJujun1R9
      NEXT_PUBLIC_APP_URL: https://helicone.test.com
      NEXT_PUBLIC_HELICONE_JAWN_SERVICE: https://jawn.helicone.test.com
      NEXT_PUBLIC_IS_ON_PREM: true
      NEXT_PUBLIC_RANDOM_VARIABLE_TO_TEST: true
      S3_ENDPOINT: http://localhost:9080
      S3_ACCESS_KEY: helicone_s3_user
      S3_SECRET_KEY: 9oELe4Vk3gSRljKNHW5fLEBPukiIC34y
      S3_BUCKET_NAME: request-response-storage
    volumes:
      - helicone-postgres:/var/lib/postgresql/data
      - helicone-clickhouse:/var/lib/clickhouse
      - helicone-minio:/data
    networks:
      - traefik
      - helicone
    # ports:
    #   - 3000:3000 # UI
    #   - 8585:8585 # API
    #   - 9080:9080 # S3 storage
networks:
  traefik:
    external: true
  helicone:
    name: helicone
volumes:
  helicone-postgres:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: $VOLUMES_PATH_PREFIX/helicone/volumes/postgres
  helicone-clickhouse:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: $VOLUMES_PATH_PREFIX/helicone/volumes/clickhouse
  helicone-minio:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: $VOLUMES_PATH_PREFIX/helicone/volumes/minio

Relevant log output

docker logs helicone --tail 50 -f
ClickHouse Database directory appears to contain a database; Skipping initialization
2026-01-31 17:42:14,579 INFO Set uid to user 0 succeeded
2026-01-31 17:42:14,590 INFO supervisord started with pid 1
2026-01-31 17:42:15,593 INFO spawned: 'ai-gateway' with pid 46
2026-01-31 17:42:15,594 INFO spawned: 'clickhouse' with pid 47
2026-01-31 17:42:15,595 INFO spawned: 'clickhouse-migrate' with pid 48
2026-01-31 17:42:15,596 INFO spawned: 'flyway-migrate' with pid 49
2026-01-31 17:42:15,597 INFO spawned: 'jawn' with pid 50
2026-01-31 17:42:15,598 INFO spawned: 'log-viewer' with pid 51
2026-01-31 17:42:15,599 INFO spawned: 'minio' with pid 54
2026-01-31 17:42:15,600 INFO spawned: 'minio-setup' with pid 55
2026-01-31 17:42:15,601 INFO spawned: 'postgresql' with pid 57
2026-01-31 17:42:15,603 INFO spawned: 'web' with pid 58
2026-01-31 17:42:15,603 INFO exited: ai-gateway (exit status 127; not expected)
2026-01-31 17:42:15,603 INFO success: clickhouse-migrate entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2026-01-31 17:42:15,603 INFO success: flyway-migrate entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2026-01-31 17:42:15,603 INFO success: minio-setup entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2026-01-31 17:42:16,692 INFO spawned: 'ai-gateway' with pid 141
2026-01-31 17:42:16,692 INFO success: clickhouse entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2026-01-31 17:42:16,692 INFO success: jawn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2026-01-31 17:42:16,692 INFO success: log-viewer entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2026-01-31 17:42:16,692 INFO success: minio entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2026-01-31 17:42:16,692 INFO success: postgresql entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2026-01-31 17:42:16,692 INFO success: web entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2026-01-31 17:42:16,693 INFO exited: ai-gateway (exit status 127; not expected)
2026-01-31 17:42:17,717 INFO exited: minio-setup (exit status 0; expected)
2026-01-31 17:42:18,733 INFO spawned: 'ai-gateway' with pid 940
2026-01-31 17:42:18,735 INFO exited: ai-gateway (exit status 127; not expected)
2026-01-31 17:42:21,743 INFO spawned: 'ai-gateway' with pid 974
2026-01-31 17:42:21,745 INFO exited: ai-gateway (exit status 127; not expected)
2026-01-31 17:42:21,753 INFO gave up: ai-gateway entered FATAL state, too many start retries too quickly
2026-01-31 17:42:22,635 INFO exited: flyway-migrate (exit status 0; expected)

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions