# Instalação e Configurações do Authentik

# Instalação Authentik em docker compose

Link: [https://docs.goauthentik.io/install-config/install/docker-compose/](https://docs.goauthentik.io/install-config/install/docker-compose/)

em 10/04/2026

<article id="bkmrk-docker-compose-insta"><div class="theme-doc-markdown markdown"><header>#### Docker Compose installation

</header></div>This installation method is for test setups and small-scale production setups.

#### Requirements

<div class="theme-doc-markdown markdown">- A host with at least 2 CPU cores and 2 GB of RAM
- Podman or Docker Compose (Compose v2, see [instructions for upgrade](https://docs.docker.com/compose/migrate/))

</div>##### Video

View our video about installing authentik on Docker.

<div class="theme-doc-markdown markdown"><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="315" src="https://www.youtube.com/embed/O1qUbrk4Yc8?si=HiSBjmJYhE_oJhB1&start=22" title="YouTube video player" width="560"></iframe>

</div>##### Download the Compose file

To download the latest `compose.yml` open your terminal, navigate to the directory of your choice, and then run the following command:

<div class="theme-doc-markdown markdown"><div class="theme-tabs-container tabs-container tabList_J5MA">- Linux
- macOS

<div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel"></div></div></div></div>```shell
wget https://docs.goauthentik.io/compose.yml
```

<div class="theme-doc-markdown markdown"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel"><div class="language-shell codeBlockContainer_mQmQ theme-code-block"><div class="codeBlockContent_t_Hd"></div></div></div></div></div></div>#### Generate PostgreSQL password and secret key

If this is a fresh authentik installation, you need to generate a PostgreSQL password and a secret key. Use a secure password generator of your choice such as `pwgen`, or you can use `openssl` as below.

Run the following commands to generate a PostgreSQL password and secret key and write them to your `.env` file:

```shell
echo "PG_PASS=$(openssl rand -base64 36 | tr -d '\n')" >> .env
echo "AUTHENTIK_SECRET_KEY=$(openssl rand -base64 60 | tr -d '\n')" >> .env
```

<div class="theme-doc-markdown markdown"><div class="language-shell codeBlockContainer_mQmQ theme-code-block"><div class="codeBlockContent_t_Hd"><div class="buttonGroup_B0hJ"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_Fy7c"><svg class="copyButtonIcon_r1h_" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_BIMv" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div><div class="theme-admonition theme-admonition-info admonition_WCGJ alert alert--info"><div class="admonitionHeading_GCBg">INFO</div><div class="admonitionContent_pbrs">  
</div></div></div>Because of a PostgreSQL limitation, only passwords up to 99 chars are supported. See: [https://www.postgresql.org/message-id/09512C4F-8CB9-4021-B455-EF4C4F0D55A0@amazon.com](https://www.postgresql.org/message-id/09512C4F-8CB9-4021-B455-EF4C4F0D55A0@amazon.com)

To enable error reporting, run the following command:

```shell
echo "AUTHENTIK_ERROR_REPORTING__ENABLED=true" >> .env
```

<div class="theme-doc-markdown markdown"><div class="language-shell codeBlockContainer_mQmQ theme-code-block"><div class="codeBlockContent_t_Hd"><div class="buttonGroup_B0hJ"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_Fy7c"><svg class="copyButtonIcon_r1h_" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_BIMv" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div></div>For an explanation about what each service in the Docker Compose file does, see [Architecture](https://docs.goauthentik.io/core/architecture/).

#### Configure custom ports

By default, authentik listens internally on port 9000 for HTTP and 9443 for HTTPS. To use different exposed ports such as 80 and 443, you can set the following variables in `.env`:

```shell
COMPOSE_PORT_HTTP=80
COMPOSE_PORT_HTTPS=443
```

<div class="theme-doc-markdown markdown"><div class="language-shell codeBlockContainer_mQmQ theme-code-block"><div class="codeBlockContent_t_Hd"><div class="buttonGroup_B0hJ"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_Fy7c"><svg class="copyButtonIcon_r1h_" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_BIMv" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div></div>See [Configuration](https://docs.goauthentik.io/install-config/configuration/) to change the internal ports. Be sure to run `docker compose up -d` to rebuild with the new port numbers.

#### Docker socket

By default, the authentik Docker Compose file mounts the Docker socket to the authentik worker container:

```yaml
- /var/run/docker.sock:/var/run/docker.sock
```

<div class="theme-doc-markdown markdown"><div class="language-yaml codeBlockContainer_mQmQ theme-code-block"><div class="codeBlockContent_t_Hd"></div></div></div>This is used for [automatic deployment and management of authentik Outposts](https://docs.goauthentik.io/add-secure-apps/outposts/integrations/docker/).

Mounting the Docker socket to a container comes with some inherent security risks. To reduce these risks, you can utilize a [Docker Socket Proxy](https://docs.goauthentik.io/add-secure-apps/outposts/integrations/docker/#docker-socket-proxy) as an additional layer of protection.

Alternatively, you can remove this mount and instead [manually deploy and manage outposts](https://docs.goauthentik.io/add-secure-apps/outposts/manual-deploy-docker-compose/).

##### Email configuration (optional but recommended)

It is also recommended to configure global email settings. These are used by authentik to notify administrators about alerts, configuration issues and new releases. They can also be used by [Email stages](https://docs.goauthentik.io/add-secure-apps/flows-stages/stages/email/) to send verification/recovery emails.

For more information, refer to our [Email configuration](https://docs.goauthentik.io/install-config/email/) documentation.

#### Install and start authentik

<div class="theme-doc-markdown markdown"><div class="theme-admonition theme-admonition-warning admonition_WCGJ alert alert--warning"><div class="admonitionHeading_GCBg">WARNING  
  
</div></div></div>All internal operations use UTC. Times displayed in the UI are automatically localized for the user. Do not update or mount `/etc/timezone` or `/etc/localtime` in the authentik containers; it will cause problems with OAuth and SAML authentication, as seen this [GitHub issue](https://github.com/goauthentik/authentik/issues/3005).

After you have downloaded the `docker-compose.yml` file, generated a password and a secret key, and optionally configured your global email, run these commands to retrieve and install the current version of authentik:

```shell
docker compose pull
docker compose up -d
```

<div class="theme-doc-markdown markdown"><div class="language-shell codeBlockContainer_mQmQ theme-code-block"><div class="codeBlockContent_t_Hd"><div class="buttonGroup_B0hJ"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_Fy7c"><svg class="copyButtonIcon_r1h_" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_BIMv" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div></div>The `compose.yml` file statically references the latest version available at the time of downloading the compose file. Each time you upgrade to a newer version of authentik, you download a new `compose.yml` file, which points to the latest available version. For more information, refer to the **Upgrading** section in the [Release Notes](https://docs.goauthentik.io/releases/).

#### Access authentik

<span style="color: rgb(241, 196, 15);">**To start the initial setup, navigate to `http://<your server's IP or hostname>:9000/if/flow/initial-setup/`.**</span>

<div class="theme-doc-markdown markdown"><div class="theme-admonition theme-admonition-info admonition_WCGJ alert alert--info"><div class="admonitionContent_pbrs">**Initial setup in browser**</div></div></div>You will get a `Not Found` error if initial setup URL doesn't include the trailing forward slash `/`. Also verify that the authentik server, worker, and PostgreSQL database are running and healthy. Review additional tips in our [troubleshooting docs](https://docs.goauthentik.io/troubleshooting/login/#cant-access-initial-setup-flow-during-installation-steps).

There you are prompted to set a password for the `akadmin` user (the default user).

#### First steps in authentik

You are now ready to add your first application and its provider. Then you'll want to add a new user.

To view a typical workflow for adding applications and users, with helpful context and explanations for each step, refer to the [First Steps](https://docs.goauthentik.io/install-config/first-steps/) tutorial.

#### 📄️ First steps

Add an application and provider, then create a user.

<footer class="theme-doc-footer docusaurus-mt-lg">---

<div class="theme-admonition theme-admonition-note admonition_WCGJ alert alert--secondary admonitionContrib_Zv8a margin-top--sm theme-doc-footer-edit-meta-row"><div class="admonitionContent_pbrs"><div class="admonitionHeader_FPxu">**Help us improve this content**</div></div></div>We welcome your knowledge and expertise. If you see areas of the documentation that you can improve (fix a typo, correct a technical detail, add additional context, etc.) we would really appreciate your contribution.

<div class="theme-admonition theme-admonition-note admonition_WCGJ alert alert--secondary admonitionContrib_Zv8a margin-top--sm theme-doc-footer-edit-meta-row"><div class="admonitionContent_pbrs"><div class="row"><div class="col col--12">  
</div></div></div></div></footer></article><nav aria-label="Docs pages" class="docusaurus-mt-lg pagination-nav" id="bkmrk-installation-and-con">[<div class="pagination-nav__label">Installation and Configuration</div>](https://docs.goauthentik.io/install-config/)[<div class="pagination-nav__label" style="text-align: justify;">Kubernetes installation</div>](https://docs.goauthentik.io/install-config/install/kubernetes/)</nav>

# Integração do Nextcloud com Authentik OIDC

Link: [https://integrations.goauthentik.io/chat-communication-collaboration/nextcloud/](https://integrations.goauthentik.io/chat-communication-collaboration/nextcloud/)

Em 09/04/2026

### What is Nextcloud

> Nextcloud is a suite of client-server software for creating and using file hosting services. Nextcloud is free and open-source, which means that anyone is allowed to install and operate it on their own private server devices.
> 
> \-- [https://nextcloud.com/](https://nextcloud.com/)arning

  
<span style="color: rgb(241, 196, 15);">**WARNING**</span>  
If you require [server side encryption](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/encryption_configuration.html), you must use LDAP. OpenID and SAML will cause **irrevocable data loss**. Nextcloud server side encryption requires access to the user's cleartext password, which Nextcloud has access to only when using LDAP because the user enters their password directly into Nextcloud.aution

This setup only works when Nextcloud is running with HTTPS enabled. See [here](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/reverse_proxy_configuration.html?highlight=overwriteprotocol#overwrite-parameters) on how to configure this.nfo

<span style="color: rgb(230, 126, 35);">**If there’s an issue with the configuration, you can log in using the built-in authentication by  
visiting [http://nextcloud.company/login?direct=1](http://nextcloud.company/login?direct=1).**</span>

#### Configuration methods

It is possible to configure Nextcloud to use OIDC, SAML, or LDAP for authentication. Below are the steps to configure each method.

<div class="theme-doc-markdown markdown" id="bkmrk-oidc-saml-ldap" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA">- OIDC
- SAML
- LDAP

</div></div>#### **OIDC**  
  
Preparation

The following placeholders are used in this guide:

<div class="theme-doc-markdown markdown" id="bkmrk-nextcloud.company%C2%A0is" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel">- `nextcloud.company` is the FQDN of the Nextcloud installation.
- `authentik.company` is the FQDN of the authentik installation.

</div></div></div></div>##### 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.  
  
<span style="color: rgb(241, 196, 15);">**WARNING**</span>

If you require [server side encryption](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/encryption_configuration.html), you must use LDAP. OpenID and SAML will cause **irrevocable data loss**.

Let's start by considering which user attributes need to be available in Nextcloud:

<div class="theme-doc-markdown markdown" id="bkmrk-name-email-unique-us" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel">- name
- email
- unique user ID
- storage quota (optional)
- groups (optional)

</div></div></div></div>authentik already provides some default *scopes* with *claims*, such as:

<div class="theme-doc-markdown markdown" id="bkmrk-email%C2%A0scope%3A-include" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel">- `email` scope: includes `email` and `email_verified`
- `profile` scope: includes `name`, `given_name`, `preferred_username`, `nickname`, `groups`
- `openid` scope: a default required by the OpenID spec (contains no claims)

</div></div></div></div>#### Create property mapping *(optional)*

If you do not need storage quota, group information, or to manage already existing users in Nextcloud, skip to the [next section](https://integrations.goauthentik.io/chat-communication-collaboration/nextcloud/#create-an-application-and-provider-in-authentik).  
If you want to control user storage and designate Nextcloud administrators, you will need to create a property mapping.

<div class="theme-doc-markdown markdown" id="bkmrk-log-in-to-authentik-" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel">1. Log in to authentik as an administrator and open the authentik Admin interface.
2. Navigate to **Customization** &gt; **Property mappings** and click **Create**.
    
    
    - **Select type**: select **Scope mapping**.
    - **Create Scope Mapping**: 
        - **Name**: `Nextcloud Profile`
        - **Scope name**: `nextcloud`
        - **Expression**:  
              
            <span style="color: rgb(53, 152, 219);">\# Extract all groups the user is a member of</span>  
            <span style="color: rgb(53, 152, 219);">groups = \[group.name for group in user.groups.all()\]</span>
            
            <span style="color: rgb(53, 152, 219);">\# In Nextcloud, administrators must be members of a fixed group called "admin".</span>
            
            <span style="color: rgb(53, 152, 219);">\# If a user is an admin in authentik, ensure that "admin" is appended to their group list.</span>  
            <span style="color: rgb(53, 152, 219);">if user.is\_superuser and "admin" not in groups:</span>  
            <span style="color: rgb(53, 152, 219);"> groups.append("admin")</span>
            
            <span style="color: rgb(53, 152, 219);">return {</span>  
            <span style="color: rgb(53, 152, 219);"> "name": request.user.name,</span>  
            <span style="color: rgb(53, 152, 219);"> "groups": groups,</span>  
            <span style="color: rgb(53, 152, 219);"> # Set a quota by using the "nextcloud\_quota" property in the user's attributes</span>  
            <span style="color: rgb(53, 152, 219);"> "quota": user.group\_attributes().get("nextcloud\_quota", None),</span>  
            <span style="color: rgb(53, 152, 219);"> # To connect an existing Nextcloud user, set "nextcloud\_user\_id" to the Nextcloud username.</span>  
            <span style="color: rgb(53, 152, 219);"> "user\_id": user.attributes.get("nextcloud\_user\_id", str(user.uuid)),</span>  
            <span style="color: rgb(53, 152, 219);">}</span>
3. Click **Finish**.

</div></div></div></div>##### Info

To set a quota, define the `nextcloud_quota` attribute for individual users or groups. For example, setting it to `1 GB` will restrict the user to 1GB of storage. If not set, storage is unlimited.

<div class="theme-doc-markdown markdown" id="bkmrk-" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel"><div class="theme-admonition theme-admonition-info admonition_WCGJ alert alert--info">  
</div></div></div></div></div><div class="theme-doc-markdown markdown" id="bkmrk--1" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel"><div class="theme-admonition theme-admonition-info admonition_WCGJ alert alert--info">  
</div></div></div></div></div>To connect to an existing Nextcloud user, set the `nextcloud_user_id` attribute to match the Nextcloud username (found under the user's `Display name` in Nextcloud).

#### Create an application and provider in authentik

<div class="theme-doc-markdown markdown" id="bkmrk-log-in-to-authentik--1" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel">1. Log in to authentik as an administrator and open the authentik Admin interface.
2. Navigate to **Applications** &gt; **Applications** and click **Create with Provider** to create an application and provider pair. (Alternatively you can first create a provider separately, then create the application and connect it with the provider.)
    
    
    - **Application**: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings.
    - **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 **slug** values because they will be required later.
        - Set a `Strict` redirect URI to `https://nextcloud.company/apps/user_oidc/code`.
        - Select any available signing key.
        - Under **Advanced protocol settings**: 
            - *(optional)* If you created the `Nextcloud Profile` scope mapping, add it to **Selected Scopes**.
            - **Subject Mode**: `Based on the User's UUID`
    - **Configure Bindings** *(optional)*: you can create a [binding](https://docs.goauthentik.io/add-secure-apps/bindings-overview/) (policy, group, or user) to manage the listing and access to applications on a user's **My applications** page.
3. Click **Submit** to save the new application and provider.

<div class="theme-admonition theme-admonition-info admonition_WCGJ alert alert--info">  
</div></div></div></div></div>##### Info

Depending on your Nextcloud configuration, you may need to use `https://nextcloud.company/index.php/` instead of `https://nextcloud.company/`.


#### **Nextcloud configuration**

<div class="theme-doc-markdown markdown" id="bkmrk-in-nextcloud%2C-ensure" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel">1. In Nextcloud, ensure that the **OpenID Connect user backend** app is installed.
2. Log in to Nextcloud as an administrator and navigate to **Settings** &gt; **OpenID Connect**.
3. Click the **+** button and enter the following settings:
    
    
    - **Identifier**: `authentik`
    - **Client ID**: Client ID from authentik
    - **Client secret**: Client secret from authentik
    - **Discovery endpoint**: `https://authentik.company/application/o/<application_slug>/.well-known/openid-configuration`
    - **Scope**: `email profile nextcloud openid`
    - Under **Attribute mappings**:
        
        
        - **User ID mapping**: `sub` (or `user_id` for existing users)
        - **Display name mapping**: `name`
        - **Email mapping**: `email`
        - **Quota mapping**: `quota` (leave blank if the `Nextcloud Profile` property mapping was skipped)
        - **Groups mapping**: `groups` (leave blank if the `Nextcloud Profile` property mapping was skipped)  
            Tip: Enable **Use group provisioning** to allow writing to this field.
    - **Use unique user ID**: If this option is disabled, Nextcloud will use the mapped user ID as the Federated Cloud ID.
    
    ##### Info
    
    If authentik and Nextcloud are running on the same host, you will need to add `'allow_local_remote_servers' => true` to your nextcloud `config.php` file. This setting allows remote servers with local addresses.
    
    ##### Info
    
    To avoid a hashed Federated Cloud ID, deselect **Use unique user ID** and use `user_id` for the User ID mapping.
    
    ##### Danger
    
    If you're using the `Nextcloud Profile` property mapping and want administrators to retain their ability to log in, make sure that **Use unique user ID** is disabled. If this setting is enabled, it will remove administrator users from the internal admin group and replace them with a hashed group ID named "admin," which does not have real administrative privileges.

</div></div></div></div>#### Enabling OIDC back-channel logout

To automatically log users out of their Nextcloud sessions when they log out of authentik, enable back-channel logout.

<div class="theme-doc-markdown markdown" id="bkmrk-log-in-to-nextcloud-" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel">1. Log in to Nextcloud as an administrator and navigate to **Settings** &gt; **OpenID Connect**.
2. Under **Registered Providers**, locate the provider with the identifier used earlier.
3. Copy the `back-channel-logout-URL` value for that provider.   
    For example: `https://nextcloud.company/apps/user_oidc/backchannel-logout/<identifier>`
4. In authentik, navigate to **Applications** &gt; **Providers** and edit the Nextcloud provider.
5. Under **Protocol Settings**, set the **Logout URI** to the copied back-channel logout URL.
6. Set the **Logout Method** to `Back-channel`.

</div></div></div></div>#### Making OIDC the default login method

Automatically redirect users to authentik when they access Nextcloud by running the following command on your Nextcloud docker host:

<div class="theme-doc-markdown markdown" id="bkmrk-sudo-docker-exec---u" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel"><div class="language-bash codeBlockContainer_mQmQ theme-code-block"><div class="codeBlockContent_t_Hd"><div class="token-line"><span style="color: rgb(251, 238, 184);"><span class="token function"><span class="token plain">Opção 1 - (Tela de Login Authentik direto)</span>  
sudo</span> <span class="token function">docker</span> <span class="token builtin class-name">exec</span> <span class="token parameter variable">--user</span><span class="token plain"> www-data </span><span class="token parameter variable">-it</span><span class="token plain"> nextcloud-aio-nextcloud php occ config:app:set </span><span style="color: rgb(185, 106, 217);"><span class="token parameter variable">-**-value**</span>**<span class="token operator">=</span><span class="token number">0</span>**</span><span class="token plain"> user\_oidc allow\_multiple\_user\_backends. </span></span></div><div class="token-line"><span style="color: rgb(251, 238, 184);"><span class="token plain">  
<span class="token function">Opção 2 - (Tela de Login Authentik e Nextcloud)  
sudo</span> <span class="token function">docker</span> <span class="token builtin class-name">exec</span> <span class="token parameter variable">--user</span> www-data <span class="token parameter variable">-it</span> nextcloud-aio-nextcloud php occ config:app:set <span style="color: rgb(185, 106, 217);"><span class="token parameter variable">-**-value**</span>**<span class="token operator">=1</span>**</span> user\_oidc allow\_multiple\_user\_backends. </span></span></div><div class="buttonGroup_B0hJ"><button aria-label="Toggle word wrap" class="clean-btn" title="Toggle word wrap" type="button"><svg aria-hidden="true" class="wordWrapButtonIcon_CQkQ" viewbox="0 0 24 24"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z" fill="currentColor"></path></svg></button><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_Fy7c"><svg class="copyButtonIcon_r1h_" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_BIMv" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div></div></div></div></div>#### Configuration verification

To confirm that authentik is correctly configured with Nextcloud, log out and then log back in by clicking **OpenID Connect**. You'll then be redirected to authentik to log in, and once authentication is successful, you'll reach the Nextcloud dashboard.

#### Resources

<div class="theme-doc-markdown markdown" id="bkmrk-nextcloud-docs---use" style="text-align: justify;">- [Nextcloud docs - User authentication with LDAP](https://docs.nextcloud.com/server/latest/admin_manual/configuration_user/user_auth_ldap.html)
- [Nextcloud OIDC App - User Documentation](https://github.com/H2CK/oidc/wiki/User-Documentation)

</div><footer class="theme-doc-footer docusaurus-mt-lg" id="bkmrk-help-us-improve-this">---

<div class="theme-admonition theme-admonition-note admonition_WCGJ alert alert--secondary admonitionContrib_Zv8a margin-top--sm theme-doc-footer-edit-meta-row" style="text-align: justify;"><div class="admonitionContent_pbrs"><div class="admonitionHeader_FPxu">**Help us improve this content**</div></div></div>We welcome your knowledge and expertise. If you see areas of the documentation that you can improve (fix a typo, correct a technical detail, add additional context, etc.) we would really appreciate your contribution.

<div class="theme-admonition theme-admonition-note admonition_WCGJ alert alert--secondary admonitionContrib_Zv8a margin-top--sm theme-doc-footer-edit-meta-row"><div class="admonitionContent_pbrs"><div class="row"><div class="col col--12">- [Edit on GitHub](https://github.com/goauthentik/authentik/edit/main/website/integrations/chat-communication-collaboration/nextcloud/index.mdx)
- [Contributor Guide](https://docs.goauthentik.io/docs/developer-docs/)
- [Open an issue](https://github.com/goauthentik/authentik/issues/new)
- [Get Enterprise Support](https://goauthentik.io/pricing/)

</div></div></div></div></footer>

# Integração do Nextcloud com Authentik LDAP

Link: [https://integrations.goauthentik.io/chat-communication-collaboration/nextcloud/](https://integrations.goauthentik.io/chat-communication-collaboration/nextcloud/)

Em 09/04/2026

## What is Nextcloud

> Nextcloud is a suite of client-server software for creating and using file hosting services. Nextcloud is free and open-source, which means that anyone is allowed to install and operate it on their own private server devices.
> 
> \-- [https://nextcloud.com/](https://nextcloud.com/)

<div class="theme-doc-markdown markdown" id="bkmrk-warning" style="text-align: justify;"><div class="theme-admonition theme-admonition-warning admonition_WCGJ alert alert--warning"><div class="admonitionHeading_GCBg"><span style="color: rgb(241, 196, 15);">**WARNING**</span></div></div></div>If you require [server side encryption](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/encryption_configuration.html), you must use LDAP. OpenID and SAML will cause **irrevocable data loss**. Nextcloud server side encryption requires access to the user's cleartext password, which Nextcloud has access to only when using LDAP because the user enters their password directly into Nextcloud.

<div class="theme-doc-markdown markdown" id="bkmrk-caution" style="text-align: justify;"><div class="theme-admonition theme-admonition-warning admonition_WCGJ alert alert--warning"></div><div class="theme-admonition theme-admonition-caution admonition_WCGJ alert alert--warning"><div class="admonitionHeading_GCBg">**<span style="color: rgb(241, 196, 15);">CAUTION</span>**</div></div></div>This setup only works when Nextcloud is running with HTTPS enabled. See [here](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/reverse_proxy_configuration.html?highlight=overwriteprotocol#overwrite-parameters) on how to configure this.

<div class="theme-doc-markdown markdown" id="bkmrk-info" style="text-align: justify;"><div class="theme-admonition theme-admonition-caution admonition_WCGJ alert alert--warning"></div><div class="theme-admonition theme-admonition-info admonition_WCGJ alert alert--info"><div class="admonitionHeading_GCBg"><span style="color: rgb(241, 196, 15);">**INFO**</span></div></div></div>If there’s an issue with the configuration, you can log in using the built-in authentication by visiting [http://nextcloud.company/login?direct=1](http://nextcloud.company/login?direct=1).

#### Configuration methods

It is possible to configure Nextcloud to use OIDC, SAML, or LDAP for authentication. Below are the steps to configure each method.

<div class="theme-doc-markdown markdown" id="bkmrk-oidc-saml-ldap" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA">- OIDC
- SAML
- LDAP

<div class="margin-top--md"></div></div></div>####  

#### <span style="color: rgb(241, 196, 15);">**LDAP Configuration**</span>

#### Preparation

The following placeholders are used in this guide:

<div class="theme-doc-markdown markdown" id="bkmrk-nextcloud.company%C2%A0is" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel">- `nextcloud.company` is the FQDN of the Nextcloud installation.
- `authentik.company` is the FQDN of the authentik installation.

<div class="theme-admonition theme-admonition-info admonition_WCGJ alert alert--info"><div class="admonitionHeading_GCBg">**<span style="color: rgb(241, 196, 15);">INFO</span>**</div></div></div></div></div></div>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.

#### Create an application and provider in authentik

<div class="theme-doc-markdown markdown" id="bkmrk-log-in-to-authentik-" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel">1. Log in to authentik as an administrator and open the authentik Admin interface.
2. Navigate to **Applications** &gt; **Applications** and click **Create with Provider** to create an application and provider pair. (Alternatively you can first create a provider separately, then create the application and connect it with the provider.)
    
    
    - **Application**: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings.
    - **Choose a Provider type**: select **LDAP** as the provider type.
    - **Configure the Provider**: provide a name (or accept the auto-provided name) and the bind flow to use for this provider
    - **Configure Bindings** *(optional)*: you can create a [binding](https://docs.goauthentik.io/add-secure-apps/bindings-overview/) (policy, group, or user) to manage the listing and access to applications on a user's **My applications** page.
3. Click **Submit** to save the new application and provider.

</div></div></div></div>#### Create an LDAP outpost

<div class="theme-doc-markdown markdown" id="bkmrk-log-in-to-authentik--1" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel">1. Log in to authentik as an admin, and open the authentik Admin interface.
2. Navigate to **Applications** &gt; **Outposts** and click **Create**.
    
    
    - **Name**: provide a suitable name for the outpost.
    - **Type**: `LDAP`
    - Under applications, add the newly created Nextcloud application to **Selected Applications**.
3. Click **Create**.

</div></div></div></div>### <span style="color: rgb(241, 196, 15);"> **Nextcloud configuration**</span>

<div class="theme-doc-markdown markdown" id="bkmrk-in-nextcloud%2C-ensure" style="text-align: justify;"><div class="theme-tabs-container tabs-container tabList_J5MA"><div class="margin-top--md"><div class="tabItem_wHwb" role="tabpanel">1. In Nextcloud, ensure that the **LDAP user and group backend** app is installed.
2. Log in to Nextcloud as an administrator.
3. Navigate to **Settings** &gt; **LDAP user and group backend** and configure the following settings:
    
    
    - On the **Server** tab:
        
        
        - Click the **+** icon and enter the following settings: 
            - **Host**: enter the hostname/IP address of the authentik LDAP outpost preceded by `ldap://` or `ldaps://`. If using LDAPS you will also need to specify the certificate that is being used.
            - **Port**: `389` or `636` for secure LDAP.
            - Under **Credentials**, enter the **Bind DN** of the authentik LDAP provider and the associated user password.
            - Under **Base DN**, enter the **Search base** of the authentik LDAP provider.
    - On the **Users** tab:
        
        
        - Set **Only these object classes** to `Users`.
    - On the **LDAP/AD integration** tab:
        
        
        - Uncheck **LDAP/AD Username**.
        - Set **Other Attributes** to `cn`.
        - Click **Expert** in the top right corner and enter these settings: 
            - **Internal Username Attribute**: `uid`
            - **UUID Attribute for Users**: `uid`
            - **UUID Attribute for Groups**: `gidNumber`
        - Click **Advanced** in the top right corner and enter these settings: 
            - Under **Connection Settings**: 
                - **Configuration Active**: checked
            - Under **Directory Settings**: 
                - **User Display Name Field**: `name`
                - **Base User Tree**: enter the **Search base** of the authentik LDAP provider.
                - **Group Display Name Field**: `cn`
                - **Base Group Tree**: enter the **Search base** of the authentik LDAP provider.
                - **Group-Member Association**: `gidNumber`
            - Under **Special Attributes**: 
                - **Email Field**: `mailPrimaryAddress`
    - On the **Groups** tab:
        
        
        - Set **Only these object classes** to `groups`.
        - Select the authentik groups that require Nextcloud access.
    
    <div class="theme-admonition theme-admonition-info admonition_WCGJ alert alert--info"><div class="admonitionHeading_GCBg"></div><div class="admonitionHeading_GCBg">**<span style="color: rgb(241, 196, 15);">INFO</span>**</div></div>If Nextcloud is behind a reverse proxy, force HTTPS by adding `'overwriteprotocol' => 'https'` to the Nextcloud `config/config.php` file. See [the Nextcloud admin manual](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html#overwrite-parameters) for more details.

</div></div></div></div>#### Configuration verification

To confirm that authentik is properly configured with Nextcloud, log out and log back in using LDAP credentials. If successful you will then be redirected to the Nextcloud dashboard.

##### Resources

<div class="theme-doc-markdown markdown" id="bkmrk-nextcloud-docs---use" style="text-align: justify;">- [Nextcloud docs - User authentication with LDAP](https://docs.nextcloud.com/server/latest/admin_manual/configuration_user/user_auth_ldap.html)
- [Nextcloud OIDC App - User Documentation](https://github.com/H2CK/oidc/wiki/User-Documentation)

</div><footer class="theme-doc-footer docusaurus-mt-lg" id="bkmrk-help-us-improve-this">---

<div class="theme-admonition theme-admonition-note admonition_WCGJ alert alert--secondary admonitionContrib_Zv8a margin-top--sm theme-doc-footer-edit-meta-row" style="text-align: justify;"><div class="admonitionContent_pbrs"><div class="admonitionHeader_FPxu">**Help us improve this content**</div></div></div>We welcome your knowledge and expertise. If you see areas of the documentation that you can improve (fix a typo, correct a technical detail, add additional context, etc.) we would really appreciate your contribution.

<div class="theme-admonition theme-admonition-note admonition_WCGJ alert alert--secondary admonitionContrib_Zv8a margin-top--sm theme-doc-footer-edit-meta-row"><div class="admonitionContent_pbrs"><div class="row"><div class="col col--12">- [Edit on GitHub](https://github.com/goauthentik/authentik/edit/main/website/integrations/chat-communication-collaboration/nextcloud/index.mdx)
- [Contributor Guide](https://docs.goauthentik.io/docs/developer-docs/)
- [Open an issue](https://github.com/goauthentik/authentik/issues/new)
- [Get Enterprise Support](https://goauthentik.io/pricing/)

</div></div></div></div></footer>

# Configurações iniciais do Authentik

Link: [https://docs.goauthentik.io/install-config/first-steps/](https://docs.goauthentik.io/install-config/first-steps/)

<div class="theme-doc-markdown markdown" id="bkmrk-first-steps"><header>#### First steps

</header></div>After you have installed and started authentik, you are now ready to add your first application and provider, add some users, and get started with using authentik as your Identity provider.

[![image.png](https://capacita.multiautomacoes.com.br/uploads/images/gallery/2026-04/scaled-1680-/MWIimage.png)](https://capacita.multiautomacoes.com.br/uploads/images/gallery/2026-04/MWIimage.png)

<svg height="80" viewbox="0 0 24 24" width="80" xmlns="http://www.w3.org/2000/svg"><path d="M12 3a9 9 0 0 0 0 18c2 0 3.92-.66 5.5-1.86l-1.44-1.44A6.995 6.995 0 0 1 5 12c0-3.87 3.13-7 7-7s7 3.13 7 7h-3l4 4l4-4h-3a9 9 0 0 0-9-9M7.71 13.16c-.09.07-.12.19-.07.29l.9 1.55c.06.12.18.12.28.12l1.13-.45q.36.24.75.42l.18 1.19c.02.11.12.19.22.19h1.8c.1.03.21-.06.23-.17l.18-1.18c.27-.12.53-.27.76-.45l1.12.45c.11.04.23-.01.28-.12l.9-1.5c.05-.12.02-.24-.06-.31l-1-.74q.045-.45 0-.9l1-.76c.09-.07.11-.18.06-.29l-.9-1.55a.226.226 0 0 0-.28-.1l-1.12.45c-.24-.17-.5-.3-.77-.42l-.17-1.19a.244.244 0 0 0-.23-.19h-1.76c-.1 0-.19.07-.21.17l-.17 1.18c-.26.12-.53.27-.76.45l-1.15-.42a.234.234 0 0 0-.29.12l-.91 1.5c-.05.12-.02.24.06.31l1 .74q-.03.225 0 .45q-.015.225 0 .45l-1 .74m4.29.31c-.84 0-1.5-.68-1.5-1.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5s-.67 1.5-1.5 1.5" fill="currentColor"></path></svg>

#### Where are we now, and what's next?

The following tutorial assumes that you have already:

<div class="theme-doc-markdown markdown" id="bkmrk-installed-authentik-">1. Installed authentik on either [Docker Compose](https://docs.goauthentik.io/install-config/install/docker-compose/#install-and-start-authentik), [Kubernetes](https://docs.goauthentik.io/install-config/install/kubernetes/#install-authentik-helm-chart), or [AWS CloudFormation](https://docs.goauthentik.io/install-config/install/aws/) and confirmed that the server, worker, and the PostgreSQL database are started and running.
2. Opened authentik in your browser to the `initial-setup` flow and added credentials for a default Admin account. ([Docker](https://docs.goauthentik.io/install-config/install/docker-compose/#access-authentik), [Kubernetes](https://docs.goauthentik.io/install-config/install/kubernetes/#access-authentik)), or [AWS CloudFormation](https://docs.goauthentik.io/install-config/install/aws/#access-authentik-from-aws-cloudformation).

<div class="theme-admonition theme-admonition-info admonition_WCGJ alert alert--info"><div class="admonitionContent_pbrs">Initial setup in browser</div></div></div>You will get a `Not Found` error if the initial setup URL doesn't include the forward slash `/` at the very end of the URL. Also verify that the authentik server, worker, and PostgreSQL database are running and healthy. Review additional tips in our [troubleshooting docs](https://docs.goauthentik.io/troubleshooting/login/#cant-access-initial-setup-flow-during-installation-steps).

Other optional pre-installation configurations that you might have already completed include:

<div class="theme-doc-markdown markdown" id="bkmrk-configured-your-glob">- [Configured your global email address](https://docs.goauthentik.io/install-config/email/#global-email-settings).
- [Configured your PostgreSQL settings](https://docs.goauthentik.io/install-config/configuration/#postgresql-settings) (read-replica, connections, etc.).
- Configured a [reverse proxy](https://docs.goauthentik.io/install-config/reverse-proxy/).
- Configured your [media storage settings](https://docs.goauthentik.io/install-config/configuration/#media-storage-settings) or optionally [AWS S3 file storage](https://docs.goauthentik.io/sys-mgmt/ops/storage-s3/).
- Added additional [custom configurations environment variables](https://docs.goauthentik.io/install-config/configuration/#set-your-environment-variables).
- [Verified](https://docs.goauthentik.io/install-config/configuration/#verify-your-configuration-settings) your configuration settings.

</div>#### Install your first application and provider

Now that you have your authentik instance installed and configured with the required settings, you can add your first [application](https://docs.goauthentik.io/core/glossary/?application) and [provider](https://docs.goauthentik.io/core/glossary/?provider). After that, we'll walk through how to add your first user.

<div class="theme-doc-markdown markdown" id="bkmrk-security-best-practi"><div class="theme-admonition theme-admonition-tip admonition_WCGJ alert alert--success"><div class="admonitionContent_pbrs">Security Best Practice</div></div></div>In a production environment, best practice is to first [create a group](https://docs.goauthentik.io/users-sources/groups/manage_groups/#create-a-group), then [create the user(s)](https://docs.goauthentik.io/users-sources/user/user_basic_operations/#create-a-user), and then add the application. Then you can configure the application to have a [binding](https://docs.goauthentik.io/add-secure-apps/bindings-overview/work-with-bindings/) to a specific group or user. The binding controls the access to the application (whether or not it is displayed on a user's My Applications page).

authentik supports integration with any application; refer to our [Integrations documentation](https://integrations.goauthentik.io/) to view integrations guides for over 180 of the most common ones.

**In this guide we'll be setting up Grafana as an example application.**

<div class="theme-doc-markdown markdown" id="bkmrk-why-grafana%3F-%C2%A0"><details class="details_IpIu isBrowser_QD4r alert alert--info details_jERq" data-collapsed="true"><summary>Why Grafana?</summary>

 </details></div>#### 1. Log in to authentik as an administrator and open the authentik Admin interface.

**A.** In the Admin interface, navigate to **Applications** &gt; **Applications** and click **Create with Provider** to create an application and provider pair.

<div class="theme-doc-markdown markdown" id="bkmrk-about-application-an"><div class="theme-admonition theme-admonition-tip admonition_WCGJ alert alert--success"><div class="admonitionContent_pbrs">About application and provider pairs</div></div></div>Every application that you add to authentik requires a provider, which is used to configure the specific protocol between the application and authentik, for example OAuth2/OIDC, SAML, LDAP, or others.

**B.** Provide the details for the application (Grafana) and provider (OAuth2/OIDC).

<div class="theme-doc-markdown markdown" id="bkmrk-configure-the-applic">- **Configure the Application**:
    
    
    - **Name**: provide a descriptive name (such as Grafana). 
        - **Group**: select an optional group for the application; groups are used to visually separate applications. For example, you can choose to group applications that you use for coding from those you use for internal communication.
    - **Policy engine mode**: select **Any** for this tutorial; the mode determnes how strictly policies are adhered to. 
        - **TIP**: in authentik, [policies](https://docs.goauthentik.io/customize/policies/working_with_policies/) are used in authentik to fine-tune access to applications, flows, stages and many other authentik components. It is not required to use a policy at all, though. The *policy engine mode* setting of **Any** means that as long as a single policy passes (or if there are no policies bound to the application), then access to the application is granted. The mode **ALL** means that every one of any policies bound to the application must pass in order for a user to have access to the application.
    - **UI Settings**: optional UI settings that are displayed about the application, including the launch URL, and three settings to display extra information about the application on the **My Applications** page: an optional icon, the publisher of the application, and a brief description.
- **Choose a Provider type**: select **OAuth2/OpenID Connect** as the provider type.
- **Configure the Provider**:
    
    
    - **Name**: Provide a name (or accept the auto-provided name).
    - **Authorization flow**: Select the default `implicit` authorization flow to use for this provider. 
        - **TIP**: The authorization [flow](https://docs.goauthentik.io/add-secure-apps/flows-stages/flow/) is where the various steps, or [*stages*](https://docs.goauthentik.io/add-secure-apps/flows-stages/stages/) of authorization are defined and executed. The defined set of stages construct the workflows of authentication, authorization, etc.
    - **Protocol settings** provide the following required configurations: 
        - Note the **Client ID**, **Client Secret**, and **Slug** values because they will be required later when you configure Grafana to use authentik.
        - Set a `Strict` redirect URI to `https://grafana.company/login/generic_oauth`. 
            - **TIP**: The Redirect URI is where the application will go as soon as authentik's authorization flow is successfully completed.
    - **Logout URI**: set to `https://grafana.company/logout`.
    - **Logout Method**: set to `Front-channel`. 
        - **TIP**: With OAuth2, front-channel logout is considered the default because most application (including Grafana) do not support back-channel logout.
    - **Signing key**: select any available signing key. 
        - **TIP**: authentik generates a key that you can use, called the `authentik Self-signed Certificate`, if you do not have a specific signing key for an application.
- **Configure Bindings** *(optional)*: for this tutorial, skip this step because you do not yet have a user. Later, after you create your first user, you can [create a binding](https://docs.goauthentik.io/add-secure-apps/bindings-overview/work-with-bindings/) to manage the display and access to applications on a user's **My applications** page.
    
    
    - **TIP**: By creating a binding between an application and a specific user, you are ensuring that the application is accessible only to that user and any other users or groups for whom you created a binding. Learn more about how bindings are used in authentik in our [Bindings overview](https://docs.goauthentik.io/add-secure-apps/bindings-overview/).
    
    For any fields not mentioned above, you can leave the default value.

</div>**C.** Click **Submit** to save the new application and provider.

#### 2. Configure Grafana to use authentik as its IdP

For some applications, you log into the application and configure settings there; with Grafana you simply edit your Grafana Docker Compose file. Here you add basic configuration settings as well as the **Client ID**, **Client Secret**, and the **Slug** values that you obtained when you configured the application and provider in authentik in Step 1. above.

**A.** In the Grafana Docker Compose file, set the following environment variables:

<div class="theme-doc-markdown markdown" id="bkmrk-tips"><div class="theme-admonition theme-admonition-tip admonition_WCGJ alert alert--success"><div class="admonitionContent_pbrs">Tips</div></div></div>These values below are for a [Grafana instance running in Docker](https://grafana.com/docs/grafana/latest/setup-grafana/configure-docker/); for standalone or Helm Chart instances refer to our [Grafana integration guide](https://integrations.goauthentik.io/monitoring/grafana/).

Note that `authentik.company` is a placeholder that we use in our example settings; replace this with the domain that authentik is running on in your environment.

<div class="theme-doc-markdown markdown" id="bkmrk--2"><div class="theme-admonition theme-admonition-tip admonition_WCGJ alert alert--success"><div class="admonitionContent_pbrs">  
</div></div><div class="language-text codeBlockContainer_mQmQ theme-code-block"><div class="codeBlockContent_t_Hd"></div></div></div>```
environment:
    GF_AUTH_GENERIC_OAUTH_ENABLED: "true"
    GF_AUTH_GENERIC_OAUTH_NAME: "authentik"
    GF_AUTH_GENERIC_OAUTH_CLIENT_ID: "<Client ID from above>"
    GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET: "<Client Secret from above>"
    GF_AUTH_GENERIC_OAUTH_SCOPES: "openid profile email"
    GF_AUTH_GENERIC_OAUTH_AUTH_URL: "https://authentik.company/application/o/authorize/"
    GF_AUTH_GENERIC_OAUTH_TOKEN_URL: "https://authentik.company/application/o/token/"
    GF_AUTH_GENERIC_OAUTH_API_URL: "https://authentik.company/application/o/userinfo/"
    GF_AUTH_SIGNOUT_REDIRECT_URL: "https://authentik.company/application/o/<application_slug>/end-session/"
    # Optionally enable auto-login (bypasses Grafana login screen)
    GF_AUTH_OAUTH_AUTO_LOGIN: "true"
    # Optionally map user groups to Grafana roles
    GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_PATH: "contains(groups[*], 'Grafana Admins') && 'Admin' || contains(groups[*], 'Grafana Editors') && 'Editor' || 'Viewer'"
    # Required if Grafana is running behind a reverse proxy
    GF_SERVER_ROOT_URL: "https://grafana.company"

```

<div class="theme-doc-markdown markdown" id="bkmrk--3"><div class="language-text codeBlockContainer_mQmQ theme-code-block"><div class="codeBlockContent_t_Hd"><div class="buttonGroup_B0hJ"><button aria-label="Toggle word wrap" class="clean-btn" title="Toggle word wrap" type="button"><svg aria-hidden="true" class="wordWrapButtonIcon_CQkQ" viewbox="0 0 24 24"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z" fill="currentColor"></path></svg></button><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_Fy7c"><svg class="copyButtonIcon_r1h_" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_BIMv" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div></div>**B.** Save your Grafana Docker Compose file, and then launch the stack and access Grafana via your browser at the configured URL.

**C.** To confirm that authentik is properly configured with the new application, log out of Grafana and then log back in using the **Sign in with authentik** button. You should be redirected to authentik to provide credentials.

#### Add your first user

Now that you can access the authentik Admin interface, and you have added an application and provider, let's add a new user.

##### 1. Log in to authentik as an administrator and open the authentik Admin interface.

**A.** Navigate to **Directory &gt; Users**, and click **New User**.

**B.** Fill in the ***required*** fields:

<div class="theme-doc-markdown markdown" id="bkmrk-username%3A-this-value">- **Username**: This value must be unique across all users.
- **TIP**: With OAuth2, front-channel logout is considered the default because most application (including Grafana) do not support back-channel logout.
- **Path**: The path where the user will be created. By default the new user is created in the `users` directory, but you can change that later by editing the user. 
    - **TIP**: Paths are basically directories, that are used to organize your users (for example HR vs Sales, etc.). Paths do not ipoact access; they are purely organizational. Note that the top-level **users** directory displays all users in that directory and all sub-directories.

</div>For information about the ***optional*** fields below, refer to our [documentation on managing users](https://docs.goauthentik.io/users-sources/user/user_basic_operations/#create-a-user).

<div class="theme-doc-markdown markdown" id="bkmrk-name%3A-the-display-na">- **Name**: The display name of the user.
- **Email**: The email address of the user. This is required for many integrations.
- **Is active**: Define the newly created user account as active.
- **Attributes**: You can leave this empty for this tutorial. This field can be used to store custom attributes for the user, in YAML or JSON format. These attributes can then be used within property mappings and policies.

</div>**C.** Click **Create**.

#### 2. Verify that the new user was created

<div class="theme-doc-markdown markdown" id="bkmrk-look-for-the-new-use">- Look for the new user in the list on the **Directory** &gt; **Users** page.

</div>#### What's next?

Now that you have added your first application, and a new user, here are some typical next steps:

<div class="theme-doc-markdown markdown" id="bkmrk-assign-your-new-user">- Assign your new user to appropriate [groups](https://docs.goauthentik.io/users-sources/user/user_basic_operations/#add-a-user-to-a-group) and [roles](https://docs.goauthentik.io/users-sources/user/user_basic_operations/#add-a-user-to-a-role).
- Configure federated or external [sources](https://docs.goauthentik.io/users-sources/sources/) (an existing source of user credentials and other user data).
- Set up MFA
- Define [property mappings](https://docs.goauthentik.io/add-secure-apps/providers/property-mappings/).
- Create a [custom flow](https://docs.goauthentik.io/add-secure-apps/flows-stages/flow/).
- Install an [Enterprise license](https://docs.goauthentik.io/enterprise/manage-enterprise/#purchase-a-license)
- [Create a policy](https://docs.goauthentik.io/customize/policies/) to control access, force MFA use, etc..

</div>#### Things to know and troubleshooting tips

Review the following information to learn more about the basics of setting up authentik and for troubleshooting tips.

#### Modifying the Docker Compose file

Especially when you are just starting out with authentik, we recommend that you use the default `docker-compose.yml` file that comes with the download, instead of trying to write the file from scratch. After you have successfully installed, configured, and accessed authentik, you can edit the file to do more advanced configurations, as documented in the [Configuration section](https://docs.goauthentik.io/install-config/configuration/).

#### Reverse proxy

Typically authentik is set up with a reverse proxy in front of it. If you already have a reverse proxy that you are using to handle your incoming network traffic, you can simply use that same reverse proxy for authentik, by adding a few configuration values. For more details see the [Reverse proxy guide](https://docs.goauthentik.io/install-config/reverse-proxy/).

#### The `latest` tag is deprecated

The `:latest` tag has been deprecated and will never be updated from the 2025.2 release. Instead, use a specific version tag for authentik instances' container images, such as `:2025.12`.

#### Using bindings to allow or restrict access to applications

Note that if you do not define any [bindings](https://docs.goauthentik.io/add-secure-apps/bindings-overview/), then all users have access to the application. To control access, you can [create a binding](https://docs.goauthentik.io/add-secure-apps/bindings-overview/work-with-bindings/). For more information about user access, refer to our documentation about [authorization](https://docs.goauthentik.io/add-secure-apps/applications/manage_apps/#policy-driven-authorization) and [hiding an application](https://docs.goauthentik.io/add-secure-apps/applications/manage_apps/#hide-applications).

#### Upgrades

When you are ready to upgrade to the latest version, be sure to read our [Upgrade documentation](https://docs.goauthentik.io/install-config/upgrade/) and refer to the [Release Notes](https://docs.goauthentik.io/releases/) for the specific version.

<footer class="theme-doc-footer docusaurus-mt-lg" id="bkmrk-help-us-improve-this">---

<div class="theme-admonition theme-admonition-note admonition_WCGJ alert alert--secondary admonitionContrib_Zv8a margin-top--sm theme-doc-footer-edit-meta-row"><div class="admonitionContent_pbrs"><div class="admonitionHeader_FPxu">**Help us improve this content**</div></div></div>We welcome your knowledge and expertise. If you see areas of the documentation that you can improve (fix a typo, correct a technical detail, add additional context, etc.) we would really appreciate your contribution.

<div class="theme-admonition theme-admonition-note admonition_WCGJ alert alert--secondary admonitionContrib_Zv8a margin-top--sm theme-doc-footer-edit-meta-row"><div class="admonitionContent_pbrs"><div class="row"><div class="col col--12">- [Edit on GitHub](https://github.com/goauthentik/authentik/edit/main/website/docs/install-config/first-steps/index.mdx)
- [Contributor Guide](https://docs.goauthentik.io/docs/developer-docs/)
- [Open an issue](https://github.com/goauthentik/authentik/issues/new)
- 

</div></div></div></div></footer>

# Tradução de mensagens no Authentik

##### **Procedimentos necessários**

##### **<span style="color: rgb(251, 238, 184);">1) Acessar o container do authentik server e instalar o pacote gettext</span>**

##### <span style="color: rgb(194, 224, 244);">docker container exec -ti authentik-server bash</span>

##### <span style="color: rgb(194, 224, 244);">apt update; apt upgrade; apt install gettext</span>


##### **<span style="color: rgb(251, 238, 184);">2) Acessar o diretório com arquivo para tradução de português brasileiro:</span>**

##### <span style="color: rgb(194, 224, 244);">locale/pt\_BR/LC\_MESSAGES/django.po</span>

##### Para facilitar as traduções e poder usar o vim para edição do arquivo, fazer o mapeamento persistente no docker-compose.

##### <span style="color: rgb(194, 224, 244);">volumes:</span>  
<span style="color: rgb(194, 224, 244);"> - ./volumes/locale/LC\_MESSAGES:/locale/pt\_BR/LC\_MESSAGES</span>

##### **<span style="color: rgb(251, 238, 184);">3) Após alterar o arquivo django.po deve ser compilado no container:</span>**

##### <span style="color: rgb(194, 224, 244);">python manage.py compilemessages</span>

##### <span style="color: rgb(255, 255, 255);">Este comando deve ser executado no diretório raiz onde está o arquivo manage.py</span>

#####   
<span style="color: rgb(251, 238, 184);">**4) Após finalizar os processos no container, regerar as configurações authentik com os comandos:**</span>

##### <span style="color: rgb(194, 224, 244);">docker compose build, e depois reiniciar com docker compose up e down.</span>