SkillAgentSearch skills...

Lazygate

Gate proxy plugin that shuts down your Minecraft server when it's idle and wakes it up when players connect.

Install / Use

/learn @kasefuchs/Lazygate
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

LazyGate

Table of Contents

About <a name = "about"></a>

LazyGate is a Gate proxy plugin that automatically manages the uptime of your Minecraft server. It stops the server when idle and starts it again when players connect.

Getting Started <a name = "getting_started"></a>

Installing

Add the lazygate module to your project:

go get github.com/kasefuchs/lazygate

Include the plugin in your list of proxy plugins:

package main

import (
	lazygate "github.com/kasefuchs/lazygate/pkg/plugin"
	"go.minekube.com/gate/cmd/gate"
	"go.minekube.com/gate/pkg/edition/java/proxy"
)

func main() {
	proxy.Plugins = append(proxy.Plugins, lazygate.NewProxyPlugin())

	gate.Execute()
}

Configuring

Configure the plugin using environment variables:

# Provider to use. Currently available nomad, docker and pufferpanel.
LAZYGATE_PLUGIN_PROVIDER="nomad"

# Namespace to use.
LAZYGATE_PLUGIN_NAMESPACE="default"

Usage

Docker

LazyGate matches registered Gate servers with provider's allocations using labels:

Docker Compose:

services:
  minecraft-server-random:
    labels:
      lazygate.allocation.server: random_name
      lazygate.allocation.time.minimumOnline: 2m
      lazygate.allocation.time.inactivityThreshold: 5m
      lazygate.queues: wait,kick
      lazygate.queue.wait.timeout: 10s
      lazygate.queue.wait.pingInterval: 2s
      lazygate.queue.kick.reason: random_name is currently starting!

Gate config:

---
config:
  servers:
    random_name: minecraft-server-random:25565
  try:
    - random_name

In this example, the random_name server will correspond to the minecraft-server1 service.

PufferPanel

Enviroment Variables for Gate

LAZYGATE_PLUGIN_PROVIDER="pufferpanel"
LAZYGATE_PLUGIN_NAMESPACE="default"
LAZYGATE_PROVIDER_PUFFERPANEL_BASEURL="<url>"
LAZYGATE_PROVIDER_PUFFERPANEL_CLIENTID="<clientid>"
LAZYGATE_PROVIDER_PUFFERPANEL_CLIENTSECRET="<clientsecret>"
LAZYGATE_PROVIDER_PUFFERPANEL_CONFIGFILEPATH="lazygate.json"

URL: The Url from pufferpanel e.g. https://panel.example.com

CLIENTID & CLIENTSECRET: The Client ID and Client Secret can you generate from Pufferpanel. Account (Top Right) -> OAuth2 Client -> Create New OAuth Client

Gate config:

---
config:
  servers:
    random_name: minecraft-server-random:25565
  try:
    - random_name

Server config

Create a lazygate.json file inside pufferpanel files:

{
  "lazygate.allocation.server": "random_name",
  "lazygate.allocation.time.minimumOnline": "2m",
  "lazygate.allocation.time.inactivityThreshold": "5m",
  "lazygate.queues": "wait,kick",
  "lazygate.queue.wait.timeout": "10s",
  "lazygate.queue.wait.pingInterval": "2s",
  "lazygate.queue.kick.reason": "random_name is currently starting!"
}

Extras

If you're running your Gate Server also inside Docker on the same host as Pufferpanel you have to pass your pufferpanel domain as extrahost.

Related Skills

View on GitHub
GitHub Stars10
CategoryDevelopment
Updated1mo ago
Forks3

Languages

Go

Security Score

95/100

Audited on Feb 25, 2026

No findings