mc-cluster/velocity-image/README.md
2024-12-06 06:38:37 -05:00

110 lines
3.0 KiB
Markdown

# Velocity Minecraft Proxy with Holesail Integration
This repository contains a Docker-based setup for running a Velocity Minecraft Proxy integrated with Holesail for peer-to-peer connections. The setup uses Velocity for managing Minecraft server connections and Holesail for managing secure connections to backend servers.
---
## Features
- **Velocity Proxy**: Lightweight and flexible proxy for Minecraft servers.
- **Holesail Integration**: Seamlessly integrates Holesail for peer-to-peer connections.
- **Node.js and PM2**: Manages the Minecraft proxy process with ease.
- **Ubuntu Base**: Secure and updated environment using the latest Ubuntu image.
- **Modular Setup**: Easily configurable Docker setup for various services.
---
## Prerequisites
- Docker and Docker Compose installed on the host system.
- Basic understanding of Docker and Minecraft server administration.
---
## Folder Structure
```
.
├── Dockerfile # Sets up the environment and configures the Velocity proxy.
├── pm2/startServer.json # PM2 configuration to manage the Minecraft server process.
├── start.sh # Shell script to start the Velocity proxy.
├── velocity.toml # Configuration file for the Velocity proxy.
├── forwarding.secret # Secret file for secure communication (currently empty).
├── docker-compose.yml # Docker Compose file for service orchestration.
```
---
## Getting Started
### Clone the Repository
```bash
git clone https://github.com/your-repo/velocity-image.git
cd velocity-image
```
### Build and Run the Docker Containers
1. **Build the Holesail connector image**:
```bash
cd ../holesail-connector
docker build -t holesail-connector .
```
2. **Navigate back to the Velocity directory**:
```bash
cd ../velocity-image
```
3. **Run the services with Docker Compose**:
```bash
docker-compose up -d
```
---
## Configuration
- **`velocity.toml`**:
- Modify the `bind` setting to change the proxy's listening address and port.
- Update the `motd` to customize the server's display message.
- Add or update server configurations under `[servers]` and `[forced-hosts]`.
- **PM2 Configuration (`pm2/startServer.json`)**:
- Modify the JVM options in the `script` field to adjust memory or garbage collection settings.
- **Holesail**:
- The Holesail connector is pre-configured. For custom configurations, refer to the [Holesail documentation](https://your-holesail-docs-url).
---
## Usage
- **Access Logs**:
View the PM2 logs:
```bash
docker exec -it volicy-proxy su - mc -c "pm2 log"
```
- **Restart the Proxy**:
```bash
docker restart volicy-proxy
```
- **Stop All Services**:
```bash
docker-compose down
```
---
## Notes
- Ensure `forwarding.secret` is configured for secure player forwarding if needed.
- Default root password is `noshallpass`. Change it for better security.
- Modify the `max_restarts` in the `pm2/startServer.json` file if you need more restart attempts.
---