Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

website/integrations: Beszel #12905

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions website/integrations/services/beszel/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
title: Integrate with Beszel
sidebar_label: Beszel
---

# Integrate With Beszel

<span class="badge badge--secondary">Support level: Community</span>

## What is Beszel

> Beszel is a lightweight server monitoring platform that provides Docker statistics, historical data, and configurable alerts.
> It features a user-friendly web interface, supports multi-user management, OAuth authentication, and offers a REST API for integration with other applications.
> Designed for simplicity, Beszel is easy to set up and operates efficiently without requiring public internet exposure.
>
> -- https://beszel.dev/
>
> This guide explains how to configure Beszel to use authentik as the OAuth provider for logging in to the Web GUI.

## Preparation

The following placeholders are used in this guide:

- `beszel.company` is the FQDN of the Beszel installation.
- `authentik.company` is the FQDN of the authentik installation.

:::note
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.
:::

## authentik configuration

Start the wizard for adding a new application.

**1. Application:**

- Name: `Beszel`
- Slug: `beszel`

**2. Choose a Provider**

Select `OAuth2/OpenID Provider`

**3. Configure Provider**

Select implicit or explicit authorization flow as desired.

Take note of the Client ID and Client Secret, you'll need to give them to Beszel later.

- Redirect URIs/Origins (RegEx): `https://_beszel.company_/api/oauth2-redirect`
- Signing Key: Select any available signing keys.

Leave the rest as default values.

## Beszel configuration

1. Sign in to Beszel with a browser of your choice and access the system setting by using this URL https://_beszel.company_/\_/#/settings.

2. Disable **Hide collection create and edit controls** and click **Save changes**.

3. Open the **users** submenu by clicking the **Collections** icon in the left menu or by accessing this URL: https://beszel.company/_/#/collections?collection=pb_users_auth.

4. Click the gear icon next to **users**, then select the **Options** tab.

5. Enable **OAuth2** by toggling the corresponding switch.

6. Click **+ Add provider** and select **OpenID Connect**.

7. Enter the following details from the authentik provider:
- Set **Client ID** to _client-id_
- Set **Client secret** to _client-secret_
- Set **Display name** to **authentik**
- Set **Auth URL** to https://_authentik.company_/application/o/authorize/
- Set **Token URL** to https://_authentik.company_/application/o/token/
- Set **User info URL** to https://_authentik.company_/application/o/userinfo/

## Test the login

- Open your web browser and go to: https://_beszel.company_.
- Click **authentik** to log in.
- You should be redirected to authentik (following the login flow you configured). After logging in, authentik will redirect you back to https://_beszel.company_.
- If you successfully return to the Beszel WebGUI, the login is working correctly.

## User Creation

1. Manually Creating Users:

- Users are not created automatically when logging in with authentik. The owner must manually create each user in Beszel.
- To create users, go to the System Settings where you configured OpenID Connect.
- The URL for user creation is: https://_beszel.company_/\_/#/collections?collection=pb_users_auth.
- Click **+ New record** and enter the user's **email** (must match the authentik email address).

2. Automatically Creating Users:
- Set the following environment variable: **USER_CREATION=true**
- Depending on your deployment method, you can set this as a Docker environment variable or in the systemd service file.
1 change: 1 addition & 0 deletions website/sidebarsIntegrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ module.exports = {
type: "category",
label: "Monitoring",
items: [
"services/beszel/index",
"services/chronograf/index",
"services/gatus/index",
"services/glitchtip/index",
Expand Down
Loading