Skip to content

[BUG] Unable change server url #4376

Description

@TheresaQWQ

Describe the issue
I configured the SERVER_URL environment variable to http://<my private ip>:8080, restarted the container, and generated a new API token. However, when running hatchet profile add --name "Default" --token "<API Token>", the CLI still attempts to connect to localhost and fails with the following error:
FATA could not connect to Hatchet server with provided token: Get "http://localhost:8080/api/v1/...

It appears the CLI or the token generation process is hardcoding or falling back to localhost:8080 instead of respecting the configured SERVER_URL.

Environment

  • SDK: Go/CLI
  • Engine: Self-hosted latest (v0.92.7)

Expected behavior
The hatchet profile add command should successfully parse the server URL from the issued token or honor the configured server endpoint, rather than defaulting to localhost:8080.

Code to Reproduce, Logs, or Screenshots
docker-compose snippet, edited from https://docs.hatchet.run/self-hosting/docker-compose:

  hatchet-engine:
    image: ghcr.io/hatchet-dev/hatchet/hatchet-engine:latest
    command: /hatchet/hatchet-engine --config /hatchet/config
    restart: on-failure
    depends_on:
      setup-config:
        condition: service_completed_successfully
      migration:
        condition: service_completed_successfully
    #ports:
    #  - "7077:7070"
    environment:
      DATABASE_URL: "postgres://hatchet:hatchet@postgres:5432/hatchet"
      SERVER_GRPC_BIND_ADDRESS: "0.0.0.0"
      SERVER_GRPC_INSECURE: "t"
      SERVER_URL: http://<my private ip>:26078
      SERVER_ALLOW_CHANGE_PASSWORD: true
    volumes:
      - ./data/hatchet/certs:/hatchet/certs
      - ./data/hatchet/config:/hatchet/config

  hatchet-dashboard:
    image: ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:latest
    command: sh ./entrypoint.sh --config /hatchet/config
    ports:
      - 26078:80
    restart: on-failure
    depends_on:
      setup-config:
        condition: service_completed_successfully
      migration:
        condition: service_completed_successfully
    environment:
      DATABASE_URL: "postgres://hatchet:hatchet@postgres:5432/hatchet"
    volumes:
      - ./data/hatchet/certs:/hatchet/certs
      - ./data/hatchet/config:/hatchet/config

cli logs:

root@hatchet-worker1:~# hatchet profile add --name "Default" --token "eyJhbGciOiJFUzI1NiIsICJraWQiOiJwZnhPSUEifQ.eyJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjgwODAiLCAiZXhwIjo0OTM3MTEwNzAyLCAiZ3JwY19icm9hZGNhc3RfYWRkcmVzcyI6ImxvY2FsaG9zdDo3MDc3IiwgImlhdCI6MTc4MzUxMDcwMiwgImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MCIsICJzZXJ2ZXJfdXJsIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwIiwgInN1YiI6IjcwN2QwODU1LTgwYWItNGUxZi1hMTU2LWYxYzQ1NDZjYmY1MiIsICJ0b2tlbl9pZCI6ImYyZDNkZDJmLTg1OGItNDMyMS04NTgxLWUxYTUwYmNhYzgxNSJ9.fB1ScqceWNpS-pY5GlzvH_jlty8qbnY0CjrEVjQUaNNlkfi7qM_2OSkouwRxcLhBcE0UJGI7mwhrIKVkeBaRpA"
2026/07/08 11:38:35 FATA could not connect to Hatchet server with provided token: Get "http://localhost:8080/api/v1/tenants/707d0855-80ab-4e1f-a156-f1c4546cbf52": dial tcp [::1]:8080: connect: connection refused
root@hatchet-worker1:~# hatchet profile add --name "Default" --token "eyJhbGciOiJFUzI1NiIsICJraWQiOiJwZnhPSUEifQ.eyJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjgwODAiLCAiZXhwIjo0OTM3MTExNDAzLCAiZ3JwY19icm9hZGNhc3RfYWRkcmVzcyI6ImxvY2FsaG9zdDo3MDc3IiwgImlhdCI6MTc4MzUxMTQwMywgImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MCIsICJzZXJ2ZXJfdXJsIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwIiwgInN1YiI6IjcwN2QwODU1LTgwYWItNGUxZi1hMTU2LWYxYzQ1NDZjYmY1MiIsICJ0b2tlbl9pZCI6Ijk0MTc3ZTlhLTE2ZDYtNDE3OC04MWNkLWQyNDlkMDEyM2FiZCJ9.HkxAmA9cWYsXpZNhF097UivDnKI_EA_OEN_WvkggfKZx-y_rsIdQmQK8Wa49ayqwFhX5dBpZiqb0jNK6d5QmFg"
2026/07/08 11:50:13 FATA could not connect to Hatchet server with provided token: Get "http://localhost:8080/api/v1/tenants/707d0855-80ab-4e1f-a156-f1c4546cbf52": dial tcp [::1]:8080: connect: connection refused

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions