https://github.com/greg-kennedy/minecraft-server
Scripts to help stand up a vanilla Minecraft server
https://github.com/greg-kennedy/minecraft-server
minecraft minecraft-server systemd systemd-service systemd-unit
Last synced: 23 days ago
JSON representation
Scripts to help stand up a vanilla Minecraft server
- Host: GitHub
- URL: https://github.com/greg-kennedy/minecraft-server
- Owner: greg-kennedy
- License: unlicense
- Created: 2017-07-28T14:58:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-28T15:28:14.000Z (over 7 years ago)
- Last Synced: 2025-02-05T16:47:51.760Z (3 months ago)
- Topics: minecraft, minecraft-server, systemd, systemd-service, systemd-unit
- Language: Perl
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# minecraft-server
Greg KennedyA collection of scripts to help stand up a vanilla Minecraft server
## Description
This repository is a collection of tools to help start and manage a vanilla Minecraft server.## Installation
* Start from an existing Ubuntu installation
* Become root (`sudo su`)
* Install Dependencies
* Install `openjdk8` and `perl` from apt
* Create a user "minecraft" and group "minecraft", no password, home directory `/home/minecraft` and login shell `/bin/false`
* Install server, server wrapper and announce script
* `cd /home/minecraft`
* Get the latest Minecraft server jar and put that in this folder
* Place `announce.pl` and `minecraft-server.sh` in here
* `chown -R minecraft:minecraft .` from within /home/minecraft
* Install systemd unit files
* `cd /etc/systemd/system`
* Place `minecraft-server.service` and `minecraft-announce.service` here
* `systemctl enable minecraft-server.service`
* `systemctl enable minecraft-announce.service`
* Reboot, or just start the services## Usage
To change the server name that appears in LAN clients, edit `announce.pl` and change the value for $server_nameWhen the server is running, you can interact with it by writing data to the named pipe. By default, this is at `/tmp/minecraft-stdin` (edit `minecraft-server.sh` to change these locations). For example,
echo "say hi" > /tmp/minecraft-stdin
will print "[Server] hi" to all connected players. You can also monitor server status by reading `/tmp/minecraft-stdout`.
Connecting these files to a web UI is left as an exercise to the reader.