[Question] – How to specify a custom path to config.toml #91

Closed
opened 2026-01-06 05:23:56 +08:00 by ChrisRichner · 1 comment
ChrisRichner commented 2026-01-06 05:23:56 +08:00 (Migrated from github.com)

Hi team,

Thanks for the great project!
When I run hubproxy with Docker‑Compose or Docker‑Swarm I hit a problem:

The container always looks for the configuration file at /root/config.toml.

In many setups (CI pipelines, different host folders, several instances with separate configs) it would be useful to choose our own path for the file.

Suggestion:
Add an environment variable (for example HUBPROXY_CONFIG or CONFIG_PATH) or a command‑line flag (--config ) that lets us tell the program where the config.toml file lives.

Thanks for your time!

Hi team, Thanks for the great project! When I run hubproxy with Docker‑Compose or Docker‑Swarm I hit a problem: The container always looks for the configuration file at /root/config.toml. In many setups (CI pipelines, different host folders, several instances with separate configs) it would be useful to choose our own path for the file. Suggestion: Add an environment variable (for example HUBPROXY_CONFIG or CONFIG_PATH) or a command‑line flag (--config <path>) that lets us tell the program where the config.toml file lives. Thanks for your time!
Rirmach commented 2026-01-08 15:17:17 +08:00 (Migrated from github.com)

Config path that the program would use is currently hardcoded ($WorkspaceDirectory/config.yaml):
31f62fde35/src/config/config.go (L201)

For you, there are 3 options:

  1. Deploy by docker (use docker compose):
    31f62fde35/docker-compose.yml (L9)
    volumes:
      - /path/to/config.toml:/root/config.toml # Change /path/to/config.toml to elsewhere you want

Do not concert about the config path inside the container

  1. Deploy by systemd:
    31f62fde35/hubproxy.service (L10)
    Change WorkingDirectory to elsewhere you want and put config.toml inside it

  2. Modify source code
    31f62fde35/src/config/config.go (L201)
    Modify config field inject chains (via environment variable and/or config file), consult LLM if needed
    Then, manual or via CI to build as your wish

PS. This project is far from stable, but it's quite simple to modify and build. So it's highly recommend to fork/PR or build your own hubproxy base on this project

Config path that the program would use is currently hardcoded (```$WorkspaceDirectory/config.yaml```): https://github.com/sky22333/hubproxy/blob/31f62fde352e3ac259225b60aed15fe0627ab07c/src/config/config.go#L201 For you, there are 3 options: 1. Deploy by docker (use docker compose): https://github.com/sky22333/hubproxy/blob/31f62fde352e3ac259225b60aed15fe0627ab07c/docker-compose.yml#L9 ```yaml volumes: - /path/to/config.toml:/root/config.toml # Change /path/to/config.toml to elsewhere you want ``` Do not concert about the config path inside the container 2. Deploy by systemd: https://github.com/sky22333/hubproxy/blob/31f62fde352e3ac259225b60aed15fe0627ab07c/hubproxy.service#L10 Change ```WorkingDirectory``` to elsewhere you want and put config.toml inside it 3. Modify source code https://github.com/sky22333/hubproxy/blob/31f62fde352e3ac259225b60aed15fe0627ab07c/src/config/config.go#L201 Modify config field inject chains (via environment variable and/or config file), consult LLM if needed Then, manual or via CI to build as your wish > PS. This project is far from stable, but it's quite simple to modify and build. So it's highly recommend to fork/PR or build your own hubproxy base on this project
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: 3344/hubproxy#91