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