Setting up self-hosted instance
Last updated
Last updated
We need a cheapest VM up and running, we recommend DigitalOcean.
Select the region closest to the majority of potential users.
For this example, we will select Frankfurt, Germany.
You could select one of the most cheapest options.
Click 'Create droplet' and observe VM being created. Once it's ready, you will see external IP address, which we need to copy.
Now we go to our domain hosting, Vercel. We need to set A DNS records for frontend and backend applications.
We will need 2 type A DNS records, one for frontend application and another for a backend server.
First, we need to log on to virtual machine. In DigitalOcean, that could be done via Console button from VM screen.
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.
For first two steps, the script will check and install Docker and docker compose. After that it will prompt you with following questions:
App domain (frontend application URL): in our case it's de.ifmethod.com.
Api domain (backend server URL): in our case it's de-api.ifmethod.com.
Image tag (version platform): the most recent one as of today is 4.25.3.
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.
After build script finishes the platform will be available at the URL you submitted as app domain.
Now we need to wait until DNS is propagated. This website tells us when de.ifmethod.com is propagated to 164.92.184.45.