This project allows the bedrock_server.exe file to run safely as a background service on Windows systems.
- Safe handling of Shutdown and Stop conditions by passing the
stopcommand to the service and waiting for it to quit. - Automatically call
whitelist reloadwhenwhitelist.jsonis modified. - Automatically call
permission reloadwhenpermissions.jsonis modified. - Automatically restart the server when
server.propertiesis 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.execan also be run as a console application for troubleshooting purposes.- Automatic server backups with configurable schedule.
- Backup interval starts at end of last backup.
-
Place
bedrock_service.exein a directory (doesn't need to be the same place asbedrock_server.exe). -
Start
bedrock_service.exefor testing.If
bedrock_service.exeis 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"] -
Exit test mode with
CTRL + X.= -
Trigger a backup with
CTRL + B, cancel a running backup withCTRL + N. -
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"]
| 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 |