H
Homarr6mo ago
Quokka

Help with Authentik

Today I tried creating a Homarr server using OIDC login per these instructions. I added an OAuth2/OpenID provider in Authentik called Homarr with a redirect URI https://quokka.wiki, and an application called Homarr with slug homarr and with the previously made Homarr provider. I then made my Docker compose like so:
version: '3'
#---------------------------------------------------------------------#
# Homarr - A simple, yet powerful dashboard for your server. #
#---------------------------------------------------------------------#
services:
homarr:
container_name: homarr
image: ghcr.io/ajnart/homarr:latest
restart: unless-stopped
environment:
AUTH_PROVIDER: oidc
AUTH_LOGOUT_REDIRECT_URL: ${AUTH_LOGOUT_REDIRECT_URL}
AUTH_OIDC_URI: ${AUTH_OIDC_URI}
AUTH_OIDC_CLIENT_ID: ${AUTH_OIDC_CLIENT_ID}
AUTH_OIDC_CLIENT_SECRET: ${AUTH_OIDC_CLIENT_SECRET}
AUTH_OIDC_CLIENT_NAME: "Authentik"
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Optional, only if you want docker integration
- /portainer/Files/AppData/Config/Homarr/configs:/app/data/configs
- /portainer/Files/AppData/Config/Homarr/icons:/app/public/icons
- /portainer/Files/AppData/Config/Homarr/data:/data
ports:
- '7575:7575'
version: '3'
#---------------------------------------------------------------------#
# Homarr - A simple, yet powerful dashboard for your server. #
#---------------------------------------------------------------------#
services:
homarr:
container_name: homarr
image: ghcr.io/ajnart/homarr:latest
restart: unless-stopped
environment:
AUTH_PROVIDER: oidc
AUTH_LOGOUT_REDIRECT_URL: ${AUTH_LOGOUT_REDIRECT_URL}
AUTH_OIDC_URI: ${AUTH_OIDC_URI}
AUTH_OIDC_CLIENT_ID: ${AUTH_OIDC_CLIENT_ID}
AUTH_OIDC_CLIENT_SECRET: ${AUTH_OIDC_CLIENT_SECRET}
AUTH_OIDC_CLIENT_NAME: "Authentik"
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Optional, only if you want docker integration
- /portainer/Files/AppData/Config/Homarr/configs:/app/data/configs
- /portainer/Files/AppData/Config/Homarr/icons:/app/public/icons
- /portainer/Files/AppData/Config/Homarr/data:/data
ports:
- '7575:7575'
With AUTH_LOGOUT_REDIRECT_URL being https://auth.mydomain.example/application/o/homarr/end-session/. Now what I'm most confused about is whether AUTH_OIDC_URI should be https://auth.mydomain.example/application/o/authorize/ or https://auth.mydomain.example/application/o/token/. I tried both and neither worked. Now when I try to log in with Authentik, it redirects to http://localhost:7575/api/auth/error?error=OAuthSignin. This should not happen.
🙋 Single Sign On | Homarr documentation
Homarr supports multiple authentication options, from internal userbase (credentials), to LDAP (with Active directory support), and OIDC.
Solution:
Now the Redirect URI is https://mydomain.example/api/auth/callback/oidc
Jump to solution
6 Replies
Cakey Bot
Cakey Bot6mo ago
Thank you for submitting a support request. Depending on the volume of requests, our team should get in contact with you shortly.
⚠️ Please include the following details in your post or we may reject your request without further comment: - Log (See https://homarr.dev/docs/community/faq#how-do-i-open-the-console--log) - Operating system (Unraid, TrueNAS, Ubuntu, ...) - Exact Homarr version (eg. 0.15.0, not latest) - Configuration (eg. docker-compose, screenshot or similar. Use ``your-text`` to format) - Other relevant information (eg. your devices, your browser, ...)
❓ Frequently Asked Questions | Homarr documentation
Can I install Homarr on a Raspberry Pi?
Manicraft1001
Manicraft10016mo ago
Hi @Quokka , thanks for your question. @Tag do you have an idea?
Quokka
QuokkaOP6mo ago
Wait imma try something real quick Should NEXTAUTH_URL be https://mydomain.example (my Homarr) or https://auth.mydomain.example (my Authentik) ? Maybe relevant: https://discord.com/channels/972958686051962910/1253507936869941369/1253508688719773796 OK so I fixed it
Manicraft1001
Manicraft10016mo ago
What was the solution?
Solution
Quokka
Quokka6mo ago
Now the Redirect URI is https://mydomain.example/api/auth/callback/oidc
Quokka
QuokkaOP6mo ago
Also I added BASE_URL and NEXTAUTH_URL which are both https://mydomain.example
Want results from more Discord servers?
Add your server