diff --git a/ct/authelia.sh b/ct/authelia.sh index ee77973d9..dc3404afc 100644 --- a/ct/authelia.sh +++ b/ct/authelia.sh @@ -45,4 +45,4 @@ description msg_ok "Completed successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}https://YOUR_AUTHELIA_URL${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9091 or https://auth.YOURDOMAIN ${CL}" diff --git a/install/authelia-install.sh b/install/authelia-install.sh index 755e3de4b..010be6cab 100644 --- a/install/authelia-install.sh +++ b/install/authelia-install.sh @@ -52,6 +52,14 @@ touch /etc/authelia/emails.txt JWT_SECRET=$(openssl rand -hex 64) SESSION_SECRET=$(openssl rand -hex 64) STORAGE_KEY=$(openssl rand -hex 64) + +if [[ "$DOMAIN" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then + AUTHELIA_URL="https://${DOMAIN}:9091" +else + AUTHELIA_URL="https://auth.${DOMAIN}" +fi +echo "$AUTHELIA_URL" > /etc/authelia/.authelia_url + cat </etc/authelia/users.yml users: authelia: @@ -75,7 +83,7 @@ session: remember_me: '1M' cookies: - domain: "${DOMAIN}" - authelia_url: "https://auth.${DOMAIN}" + authelia_url: "${AUTHELIA_URL}" storage: encryption_key: "${STORAGE_KEY}" local: