Skip to content

Networking & Remote Access ​

Configure remote access, LAN connectivity, SSL/HTTPS, and port management.

Server Connection

Remote Access Configuration ​

To access Minepanel from outside your local network:

1. Update Environment Variables ​

Edit your docker-compose.yml:

yaml
environment:
  # Backend - Controls CORS
  - FRONTEND_URL=http://your-server-ip:3000

  # Frontend - API endpoints
  - NEXT_PUBLIC_BACKEND_URL=http://your-server-ip:8091

2. Using a Domain Name ​

If you have a domain:

yaml
environment:
  # Backend
  - FRONTEND_URL=https://minepanel.yourdomain.com

  # Frontend
  - NEXT_PUBLIC_BACKEND_URL=https://api.yourdomain.com

3. Restart Services ​

bash
docker compose restart

Security

  • Always use HTTPS for production deployments
  • See SSL/HTTPS section below for setup
  • Make sure your firewall allows the required ports
  • Don't expose ports publicly without proper authentication

LAN Network Configuration ​

When you create a Minecraft server, Minepanel automatically shows the connection information to share with players. By default, it shows your public IP (obtained automatically via ipify.org). However, if you want players on your local network (LAN) to see your local IP address, you need to configure it manually.

Why Configure LAN IP? ​

  • Better performance: Players on your local network will connect directly without going through your router
  • No port forwarding needed: For LAN players, you don't need to configure port forwarding
  • Both options: The panel will show both public IP (for internet players) and LAN IP (for local players)

How to Get Your LAN IP ​

On macOS:

bash
ipconfig getifaddr en0
# Example output: 192.168.3.208

On Linux:

bash
hostname -I | awk '{print $1}'
# Example output: 192.168.1.100

On Windows (PowerShell):

powershell
(Get-NetIPAddress -AddressFamily IPv4 -InterfaceAlias "Ethernet").IPAddress
# Example output: 192.168.1.50

TIP

Your LAN IP typically starts with 192.168.x.x or 10.x.x.x

Configuration ​

Add the HOST_LAN_IP variable to your docker-compose.yml:

yaml
services:
  minepanel:
    environment:
      # ... other variables
      - HOST_LAN_IP=192.168.3.208 # Replace with your actual LAN IP

Or in your .env file:

bash
HOST_LAN_IP=192.168.3.208

Restart Services ​

bash
docker compose down
docker compose up -d

How It Works ​

When a Minecraft server is running, the panel will show a Server Connection section with:

  1. Public IP/Domain: 203.0.113.50:25565 (for external players)
  2. LAN IP: 192.168.3.208:25565 (for local network players)

Both addresses are easily copyable with one click.

INFO

If you don't configure HOST_LAN_IP, only the public IP will be shown. This is fine if all your players are connecting from the internet.

Port Configuration ​

Default Ports ​

ServicePortDescription
Frontend3000Web interface
Backend8091API server
Minecraft Servers25565+Game servers

Changing Ports ​

Edit your .env file or docker-compose.yml:

bash
BACKEND_PORT=8091
FRONTEND_PORT=3000

Port Conflicts ​

If a port is already in use:

bash
# Check what's using the port
sudo lsof -i :3000

# Change to a different port
FRONTEND_PORT=3001

Firewall Configuration ​

For remote access, open these ports:

bash
# UFW (Ubuntu/Debian)
sudo ufw allow 3000/tcp   # Frontend
sudo ufw allow 8091/tcp   # Backend
sudo ufw allow 25565/tcp  # Minecraft (default)

# firewalld (CentOS/RHEL)
sudo firewall-cmd --permanent --add-port=3000/tcp
sudo firewall-cmd --permanent --add-port=8091/tcp
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --permanent --add-port=25565/tcp
sudo firewall-cmd --reload

SSL/HTTPS ​

For production deployments, use HTTPS with a reverse proxy.

Using Nginx ​

  1. Install Nginx and Certbot:
bash
sudo apt update
sudo apt install nginx certbot python3-certbot-nginx
  1. Create Nginx config:
nginx
# /etc/nginx/sites-available/minepanel
server {
    listen 80;
    server_name minepanel.yourdomain.com;

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }

    location /api {
        proxy_pass http://localhost:8091;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
    }
}
  1. Enable and get SSL:
bash
sudo ln -s /etc/nginx/sites-available/minepanel /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
sudo certbot --nginx -d minepanel.yourdomain.com
  1. Update environment variables:
yaml
environment:
  - FRONTEND_URL=https://minepanel.yourdomain.com
  - NEXT_PUBLIC_BACKEND_URL=https://minepanel.yourdomain.com/api

Using Caddy ​

Caddy automatically handles SSL certificates:

caddyfile
# Caddyfile
minepanel.yourdomain.com {
    reverse_proxy localhost:3000
    
    handle /api/* {
        reverse_proxy localhost:8091
    }
}
bash
caddy start

Behind a Reverse Proxy ​

Update all three critical variables:

yaml
environment:
  # Backend - CRITICAL for CORS
  - FRONTEND_URL=https://your-domain.com

  # Frontend - API endpoints
  - NEXT_PUBLIC_BACKEND_URL=https://api.your-domain.com

Custom Network ​

If you need a custom Docker network:

yaml
networks:
  minepanel:
    driver: bridge
    ipam:
      config:
        - subnet: 172.20.0.0/16

services:
  minepanel:
    networks:
      - minepanel

Troubleshooting Network Issues ​

Can't access from remote ​

  1. Check FRONTEND_URL matches the URL you're using
  2. Verify firewall ports are open
  3. Check router port forwarding (if applicable)
  4. Restart after changing network variables

CORS Errors ​

The FRONTEND_URL variable controls CORS. It must match exactly how you access the frontend:

  • Local: FRONTEND_URL=http://localhost:3000
  • Remote IP: FRONTEND_URL=http://192.168.1.100:3000
  • Domain: FRONTEND_URL=https://minepanel.yourdomain.com

Always restart after changing: docker compose restart

Connection Refused ​

  1. Check Docker is running: docker ps
  2. Check logs: docker compose logs
  3. Verify ports aren't conflicting: sudo lsof -i :3000

Next Steps ​

Released under the MIT License.