Server

Configuration

Example Configuration

This section is intended as an example configuration to help users with a rough contextual layout of this configuration section, it is not intended to explain the options. The configuration shown may not be a valid configuration, and you should see the options section below and the navigation links to properly understand each option individually.

configuration.yml
server:
  address: 'tcp://:9091/'
  disable_healthcheck: false
  tls:
    key: ''
    certificate: ''
    client_certificates: []
  headers:
    csp_template: ''
  buffers:
    read: 4096
    write: 4096
  timeouts:
    read: '6s'
    write: '6s'
    idle: '30s'
  endpoints:
    enable_pprof: false
    enable_expvars: false
    authz: {} ## See the dedicated "Server Authz Endpoints" configuration guide.

Options

address

string address tcp://:9091/ not required

Reference Note

This configuration option uses a common syntax. For more information please see both the configuration example and the Common Syntax: Address reference guide.

Important Notes

The Proxy Integration documentation has important notes on this option for when integrating it with a proxy.

Configures the listener address for the Main HTTP Server. The address itself is a listener and the scheme must either be the unix scheme or one of the tcp schemes. It can configure the host, port, and path the listener responds to.

To configure the path for a unix socket see the address syntax documentation linked above.

If the path is configured to anything other than / requests will be handled for both / and the configured path. For example if configured to tcp://:9091/authelia then requests will be handled for both the / and /authelia/ path.

Examples

configuration.yml
server:
  address: 'tcp://127.0.0.1:9091/'
configuration.yml
server:
  address: 'tcp://127.0.0.1:9091/subpath'
configuration.yml
server:
  address: 'unix:///var/run/authelia.sock'

asset_path

string not required

Authelia by default serves all static assets from an embedded file system in the Go binary.

Modifying this setting will allow you to override and serve specific assets for Authelia from a specified path. All assets that can be overridden must be placed in the asset_path. The structure of this directory and the assets which can be overridden is documented in the Sever Asset Overrides Reference Guide.

disable_healthcheck

boolean false not required

On startup Authelia checks for the existence of /app/healthcheck.sh and /app/.healthcheck.env and if both of these exist it writes the configuration vars for the healthcheck to the /app/.healthcheck.env file. In instances where this is not desirable, it’s possible to disable these interactions entirely.

An example situation where this is the case is in Kubernetes when set security policies that prevent writing to the ephemeral storage of a container or just don’t want to enable the internal health check.

tls

Authelia typically listens for plain unencrypted connections. This is by design as most environments allow to security on lower areas of the OSI model. However it required, if you specify both the tls key and tls certificate options, Authelia will listen for TLS connections.

The key must be generated by the administrator and can be done by following the Generating an RSA Self Signed Certificate guide provided a self-signed certificate is fit for purpose. If a self-signed certificate is fit for purpose is beyond the scope of the documentation and if it is not fit for purpose we instead recommend generating a certificate signing request or obtaining a certificate signed by one of the many ACME certificate providers. Methods to achieve this are beyond the scope of this guide.

key

string situational

The path to the private key for TLS connections. Must be in DER base64/PEM format and must be encoded per the PKCS#8, PKCS#1, or SECG1 specifications.

certificate

string situational

The path to the public certificate for TLS connections. Must be in DER base64/PEM format.

client_certificates

list(string) situational

The list of file paths to certificates used for authenticating clients. Those certificates can be root or intermediate certificates. If no item is provided mutual TLS is disabled.

headers

csp_template

string not required

This customizes the value of the Content-Security-Policy header. It will replace all instances of the below placeholder with the nonce value of the Authelia react bundle. This is an advanced option to customize, and you should do sufficient research about how browsers utilize and understand this header before attempting to customize it.

Placeholder Value: ${NONCE}

Default Template: default-src 'self'; frame-src 'none'; object-src 'none'; style-src 'self' 'nonce-${NONCE}'; frame-ancestors 'none'; base-uri 'self'

buffers

structure server-buffers not required

Reference Note

This configuration option uses a common structure. For more information please see both the configuration example and the Common Structure: Server Buffers reference guide.

Configures the server buffers.

timeouts

structure server-timeouts not required

Reference Note

This configuration option uses a common structure. For more information please see both the configuration example and the Common Structure: Server Timeouts reference guide.

Configures the server timeouts.

endpoints

enable_pprof

boolean false not required

Security Note

This is a developer endpoint. DO NOT enable it unless you know why you’re enabling it. DO NOT enable this in production.

Enables the go pprof endpoints.

enable_expvars

boolean false not required

Security Note

This is a developer endpoint. DO NOT enable it unless you know why you’re enabling it. DO NOT enable this in production.

Enables the go expvar endpoints.

authz

This is an advanced option allowing configuration of the authorization endpoints and has its own section. Generally this does not need to be configured for most use cases. See the authz configuration for more information.

Additional Notes

Buffer Sizes

The read and write buffer sizes generally should be the same. This is because when Authelia verifies if the user is authorized to visit a URL, it also sends back nearly the same size response as the request. However, you’re able to tune these individually depending on your needs.

Asset Overrides

If replacing the Logo for your Authelia portal, it is recommended to upload a transparent PNG of your desired logo. Authelia will automatically resize the logo to an appropriate size to present in the frontend.