This project is based on tekn0irs nginx-stream.
- A webserver with a static IP address supporting Docker
This image is available at Docker Hub.
You can run it by using the following command:
docker run -p 25565:25565 -e INITIAL_HOST=<host> -e INITIAL_PORT=<port> vollborn/minecraft-nginx-reverse-proxy
You can also use docker-compose. Example docker-compose.yml:
version: "3.8"
services:
proxy:
image: vollborn/minecraft-nginx-reverse-proxy
restart: unless-stopped
ports:
- "${LOCAL_PORT:-25565}:25565"
environment:
INITIAL_HOST: <host>
INITIAL_PORT: <port>
# TZ: "Europe/Berlin"
Here we go.
You should be up and running!
Clone this project to your webserver.
git clone https://github.com/vollborn/minecraft-nginx-reverse-proxy.git
Enter the cloned directory.
cd minecraft-nginx-reverse-proxy
Then you need to copy the .env.example file. For that, run:
cp .env.example .env
Run docker-compose build to build the container.
docker-compose build
You can start the container by executing this command:
docker-compose up -d
To change the host IP address or port without restarting the container, you can to execute the following command:
# Windows
sethost <ip> <port>
# Linux
bash ./sethost.sh <ip> <port>
Examples:
# Windows
sethost 192.168.178.99 25565
# Linux
bash ./sethost.sh 192.168.178.99 25565