# How to set up Dynmap with a Reverse Proxy and SSL certificate

## Requirements

* A Minecraft server with the Dynmap plugin installed and running.
* A VPS with Ubuntu 20.04.
* A domain.

{% hint style="success" %}
Get a VPS at [rawSRV.com](https://rawsrv.com) starting at $9.50/m
{% endhint %}

## Step 1: Point your domain to your VPS IP address

{% hint style="info" %}
&#x20;These steps may vary for each domain registrar, this tutorial will explain how to point your domain to your VPS IP via CloudFlare.
{% endhint %}

* Navigate to CloudFlare.com and login
* Choose the domain you want to have your map on
* Select “DNS” from the menu at the top of the screen
* Click “Add Record”
* Set “Type” to “A”
* Set “Name” to whatever you want your subdomain to be (Eg: map)
* Set “IPv4 address” to the IP Address of your VPS
* Click “Save”

## Step 2: Install NGINX

Run these commands to update your system and install NGINX:

```
sudo apt update
sudo apt-get -y install nginx
```

## Step 3: Add Certbot PPA

You’ll need to add the Certbot PPA to your list of repositories. To do so, run the following commands on the command line on the machine:

```
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
```

{% hint style="info" %}
You may be prompted to press "ENTER" or any other key to cancel. Press "ENTER" to continue.
{% endhint %}

## Step 4: Install Certbot

Run this command on the command line on the machine to install Certbot:

```
sudo apt-get -y install certbot python3-certbot-nginx
```

## Step 5: Download proxy script

Run this command to download the proxy script and start it, follow the on-screen commands:

{% hint style="info" %}
This script requires root permissions to run, if you are not logged in as root, you need to run the command "sudo su - root" before continuing.
{% endhint %}

```
wget https://raw.githubusercontent.com/phoenixnodes/scripts/master/proxy.sh && bash proxy.sh
```

## Step 6: Reload NGINX

Run this command to reload NGINX:

```
sudo service nginx reload
```

## Completion

To verify that everything is working, visit your map subdomain (Eg: map.yoursite.com). You should be able to view your Dynmap without using your server’s IP and Dynmap port.


---

# 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.phoenixnodes.com/advanced-guides/install-nginx-reverse-proxy-on-ubuntu-18.04-for-dynmap.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.
