Skip to content

update authentik to 2026.5.2#14846

Open
thieneret wants to merge 15 commits into
community-scripts:mainfrom
thieneret:update-authentik-2026.5.2
Open

update authentik to 2026.5.2#14846
thieneret wants to merge 15 commits into
community-scripts:mainfrom
thieneret:update-authentik-2026.5.2

Conversation

@thieneret
Copy link
Copy Markdown
Contributor

✍️ Description

I finally managed to finish the authentik update script. Sorry for the delay, but I don't have much time these days. Plus, there was a typo in my test configuration and it took me 2 days to find it. My fault. :(

So about the update:

  • a few new dependencies have been introduced
  • authentik recently changed the way it handles worker. Now the new handler needs to be compiled with Rust and this process needs more than 4GB of RAM, so the default amount of RAM for the container has increased to 8GB.
  • During testing I have seen a few cases where the worker or server could not start because they were trying to use the same ports, so the port configuration is overridden in separate environment files for the worker and the server
  • starting with version 2026.5.0, you do not need to type the /if/flow/initial-setup/ link for the initial setup on a new installation because it will automatically redirect you there
  • In my experience, the initial setup is only accessible via https, so the default port has changed to 9443. After the initial setup, the http page is accessible on port 9000.

I can't find the JSON file in the repository to modify the necessary information.

🔗 Related Issue

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to script metadata (PocketBase/website data).
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

@thieneret thieneret requested a review from a team as a code owner June 1, 2026 08:10
@github-actions github-actions Bot added breaking change A change that is not backward compatible update script A change that updates a script labels Jun 1, 2026
Comment thread ct/authentik.sh
Comment thread ct/authentik.sh
Comment on lines +31 to +34
CUR_VERSION="$(<"$HOME/.authentik")"
IFS='.' read -ra PARTS <<< "${CUR_VERSION#version/}"
MAJOR=${PARTS[0]}
MINOR=${PARTS[1]}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CUR_VERSION="$(<"$HOME/.authentik")"
IFS='.' read -ra PARTS <<< "${CUR_VERSION#version/}"
MAJOR=${PARTS[0]}
MINOR=${PARTS[1]}
IFS='.' read -r MAJOR MINOR PATCH <<< "${$(<"$HOME/.authentik")#version/}"

Not tested, but possibly cleaner.

Copy link
Copy Markdown
Contributor Author

@thieneret thieneret Jun 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not working:

-bash: ${$(< "$HOME/.authentik")#version/}: bad substitution

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

read -r MAJOR MINOR PATCH <<< "$(sed 's/^version\///; s/\./ /g' "$HOME/.authentik")" ?

Comment thread ct/authentik.sh Outdated
Comment thread install/authentik-install.sh Outdated
Comment thread install/authentik-install.sh
thieneret and others added 3 commits June 1, 2026 11:02
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
@thieneret
Copy link
Copy Markdown
Contributor Author

@CrazyWolf13 @MickLesk
Thank you for your advices.
Refactored and tested

Comment thread ct/authentik.sh Outdated
Comment thread ct/authentik.sh Outdated
Comment thread ct/authentik.sh Outdated
Comment thread ct/authentik.sh Outdated
Comment thread ct/authentik.sh
AUTHENTIK_LISTEN__METRICS="[::]:8300"
EOF
msg_ok "Updated Worker and Server config!"
msg_warn "Please check /etc/default/authentik-worker and /etc/default/authentik-server config files for port configurations!"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does one need to review the port after an update?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, the port configuration was read from the /etc/authentik/config.yml file. The http, https, and metrics ports are valid for both the worker and the server. This is not a problem in a docker environment, since they run in two separate containers, but in our case they cause a conflict. During testing, I found that this conflict prevents the services from starting in some cases, so I created separate environment files for both the worker and the server, where the ports are overridden. If the user has modified the default ports, they must be transferred to the new environment file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay I see. So essentially the ports stay the same unless the user customized them?

Also then there was an error in the script as port was noted to be 9000?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default http port is 9000, through which the service can be accessed. The default https port is 9443, through which the service can be accessed securely. However, as I wrote in the pull request description, starting with version 2026.5.2, the initial settings can only be made via https 9443, so at the end of the script I changed the port to 9443 and I would recommend changing this on the website as well. After the initial settings, the service can also be accessed via http 9000.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add this into PR Description? Its marked as "breaking change" so the users can look about it and see the recent big changes and why ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in the description, although not as detailed as here.
If you feel it's necessary, I can elaborate there as well.

Comment thread install/authentik-install.sh Outdated
Comment thread install/authentik-install.sh Outdated
Comment thread install/authentik-install.sh Outdated
Comment thread install/authentik-install.sh Outdated
Comment thread install/authentik-install.sh Outdated
@MickLesk
Copy link
Copy Markdown
Member

MickLesk commented Jun 2, 2026

@thieneret you can now use profiles for rust
#14872

Example:

RUST_PROFILE="minimal" RUST_TOOLCHAIN="stable" setup_rust

MickLesk and others added 11 commits June 2, 2026 09:21
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
@thieneret
Copy link
Copy Markdown
Contributor Author

RUST_TOOLCHAIN="stable" tested and working

Comment thread ct/authentik.sh
Comment thread ct/authentik.sh
UV_PYTHON_INSTALL_DIR="/usr/local/bin" PYTHON_VERSION="3.14.3" setup_uv
setup_rust
RUST_PROFILE="minimal" RUST_TOOLCHAIN="stable" setup_rust

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we add here setup_yq too if something broke in bashrc during update?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add it?

Comment thread ct/authentik.sh
Comment thread ct/authentik.sh
Comment thread ct/authentik.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change A change that is not backward compatible update script A change that updates a script

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants