GithubHelp home page GithubHelp logo

kwilliams1987 / minecraft-bedrock-service Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 0.0 82 KB

Wrapper for Minecraft Bedrock Dedicated Server to allow it to safely run as a Windows Service.

C# 99.71% Batchfile 0.29%
minecraft-bedrock-service minecraft windows-service windows-service-wrapper

minecraft-bedrock-service's Introduction

Minecraft Bedrock Windows Service Wrapper

This project allows the bedrock_server.exe file to run safely as a background service on Windows systems.

Features

  • Safe handling of Shutdown and Stop conditions by passing the stop command to the service and waiting for it to quit.
  • Automatically call whitelist reload when whitelist.json is modified.
  • Automatically call permission reload when permissions.json is modified.
  • Automatically restart the server when server.properties is modified.
  • Automatically restart the server if it is unexpectedly killed.
  • Shutdown and restart include 30 sec (15 on Windows Shutdown) grace periods with server announcements.
    • System can detect if players are online and skips grace period if there are none.
  • Server output is saved to disk as bedrock_service.log.
  • bedrock_service.exe can also be run as a console application for troubleshooting purposes.
  • Automatic server backups with configurable schedule.
    • Backup interval starts at end of last backup.

Usage

  1. Place bedrock_service.exe in a directory (doesn't need to be the same place as bedrock_server.exe).

  2. Start bedrock_service.exe for testing.

    If bedrock_service.exe is not in the current working directory pass the --workingDirectory "directory\containing\bedrock_server" parameter.

    Example: .\bedrock_service.exe [--workingDirectory "directory\containing\bedrock_server"] [--executable "bedrock_server.exe"] [--logFileName "bedrock_service.log"] [--backupInterval "00:30:00"] [--backupDirectory "Backups"]

  3. Exit test mode with CTRL + X.=

  4. Trigger a backup with CTRL + B, cancel a running backup with CTRL + N.

  5. Create a new Windows Service entry:

    .\bedrock_service.exe --createService true [--workingDirectory "directory\containing\bedrock_server"] [--executable "bedrock_server.exe"] [--logFileName "bedrock_service.log"] [--backupInterval "00:30:00"] [--backupDirectory "Backups"]

Parameters

Parameter Default Value Description
--workingDirectory {Working Directory} Directory of server code, logs and backups.
--executable bedrock_server.exe Filename of server program.
--logFileName bedrock_service.log Filename of log output.
--backupInterval 00:30:00 Time between backups, 0 = disabled.
--backupDirectory Backups Place to store the backup files, as a subdirectory of workingDirectory

minecraft-bedrock-service's People

Contributors

kwilliams1987 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.