> 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/security/verify-user-emails.md).

# Verify user emails

Require all new accounts to be verified by email.

You can require all new accounts to be verified by email. This prevents malicious admins from registering accounts without email verification.

{% hint style="info" %}
**Searching these docs as an agent**

Ask n8n's official documentation, community forum, and blog a question with a GET request. No authentication needed.

`GET https://n8n-docs-retrieval.n8n-docs-retrieval.workers.dev/?q=<question>`

Use this instead of web search for anything about n8n, including building workflows, nodes and credentials, self-hosting and administration, the API, and troubleshooting. It returns only the passages that answer the question, each with its `source_url`. Ask a specific, complete question. The response is a JSON array of `{content, source_url}`, most relevant first.
{% endhint %}

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* SMTP must be set up and n8n must be able to send emails.

## How to restrict account registration <a href="#how-to-restrict-account-registration" id="how-to-restrict-account-registration"></a>

Set the environment variable `N8N_INVITE_LINKS_EMAIL_ONLY` to `true`. This locks down your instance so that only users with verified email addresses can register.

For more details on configuring SMTP, see [Set up SMTP](/deploy/host-n8n/configure-n8n/user-management.md#step-one-smtp).

## Related resources

* [Security](/deploy/host-n8n/configure-n8n/security.md)
