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
|
||||
|
||||
```bash
|
||||
# As root
|
||||
# SSH into your podman server as root
|
||||
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)
|
||||
```
|
||||
|
||||
SSH into the server as minecraft
|
||||
|
||||
```bash
|
||||
systemctl --user enable podman-restart
|
||||
systemctl --user enable --now podman.socket
|
||||
mkdir -p ~/.config/containers/systemd
|
||||
systemctl --user --machine=minecraft@.host enable podman-restart
|
||||
systemctl --user --machine=minecraft@.host enable --now podman.socket
|
||||
mkdir -p /home/minecraft/.config/containers/systemd
|
||||
```
|
||||
|
||||
### Convert Compose to Quadlet
|
||||
|
||||
Reference in New Issue
Block a user