# Kanboard Authentification with Authelia

**URL:** <https://kanboard.discourse.group/t/kanboard-authentification-with-authelia/1667>\
**Category:** Installation Issues\
**Created:** [February 18, 2021, 10:00am UTC](https://kanboard.discourse.group/t/kanboard-authentification-with-authelia/1667 "2021-02-18T10:00:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![asterix](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@asterix](https://kanboard.discourse.group/u/asterix)\
**Post date:** [February 18, 2021, 10:00am UTC](https://kanboard.discourse.group/t/kanboard-authentification-with-authelia/1667/1 "2021-02-18T10:00:37Z")

</div>

Hello,

I use kanboard in docker, behind Traefik and Authelia for Authentification.

This is my configuration :

When I go in [kanboard.xxxxx.org](http://kanboard.xxxxx.org) i’m redirect to [sso.xxxxx.org](http://sso.xxxxx.org).  
Authentication is working but redirects me to the login page, but I would like to be logged in automatically.

This is my docker-compose.yml :

```
version: '3'

networks:
  net:
    driver: bridge
    name: net

services:
  traefik:
    image: traefik:v2.2
    container_name: traefik
    volumes:
      - ./config.yml:/etc/traefik/traefik.yml:ro
      - /var/run/docker.sock:/var/run/docker.sock
      - ./letsencrypt:/letsencrypt
    networks:
      - net
    labels:
      - 'traefik.enable=true'
      - 'traefik.http.routers.api.rule=Host(`xxx.xxxx.xxx`)'
      - 'traefik.http.routers.api.entrypoints=https'
      - 'traefik.http.routers.api.service=api@internal'
      - 'traefik.http.routers.api.tls=true'
    ports:
      - 80:80
      - 443:443
    command:
      - '--api'
      - '--providers.docker=true'
      - '--providers.docker.exposedByDefault=false'
      - '--entrypoints.http=true'
      - '--entrypoints.http.address=:80'
      - '--entrypoints.http.http.redirections.entrypoint.to=https'
      - '--entrypoints.http.http.redirections.entrypoint.scheme=https'
      - '--entrypoints.https=true'
      - '--entrypoints.https.address=:443'
      - '--log=true'
      - '--log.level=DEBUG'
      - '--log.filepath=/var/log/traefik.log'

  kanboard:
    image: kanboard/kanboard:latest
    container_name: kanboard
    networks:
      - net
    labels:
      - 'traefik.enable=true'
      - 'traefik.http.routers.kanboard.rule=Host(`xxx.xxx.xxx`)'
      - 'traefik.http.routers.kanboard.entrypoints=https'
      - 'traefik.http.routers.kanboard.tls=true'
      - 'traefik.http.routers.kanboard.middlewares=authelia@docker'
    expose:
      - 80
    restart: unless-stopped

  secure:
    image: containous/whoami
    container_name: secure
    networks:
      - net
    labels:
      - 'traefik.enable=true'
      - 'traefik.http.routers.secure.rule=Host(`whoami.xxx.xxx`)'
      - 'traefik.http.routers.secure.entrypoints=https'
      - 'traefik.http.routers.secure.tls=true'
      - 'traefik.http.routers.secure.middlewares=authelia@docker'
    expose:
      - 80
    restart: unless-stopped

```

Here is the result after the authentication on the “secure” container (whoami).  
The headers are well recovered

 ![header](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/1X/62307b561d3bc4ac4355ff965d96a367f8160b41.png)

I have add this in /var/www/app/config.php for kanboard :

> // Enable/disable the reverse proxy authentication  
> define(‘REVERSE\_PROXY\_AUTH’, true);  
> // Header name to use for the username  
> define(‘REVERSE\_PROXY\_USER\_HEADER’, ‘REMOTE\_USER’);  
> // Username of the admin, by default blank  
> define(‘REVERSE\_PROXY\_DEFAULT\_ADMIN’, ‘admin’);  
> // Header name to use for the username  
> define(‘REVERSE\_PROXY\_EMAIL\_HEADER’, ‘REMOTE\_EMAIL’);

But nothing changes, after authelia authentication I am redirected to the kanboard login page and not authenticated directly on kanboard

Can you help me please?

---

<div class="post-metadata">

**Author:** ![gandalfb](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/gandalfb/32/900_2.png) [@gandalfb](https://kanboard.discourse.group/u/gandalfb)\
**Post date:** [May 27, 2021, 6:54pm UTC](https://kanboard.discourse.group/t/kanboard-authentification-with-authelia/1667/2 "2021-05-27T18:54:45Z")

</div>

Hi, try to prepend HTTP\_

```auto
// Enable/disable the reverse proxy authentication
define('REVERSE_PROXY_AUTH', true);
// Header name to use for the username
define('REVERSE_PROXY_USER_HEADER', 'HTTP_REMOTE_USER');

// Header name to use for the username
define('REVERSE_PROXY_EMAIL_HEADER', 'HTTP_REMOTE_EMAIL');

```

That works for me.

Ressource: Note at the bottom of [https://docs.kanboard.org/en/latest/admin\_guide/reverse\_proxy\_authentication.html](https://docs.kanboard.org/en/latest/admin_guide/reverse_proxy_authentication.html)

---

<div class="post-metadata">

**Author:** ![asterix](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@asterix](https://kanboard.discourse.group/u/asterix)\
**Post date:** [September 6, 2021, 11:35am UTC](https://kanboard.discourse.group/t/kanboard-authentification-with-authelia/1667/3 "2021-09-06T11:35:39Z")

</div>

Hi,

Sorry for the response time, and thank you very much for your help it works for me!
