> 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

Generate and manage backup codes in Devolutions Server so users can log in when their usual multifactor authentication method is unavailable.

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.
2. Set the ***Number of backup codes*** a user can generate, then click ***Save***.
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)](/server/web-interface/administration/user-and-security-management/users/multifactor.md) 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***.
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.

#### 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
