搭建authelia

68 次阅读

本文最后更新于 2026年5月11日。

编排:

version: "3.7"

networks:
  1panel-network:
    external: true
    
services:
  authelia:
    image: authelia/authelia
    container_name: authelia
    volumes:
      - ./authelia:/config

    ports:
      - 127.0.0.1:8883:9091 
    restart: unless-stopped
    
    networks:
      - 1panel-network    

运行后报很多配置错误:

一步步修改配置后终于成功。

成功日志:

time="2024-01-25T06:00:34Z" level=warning msg="Configuration: access control: no rules have been specified so the 'default_policy' of 'one_factor' is going to be applied to all requests"
time="2024-01-25T06:00:34Z" level=info msg="Authelia v4.37.5 is starting"
time="2024-01-25T06:00:34Z" level=info msg="Log severity set to debug"
time="2024-01-25T06:00:34Z" level=info msg="Storage schema is being checked for updates"
time="2024-01-25T06:00:34Z" level=info msg="Storage schema migration from 0 to 7 is being attempted"
time="2024-01-25T06:00:34Z" level=debug msg="Storage schema migrated from version 0 to 1"
time="2024-01-25T06:00:34Z" level=debug msg="Storage schema migrated from version 1 to 2"
time="2024-01-25T06:00:34Z" level=debug msg="Storage schema migrated from version 2 to 3"
time="2024-01-25T06:00:34Z" level=debug msg="Storage schema migrated from version 3 to 4"
time="2024-01-25T06:00:34Z" level=debug msg="Storage schema migrated from version 4 to 5"
time="2024-01-25T06:00:34Z" level=debug msg="Storage schema migrated from version 5 to 6"
time="2024-01-25T06:00:34Z" level=debug msg="Storage schema migrated from version 6 to 7"
time="2024-01-25T06:00:34Z" level=info msg="Storage schema migration from 0 to 7 is complete"
time="2024-01-25T06:00:34Z" level=debug msg="The NTP startup check was skipped due to there being no configured 2FA access control rules"
time="2024-01-25T06:00:34Z" level=info msg="Initializing server for non-TLS connections on '[::]:9091' path '/'"

通过容器命令行生成密码

进入命令行要选择/bin/sh命令

/app # authelia hash-password auth-321
Digest: $argon2id$v=19$m=65536,t=3,p=4$YYKdR4J39IVmeUwEMwXJ4A$UkDAOh23G3Ooi4J+YYwSa27/K5UPrmC/K/DZ89/cWl0

用户名直接再用户配置文件明文定义的。

现在不知道怎么和其他项目配合