How Can We Help?
Add Dynmap to your Minecraft Server
Do you want to add a visual map on your Minecraft Server? Do you want to view the map via a website? Look no further! In this article, we will explain how to set up Dynmap for your Minecraft server. We will also cover how to set up Dynmap behind an NGINX reverse proxy.
Prerequisites
For this article, it is assumed that you have a Minecraft server installed. The Minecraft server that we tested with is a SpigotMC server. Additionally, it is assumed that you have an NGINX reverse proxy setup.
Installation
Before we start make sure to turn off your Minecraft server, to make sure nothing gets corrupted.
Next, download the version of Dynmap that belongs to your Minecraft server from github.com.
Place the .jar
file in the plugins
folder in your Minecraft server files.
Now, start your Minecraft server. Once your server is started you can navigate to __IP__:8123
to view the map of your server.
In case you already have an explored map run dynmap fullrender
to render the entire explored map.
For help with Dynmap have a look here (github.com).
NGINX Reverse Proxy
For a standard NGINX reverse proxy, create a file in /etc/nginx/sites-available
and fill it as follows:
server {
listen 80;
listen [::]:80;
server_name mc.example.com;
access_log /var/log/nginx/example_com/access/mc.log;
error_log /var/log/nginx/example_com/error/mc.log;
location / {
include proxy_params;
proxy_pass http://127.0.0.1:8123;
}
}
Make sure to modify the variables to your needs. To enable HTTPS it is recommended to use Certbot.
In the event that you want to have your Dynmap on a specific path in your URL, use the configuration below. This can be especially handy if you have multiple Minecraft servers.
server {
listen 80;
listen [::]:80;
server_name mc.example.com;
access_log /var/log/nginx/example_com/access/mc.log;
error_log /var/log/nginx/example_com/error/mc.log;
location /survival/ {
include proxy_params;
proxy_pass http://127.0.0.1:8123;
rewrite ^/survival/(.*) /$1 break;
sub_filter "http://mc.example.com/" "http://mc.example.com/survival/";
sub_filter_once off;
}
}
Do not forget to create a symlink of your configuration to the sites-enabled
folder in NGINX, i.e. ln -s /etc/nginx/sites-available/minecraft.conf /etc/nginx/sites-enable/minecraft.conf
. Next test your configuration using nginx -t
and reload NGINX if everything is okay using nginx -s reload
. You should now have a Dynmap map behind an NGINX reverse proxy.
2 Responses
I enjoy how your writing authentically reflects your individual personality. It makes me feel connected to you.
I always look forward to your fresh and one-of-a-kind perspectives. It keeps me coming back for more.