> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/server/web-interface/administration/configuration/server-settings/security/multifactor/backup-codes.md).

# Backup codes

Backup codes are validation codes that provide users with one-time access to Devolutions Server when they do not have access to their usual multifactor authentication (MFA) product or device. They must be generated beforehand and kept safe in case of emergency.

An administrator must first enable the option, after which users can generate their backup codes.

### Settings

#### Enable backup codes (administrator)

An administrator must enable backup codes as an alternate MFA method:

1. In ***Administration – Server settings – Multifactor***, check the ***Backup codes*** box, then click ***Configure*** next to the option.

   <figure><img src="https://cdnweb.devolutions.net/docs/docs_en_server_ServerOp7017.png" alt=""><figcaption></figcaption></figure>
2. Set the ***Number of backup codes*** a user can generate, then click ***Save***.

   <figure><img src="https://cdnweb.devolutions.net/docs/docs_en_server_ServerOp7018.png" alt=""><figcaption></figcaption></figure>
3. Click the ***Save*** icon of the ***Multifactor*** section to save your changes.

{% hint style="info" %}
If your ***MFA usage*** is set to ***MFA Optional per User*** , you must configure MFA for each user before they can generate backup codes. See [Multifactor (Edit User)](https://docs.devolutions.net/server/web-interface/administration/security-management/users/edit-user-two-factor/) for more details.
{% endhint %}

#### Generate backup codes (user)

1. To generate backup codes, click on your avatar in the Devolutions Server side menu, then click ***Edit your Account***.

   <figure><img src="https://cdnweb.devolutions.net/docs/docs_en_server_ServerOp7020.png" alt=""><figcaption></figcaption></figure>
2. Go to ***Alternate MFA*** and click on ***Generate backup codes***. A list of backup codes will be displayed. The user can copy and paste the codes and store them somewhere secure in case of emergency.

   <figure><img src="https://cdnweb.devolutions.net/docs/docs_en_server_ServerOp7021.png" alt=""><figcaption></figcaption></figure>

#### See also

* [Devolutions Academy – Enforce MFA for users from Devolutions Server web interface](https://academy.devolutions.net/student/page/2747690-enforce-mfa-for-users-from-devolutions-server-web-interface?curriculum_activity_id=4182448\&path_id=2628397\&sid=8d455496-2d95-447f-9246-9311ad0fcf8b\&sid_i=0)


---

# 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:

```
GET https://docs.devolutions.net/server/web-interface/administration/configuration/server-settings/security/multifactor/backup-codes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
