# Setting up a self-hosted instance

## Requirements:

* An Linux/Windows server
* MariaDB Installed
* In case of commercial use (for self-hosted only!) permission from iMalFect (check License.md on GitHub)

## Setup

1\. Create a VitePay SQL Database using the dump provided

2\. Copy the .env.example file as .env and edit details, more description about the .env file here

3\. Replace the public reCaptcha key with yours in the registerMerchant html file

4\. Run "npm start" in order to run the webserver

5\. Visit the webserver

6\. You're all set! Contact imalfect#7015 on discord for support!


---

# 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.pay.imal.dev/self-hosted/setting-up-a-self-hosted-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.
