In case you want to protect containers with Authentik but your Authentik runs on another, totally different server, you can deploy an outpost container. This container will communicate with your offsite Authentik instance and provide a traefik forward-auth middleware.
Follow these instructions:
1. Create your to-be-protected application at your Authentik instance (provider + app) as usual.
2. Create a new outpost at your Authentik instance at `/if/admin/#/outpost/outposts`.
- Make note of the deployment token. This one will later be used as env in `AUTHENTIK_TOKEN` for the outpost container.
- Add your previously to-be-protected application to this outpost.
4. Spawn the outpost proxy container on your server, where Authentik is not running.
````
services:
authentik-outpost:
image: ghcr.io/goauthentik/proxy:2025.6
container_name: authentik-outpost
restart: unless-stopped
expose:
- 9000
environment:
AUTHENTIK_HOST: https://authentik.ptf.one
AUTHENTIK_TOKEN: <YOUR-DEPLOYMENT-TOKEN>
AUTHENTIK_INSECURE: "false" # set to "true" if your Authentik domain uses self-signed certs
Afterwards, you can use the new middleware `authentik@docker` for your running containers. If enabled, you have to authenticate against the Authentik instance, which runs somewhere else.
Here an example on how to enable the middleware on a simplistic whoami container: