> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/deploy/host-n8n/configure-n8n/user-management.md).

# User management

User management in n8n allows you to invite people to work in your n8n instance.

This document describes how to configure your n8n instance to support user management, and the steps to start inviting users.

Refer to the main [User management](/administer/manage-users-and-access.md) guide for more information about usage, including:

* [Managing users](/administer/manage-users-and-access/add-and-remove-users.md)
* [Account types](/administer/manage-users-and-access/understand-account-types.md)
* [Best practices](/administer/manage-users-and-access/follow-best-practices.md)

For LDAP setup information, refer to [LDAP](/administer/manage-users-and-access/verify-user-identity/connect-ldap.md).

For SAML setup information, refer to [SAML](/administer/manage-users-and-access/verify-user-identity/use-saml.md).

{% hint style="info" %}
**Unsupported user management methods**

In version 1.0, n8n:

* Removed support for **basic auth** and **JWT**
* Removed the `N8N_USER_MANAGEMENT_DISABLED` environment variable. No supported way to disable the login screen exists in recent versions of n8n, including for local or development use. If you need to simplify login for local development, consider using a password manager, setting a simple local password, or scripting the standard login flow.
  {% endhint %}

## Setup <a href="#setup" id="setup"></a>

There are three stages to set up user management in n8n:

1. Configure your n8n instance to use your SMTP server.
2. Start n8n and follow the setup steps in the app.
3. Invite users.

### Step one: SMTP <a href="#step-one-smtp" id="step-one-smtp"></a>

n8n recommends setting up an SMTP server, for user invites and password resets.

{% hint style="info" %}
**Optional from 0.210.1**

From version 0.210.1 onward, this step is optional. You can choose to manually copy and send invite links instead of setting up SMTP. Note that if you skip this step, users can't reset passwords.
{% endhint %}

Get the following information from your SMTP provider:

* Server name
* SMTP username
* SMTP password
* SMTP sender name

To set up SMTP with n8n, configure the SMTP environment variables for your n8n instance. For information on how to set environment variables, refer to [Configuration](/deploy/host-n8n/configure-n8n/basic-configuration.md)

| Variable                                    | Type    | Description                                                                                                                  | Required? |
| ------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- | --------- |
| `N8N_EMAIL_MODE`                            | string  | `smtp`                                                                                                                       | Required  |
| `N8N_SMTP_HOST`                             | string  | *your\_SMTP\_server\_name*                                                                                                   | Required  |
| `N8N_SMTP_PORT`                             | number  | *your\_SMTP\_server\_port* Default is `465`.                                                                                 | Optional  |
| `N8N_SMTP_USER`                             | string  | *your\_SMTP\_username*                                                                                                       | Optional  |
| `N8N_SMTP_PASS`                             | string  | *your\_SMTP\_password*                                                                                                       | Optional  |
| `N8N_SMTP_OAUTH_SERVICE_CLIENT`             | string  | *your\_OAuth\_service\_client*                                                                                               | Optional  |
| `N8N_SMTP_OAUTH_PRIVATE_KEY`                | string  | *your\_OAuth\_private\_key*                                                                                                  | Optional  |
| `N8N_SMTP_SENDER`                           | string  | Sender email address. You can optionally include the sender name. Example with name: *n8n `<contact@n8n.com>`*               | Required  |
| `N8N_SMTP_SSL`                              | boolean | Whether to use SSL for SMTP (true) or not (false). Defaults to `true`.                                                       | Optional  |
| `N8N_UM_EMAIL_TEMPLATES_INVITE`             | string  | Full path to your HTML email template. This overrides the default template for invite emails.                                | Optional  |
| `N8N_UM_EMAIL_TEMPLATES_PWRESET`            | string  | Full path to your HTML email template. This overrides the default template for password reset emails.                        | Optional  |
| `N8N_UM_EMAIL_TEMPLATES_WORKFLOW_SHARED`    | String  | Overrides the default HTML template for notifying users that a credential was shared. Provide the full path to the template. | Optional  |
| `N8N_UM_EMAIL_TEMPLATES_CREDENTIALS_SHARED` | String  | Overrides the default HTML template for notifying users that a credential was shared. Provide the full path to the template. | Optional  |
| `N8N_UM_EMAIL_TEMPLATES_PROJECT_SHARED`     | String  | Overrides the default HTML template for notifying users that a project was shared. Provide the full path to the template.    | Optional  |

If your n8n instance is already running, you need to restart it to enable the new SMTP settings.

{% hint style="info" %}
**More configuration options**

There are more configuration options available as environment variables. Refer to [Environment variables](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables.md) for a list. These include options to disable tags, workflow templates, and the personalization survey, if you don't want your users to see them.
{% endhint %}

{% hint style="info" %}
**New to SMTP?**

If you're not familiar with SMTP, this [blog post by SendGrid](https://sendgrid.com/blog/what-is-an-smtp-server/) offers a short introduction, while [Wikipedia's Simple Mail Transfer Protocol article](https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol) provides more detailed technical background.
{% endhint %}

### Step two: In-app setup <a href="#step-two-in-app-setup" id="step-two-in-app-setup"></a>

When you set up user management for the first time, you create an owner account.

1. Open n8n. The app displays a signup screen.
2. Enter your details. Your password must be at least eight characters, including at least one number and one capital letter.
3. Click **Next**. n8n logs you in with your new owner account.

#### Pre-provision the instance owner from environment variables <a href="#pre-provision-the-instance-owner-from-environment-variables" id="pre-provision-the-instance-owner-from-environment-variables"></a>

{% hint style="info" %}
**Available from n8n v2.17.0**
{% endhint %}

You can pre-provision the instance owner from environment variables instead of going through the in-app setup. Set `N8N_INSTANCE_OWNER_MANAGED_BY_ENV` to `true` and provide the owner details. See [Manage instance settings using environment variables](/deploy/host-n8n/configure-n8n/manage-settings-using-environment-variables.md) for how the activation pattern works.

To change the owner email after setup, see [Change the instance owner email for self-hosted n8n](/deploy/host-n8n/configure-n8n/change-instance-owner-email.md).

{% hint style="warning" %}
**`N8N_INSTANCE_OWNER_PASSWORD_HASH` must be a bcrypt hash**

This variable expects a pre-hashed bcrypt value. Setting a plaintext password breaks login.
{% endhint %}

| Variable                            | Type    | Default | Description                                                                                                                                                                                                       |
| ----------------------------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `N8N_INSTANCE_OWNER_MANAGED_BY_ENV` | Boolean | `false` | Set to `true` to manage the instance owner from environment variables. When `true`, n8n overwrites the instance owner details below on every startup, locks the UI control for that user, and rejects API writes. |
| `N8N_INSTANCE_OWNER_EMAIL`          | String  | -       | Email address for the instance owner.                                                                                                                                                                             |
| `N8N_INSTANCE_OWNER_FIRST_NAME`     | String  | -       | First name for the instance owner.                                                                                                                                                                                |
| `N8N_INSTANCE_OWNER_LAST_NAME`      | String  | -       | Last name for the instance owner.                                                                                                                                                                                 |
| `N8N_INSTANCE_OWNER_PASSWORD_HASH`  | String  | -       | Bcrypt hash of the instance owner's password. Setting a plaintext password breaks login.                                                                                                                          |

{% hint style="warning" %}
**Owner email must be unique**

`N8N_INSTANCE_OWNER_EMAIL` must not already belong to another user on the instance. This setting updates the existing instance owner account; it doesn't transfer ownership to another existing user or merge user accounts. To use an email address that already belongs to another user, change or delete that user first so the email becomes available.
{% endhint %}

### Step three: Invite users <a href="#step-three-invite-users" id="step-three-invite-users"></a>

You can now invite other people to your n8n instance.

1. Sign into your workspace with your owner account. (If you are in the Admin Panel open your **Workspace** from the Dashboard)
2. Click the three dots next to your user icon at the bottom left and click **Settings**. n8n opens your **Personal settings** page.
3. Click **Users** to go to the **Users** page.
4. Click **Invite**.
5. Enter the new user's email address.
6. Click **Invite user**. n8n sends an email with a link for the new user to join.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.n8n.io/deploy/host-n8n/configure-n8n/user-management.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
