Authentik Initial Setup Not Found Error Fix
在Unraid服务器上安装Authentik时遇到“Not Found”错误,原因是默认认证流和管理员用户未创建。通过手动创建管理员用户、应用默认蓝图并重启容器解决问题。 2026-1-1 07:13:23 Author: www.blackmoreops.com(查看原文) 阅读量:3 收藏

I was installing Authentik on my Unraid server and navigated to http://your-ip:9000/if/flow/initial-setup/ to complete the initial setup. Instead of the expected configuration page, I was greeted with a this “Go home” “Not Found” error. After spending hours searching on Google and Authenlia website trying to fix this Authentik initial setup not found error, I kind of discovered the root cause: the default flows and admin user weren’t created during installation, leaving the instance without authentication flows. I’m documenting the solution here in case it helps someone else facing the same issue.

Resolve the Authentik "Not Found" error when accessing the initial setup page on Unraid by manually creating the admin user and applying default authentication flow blueprints.

Resolve the Authentik “Not Found” error when accessing the initial setup page on Unraid by manually creating the admin user and applying default authentication flow blueprints.

My view on why this Initial Setup Not Found Error happens

The “Not Found” page appears because the initial setup flow doesn’t exist in your Authentik database. This typically happens when:

  • Default blueprints weren’t applied during container startup
  • The bootstrap process failed silently
  • Database migrations completed but blueprint installation didn’t
  • The admin user creation process was skipped

Unlike a traditional 404 error that might indicate a configuration problem, this specific error means Authentik is running correctly but lacks the foundational flows required for user authentication.

Quick Solution for Authentik Initial Setup Not Found

For Authentik running on Docker or Unraid following steps worked for me:

Step 1: Find Your Container ID

docker ps | grep authentik

Sample output:

6c927d893c80   ghcr.io/goauthentik/server:2025.8.1      "dumb-init -- ak ser…"   29 minutes ago   Up 8 minutes (healthy)   0.0.0.0:9000->9000/tcp, :::9000->9000/tcp, 0.0.0.0:9443->9443/tcp, :::9443->9443/tcp

Note the container ID from the first column (in this example: 6c927d893c80). You’ll use this in subsequent commands.

Step 2: Create Admin User Manually

Access the Authentik shell:

docker exec -it 6c927d893c80 ak shell

Create the admin user with these commands:

from authentik.core.models import User
user = User.objects.create(username='akadmin', name='Admin User', email='admin@localhost')
user.set_password('YourSecurePassword')
user.is_active = True
user.save()
print(f"User created: {user.username}")
exit()

Replace YourSecurePassword with a strong password.

Step 3: Add User to Admin Group

docker exec -it 6c927d893c80 ak create_admin_group akadmin

You should see confirmation: “User ‘akadmin’ successfully added to the group ‘authentik Admins’.”

Step 4: Locate Blueprint Files

Find where blueprints are stored in your container:

docker exec -it 6c927d893c80 find / -name "*.yaml" -path "*blueprint*" 2>/dev/null | head -20

Blueprints should be in /blueprints/default/.

Step 5: Apply Default Blueprints

Apply the essential authentication flows:

docker exec -it 6c927d893c80 ak apply_blueprint /blueprints/default/flow-default-authentication-flow.yaml
docker exec -it 6c927d893c80 ak apply_blueprint /blueprints/default/flow-default-invalidation-flow.yaml
docker exec -it 6c927d893c80 ak apply_blueprint /blueprints/default/flow-default-user-settings-flow.yaml
docker exec -it 6c927d893c80 ak apply_blueprint /blueprints/default/default-brand.yaml

Step 6: Restart Container

docker restart 6c927d893c80

Wait 30-60 seconds for the container to fully restart.

Step 7: Access Authentik

Navigate to http://your-ip:9000/ and log in with:

  • Username: akadmin
  • Password: [the password you set]

Alternative Method: Using Official Documentation Approach

The Authentik troubleshooting documentation recommends trying a container restart first, then using the changepassword command to set the admin password. However, this approach creates a circular problem when the akadmin user doesn’t exist yet.

When attempting to follow the official documentation, you’ll encounter an error:

docker exec -it 6c927d893c80 ak changepassword akadmin

Output:

CommandError: user 'akadmin' does not exist

This creates a catch-22 situation: you need the user to exist before you can change its password, but the initial setup flow (which would create the user) doesn’t exist. The official recovery key method also fails with “User ‘akadmin’ not found” for the same reason. This is why manually creating the user through the Django shell (as shown in Step 2 above) is necessary to break this loop.

Verifying Your Installation

After logging in successfully, verify your setup:

    1. Navigate to DirectoryUsers and edit the akadmin user
    2. Set a proper email address
    3. Check SystemFlows to confirm all default flows are present:
      • default-authentication-flow
      • default-invalidation-flow
      • default-user-settings-flow

Password Issues with Special Characters:

When setting the initial password in Step 2, I encountered login failures when using a complex password with special characters. The password was set successfully, but authentication kept failing. If you experience this, reset the password using the management command:

docker exec -it 6c927d893c80 ak changepassword akadmin

I set a simpler password without special characters, logged in successfully, then changed it to a more complex password through the Authentik web interface under DirectoryUsers. This two-step approach avoids potential character encoding issues during the initial shell-based password setting. For enterprise deployments requiring advanced features, consult the Authentik enterprise documentation for additional configuration options and support resources.

Conclusion

It seems this error occured during initial installation by not loading the blueprints or race conditions in the startup sequence. I do have very strict DNS policy and maybe it was simply blocked. I remmeber the download took forever on my 1Gbps connection which was weird. Maybe it was blocked by a firewall or DNS blacklist, maybe its a race issue but by manually creating the admin user through the Django shell and applying the default blueprints, I bypassed the failed automated setup and gain full access to my Authentik instance. Once logged in, I was able to configure additional authentication flows, integrate applications, and customise my identity provider.

If you find Authentik’s setup process overly complex for your needs, consider trying Authelia as a simpler alternative. Authelia is much lighter than Authentik and offers a more straightforward installation process that’s perfect for home lab environments and smaller deployments. You can follow my comprehensive guide on Authelia SSO setup with Unraid and Nginx Proxy Manager for a smoother authentication experience that doesn’t require manual database manipulation or blueprint management.

For additional security layers beyond SSO, I’ve also created a guide on two-factor authentication in WordPress with mobile app push notifications that I absolutely love. Using Cisco DUO, you get the best authentication experience with push notifications to your mobile device, and it works brilliantly with WordPress and other platforms. It’s definitely worth checking out if you’re serious about securing your self-hosted services.


文章来源: https://www.blackmoreops.com/authentik-initial-setup-not-found-error-fix/
如有侵权请联系:admin#unsafe.sh