Skip to main content

Integrate with Stirling PDF

Support level: Community

What is Stirling PDF?

Stirling PDF is an open-source PDF editor and processor for reading, editing, signing, converting, and automating PDF documents.

-- https://stirling.com/

Preparation

The following placeholders are used in this guide:

  • stirling-pdf.company is the FQDN of the self-hosted Stirling PDF installation.
  • authentik.company is the FQDN of the authentik installation.
info

This documentation lists only the settings that you need to change from their default values. Be aware that any changes other than those explicitly mentioned in this guide could cause issues accessing your application.

This guide applies to self-hosted Stirling PDF Server and Enterprise deployments. The hosted application at https://stirling.com/app/ uses Stirling-managed sign-in providers and does not use the self-hosted OIDC configuration in this guide.

Before you begin, activate a Stirling PDF Server or Enterprise license and ensure that you can log in with a local administrator account. Keep local login enabled until you have verified the integration.

authentik configuration

Redirect URI changes in authentik 2026.5

In authentik versions earlier than 2026.5, all Redirect URIs are automatically treated as Authorization type. If you are using one of these older authentik versions, add only the Authorization URL to your Redirect URIs and do not configure a Post Logout URI.

To support the integration of Stirling PDF with authentik, you need to create an application/provider pair in authentik.

Create an application and provider

  1. Log in to authentik as an administrator and open the authentik Admin interface.
  2. Navigate to Applications > Applications and click New Application to open the application wizard.
    • Application: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings. Note the Slug value because it is required later.
    • Choose a Provider type: select OAuth2/OpenID Connect as the provider type.
    • Configure the Provider: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and the following required configurations.
      • Note the Client ID and Client Secret values because they are required later.
      • Add a Redirect URI of type Strict Authorization with a value of https://stirling-pdf.company/login/oauth2/code/authentik.
      • Select any available signing key.
    • Configure Bindings (recommended): create a binding (policy, group, or user) to control which users can access Stirling PDF and be registered automatically.
  3. Click Submit to save the new application and provider.

Stirling PDF configuration

Add the following environment variables to the Stirling PDF configuration:

.env
SYSTEM_BACKENDURL="https://stirling-pdf.company"
SECURITY_ENABLELOGIN="true"
SECURITY_OAUTH2_ENABLED="true"
SECURITY_OAUTH2_ISSUER="https://authentik.company/application/o/<application_slug>/"
SECURITY_OAUTH2_CLIENTID="<Client ID from authentik>"
SECURITY_OAUTH2_CLIENTSECRET="<Client Secret from authentik>"
SECURITY_OAUTH2_PROVIDER="authentik"

Restart Stirling PDF to apply the configuration.

Stirling PDF automatically creates OIDC users with the standard user role. To grant administrative access to an OIDC user, first log in through authentik, then use the local administrator account to change that user's role on the Users page.

Configuration verification

To confirm that authentik is properly configured with Stirling PDF, open Stirling PDF and click Sign in with Authentik. After you authenticate, Stirling PDF creates the user account and opens the application.

Resources