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 stringRead config from file
-p, --property-id stringProperty ID from app.templarbit.com
-s, --secret-key stringSecret Key from app.templarbit.com
--proxy-listen string Reverse Proxy listens on address
--proxy-public-key stringPath to public key certificate (PEM format) to enable https
--proxy-private-key stringPath to private key to enable https
--proxy-upstream stringUpstream URL to serve in reverse proxy mode
--upstream-insecure-skip-verifySkip upstream certificate validation (for self-signed certificates)
--proxy-rewrite-hostAct as transparent proxy and rewrite Host header (default true)
--trust-proxy-ips stringComma separated list of trusted proxy IP addresses
--trust-x-real-ip-headerTrust contents of X-Real-IP header
--trust-forwarded-headerTrust contents of Forwarded header
--trust-x-forwarded-for-headerTrust contents of X-Forwarded-For header
--trust-tcp-proxy-protocol Trust TCP PROXY protocol
--statsd-listenListen on address to handle statsd input
--monitor-onlyRun features in monitor only mode
--exec stringStart another child process and exit if it dies
--disable-auto-updatesDisable 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.

Updated about a year ago

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.