# Move hostware environment

Below you will find a description of how the hostware VM can be moved to another VM.

### Set up a new server

Install a fresh hostware environment on the new server using our installer script.

### Move database

The "hostware" database must be moved from the old to the new server. This can be done using mysqldump, for example.

**Export:**\
mysqldump -u root -p hostware > hostware\_backup.sql

**Import:**\
mysql -uroot -p -f hostware < hostware\_backup.sql

### Move .env

It is important that the .env file is moved from the hostware directory (/var/www/hostware) to the new server.

### Moving other files

Other files such as favicons or individual modules in the /custom/modules or /custom/themes directory must also be moved. The /storage/app/ directory should also be moved if it is not empty.

### Empty caches

All caches can then be emptied with the following command:

```shellscript
cd /var/www/hostware
php artisan cache:clear
php artisan config:clear
php artisan route:clear
```


---

# Agent Instructions: 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.hostware.io/system-and-configuration/troubleshooting-and-questions/move-hostware-environment.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.
