Replies: 5 comments 2 replies
-
|
@EBS-DarkD Solution 1: Configure DNS Servers in Docker/Portainer (Recommended)Explicitly configure DNS servers in your Portainer stack or docker-compose.yml: For Portainer Stacks:
services:
app:
# ... other configuration ...
dns:
- 8.8.8.8 # Google DNS
- 8.8.4.4 # Google DNS secondary
# OR use your internal DNS server
- 192.168.1.1 # Your router/internal DNSFor docker-compose.yml: services:
app:
build: .
dns:
- 8.8.8.8
- 8.8.4.4
# ... rest of configurationAfter updating, restart the container/stack. Solution 2: Use Docker Internal NetworkingIf both Authentik and TimeTracker are running on the same Docker network (same subnet in Portainer), you can use Docker's internal DNS resolution by using the container/service name instead of the external domain.
Note: This only works if both containers can communicate internally. External redirects (like OIDC callbacks) will still need the public domain. Solution 3: Add extra_hosts MappingMap the domain to an IP address in your Docker configuration: For Portainer Stacks: services:
app:
# ... other configuration ...
extra_hosts:
- "auth.goat-lovers.xxx:192.168.1.100" # Replace with actual Authentik IPFor docker-compose.yml: services:
app:
build: .
extra_hosts:
- "auth.goat-lovers.xxx:192.168.1.100"
# ... rest of configurationTo find the IP address: # From within the TimeTracker container
docker exec -it timetracker-app ping -c 1 auth.goat-lovers.xxx
# Or from host
ping auth.goat-lovers.xxx |
Beta Was this translation helpful? Give feedback.
-
|
Tried all of the above and it's still not playing! I think for now, I'm going to stick with internal auth only, setup the accounts, turn off registration and add an ACL on NPM so I can make it available externally. |
Beta Was this translation helpful? Give feedback.
-
|
@EBS-DarkD , can you send me how you setup everything? if possible with docker-compose files so i can try out and debug. |
Beta Was this translation helpful? Give feedback.
-
|
TT Stack.... Authentik App part of authentik stack (there's a lot in there) ` |
Beta Was this translation helpful? Give feedback.
-
|
@EBS-DarkD have you been able to test with the latest versions? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've set everything up for local users and it's working fine but I've just tried to turn on OIDC with my authentik provider and I'm facing the following issue...
Error loading metadata: HTTPSConnectionPool(host='auth.goat-lovers.xxx', port=443): Max retries exceeded with url: /application/o/time-tracker/.well-known/openid-configuration (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f3b1e477810>: Failed to resolve 'auth.goat-lovers.xxx' ([Errno -2] Name or service not known)"))Note that I'm running both applications through portainer stacks and they are on different stacks but the same subnet
The setup also has nginx proxy manager integrated with openappsec
DNS for both the Authentik and TimeTracker is working fine - note the TimeTracker is on a different domain to the Authentik
If I try to curl https://auth.goat-lovers.xxx/application/o/time-tracker/.well-known/openid-configuration from within the TimeTracker docker container, I get the correct response so theres correct DNS resolution happening at the container level!
Anyone any ideas on what I need to tweak here?
Beta Was this translation helpful? Give feedback.
All reactions