Reformat prettier
This commit is contained in:
parent
ed8f7fad1f
commit
9aef4110fd
@ -1,9 +1,10 @@
|
||||
---
|
||||
title: 'Minecraft Server'
|
||||
title: "Minecraft Server"
|
||||
visible: true
|
||||
---
|
||||
|
||||
[toc]
|
||||
|
||||
Make sure to allow port `25565/tcp` to your server
|
||||
|
||||
## Vanilla
|
||||
@ -11,6 +12,7 @@ Make sure to allow port `25565/tcp` to your server
|
||||
## PaperMC
|
||||
|
||||
## Forge Server
|
||||
|
||||
Download the forge installer from their website and install the server to a directory of your choosing.
|
||||
Copy that folder to your server
|
||||
|
||||
@ -33,9 +35,11 @@ Accept the EULA by editing `/etc/minecraft/forge-(version)/eula.txt`
|
||||
## Fabric Server
|
||||
|
||||
## Systemd Service
|
||||
|
||||
> Adapted from [this gist](https://gist.github.com/dotStart/ea0455714a0942474635)
|
||||
|
||||
`/etc/systemd/system/minecraft.service`
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description=Minecraft Server
|
||||
@ -64,9 +68,11 @@ WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
## Systemd Service with STDIN available
|
||||
|
||||
> Based on [this stackexchange answer](https://unix.stackexchange.com/questions/598221/how-to-control-systemd-service-using-screen/612118#612118)
|
||||
|
||||
`/etc/systemd/system/minecraft.socket`
|
||||
|
||||
```
|
||||
[Unit]
|
||||
PartOf=minecraft.service
|
||||
@ -76,6 +82,7 @@ ListenFIFO=%t/minecraft.stdin
|
||||
```
|
||||
|
||||
`/etc/systemd/system/minecraft.service`
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description=Minecraft Server
|
||||
@ -104,7 +111,9 @@ To run commands, redirect commands into your socket.
|
||||
`echo "command" > /run/minecraft.stdin`
|
||||
|
||||
### Pipe commands script
|
||||
|
||||
**No safety at all!!**
|
||||
|
||||
```
|
||||
#!/usr/bin/env bash
|
||||
echo "$@" > /run/minecraft.stdin
|
||||
|
Loading…
Reference in New Issue
Block a user