Skip to main content
You can use environment variables to override the config file for the Tyk Pump. Environment variables are created from the dot notation versions of the JSON objects contained with the config files. To understand how the environment variables notation works, see Environment Variables. All the Pump environment variables have the prefix TYK_PMP_. The environment variables will take precedence over the values in the configuration file.

Environment Variable Type Mapping

When configuring Tyk components using environment variables, it’s important to understand how different data types are represented. The type of each variable is based on its definition in the Go source code. This section provides a guide on how to format values for common data types.
Go TypeEnvironment Variable FormatExample
stringA regular string of text.TYK_GW_SECRET="mysecret"
int, int64A whole number.TYK_GW_LISTENPORT=8080
booltrue or false.TYK_GW_USEDBAPPCONFIG=true
[]stringA comma-separated list of strings.TYK_PMP_PUMPS_STDOUT_FILTERS_SKIPPEDAPIIDS="api1,api2,api3"
map[string]stringA comma-separated list of key:value pairs.TYK_GW_GLOBALHEADERS="X-Tyk-Test:true,X-Tyk-Version:1.0"
map[string]interface{}A JSON string representing the object.TYK_GW_POLICIES_POLICYSOURCE_CONFIG='{"connection_string": "..."}'
For complex types like map[string]interface{}, the value should be a valid JSON string. For []string and map[string]string, ensure there are no spaces around the commas unless they are part of the value itself.