Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/temporal-sa/temporal-cloud-proxy/llms.txt

Use this file to discover all available pages before exploring further.

The simplest way to run Temporal Cloud Proxy is as a native binary. The build requires Go 1.24 or later and produces a single self-contained executable (tclp) with no runtime dependencies. Once built, you can run it on any compatible Linux or macOS host by pointing it at a YAML config file.

Prerequisites

  • Go 1.24 or later — the proxy module and CI pipeline both target Go 1.24
  • git — to clone the repository
  • Access to Temporal Cloud — a namespace with either mTLS certificates or an API key

Build

1

Clone the repository

git clone https://github.com/temporal-sa/temporal-cloud-proxy.git
cd temporal-cloud-proxy
2

Build with make

make build
This runs go build -o ./tclp ./cmd and places the binary at ./tclp in the repository root.
3

Verify the binary

./tclp --help
You should see the CLI usage output listing the available flags.

Makefile Targets

TargetDescription
make buildCompile the tclp binary to ./tclp
make cleanRemove the compiled ./tclp binary
make allRun tests, then build (test + build)
make testRun all tests (go test ./...)
make test-verboseRun all tests with verbose output (-v)
make test-coverageRun all tests with coverage reporting (-cover)
make test-raceRun all tests with the race detector (-race)
make test-shortRun all tests in short mode (-short)
make test-cleanClear the Go test cache (go clean -testcache)
make benchmarkRun all benchmarks (go test -bench=. ./...)
make test-authRun tests for the auth package only
make test-cryptoRun tests for the crypto package only
make test-proxyRun tests for the proxy package only
make test-utilsRun tests for the utils package only

CLI Flags

The tclp binary accepts two flags:
--config
string
Alias: -cPath to the YAML configuration file. Defaults to config.yaml in the current working directory.
./tclp --config /etc/temporal-proxy/config.yaml
--level
string
Log level for structured output. Accepted values: debug, info, warn, error. Defaults to info.
./tclp --level debug

Running

With a config.yaml present in the current directory, start the proxy with no extra flags:
# Start with default config.yaml in current directory
./tclp

# Start with explicit config path and debug logging
./tclp --config /etc/temporal-proxy/config.yaml --level debug
The proxy binds its gRPC listener on the host and port specified in the config (server.host / server.port) and exposes Prometheus metrics on metrics.port.

Graceful Shutdown

The proxy registers handlers for both SIGTERM and SIGINT. When either signal is received, the main loop calls app.Stop(), which triggers the fx lifecycle shutdown hooks. Those hooks call transport.Stop(), which in turn calls grpc.GracefulStop() to drain in-flight requests before the process exits. To stop the proxy gracefully:
# Send SIGTERM to a running process
kill -SIGTERM <pid>

# Or press Ctrl+C in the terminal where tclp is running (sends SIGINT)
Abrupt termination (e.g. kill -9) bypasses graceful shutdown and may leave in-flight Temporal requests incomplete. Always prefer SIGTERM or SIGINT when stopping the proxy.

systemd Service

To run the proxy as a managed service on a Linux host, create a systemd unit file:
[Unit]
Description=Temporal Cloud Proxy
After=network.target

[Service]
ExecStart=/usr/local/bin/tclp --config /etc/temporal-proxy/config.yaml
Restart=on-failure
RestartSec=5s
Environment=TEMPORAL_API_KEY=your-key-here

[Install]
WantedBy=multi-user.target
Save the file to /etc/systemd/system/temporal-cloud-proxy.service, then enable and start it:
sudo systemctl daemon-reload
sudo systemctl enable temporal-cloud-proxy
sudo systemctl start temporal-cloud-proxy
sudo systemctl status temporal-cloud-proxy
To cross-compile for a specific target platform, set GOOS and GOARCH before building:
GOOS=linux GOARCH=amd64 go build -o tclp ./cmd
This is useful when building on macOS for deployment to a Linux server.

Build docs developers (and LLMs) love