simplify podman minecraft deploy
This commit is contained in:
@@ -16,31 +16,12 @@ Find and replace minecraft with the name of the service.
|
|||||||
### Create the minecraft user
|
### Create the minecraft user
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# As root
|
# SSH into your podman server as root
|
||||||
useradd minecraft
|
useradd minecraft
|
||||||
|
|
||||||
su - minecraft
|
|
||||||
# Set the minecraft user password
|
|
||||||
passwd
|
|
||||||
# Generate an SSH key for this user. We don't need it now, but it might be handy later.
|
|
||||||
ssh-keygen
|
|
||||||
# Exit back to root.
|
|
||||||
exit
|
|
||||||
|
|
||||||
# Optional, copy your authorized_keys into the minecraft user's home dir so you can SSH in.
|
|
||||||
cp ~/.ssh/authorized_keys /home/minecraft/.ssh/authorized_keys
|
|
||||||
chown minecraft:minecraft /home/minecraft/.ssh/authorized_keys
|
|
||||||
|
|
||||||
# Allow user systemd services to run after you've died (logged out).
|
|
||||||
loginctl enable-linger $(id -u minecraft)
|
loginctl enable-linger $(id -u minecraft)
|
||||||
```
|
systemctl --user --machine=minecraft@.host enable podman-restart
|
||||||
|
systemctl --user --machine=minecraft@.host enable --now podman.socket
|
||||||
SSH into the server as minecraft
|
mkdir -p /home/minecraft/.config/containers/systemd
|
||||||
|
|
||||||
```bash
|
|
||||||
systemctl --user enable podman-restart
|
|
||||||
systemctl --user enable --now podman.socket
|
|
||||||
mkdir -p ~/.config/containers/systemd
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Convert Compose to Quadlet
|
### Convert Compose to Quadlet
|
||||||
|
|||||||
Reference in New Issue
Block a user