Issue when loading secrets: error loading secret into key 'session.secret': it's already defined in other configuration sources #7321
-
I cannot seem to load any secrets into the configuration file. I have all my secrets in Here is my docker-compose.yml: ---
networks:
proxy:
external: true
name: 'proxy'
services:
authelia:
container_name: 'authelia'
image: 'docker.io/authelia/authelia:latest'
restart: 'unless-stopped'
user: '994:992'
networks:
- proxy
expose:
- 9091
environment:
AUTHELIA_JWT_SECRET_FILE: '/secrets/JWT_SECRET'
AUTHELIA_SESSION_SECRET_FILE: '/secrets/SESSION_SECRET'
AUTHELIA_STORAGE_ENCRYPTION_KEY_FILE: '/secrets/STORAGE_ENCRYPTION_KEY'
AUTHELIA_DUO_API_INTEGRATION_KEY_FILE: '/secrets/DUO_API_INTEGRATION_KEY'
AUTHELIA_DUO_API_SECRET_KEY_FILE: '/secrets/DUO_API_SECRET_KEY'
TZ: 'America/New_York'
volumes:
- '/var/lib/authelia/config:/config'
- '/var/lib/authelia/secrets:/secrets:ro'
healthcheck:
test: ["CMD", "/app/healthcheck.sh"]
interval: 5m
timeout: 5s Here are the logs:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Please note this response was created using generative AI leveraging previously available information from the repository. This information may be helpful however it is our strong recommendation that you carefully consider the information before blindly applying it. The issue you're encountering where secrets are reported as "already defined in other configuration sources" typically indicates that the same configuration keys are being defined in multiple places within your Authelia configuration. This can happen if the secrets are set both in the environment variables and directly in the configuration files, or if there are duplicate entries within the configuration itself. Here are a few steps to troubleshoot and resolve this issue:
If after these checks the issue persists, consider simplifying your configuration to the minimum necessary to run Authelia and incrementally add configurations to identify the problematic setting. For more detailed guidance, you can refer to the Authelia documentation on secrets management and configuration: This comment was generated by Glime. |
Beta Was this translation helpful? Give feedback.
-
That AI is actually surprisingly very coherent... I changed all the instances of |
Beta Was this translation helpful? Give feedback.
-
Remove encryption key for example. Same applies to the other ones defined with a storage:
encryption_key: AUTHELIA_STORAGE_ENCRYPTION_KEY_FILE |
Beta Was this translation helpful? Give feedback.
You defined them in your docker compose, when using the env secrets detection you do must not define them in the config as well. This is to prevent confusion and prevent accidentally including them in the config as well.