Templarbit

Templarbit Resources

Welcome to the Templarbit developer resources. You'll find comprehensive guides and documentation to help you start securing your applications and websites with Templarbit as quickly as possible. Let's jump right in!

Get Started

Agent Configuration Options

You can customize the Templarbit Agent configuration further after you've installed it.

All configuration options

-c, --config string

Read config from file

-p, --property-id string

Property ID from app.templarbit.com

-s, --secret-key string

Secret Key from app.templarbit.com

--proxy-listen string

Reverse Proxy listens on address

--proxy-public-key string

Path to public key certificate (PEM format) to enable https

--proxy-private-key string

Path to private key to enable https

--proxy-upstream string

Upstream URL to serve in reverse proxy mode

--upstream-insecure-skip-verify

Skip upstream certificate validation (for self-signed certificates)

--proxy-rewrite-host

Act as transparent proxy and rewrite Host header (default true)

--trust-proxy-ips string

Comma separated list of trusted proxy IP addresses

--trust-x-real-ip-header

Trust contents of X-Real-IP header

--trust-forwarded-header

Trust contents of Forwarded header

--trust-x-forwarded-for-header

Trust contents of X-Forwarded-For header

--trust-tcp-proxy-protocol

Trust TCP PROXY protocol

--statsd-listen

Listen on address to handle statsd input

--monitor-only

Run features in monitor only mode

--exec string

Start another child process and exit if it dies

--disable-auto-updates

Disable auto updates

Configuration from file

The Templarbit Agent will look for a configuration file in the following directories, in this order:

  • ./templarbit-agent.json (current directory)
  • $HOME/.templarbit/templarbit-agent.json
  • /usr/local/etc/templarbit/templarbit-agent.json
  • /etc/templarbit/templarbit-agent.json

You can manually specify the location of a configuration file:

templarbit-agent --config /etc/templarbit-config.yaml

Here is an example temparbit-config.json configuration file. All configuration flags from above can be used in the JSON configuration file as well.

{
  "property-id": "xxx",
  "secret-key": "xxx",
  "proxy-listen": "0.0.0.0:80",
  "proxy-upstream": "http://localhost:9000",
  "trust-proxy-ips": "10.0.0.5, 10.0.0.6",
  "proxy-rewrite-host": false
}

Configuration from ENV

It is possible to configure the Templarbit Agent with Environment variables. All configuration flags from above can be used when prefixed with TB. Examples:

TB_PROPERTY_ID="xxx"
TB_SECRET_KEY="xxx"
TB_PROXY_LISTEN="0.0.0.0:80"
TB_PROXY_UPSTREAM="http://localhost:9000"
TB_TRUST_PROXY_IPS="10.0.0.5, 10.0.0.6"
TB_PROXY_REWRITE_HOST="false"

Combining Configuration

You can use a combination of CLI flags (i.e. --listen), configuration from file and environment variables.

The Templarbit Agent uses the following precedence order. Each item takes precedence over the item below it:

  • CLI flags (i.e. --proxy-listen)
  • ENV variable (i.e. TB_PROXY_LISTEN)
  • Configuration file, specified with --config or discovered configuration file.

Agent Configuration Options


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.