> For the complete documentation index, see [llms.txt](https://handbook.swinlanes.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://handbook.swinlanes.com/getting-started/setting-up-self-hosted-instance.md).

# Setting up self-hosted instance

## 1. Create a virtual machine and obtain IP address

We need a cheapest VM up and running, we recommend DigitalOcean.

<figure><img src="/files/RY1lVtKkB0Ec3uge3KRr" alt=""><figcaption></figcaption></figure>

Select the region closest to the majority of potential users.

<figure><img src="/files/f08ONhSMzcFOCi51MTRf" alt=""><figcaption></figcaption></figure>

For this example, we will select Frankfurt, Germany.

<figure><img src="/files/uCPVoC2Uq49TI69XJqpw" alt=""><figcaption></figcaption></figure>

You could select one of the most cheapest options.

<figure><img src="/files/K49oEmnwUiOz9LjT7F5g" alt=""><figcaption></figcaption></figure>

Click 'Create droplet' and observe VM being created. Once it's ready, you will see external IP address, which we need to copy.

<figure><img src="/files/b0aCwIQcaY6bMSWPnwpO" alt=""><figcaption></figcaption></figure>

Now we go to our domain hosting, Vercel. We need to set A DNS records for frontend and backend applications.&#x20;

## 2. Setting up DNS zone records

We will need 2 type A DNS records, one for frontend application and another for a backend server.

<figure><img src="/files/ZLIgKDEVpEUHvLOCR1zy" alt=""><figcaption></figcaption></figure>

Now we need to wait until DNS is propagated. This website <https://dnschecker.org> tells us when de.ifmethod.com is propagated to 164.92.184.45.&#x20;

## 3. Platform installation

First, we need to log on to virtual machine. In DigitalOcean, that could be done via Console button from VM screen.&#x20;

<figure><img src="/files/tTQTalqHAYnh10AmF8Rq" alt=""><figcaption></figcaption></figure>

We need to make sure we logged in as super user. By default, DigitalOcean logs you in under root. Run `sudo su` to switch to root user if needed.

Now we need to download and execute a build script. Run the following commands in sequence.

```
curl -fsSL https://raw.githubusercontent.com/aerlinn13/ifmethod-helm-charts/refs/heads/main/setup_docker.sh -o setup_docker.sh
```

```
chmod +x ./setup_docker.sh
```

```
./setup_docker.sh
```

For first two steps, the script will check and install Docker and docker compose. After that it will prompt you with following questions:

1. App domain (frontend application URL): in our case it's de.ifmethod.com.
2. Api domain (backend server URL): in our case it's de-api.ifmethod.com.
3. Image tag (version platform): the most recent one as of today is 4.25.3.
4. Your email address for self-signed SSL certificates.

After you submit all the answers the script will install required images, set up NGINX server, request SSL certificates and reload NGINX server in SLL mode.&#x20;

After build script finishes the platform will be available at the URL you submitted as app domain.
