Agent config file

Everything you pass to devgate http can live in the agent’s config file instead, one entry per endpoint — the way ngrok’s version 3 config does it. The file is the one devgate config add-authtoken creates: ~/.devgate/devgate.yml.

~/.devgate/devgate.yml
version: 3
agent:
  authtoken: <your-authtoken>
endpoints:
  - name: web
    url: https://<your dev domain>
    upstream:
      url: 8080
    traffic_policy:
      on_http_request:
        - actions:
            - type: basic-auth
              config:
                credentials: ["team:correct-horse-battery"]
  - name: api
    url: https://api.example.internal
    upstream:
      url: 3000
    pooling_enabled: true

Starting endpoints

$ devgate start web
$ devgate start web api
$ devgate start --all

The agent brings the named endpoints online together, in one terminal, with one local inspector. devgate config check reads the file the same way and lists what start --all would run, without starting anything.

Endpoint fields

FieldMeaning
nameRequired and unique; what devgate start takes.
urlYour dev domain, a reserved domain or https://name.internal. Leave it out for a random URL.
upstream.urlRequired: a port (8080), host:port or http://host:port.
upstream.host_headerrewrite or a name, as --host-header.
upstream.protocolhttp1 (default) or http2 — HTTP/2 to your service, for gRPC: --upstream-protocol.
upstream.proxy_protocol1 or 2: a PROXY header with the client’s address ahead of each TCP or TLS connection, as --proxy-proto.
traffic_policyA Traffic Policy, inline.
traffic_policy_fileOr a path to one, relative to the config file.
pooling_enabledShare the URL with other agents; see pooling.
descriptionFree text, for you.

Under agent:, next to the authtoken, log, log_format and log_level set the agent’s logs, as in ngrok’s config.

Keys devgate doesn’t use are ignored, so an ngrok config with extra settings still loads. Re-running devgate config add-authtoken only replaces the token; your endpoints and comments stay.

Questions people actually ask

Can I reuse my ngrok.yml?

Its endpoints section, yes: devgate reads the same version 3 shape — name, url, upstream.url, upstream.protocol, upstream.proxy_protocol, traffic_policy, pooling_enabled — and agent: log, log_format and log_level. Copy the endpoints into ~/.devgate/devgate.yml, keep your devgate authtoken under agent:, and run devgate start --all.

Where is the config file?

~/.devgate/devgate.yml on macOS and Linux, %USERPROFILE%\.devgate\devgate.yml on Windows. --config <path> or the DEVGATE_CONFIG environment variable point the agent at another file.