Skip to main content

Configuring Configu Proxy

You can configure the Configu Proxy server using environment variables. The following environment variables are available:
string
required
The (absolute) file path of the .configu configuration file. CONFIGU_CONFIGURATION can also be used.
number
default:"8080"
The host port to serve the HTTP server on.
boolean
default:"false"
Enables or disables transport layer security (TLS). - The CONFIGU_HTTP_TLS_CERT and CONFIGU_HTTP_TLS_KEY environment variables are required when CONFIGU_HTTP_TLS_ENABLED is set to true.
string
The (absolute) file path of the certificate to use for the TLS connection.
string
The (absolute) file path of the TLS key that should be used for the TLS connection.
boolean
default:"false"
Enables or disables the authentication mechanism. - The CONFIGU_AUTH_PRESHARED_KEYS environment variable is required when CONFIGU_AUTH_ENABLED is set to true.
string
Comma-separated list of pre-shared keys that are allowed to make requests to the server.
string
default:"http://localhost:8080"
The public URL of the server.
string
default:"*"
Comma-separated list of origins that are allowed to make requests to the server.
boolean
default:"false"
Enables or disables the trust proxy setting.
boolean
default:"true"
Enables or disables request logging.
boolean
default:"true"
Enables or disables the API reference documentation route at /docs.

Production Best Practices

For production environments, it is recommended to:
  • Enable authentication using pre-shared keys. CONFIGU_AUTH_ENABLED=true and CONFIGU_AUTH_PRESHARED_KEYS=key1,key2.
  • Disable request logging. CONFIGU_LOG_ENABLED=false.
  • Disable the API reference documentation route at /docs. CONFIGU_DOCS_ENABLED=false.
  • Enable transport layer security (TLS) and use a valid certificate from a trusted certificate authority (CA). CONFIGU_HTTP_TLS_ENABLED=true, CONFIGU_HTTP_TLS_CERT=/path/to/cert.pem, and CONFIGU_HTTP_TLS_KEY=/path/to/key.pem.
  • Use a reverse proxy like Nginx, Caddy, Traefik or HAProxy to handle TLS termination and load balancing. CONFIGU_HTTP_TRUST_PROXY=true.

Generating a Self-Signed Certificate

For development purposes, you can generate a self-signed certificate Using OpenSSL:
Using mkcert:

Running Configu Proxy

Using Docker

You can run the Configu Proxy server using Docker. The following command starts the server:
Replace /path/to/.configu with the path to your .configu configuration file. Here is an example configuration for running the Configu Proxy server on different port with authentication and TLS enabled:
Replace /path/to/.configu with the path to your .configu configuration file and /path/to/certs with the path to your certificate and key files.

Using Docker Compose

You can use Docker Compose to run the Configu Proxy server. Here is an example configuration:
docker-compose.yml
Replace /path/to/.configu with the path to your .configu configuration file. Run the following command to start the server:

Using Kubernetes

You can deploy the Configu Proxy server on Kubernetes using a Deployment and a Service. Here is an example configuration:
configu-proxy.yaml
Create a ConfigMap with your .configu configuration file:
Replace /path/to/.configu with the path to your .configu configuration file. Apply the configuration:
Verify the deployment:

Using Helm

This section is under construction and will be ready soon. Thanks for your patience! 🚧