Auth provider extensions are backend extensions that hook into the panel’s authentication layer. They can replace or work alongside the built-in username/password flow to enable custom login mechanisms such as LDAP, SAML, or any proprietary identity system your organization uses.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/calagopus/panel/llms.txt
Use this file to discover all available pages before exploring further.
The built-in OAuth2 login (Google, GitHub, Discord, and so on) is configured separately under Admin → OAuth Providers and does not require an extension. Auth provider extensions are for custom backends that OAuth2 does not cover.
How auth provider extensions work
Auth provider extensions are backend Rust crates that implement theExtension trait from the shared crate. During startup, the extension’s initialize method runs after the database has been migrated and before the web server starts. From there, the extension registers its authentication routes by implementing initialize_router, which receives an ExtensionRouteBuilder and returns a modified builder with the extension’s routes attached.
The ExtensionRouteBuilder exposes mount points for every route group the panel supports:
| Method | Route group |
|---|---|
add_global_router | / |
add_auth_api_router | /api/auth |
add_admin_api_router | /api/admin |
add_client_api_router | /api/client |
add_client_server_api_router | /api/client/servers/{server} |
add_remote_api_router | /api/remote |
add_remote_server_api_router | /api/remote/servers/{server} |
/api/auth using add_auth_api_router. The existing authentication middleware is already applied to the admin and client route groups by the parent router, so extensions mounted there can rely on it.
Extension lifecycle
Every backend extension implements theExtension trait. The relevant lifecycle methods for an auth provider are:
pub struct ExtensionStruct that implements Extension and Default. This struct is the entry point the panel looks for when it loads the compiled crate.
Extension settings
If your auth provider needs configuration (for example, an LDAP server URL or a shared secret), implementsettings_deserializer to return a type that implements both SettingsSerializeExt and SettingsDeserializeExt. The panel serializes settings to the database and exposes them through the admin settings interface.
The SettingsSerializer and SettingsDeserializer types support raw, serde-serialized, and encrypted values:
APP_ENCRYPTION_KEY. Values are decrypted transparently on read.
Installing an auth provider extension
Verify the heavy image is running
Extension management requires the heavy Docker image. Confirm your
compose.yml uses ghcr.io/calagopus/panel:heavy and that the /app/extensions volume is mapped.Upload the extension archive
In Admin → Extensions, click Upload extension and select the
.c7s.zip archive provided by the extension author. The panel validates the archive structure, checks that pub struct ExtensionStruct exists in backend/src/lib.rs, and confirms the panel_version requirement matches the running panel version.Rebuild the panel
Click Rebuild in the Extensions panel. The build process compiles the Rust crate into the running image. Monitor the build log to confirm success.
Configure the extension
After the rebuild completes and the panel restarts, navigate to Admin → Extensions → [Your extension name] to configure any settings the extension exposes through its settings deserializer.
Extension permissions
An auth provider extension can register new admin or server permission groups usinginitialize_permissions. This is useful if you want to gate access to extension-specific admin features behind a permission.
Inter-extension communication
Extensions can call into each other through theprocess_call mechanism. To avoid naming collisions, prefix call names with your package identifier (e.g., com_acme_my-auth_validate_token).
None for calls that do not apply to your extension so the matching process continues to the next registered extension.
Removing an auth provider extension
Disable the authentication flow
Before removing the extension, ensure users have an alternative login method. Removing the extension while it is the only auth method will lock users out.
Delete the extension
In Admin → Extensions, delete the extension. If the extension added database migrations, enable Remove migrations to roll them back.
Related
- Extensions overview — requirements, archive format, and the rebuild process
- Frontend extensions — add a configuration UI for your extension
- Admin → OAuth Providers — built-in OAuth2 login, no extension required