Skip to main content
gomodel config export prints the configuration a gateway started now would run with as one config.yaml: your config.yaml, environment variables, and the objects saved in the dashboard, such as providers, virtual models, users, and budgets. Use it to review a setup, keep it in Git, or start another instance from it.

Export

Run the command where the gateway runs, so it reads the same files, environment, and database. It is safe while the gateway is running. Logs go to stderr, so the file holds only the configuration. It reads the files and environment afresh, not the running gateway. If you edited config.yaml and the gateway rejected the reload, the export shows the edited file, or fails with the same error.
From the directory the gateway starts in, with the same environment:
Write to a new file, never onto the config.yaml the gateway reads: the shell empties that file before the command starts.
Settings at their default value are left out, so the file shows only what you changed. Add --include-defaults to write the defaults too, except settings that are empty by default.

Secrets

Secret settings, such as API keys, are written as references, never as values:
A key typed into the dashboard gets a # secret not exported comment naming the variable to set. A gateway loading the file does not start until that variable is set. Free-form text, such as a description, is only checked for credential shapes, so a token pasted into one can end up in the file. Review such text before sharing it.

Use the export

Save it as config/config.yaml on the target instance (in Docker, mount it at /app/config/config.yaml), set the variables it references, and start the gateway. Objects that came from the dashboard are now declared in the file, so they are read-only in the dashboard.
Not everything has a config.yaml form. Managed API keys, workflows, guardrails created in the dashboard, model pricing overrides, runtime settings, disabled provider credentials, and MCP server display names are not exported, and are listed in the file’s header. They stay in the database: to carry them over, point the target instance at that database or restore a backup of it there.

Why the dashboard has no export button

The export is deliberately a shell command, with no HTTP endpoint behind it.
  • It describes the whole deployment. Even without secrets, it lists every upstream, database, and internal URL, and where each credential lives.
  • A dashboard login should not be enough to take it. An endpoint would hand the file to anyone with an admin login, or a stolen one. Shell access to the gateway is a narrower group, which can already read its files and environment.
  • Redaction has limits. A token pasted into a description is written as is, so the file should not be one click away.
See Exporting the Effective Configuration for the full rules.
Last modified on November 23, 2026