timvisee dabeabeff4
Increase server monitoring timeouts to 20 seconds
Should improve polling reliability for overloaded servers.
2021-11-15 13:59:51 +01:00
2021-11-07 21:16:42 +01:00
2021-11-07 23:16:56 +01:00
2021-11-08 15:27:48 +01:00
2021-11-14 12:54:34 +01:00
2021-11-14 12:54:34 +01:00
2021-11-07 18:12:39 +01:00
2021-11-14 12:54:34 +01:00

Build status on GitLab CI Project license

lazymc

lazymc puts your Minecraft server to rest when idle, and wakes it up when players connect.

Some Minecraft servers (especially modded) use an insane amount of resources when nobody is playing. lazymc helps by stopping your server when idle, until a player connects again.

lazymc functions as proxy between clients and the server. It handles all incoming status connections until the server is started and then transparently relays/proxies the rest. All without them noticing.

https://user-images.githubusercontent.com/856222/141378688-882082be-9efa-4cfe-81cc-5a7ab8b8e86b.mp4

Click to see screenshots

Sleeping server Join sleeping server Starting server Started server

Features

  • Very efficient, lightweight & low-profile (~3KB RAM)
  • Supports Minecraft Java Edition 1.6+, supports modded (e.g. Forge, FTB)
  • Transparent join: hold clients when server starts, relay when ready, without them noticing
  • Customizable MOTD and login messages
  • Automatically manages server.properties (host, port and RCON settings)
  • Graceful server sleep/shutdown through RCON (with SIGTERM fallback on Linux/Unix)
  • Restart server on crash

Requirements

  • Linux, macOS or Windows
  • Minecraft Java Edition 1.6+
  • On Windows: RCON (automatically managed)

Note: You must have access to the system to run the lazymc binary. If you're using a Minecraft shared hosting provider with a custom dashboard, you likely won't be able to set this up.

Usage

Note: these instructions are for Linux & macOS, for Windows look here.

Make sure you meet all requirements.

Download the appropriate binary for your system from the latest release page.

Place the binary in your Minecraft server directory, rename it if you like. Open a terminal, go to the directory, and make sure you can invoke it:

chmod a+x ./lazymc
./lazymc --help

When lazymc is set-up, change into your server directory if you haven't already. Then set up the configuration and start it up:

# Change into your server directory (if you haven't already)
cd server

# Generate lazymc configuration
lazymc config generate

# Edit configuration
# Set the correct server address, directory and start command
nano lazymc.toml

# Start lazymc
lazymc start

Before you use this in production, please ensure starting and stopping the server works as expected by connecting to it once. Watch lazymcs output while it starts and stops. If stopping results in errors, fix this first to prevent corrupting world/user data.

Follow this repository with the Watch button on the top right to be notified of new releases.

Everything should now be ready to go! Connect with your Minecraft client to wake your server up!

Note: If a binary for your system isn't provided, please compile from source.

Note: Installation options are limited at this moment. More will be added later.

Compile from source

Make sure you meet all requirements.

To compile from source you need Rust, install it through rustup: https://rustup.rs/

When Rust is installed, compile and install lazymc from this git repository directly:

# Compile and install lazymc from source
cargo install -f --git https://github.com/timvisee/lazymc

# Ensure lazymc works
lazymc --help

Or clone the repository and build it yourself:

# Clone repository
git clone https://github.com/timvisee/lazymc
cd lazymc

# Compile
cargo build --release

# Run lazymc
./target/release/lazymc --help

Third-party usage & implementations

A list of third-party implementations, projects using lazymc, that you might find useful:

License

This project is released under the GNU GPL-3.0 license. Check out the LICENSE file for more information.

Description
💤 Put your Minecraft server to rest when idle.
Readme GPL-3.0 5.4 MiB
Languages
Rust 99.8%
Shell 0.2%