🦞
Resources

openclaw_gateway

Manages the OpenClaw gateway server configuration.

Manages the OpenClaw gateway server configuration including port, bind address, authentication, and reload behavior.

This is a singleton resource -- only one openclaw_gateway block should exist per configuration.

Example Usage

resource "openclaw_gateway" "main" {
  port        = 18789
  bind        = "loopback"
  auth_mode   = "token"
  auth_token  = var.gateway_token
  reload_mode = "hybrid"
}

Expose via Tailscale

resource "openclaw_gateway" "main" {
  port           = 18789
  bind           = "all"
  tailscale_mode = "funnel"
  auth_mode      = "token"
  auth_token     = var.gateway_token
}

Argument Reference

ArgumentTypeRequiredDefaultDescription
portInt64No18789Gateway listen port.
bindStringNo"loopback"Bind address: loopback or all.
auth_modeStringNo--Authentication mode: token, password, or none.
auth_tokenStringNo--Gateway auth token. Sensitive.
reload_modeStringNo"hybrid"Config reload mode: hybrid, hot, restart, or off.
tailscale_modeStringNo--Tailscale exposure: off, serve, or funnel.

Attribute Reference

AttributeTypeDescription
idStringAlways "gateway".

Import

terraform import openclaw_gateway.main gateway

On this page