@@ -8,7 +8,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
88APP=" authentik"
99var_tags=" ${var_tags:- auth} "
1010var_cpu=" ${var_cpu:- 4} "
11- var_ram=" ${var_ram:- 4096 } "
11+ var_ram=" ${var_ram:- 8192 } "
1212var_disk=" ${var_disk:- 16} "
1313var_os=" ${var_os:- debian} "
1414var_version=" ${var_version:- 13} "
@@ -22,20 +22,29 @@ catch_errors
2222
2323function update_script() {
2424 header_info
25- check_container_storage
26- check_container_resources
2725
2826 if [[ ! -d /opt/authentik ]]; then
2927 msg_error " No authentik Installation Found!"
3028 exit
3129 fi
3230
31+ CUR_VERSION=" $( < " $HOME /.authentik" ) "
32+ IFS=' .' read -ra PARTS <<< " ${CUR_VERSION#version/}"
33+ MAJOR=${PARTS[0]}
34+ MINOR=${PARTS[1]}
35+
36+ check_container_storage
37+ check_container_resources
38+
39+ msg_info " Update dependencies"
40+ ensure_dependencies crossbuild-essential-amd64 gcc-x86-64-linux-gnu cmake clang libunwind-18-dev
41+ msg_ok " Update dependencies"
42+
3343 NODE_VERSION=" 24" setup_nodejs
3444 setup_go
3545 UV_PYTHON_INSTALL_DIR=" /usr/local/bin" PYTHON_VERSION=" 3.14.3" setup_uv
36- setup_rust
3746
38- AUTHENTIK_VERSION=" version/2026.2.3 "
47+ AUTHENTIK_VERSION=" version/2026.5.2 "
3948 XMLSEC_VERSION=" 1.3.11"
4049
4150 if check_for_gh_release " geoipupdate" " maxmind/geoipupdate" ; then
@@ -71,7 +80,20 @@ function update_script() {
7180
7281 CLEAN_INSTALL=1 fetch_and_deploy_gh_release " authentik" " goauthentik/authentik" " tarball" " ${AUTHENTIK_VERSION} " " /opt/authentik"
7382
74- msg_info " Updating web"
83+ msg_info " Clearing rust"
84+ rm -rf /root/.cargo /root/.rustup
85+ msg_ok " Clearing rust"
86+
87+ msg_info " Setup custom rust"
88+ cd /opt/authentik
89+ export PATH=" /root/.cargo/bin:$PATH "
90+ echo ' export PATH="/root/.cargo/bin:$PATH"' >> " /root/.profile"
91+ curl https://sh.rustup.rs -sSf | $STD sh -s -- -y --profile minimal --default-toolchain none
92+ $STD rustup install
93+ $STD rustup default " $( sed -n ' s/channel = "\(.*\)"/\1/p' rust-toolchain.toml) "
94+ msg_ok " Setup custom rust"
95+
96+ msg_info " Updating web"
7597 cd /opt/authentik/web
7698 export NODE_ENV=" production"
7799 $STD npm install
@@ -89,6 +111,14 @@ function update_script() {
89111 $STD go build -o /opt/authentik/radius ./cmd/radius
90112 msg_ok " Updated go proxy"
91113
114+ msg_info " Building worker"
115+ export AWS_LC_FIPS_SYS_CC=" clang"
116+ cd /opt/authentik
117+ $STD cargo build --package authentik --no-default-features --features core --locked --release --jobs 1
118+ cp ./target/release/authentik /opt/authentik/authentik-worker
119+ rm -r ./target
120+ msg_ok " Buildt worker"
121+
92122 msg_info " Updating python server"
93123 export UV_NO_BINARY_PACKAGE=" cryptography lxml python-kadmin-rs xmlsec"
94124 export UV_COMPILE_BYTECODE=" 1"
@@ -100,6 +130,103 @@ function update_script() {
100130 $STD uv sync --frozen --no-install-project --no-dev
101131 chown -R authentik:authentik /opt/authentik
102132 msg_ok " Updated python server"
133+
134+ if [[ $MAJOR == 2026 && $MINOR -lt 5 ]]; then
135+ msg_info " Updating Worker and Server config"
136+ cp /etc/authentik/config.yml /etc/authentik/config.bak
137+ yq -i " .postgresql.conn_max_age = 0" /etc/authentik/config.yml
138+ yq -i " .postgresql.conn_health_checks = false" /etc/authentik/config.yml
139+ yq -i " .listen.debug_tokio = \" [::]:6669\" " /etc/authentik/config.yml
140+ yq -i " .log.rust_log.console_subscriber = \" info\" " /etc/authentik/config.yml
141+ yq -i " .log.rust_log.h2 = \" info\" " /etc/authentik/config.yml
142+ yq -i " .log.rust_log.hyper_util = \" warn\" " /etc/authentik/config.yml
143+ yq -i " .log.rust_log.mio = \" info\" " /etc/authentik/config.yml
144+ yq -i " .log.rust_log.notify = \" info\" " /etc/authentik/config.yml
145+ yq -i " .log.rust_log.reqwest = \" info\" " /etc/authentik/config.yml
146+ yq -i " .log.rust_log.runtime = \" info\" " /etc/authentik/config.yml
147+ yq -i " .log.rust_log.rustls = \" info\" " /etc/authentik/config.yml
148+ yq -i " .log.rust_log.sqlx = \" info\" " /etc/authentik/config.yml
149+ yq -i " .log.rust_log.sqlx_postgres = \" info\" " /etc/authentik/config.yml
150+ yq -i " .log.rust_log.tokio = \" info\" " /etc/authentik/config.yml
151+ yq -i " .log.rust_log.tungstenite = \" info\" " /etc/authentik/config.yml
152+ yq -i " .web.workers = 2" /etc/authentik/config.yml
153+ mv /etc/default/authentik /etc/default/authentik.bak
154+ cat << EOF >/etc/default/authentik-server
155+ TMPDIR=/dev/shm/
156+ UV_LINK_MODE=copy
157+ UV_PYTHON_DOWNLOADS=0
158+ UV_NATIVE_TLS=1
159+ VENV_PATH=/opt/authentik/.venv
160+ PYTHONDONTWRITEBYTECODE=1
161+ PYTHONUNBUFFERED=1
162+ PATH=/opt/authentik/lifecycle:/opt/authentik/.venv/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin
163+ DJANGO_SETTINGS_MODULE=authentik.root.settings
164+ PROMETHEUS_MULTIPROC_DIR="/tmp/authentik_prometheus_tmp"
165+ AUTHENTIK_LISTEN__HTTP="[::]:9000"
166+ AUTHENTIK_LISTEN__HTTPS="[::]:9443"
167+ AUTHENTIK_LISTEN__METRICS="[::]:9300"
168+ EOF
169+ cat << EOF >/etc/default/authentik-worker
170+ TMPDIR=/dev/shm/
171+ UV_LINK_MODE=copy
172+ UV_PYTHON_DOWNLOADS=0
173+ UV_NATIVE_TLS=1
174+ VENV_PATH=/opt/authentik/.venv
175+ PYTHONDONTWRITEBYTECODE=1
176+ PYTHONUNBUFFERED=1
177+ PATH=/opt/authentik/lifecycle:/opt/authentik/.venv/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin
178+ DJANGO_SETTINGS_MODULE=authentik.root.settings
179+ PROMETHEUS_MULTIPROC_DIR="/tmp/authentik_prometheus_tmp"
180+ AUTHENTIK_LISTEN__HTTP="[::]:8000"
181+ AUTHENTIK_LISTEN__HTTPS="[::]:8443"
182+ AUTHENTIK_LISTEN__METRICS="[::]:8300"
183+ EOF
184+ msg_ok " Updated Worker and Server config!"
185+ msg_warn " Please check /etc/default/authentik-worker and /etc/default/authentik-server config files for port configurations!"
186+
187+ msg_info " Updating services"
188+ cat << EOF >/etc/systemd/system/authentik-server.service
189+ [Unit]
190+ Description=authentik Go Server (API Gateway)
191+ After=network.target authentik-worker.service
192+ Wants=postgresql.service authentik-worker.service
193+
194+ [Service]
195+ User=authentik
196+ Group=authentik
197+ ExecStartPre=/usr/bin/mkdir -p "\$ {PROMETHEUS_MULTIPROC_DIR}"
198+ ExecStart=/opt/authentik/authentik-server
199+ WorkingDirectory=/opt/authentik/
200+ Restart=always
201+ RestartSec=5
202+ EnvironmentFile=/etc/default/authentik-server
203+
204+ [Install]
205+ WantedBy=multi-user.target
206+ EOF
207+
208+ cat << EOF >/etc/systemd/system/authentik-worker.service
209+ [Unit]
210+ Description=authentik Worker
211+ After=network.target postgresql.service
212+
213+ [Service]
214+ User=authentik
215+ Group=authentik
216+ Type=simple
217+ EnvironmentFile=/etc/default/authentik-worker
218+ ExecStartPre=/usr/bin/mkdir -p "\$ {PROMETHEUS_MULTIPROC_DIR}"
219+ ExecStart=/opt/authentik/authentik-worker worker
220+ WorkingDirectory=/opt/authentik
221+ Restart=always
222+ RestartSec=5
223+
224+ [Install]
225+ WantedBy=multi-user.target
226+ EOF
227+ systemctl daemon-reload
228+ msg_ok " Updated services"
229+ fi
103230 fi
104231
105232 msg_info " Starting Services"
@@ -150,7 +277,5 @@ description
150277
151278msg_ok " Completed successfully!\n"
152279echo -e " ${CREATING}${GN}${APP} setup has been successfully initialized!${CL} "
153- echo -e " ${INFO}${YW} Initial setup URL:${CL} "
154- echo -e " ${TAB}${GATEWAY}${BGN} http://${IP} :9000/if/flow/initial-setup/${CL} "
155280echo -e " ${INFO}${YW} Access it using the following URL:${CL} "
156- echo -e " ${TAB}${GATEWAY}${BGN} http ://${IP} :9000 ${CL} "
281+ echo -e " ${TAB}${GATEWAY}${BGN} https ://${IP} :9443 ${CL} "
0 commit comments