---
title: Deploy authentik with AI on Blossom
url: "/deploy/authentik/"
canonical_url: https://blossom88.com/deploy/authentik/
markdown_url: https://blossom88.com/deploy/authentik.md
summary: Deploy authentik with AI on Blossom. Run your own single sign-on with managed
  PostgreSQL and private R2 uploads.
stack:
- Python
- Django
- TypeScript
- PostgreSQL
---

# Deploy authentik with AI on Blossom

[authentik](https://goauthentik.io/) provides single sign-on for your apps.
Manage users centrally and connect applications to the same sign-in service.

## Ask Your Agent

> **Ask your AI agent:** Deploy authentik on Blossom and help me connect my first app for single sign-on.
>
> Follow this guide: https://blossom88.com/deploy/authentik/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## Your Sign-In Hub

| Part | Purpose |
|---|---|
| Server | Sign-in, application portal and identity APIs |
| Private worker | Background processing and maintenance |
| Managed PostgreSQL | Users, providers, sessions and signing configuration |
| Private R2 bucket | Uploaded application icons and other files |

Bring a private S3-compatible bucket, such as Cloudflare R2. The Server is
public for your app's sign-in flow; the worker and database stay private.

This setup uses [MIT-licensed community features](https://github.com/goauthentik/authentik/blob/main/LICENSE).

![authentik's application portal shows the connected Blossom Notes app and its uploaded icon.](/deploy/assets/images/authentik/applications.webp)

<details class="optional-reading" markdown="1">
<summary>Deployment setup and commands</summary>

Check the current [installation requirements](https://docs.goauthentik.io/install-config/)
and [configuration](https://docs.goauthentik.io/install-config/configuration/).
Choose compatible maintained images and PostgreSQL, and pin the image's
multi-architecture index digest. Use the same image for separate Server and
worker Services on regular App Capacity.

    blossom profile:show
    blossom app:create --data '{"app":{"name":"authentik"}}'
    blossom environment:create --data environment.yml
    blossom database_instance:create --data postgres.yml
    blossom activity:wait --id activity-100 --timeout 20m
    blossom environment_link:create --data postgres-link.yml

Decode the linked database URL into the native PostgreSQL settings. Give
both roles the same stable secret key, database and storage configuration.
Keep runtime scratch files in a writable temporary directory. Preserve the
image's user and native role startup; no Docker socket is needed for this
OIDC setup. Use the native readiness endpoint for both roles, allowing time
for first-start initialization.

Use the [S3 storage backend](https://docs.goauthentik.io/sys-mgmt/ops/storage-s3/)
for uploads. Supply the bucket, endpoint, region, signing settings and scoped
runtime credentials, including the session token when using temporary
credentials. Scope them to the documented media/report prefixes and arrange
renewal before an expiring credential lapses. Never give the app storage
administration credentials or make the bucket public. Configure browser GET
access from the Server's exact origin when needed.

    blossom service:create --data server.yml
    blossom service:create --data worker.yml
    blossom env_var:push --environment environment-100 --file .env.production
    blossom environment:deploy --id environment-100 --follow
    blossom environment:show --id environment-100

Complete native owner setup behind Blossom Account access. Use the documented
installation flow or worker bootstrap settings and store the credentials
privately. Then make the identity endpoint reachable by your intended clients;
let authentik authenticate users and protect its administration APIs.

</details>

## Connect Your First App

Create a user and an OpenID Connect provider/application. Register your app's
exact callback URL, configure its issuer and client ID, and test sign-in.
Use Authorization Code with PKCE for public clients.

<details class="optional-reading" markdown="1">
<summary>Updates, sessions and persistence</summary>

Keep the database, bucket, stable secret key, provider settings and signing
keys across updates.

    blossom environment:deploy --id environment-100 --follow
    blossom container:list --environment environment-100

Our sample user completed a fresh OIDC sign-in after both Containers were
replaced. The same identity, provider and signing flow worked; the uploaded
icon kept its exact bytes and new configuration edits saved successfully.

Client sign-out and identity-provider sign-out are different. By default,
[application-initiated logout](https://docs.goauthentik.io/add-secure-apps/providers/oauth2/frontchannel_and_backchannel_logout/)
keeps the central authentik session. We checked client logout, global identity
logout and a fresh sign-in requirement separately. Configure broader single
logout to match what your applications support.

This pass covers one Server, one worker and one OIDC client. SAML, MFA,
outposts, external identity sources, multi-app single logout, load and backup
restore need separate checks. Back up PostgreSQL, uploaded files and the
required configuration, then test recovery before relying on the deployment
for important accounts.

</details>

## What You Get

- Your own identity provider and application portal
- A first app connected through OpenID Connect
- Managed PostgreSQL and shared uploads in your private bucket
