An open API service indexing awesome lists of open source software.

https://github.com/oreqr/fake-minecraft-server

🎮Lightweight Rust implementation of a fake Minecraft server
https://github.com/oreqr/fake-minecraft-server

fake-server game-server minecraft minecraft-protocol minecraft-server rust testing

Last synced: 9 months ago
JSON representation

🎮Lightweight Rust implementation of a fake Minecraft server

Awesome Lists containing this project

README

          

# Fake Minecraft Server

[![CI](https://github.com/OreQr/fake-minecraft-server/actions/workflows/ci.yml/badge.svg)](https://github.com/OreQr/fake-minecraft-server/actions/workflows/ci.yml)

Lightweight Rust implementation of a fake Minecraft server. It supports server list responses (status/ping) and connection attempts, useful for testing clients or as a placeholder server.

Server list


Connection attempt

## Installation

### Pre-built binaries

You can download pre-built binaries for Windows, macOS, and Linux from the [Releases page](https://github.com/OreQr/fake-minecraft-server/releases).

### Docker

```bash
docker run --name fake-server -d -p 25565:25565 -v "$(pwd)/config.yml:/config.yml" ghcr.io/oreqr/fake-minecraft-server:latest
```

## Configuration

Server uses a YAML configuration file (`config.yml`). If no configuration is found, default values will be used.

You can specify a custom path to the configuration file by setting the `CONFIG_PATH` environment variable.

Example configuration file with comments is provided in [`config.example.yml`](https://github.com/OreQr/fake-minecraft-server/blob/master/config.example.yml).

### Default values:

```yaml
debug: false

host: 0.0.0.0
port: 25565

status:
version:
same: true

players:
max: 20
online: 0

motd: "§cFake Minecraft Server"
favicon: server-icon.png

kick_message: "§c§lThis is a fake server!\n§eIt only responds to ping requests."
```

## Debugging

To enable debug logging, you can either:

1. Set the environment variable:

```env
DEBUG=true
# or Rust lang
RUST_LOG="debug"
```

2. Or enable debug in the config file:

```yaml
debug: true
```

## License

[MIT](https://github.com/OreQr/fake-minecraft-server/blob/master/LICENSE)