Jan 3, 2025
Jan 3, 2025
N/A Views
MD

Warning

This article was automatically translated by OpenAI (gpt-4o-mini).It may be edited eventually, but please be aware that it may contain incorrect information at this time.

This is a note on installing GeyserMC, a proxy that allows access to Minecraft's Java Edition from a Bedrock Edition client.

It should be similar on Ubuntu as well.

This is a continuation of this article, but it can also be installed independently.

Installing Java

(If not already done)

  1. Create the necessary directory and add the GPG key.
sudo mkdir -m 0755 -p /etc/apt/keyrings/
wget -q -O - https://download.bell-sw.com/pki/GPG-KEY-bellsoft | gpg --dearmor | sudo tee /etc/apt/keyrings/GPG-KEY-bellsoft.gpg > /dev/null
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/GPG-KEY-bellsoft.gpg] https://apt.bell-sw.com/ stable main" | sudo tee /etc/apt/sources.list.d/bellsoft.list
  1. Update the package list and install Java.
sudo apt-get update
sudo apt-get install bellsoft-java21 -y

Creating the minecraft User

(If not already done)

sudo adduser minecraft --disabled-password --disabled-login --no-create-home --gecos ""

Installing GeyserMC

sudo mkdir -p /opt/geyser
cd /opt/geyser
sudo chown -R minecraft:minecraft /opt/geyser/
sudo -u minecraft wget -O Geyser-Standalone.jar https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/standalone
printf '#!/bin/bash\njava -jar Geyser-Standalone.jar\n' | sudo -u minecraft tee start > /dev/null
sudo chmod +x start
printf '#!/bin/bash\nkill -9 $(jcmd | grep Geyser-Standalone.jar | cut -d" " -f1)' | sudo -u minecraft tee stop > /dev/null
sudo chmod +x stop
cd /etc/systemd/system/
sudo touch geyser.service
printf '[Unit]\nDescription=Geyser Server on start up\nWants=network-online.target\n[Service]\nUser=minecraft\nWorkingDirectory=/opt/geyser\nExecStart=/opt/geyser/start\nStandardInput=null\n[Install]\nWantedBy=multi-user.target' | sudo tee geyser.service > /dev/null
sudo systemctl daemon-reload
sudo systemctl enable geyser.service
sudo systemctl start geyser.service

Since /opt/geyser/config.yml will be generated, change the connection information as needed,

sudo systemctl restart geyser.service

The logs can be viewed with

journalctl -u geyser -f

Connection

Access raspberrypi's IP address:19132 from the Bedrock Edition client to check if the server is running properly.

Found a mistake? Update the entry.
Share this article: