Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 50 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,71 +1,98 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
base64 (0.3.0)
bigdecimal (3.2.2)
colorator (1.1.0)
concurrent-ruby (1.1.10)
concurrent-ruby (1.3.5)
csv (3.3.5)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.15.5)
ffi (1.15.5-x64-mingw-ucrt)
ffi (1.17.2-arm64-darwin)
ffi (1.17.2-x64-mingw-ucrt)
ffi (1.17.2-x86_64-darwin)
ffi (1.17.2-x86_64-linux-gnu)
forwardable-extended (2.6.0)
google-protobuf (4.31.1-arm64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.31.1-x64-mingw-ucrt)
bigdecimal
rake (>= 13)
google-protobuf (4.31.1-x86_64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.31.1-x86_64-linux-gnu)
bigdecimal
rake (>= 13)
http_parser.rb (0.8.0)
i18n (1.12.0)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
jekyll (4.3.0)
jekyll (4.4.1)
addressable (~> 2.4)
base64 (~> 0.2)
colorator (~> 1.0)
csv (~> 3.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
json (~> 2.6)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5)
mercenary (~> 0.3, >= 0.3.6)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-sass-converter (3.1.0)
sass-embedded (~> 1.75)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
json (2.13.2)
just-the-docs (0.4.1)
jekyll (>= 3.8.5)
jekyll-seo-tag (>= 2.0)
rake (>= 12.3.1)
kramdown (2.4.0)
rexml
kramdown (2.5.1)
rexml (>= 3.3.9)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.7.1)
liquid (4.0.4)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.0)
rake (13.0.6)
public_suffix (6.0.2)
rake (13.3.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.3.9)
rouge (4.0.0)
rexml (3.4.1)
rouge (4.6.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
sass-embedded (1.89.2-arm64-darwin)
google-protobuf (~> 4.31)
sass-embedded (1.89.2-x64-mingw-ucrt)
google-protobuf (~> 4.31)
sass-embedded (1.89.2-x86_64-darwin)
google-protobuf (~> 4.31)
sass-embedded (1.89.2-x86_64-linux-gnu)
google-protobuf (~> 4.31)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.3.0)
webrick (1.8.2)
unicode-display_width (2.6.0)
webrick (1.9.1)

PLATFORMS
arm64-darwin-21
Expand Down
7 changes: 1 addition & 6 deletions community/BluemapLazyServer.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ that allows for 24/7 viewing of the map (and map markers), even when the server
1. TOC
{:toc}


## Setting up a lazy server

The [lazymc] project can be used to set up a lazy Minecraft server. Essentially it acts just enough
Expand All @@ -30,8 +29,7 @@ Once the server is running, it monitors the number of current players and shuts
empty. It can also be configured to pause the Minecraft server instead of shutting it down so it can
be instantly resumed when the next player connects.

Detailed instructions on how to set up and configure lazymc are available in the project's README.

Detailed instructions on how to set up and configure lazymc are available in the project's [README](https://github.com/timvisee/lazymc?tab=readme-ov-file#lazymc).

## Configuring BlueMap

Expand Down Expand Up @@ -66,7 +64,6 @@ to be configured with a short `proxy_read_timeout` to avoid hanging while waitin
from the integrated webserver. This is because the paused server will accept the connection but not
be able to respond in any way to the request.


## Faking "live" data while server is offline

