Files
authentik/website/docs/install-config/reverse-proxy.md
Tana M Berry 3fd278e16d website/docs: add a new page to help people get started after install is complete (#19217)
* new first steps docs

* moved email config up to match Docker

* first draft

* moved sections and retitled some

* more content, tweaks

* dewis edits

* added Dewi ideas, more content, tweaks

* more content, green tips, other fixes

* Optimised images with calibre/image-actions

* Optimised images with calibre/image-actions

* Optimised images with calibre/image-actions

* conflicts?

* dominic's eedits, more content

* another fine Dominic edit

* more dewi and dominic edits, links

* a bunch of things

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* tweaks

* thanks Teffen

* new styles, more content

* few more dominic edits, tweaks

* formatting fights on tips

* fix some alignments

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* changes from Jens

* work on bindings docs that was needed for the first steps docs

* links, more tweaks

* more edits, more TODOs done

* add mermaid diagram, more links, more content

* fix sidebar, tweaks

* tweak

* more link fixing

* fix heading size

* more dewi and dominic edits

* more dewi and dominic edits

* teffen enhancements yay and more bindings rearchitecting

* added note about stage bindings being the only type of binding that you can bind to yeehaw

---------

Signed-off-by: Tana M Berry <tanamarieberry@yahoo.com>
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
Co-authored-by: Dewi Roberts <dewi@goauthentik.io>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
2026-02-04 15:31:46 +01:00

69 lines
2.7 KiB
Markdown

---
title: Reverse proxy
---
:::info
Since authentik uses WebSockets to communicate with Outposts, it does not support HTTP/1.0 reverse proxies. The HTTP/1.0 specification does not officially support WebSockets or protocol upgrades, though some clients may allow it.
:::
If you want to access authentik behind a reverse proxy, there are a few headers that must be passed upstream:
- `X-Forwarded-Proto`: Tells authentik and Proxy Providers if they are being served over an HTTPS connection.
- `X-Forwarded-For`: Without this, authentik will not know the IP addresses of clients.
- `Host`: Required for various security checks, WebSocket handshake, and Outpost and Proxy Provider communication.
- `Connection: Upgrade` and `Upgrade: WebSocket`: Required to upgrade protocols for requests to the WebSocket endpoints under HTTP/1.1.
It is also recommended to use a [modern TLS configuration](https://ssl-config.mozilla.org/) and disable SSL/TLS protocols older than TLS 1.3.
If your reverse proxy isn't accessing authentik from a private IP address, [trusted proxy CIDRs configuration](./configuration/configuration.mdx#listen-settings) needs to be set on the authentik server to allow client IP address detection.
The following nginx configuration can be used as a starting point for your own configuration.
```
# Upstream where your authentik server is hosted.
upstream authentik {
server <hostname of your authentik server>:9443;
# Improve performance by keeping some connections alive.
keepalive 10;
}
# Upgrade WebSocket if requested, otherwise use keepalive
map $http_upgrade $connection_upgrade_keepalive {
default upgrade;
'' '';
}
server {
# HTTP server config
listen 80;
listen [::]:80;
server_name sso.domain.tld;
# 301 redirect to HTTPS
return 301 https://$host$request_uri;
}
server {
# HTTPS server config
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name sso.domain.tld;
# TLS certificates
ssl_certificate /etc/letsencrypt/live/domain.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.tld/privkey.pem;
add_header Strict-Transport-Security "max-age=63072000" always;
# Proxy site
# Location can be set to a subpath if desired, see documentation linked below:
# https://docs.goauthentik.io/docs/install-config/configuration/#authentik_web__path
location / {
proxy_pass https://authentik;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade_keepalive;
}
}
```