template.yaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ---
  2. kind: compose
  3. schema: "1.2"
  4. metadata:
  5. name: Authentik
  6. description: >
  7. Integrate Authentik Single Sign-On (SSO) for secure and streamlined user authentication.
  8. Authentik is an open-source identity provider that supports various authentication protocols.
  9. This configuration enables OAuth-based SSO, allowing users to log in using their Authentik
  10. credentials, enhancing security and user experience.
  11. Project: https://goauthentik.io/
  12. Documentation: https://goauthentik.io/docs/
  13. GitHub: https://github.com/goauthentik/authentik
  14. version: 2025.10.1
  15. author: Christian Lempa
  16. date: '2025-11-05'
  17. tags:
  18. - traefik
  19. - swarm
  20. - volume_modes
  21. next_steps: |
  22. 1. Start Authentik:
  23. docker compose up -d
  24. 2. Access the web interface:
  25. {% if traefik_enabled -%}
  26. - Via Traefik: https://{{ traefik_host }}
  27. {% if not traefik_enabled and network_mode == 'bridge' %}- Direct access: http://localhost:{{ ports_http }}{% endif %}
  28. {%- else -%}
  29. - Open http://localhost:{{ ports_http }} in your browser
  30. {%- endif %}
  31. 3. Initial setup:
  32. - Follow the setup wizard to create your admin account
  33. - Configure authentication flows and providers
  34. - Set up user directory (LDAP, Active Directory, or local)
  35. 4. Configure your first application:
  36. - Navigate to Applications → Create
  37. - Choose authentication provider (OAuth2, SAML, LDAP, etc.)
  38. - Configure redirect URIs and client credentials
  39. - Assign users or groups to the application
  40. 5. Important configuration:
  41. - Secret Key: {{ authentik_secret_key }}
  42. - Database Password: {{ database_password }}
  43. - Store these credentials securely!
  44. 6. Security recommendations:
  45. - Enable two-factor authentication for admin accounts
  46. - Configure backup flows and recovery tokens
  47. - Set up email notifications for security events
  48. - Review and customize authentication policies
  49. - Regularly backup the database and media files
  50. For more information, visit: https://goauthentik.io/docs/
  51. spec:
  52. general:
  53. vars:
  54. service_name:
  55. default: authentik
  56. container_name:
  57. default: authentik-server
  58. database:
  59. required: true
  60. vars:
  61. database_name:
  62. default: authentik
  63. database_user:
  64. default: authentik
  65. ports:
  66. vars:
  67. ports_http:
  68. description: Host port for HTTP
  69. type: int
  70. default: 8000
  71. ports_https:
  72. description: Host port for HTTPS
  73. type: int
  74. default: 8443
  75. traefik:
  76. vars:
  77. traefik_host:
  78. default: authentik.home.arpa
  79. authentik:
  80. description: Configure Authentik application settings
  81. required: true
  82. vars:
  83. authentik_error_reporting:
  84. description: Enable error reporting to Authentik developers
  85. type: bool
  86. default: false
  87. authentik_secret_key:
  88. description: Secret Key
  89. extra: Used for cookie signing and unique user IDs
  90. type: str
  91. sensitive: true
  92. autogenerated: true