The frontend attempts to load live data (markers, players) from endpoints under
Expand All @@ -77,7 +74,6 @@ When shutting down (and periodically) BlueMap will write out the current live st
looking for so we can just service the request normally from the webroot (falling back to a 204 No
Content response if the requested file doesn't exist).


## Example Nginx config

```nginx
Expand Down Expand Up @@ -170,7 +166,6 @@ yourdomain.com {
> **will** need to adapt it to your setup!
{: .info .important }


[lazymc]:https://github.com/timvisee/lazymc
[Nginx]: https://nginx.org/
[Caddy]: https://caddyserver.com/
Expand Down
7 changes: 3 additions & 4 deletions community/CaveRendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ literally just holes in some dark corners.

## Anti-cheating purposes

Please note that simply disabling free-flight won't be enough of an anti-cheat.
You will need to mingle with the cave settings.
Using a no-ore texture pack is also a great addition but as caves often contain ores,
you will want to hide them as well.
Please note that simply disabling free-flight won't be enough of an anti-cheat.
You will need to mingle with the cave settings.
Using a no-ore texture pack is also a great addition but as caves often contain ores, you will want to hide them as well.
77 changes: 39 additions & 38 deletions community/Chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,37 +25,38 @@ BlueMap Discord for free.

Requirement keywords as per [RFC 2119](https://datatracker.ietf.org/doc/html/rfc2119)

- You MUST have a Spigot based server. Paper SHOULD be used. The addon doesn't support other platforms.
- You MUST have root access and be able to install and configure additional software such as nginx.
- You MUST NOT run a server network with Bungeecord, Velocity or similar. The addon only supports one global chat.
- You SHOULD have a public IP address. If you don't you will need to figure out exposing ports to the internet yourself.
- You SHOULD know the basics of navigating around the command line, otherwise this will be painful.
- You SHOULD have a domain. Have fun figuring out self signed certificates without a domain.
- You SHOULD NOT run any chat plugins. The addon does not support them and the behaviour is undefined.
- You MAY grab a sysadmin friend to help you.
- You **MUST** have a Spigot based server. Paper **SHOULD** be used. The addon doesn't support other platforms.
- You **MUST** have root access and be able to install and configure additional software such as nginx.
- You **MUST NO**T run a server network with Bungeecord, Velocity or similar. The addon only supports one global chat.
- You **SHOULD** have a public IP address. If you don't you will need to figure out exposing ports to the internet yourself.
- You **SHOULD** know the basics of navigating around the command line, otherwise this will be painful.
- You **SHOULD** have a domain. Have fun figuring out self signed certificates without a domain.
- You **SHOULD NOT** run any chat plugins. The addon does not support them and the behaviour is undefined.
- You **MAY** grab a sysadmin friend to help you.

The guide assumes all the recommendations are followed.

## The starting situation

We've got a VPS running Debian. The VPS has a public IP. There is a Paper Minecraft server running on port 25565 and
BlueMap installed as a plugin running on port 8100. The BlueMap is accesible at `http://12.34.56.789:8100/`.
We've got a VPS running Debian. The VPS has a public IP. There is a Paper Minecraft server running on port `25565` and
BlueMap installed as a plugin running on port `8100`. The BlueMap is accesible at `http://12.34.56.789:8100/`.
In my case the Minecraft server is run with a Docker container as seen below.

![Contents of compose.yml and files in the data directory]({{site.baseurl}}/assets/chat/starting-situation.png)
![BlueMap already working at http://12.34.56.789:8100/]({{site.baseurl}}/assets/chat/bluemap-already-working.png)

## Proxying with nginx

Our first step is to put the BlueMap site behind nginx reverse proxy. This is needed as we want HTTPS,
nginx auth request module and combine many services under one host. Install nginx using `sudo apt install -y nginx`.
You should now be able to observe nginx working at `http://12.34.56.789/`
Our first step is to put the BlueMap site behind NGINX reverse proxy.
This is needed as we want HTTPS, NGINX auth request module and combine many services under one host.
Install NGINX using `sudo apt install -y nginx`.
You should now be able to observe NGINX working at `http://12.34.56.789/`

![Welcome to nginx!]({{site.baseurl}}/assets/chat/nginx-installed.png)

Next we should navigate to `/etc/nginx` to start configuring our fresh installation. We shall start by removing the
default configuration files with `sudo rm -rf ./sites-available/default ./sites-enabled/default /var/www/html`.
And creating our own using `sudo nano ./sites-available/bluemap.conf` with the following content.
Next we should navigate to `/etc/nginx` to start configuring our fresh installation
We shall start by removing the default configuration files with `sudo rm -rf ./sites-available/default ./sites-enabled/default /var/www/html`
Then create our own using `sudo nano ./sites-available/bluemap.conf` with the following content:

```nginx
server {
Expand All @@ -68,35 +69,35 @@ server {
}
```

Next we have to enable the create configuration file with `sudo ln -s ../sites-available/bluemap.conf ./sites-enabled/bluemap.conf`.
Then after reloading nginx with `sudo nginx -s reload` we should see our BlueMap at the location which had nginx welcome page earlier.
Next we have to enable the create configuration file with `sudo ln -s ../sites-available/bluemap.conf ./sites-enabled/bluemap.conf`.
Then after reloading NGINX with `sudo nginx -s reload` we should see our BlueMap at the location which had NGINX welcome page earlier.

![BlueMap running through nginx proxy]({{site.baseurl}}/assets/chat/http-proxied-bluemap.png)

As we no longer use BlueMap's own port for accessing it. We should prevent it from being exposed. In our `compose.yml` file
we can do `"127.0.0.1:8100:8100/tcp"` instead of `"8100:8100/tcp"`. If you don't use Docker, instead of changing Docker's
port bindings change directly the ip address BlueMap uses by editing `plugins/BlueMap/webserver.conf` and adding `ip: "127.0.0.1"`.
As we no longer use BlueMap's own port for accessing it. We should prevent it from being exposed.
In our `compose.yml` file we can do `"127.0.0.1:8100:8100/tcp"` instead of `"8100:8100/tcp"`.
If you don't use Docker, instead of changing Docker's port bindings, change the IP address BlueMap uses by editing `plugins/BlueMap/webserver.conf` and adding `ip: "127.0.0.1"`.

## Domain and HTTPS

Proxying is cool and all but it's pretty much a no-op right now. So open up your DNS management interface,
in my case Cloudflare, and add an A record for the ip address of the server.
Proxying is cool and all but it's pretty much a no-op right now.
So open up your DNS management interface, in my case Cloudflare, and add an A record for the IP address of the server.

![DNS record at Cloudflare]({{site.baseurl}}/assets/chat/dns-cloudflare.png)

Change the server name in nginx `sites-available/bluemap.conf` file to match your chosen domain like this `server_name your.domain;`
Change the server name in NGINX `sites-available/bluemap.conf` file to match your chosen domain like this `server_name your.domain;`
The BlueMap should be accesible at the domain, just without HTTPS still.

To get the most out of our domain we want to use free SSL certificates to secure the connection. And to do that we need
a tool to acquire certificates, like `acme.sh`, which is really cool. To install `acme.sh` we want to change to root user
with `sudo su` and run `curl https://get.acme.sh | sh -s email=your@email.here` with your email.

Close and reopen your terminal and change back to root with `sudo su`, so we are now ready to get some free goodies.
Run `acme.sh --issue --nginx -d your.domain` to acquire the certificates for your domain.
Close and reopen your terminal and change back to root with `sudo su`, so we are now ready to get some free goodies.
Run `acme.sh --issue --nginx -d your.domain` to acquire the certificates for your domain.
Though these certificates are not ready for use yet.

First we want to prepare a couple of files and permissions so everything goes smoothly with nginx.
Run the following commmands.
First we want to prepare a couple of files and permissions so everything goes smoothly with NGINX.
Run the following commmands:

```sh
addgroup certs
Expand All @@ -110,8 +111,8 @@ chmod 770 /etc/nginx/certs
chmod 660 /etc/nginx/certs/*
```

These will setup a `certs` groups and a `certs` folder which only the users in the group (root and nginx) are allowed to access.
Now we can install the certificates we acquired earlier.
These will setup a `certs` groups and a `certs` folder which only the users in the group (root and NGINX) are allowed to access.
Now we can install the certificates we acquired earlier:

```sh
acme.sh --install-cert -d your.domain \
Expand All @@ -121,7 +122,7 @@ acme.sh --install-cert -d your.domain \
```

We can now logout of the root user and get back to our normal user (unless you just do everything on root anyway...).
Let's revise the nginx `sites-available/bluemap.conf` to use them.
Let's revise the NGINX `sites-available/bluemap.conf` to use them.

```nginx
server {
Expand All @@ -145,7 +146,7 @@ server {
}
```

After reloading nginx with `sudo nginx -s reload` we should have a working BlueMap website with HTTPS. Hurray!
After reloading NGINX with `sudo nginx -s reload` we should have a working BlueMap website with HTTPS. Hurray!

![BlueMap with HTTPS]({{site.baseurl}}/assets/chat/bluemap-with-https.png)

Expand Down Expand Up @@ -266,16 +267,16 @@ Your BlueMap should now have a log in button in the menu.

## Chat

We've finally arrived at the last step. Just one more plugin and a tiny bit of nginx configuration.
We've finally arrived at the last step. Just one more plugin and a tiny bit of NGINX configuration.

Download [BlueMap-Chat](https://github.com/Chicken/Auth/releases/tag/bluemap-chat-v0.3.0), transfer it
`scp ~/Downloads/BlueMap-Chat*.jar 12.34.56.789:~/minecraft-server/data/plugins` and restart the server.
Yet again the version above is the one used during writing (v0.3.0). You may want to use a newer version
but the instructions may differ, so refer to the official documentation.
We Docker users have to fiddle with the ips and ports again. Edit the `plugins/BlueMap-Chat/config.yml` to have
`scp ~/Downloads/BlueMap-Chat*.jar 12.34.56.789:~/minecraft-server/data/plugins` and restart the server.
Yet again, the version above is the one used during writing (v0.3.0). You may want to use a newer version
but the instructions may differ, so refer to the official documentation.
We Docker users have to fiddle with the IP's and ports again. Edit the `plugins/BlueMap-Chat/config.yml` to have
`ip: "0.0.0.0"` and `compose.yml` ports section to have `"127.0.0.1:8800:8800/tcp"`.

Next, in the nginx config, add the following above the "Other addons go here" text at the bottom of the file and reload nginx.
Next, in the NGINX config, add the following above the "Other addons go here" text at the bottom of the file and reload NGINX.

```nginx
# Chat addon
Expand Down
Loading