> 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/knowledge-base/how-to-articles/create-server-staging-instance.md).

# Create a Devolutions Server staging instance

To perform testing on an instance of Devolutions Server without altering the data in production, deploy a test instance based on a copy of the production instance.

{% hint style="info" %}
Before deploying a Devolutions Server instance, it is recommended to run a few tests to make sure everything is working properly. See [Devolutions Server staging checklist](https://docs.devolutions.net/server/kb/how-to-articles/create-server-staging-instance/staging-checklist/) for more details.
{% endhint %}

The following steps describe how to create a test instance hosted on the same machine as the production instance.

{% hint style="warning" %}
Copying a production instance of Devolutions Server to a staging environment can impact privileged accounts if the PAM module is in use. To avoid this, remove the privileged accounts from the staging instance and create new ones specifically for the staging environment.
{% endhint %}

1. Perform a full backup of the production database.
2. Restore the database under a new name.
3. [Export the encryption keys](https://docs.devolutions.net/server/kb/how-to-articles/manage-encryption-keys/) from the production instance of Devolutions Server (if this is not already done).
4. [Create a new instance](https://docs.devolutions.net/server/getting-started/installation/create-server-instance/) in the Devolutions Server Console. It is recommended to create the test instance using the same version as the production instance.
5. In the database step, enter the information related to the database copy created on step 2.
6. Once prompted for it, provide the encryption key file exported in step 3. From this point on, you can perform the Devolutions Server Console upgrade and [update the test instance](https://docs.devolutions.net/server/getting-started/installation/upgrade-server/). The console is designed to support earlier versions of Devolutions Server.
7. Make a full backup of the staging database when the creation is complete.
8. Install and test all the additional features, such as the scheduler service, the recording server, and the Devolutions Gateway.

### Migrating Devolutions Server to another server

The instructions above can be used to migrate the Devolutions Server instance to a new server.

If desired, you can disconnect the old machine from your domain and rename the new one to match the original machine name. Doing so eliminates the need to update the access URI and the Devolutions Server workspace in Remote Desktop Manager.

If you plan to migrate the SQL database to a new server, this should be done after completing the Devolutions Server migration. Once the database has been migrated, update the database configuration via the Devolutions Server Console.

If you plan to move the Devolutions Server instance to a new identity provider, you can also use the [authentication migration tool](https://docs.devolutions.net/server/kb/how-to-articles/authentication-migration/) to transfer users and user groups to the new provider seamlessly.

### Migrating an SQL Server to another server

Follow the steps below to migrate an SQL Server from a Devolutions Server to another. This method is useful for those wanting to switch from SQL Express to SQL Server, for example.

1. Perform a full backup of your database.
2. Restore the database under a new name.
3. Make sure your service accounts are present in the new SQL Server. The DVLS\_Owner must still be a DB\_Owner on the restored database and have the [***Alter any login*** and ***Control Server*** ](https://docs.devolutions.net/server/kb/knowledge-base/pre-deployment-account-survey/)from the securable.
4. In the Devolutions Server Console, under ***Edit*** – ***Database***, point the Devolutions Server instance to the new SQL Server and database.
5. In the ***Advanced credentials*** section of the same tab, check ***Apply least permissions*** on both the Web Application and the Scheduler service. Click on ***Save***.
6. Stop and restart the Devolutions Server instance to apply the changes.


---

# 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/knowledge-base/how-to-articles/create-server-staging-instance.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.
