这是基于PaperMC构建的Minecraft跨平台服务器镜像,搭载Geyser组件,无需额外代理或模组即可让Java版和手机、主机等平台的基岩版玩家共同进入同一游戏世界游玩。
PaperMC server with Bedrock cross-play
A Minecraft server image where Java and Bedrock players share one world. Bedrock players on phones and Windows join with their normal Minecraft app; consoles (Xbox, PlayStation, Switch) can join too, but need a DNS redirect. No Java account, no mods.
Runs Minecraft 26.1.2 on Paper and Java 25. Built on https://github.com/itzg/docker-minecraft-server.
Current release: v2.8.1. See https://codeberg.org/eudes-silva/papermc-geyser-server/src/branch/main/CHANGELOG.md for the full history.
Why not just use itzg/minecraft-server directly?
You can, and for a lot of servers you should. It is the base this image builds
on, and it can install Geyser for you through MODRINTH_PROJECTS. Four things
are different here.
The combination is tested rather than assembled at boot. Geyser 2.11.3 build 1245, Floodgate build 140, ViaVersion 5.12.0 and Paper 26.1.2 were checked together before release. When you install plugins by name, you find out they disagree once players are already online.
Builds are reproducible. All 25 downloads are pinned by URL and SHA256, and the
base image by digest. MODRINTH_PROJECTS resolves to whatever is newest at
boot, so the server you start tomorrow is not the one you started today. Here,
v2.8.1 produces the same bytes a year from now, and a scheduled job re-checks
every pin against upstream.
The terrain packs match the Minecraft version. Terralith, Incendium, Nullscape,
Dungeons & Taverns, Explorify and More Mobs each ship a different build per
version, and a mismatched pack_format is rejected at boot without saying so.
Keeping six of them lined up by hand is tedious.
It is opinionated. Paper and Spigot are tuned, ore obfuscation is on, and
pre-generation covers all three dimensions. If you would rather build your own
stack, take the minimal variant or use itzg directly.
Getting started
You need Docker with the Compose plugin, roughly 6 GB of free RAM, and a few GB of disk. Everything else is in the image.
1. Create a folder and a compose file
Make a folder for the server and save this as docker-compose.yml in it:
yamlservices: papermc: image: silvaeudes/papermc-geyser-server:v2.8.1 container_name: papermc-server restart: unless-stopped init: true stop_grace_period: 90s ports: - "25565:25565/tcp" # Java players - "19132:19132/udp" # Bedrock players - "8080:8080/tcp" # web map - "127.0.0.1:25575:25575/tcp" # RCON, only from this machine volumes: - minecraft-data:/data environment: EULA: "TRUE" MEMORY: "4G" healthcheck: test: ["CMD", "rcon-cli", "list"] interval: 60s timeout: 10s retries: 5 start_period: 300s volumes: minecraft-data:
EULA: "TRUE" means you accept the
Minecraft EULA. The server refuses to start
without it.
MEMORY is how much RAM Java may use. 4G suits a handful of players. Give the
container 1 to 2 GB more than this, because the JVM needs room beyond the heap.
2. Decide about pre-generation now
This is optional, but it is far easier to decide before the first start than after. Generating terrain while players explore is the usual cause of lag spikes, and the terrain datapacks in this image are heavy to generate. Doing it once, up front, with nobody online avoids that.
It costs you a few hours at 100% CPU, during which the server is playable but slow. If you are just trying the image out, skip it and come back later.
To turn it on, add two lines to the environment: block above:
yamlPREGEN_WORLD: "true" PREGEN_RADIUS: "5000"
It starts by itself about a minute after the server finishes booting, works through the Overworld, Nether and End, and never runs again. You can play while it works.
See Pre-generating the world for radius settings and for turning it on after the world already exists.
3. Start it
bashdocker compose up -d
4. Watch the first boot
bashdocker compose logs -f papermc
The first start takes about 3 to 5 minutes. It downloads Paper, installs the plugins and datapacks, and generates the world. You are ready when you see:
[Server thread] INFO: Done (12.345s)! For help, type "help"
Ctrl+C stops following the log. It does not stop the server.
5. Connect
| Java Edition | Add a server, address your-server-ip, port 25565 |
| Bedrock (phone, Windows) | Add a server, address your-server-ip, port 19132 |
On the same machine use localhost. On your home network use the machine's
local IP. From the internet you need to forward those two ports on your router,
or use something like Tailscale so you do not
have to open ports at all.
Bedrock uses UDP on port ***. If Java players get in and Bedrock players do not, check the UDP forward first.
Consoles (Xbox, PlayStation, Switch) have no "add server" button at all. Players there need a DNS redirect such as https://github.com/Pugmatt/BedrockConnect, or an invite from someone already on the server from a phone or PC.
6. Make yourself an admin
Replace YourName with your Minecraft username:
bashdocker exec papermc-server rcon-cli "op YourName"
That is the whole setup. The rest of this file covers settings, day-to-day commands, and what each plugin does.
Configuration
There are two ways to run this image, and they read settings differently. Pick one and stay with it.
Option A: the short compose file above
Settings go straight into the environment: block, using the names the server
itself uses:
yamlenvironment: EULA: "TRUE" MEMORY: "6G" VIEW_DISTANCE: "10" DIFFICULTY: "hard"
A .env file next to this compose file does nothing, because nothing in it
reads one.
Option B: the repository compose file and .env
This is the fuller setup, and the one the rest of this file assumes:
bashgit clone https://codeberg.org/eudes-silva/papermc-geyser-server.git cd papermc-geyser-server cp .env.example .env # edit .env, then: docker compose up -d
.env.example lists every option with its default and a note on what it does.
The compose file passes those names through with env_file, so for almost
everything you just put the name in .env and it reaches the server unchanged.
server.properties is generated, not edited
Whichever option you pick, the image rewrites server.properties from the
environment on every boot, so it always matches what you configured. Editing
that file directly does nothing: the next restart overwrites it.
Set the value in .env (Option B) or in environment: (Option A) instead. The
table below lists the common ones, and .env.example has the rest.
Four settings have a different name in .env than in the server. The
compose file translates them:
Put this in .env | The server receives |
|---|---|
JAVA_MEMORY | MEMORY |
SERVER_MOTD | MOTD |
GAMEMODE | MODE |
LEVEL_NAME | LEVEL |
Use the left-hand name. Writing MEMORY=8G in .env has no effect with this
compose file: the translation on the right overwrites it, and you silently keep
the 4G default. This is the one place where the two setups differ, and it is
worth getting right before you wonder why more RAM changed nothing.
The compose file also sets two values that differ from what a stock server
writes: DIFFICULTY is normal rather than easy, and SPAWN_PROTECTION is
0 rather than 16. Both use their own name, so you change them in .env as
usual.
After editing .env, apply it with docker compose up -d. A restart is not
enough, because the container has to be recreated.
Settings worth knowing
Names below are the ones you write in .env (Option B). For Option A, use
MEMORY instead of JAVA_MEMORY.
| Setting | Default | What it does |
|---|---|---|
JAVA_MEMORY | 4G | RAM for the Java heap |
VIEW_DISTANCE | 8 | Chunks each player can see. The biggest single lever on CPU and bandwidth |
SIMULATION_DISTANCE | 6 | Chunks that actually tick: mobs, redstone, crops |
MAX_PLAYERS | 20 | Player slots |
DIFFICULTY | normal | peaceful, easy, normal, hard |
ONLINE_MODE | true | Verifies Java accounts with Mojang. Leave it on |
PREGEN_WORLD | false | Pre-generate the world on first boot, see below |
ENABLE_DATAPACKS | true | Set false for plain vanilla terrain |
ENABLE_GRIM | false | Anti-cheat, off by default, see the GrimAC section |
RCON is bound to 127.0.0.1, so it is not reachable from the network. Leaving
RCON_PASSWORD empty gets a new random password on every restart; the
in-container client works either way.
ONLINE_MODE=true works fine with Bedrock players. Floodgate authenticates them
separately, so cross-play is unaffected. Turn it off only for an offline or LAN
setup, and know that anyone can then join under any username.
Do not change ONLINE_MODE on a world that already has players. It changes how
player IDs are generated, which resets inventories, homes and permissions.
Image variants
| Tag | What is in it |
|---|---|
v2.8.1, latest | Everything: 19 plugins and 6 worldgen datapacks |
v2.8.1-minimal, minimal | Cross-play, permissions and grief protection only. No worldgen datapacks, no convenience plugins |
Take minimal if you want to install your own plugins, or if you want plain
vanilla terrain. Both come from the same source and get the same fixes.
To build either yourself:
bashdocker build --target minimal . docker build --target full .
Images are published for linux/amd64 and linux/arm64, so they run on a
Raspberry Pi 4/5 or an ARM cloud instance.
Everyday commands
bash# Follow the log docker compose logs -f papermc # Run one server command docker exec papermc-server rcon-cli "list" # Open an interactive server console docker exec -it papermc-server rcon-cli # Attach to the live console (Ctrl+C detaches, it does not stop the server) docker attach --sig-proxy=false papermc-server # Stop the server, keeping the container docker compose stop # Start it again docker compose start # Stop and remove the container (the world is kept) docker compose down # Update to a newer image docker compose pull && docker compose up -d
Never run docker compose down -v
docker compose down removes the container and leaves your world alone. Adding
-v also deletes the volume, and your world with it, permanently. There is
no undo and no prompt. docker volume rm and docker volume prune do the same.
To stop playing for a while, use docker compose stop. Use down only when you
want the container gone, and never add -v unless you mean to erase the server.
Backing up
Stop the server first so nothing is writing to the world while you copy it:
bashdocker compose stop docker run --rm --volumes-from papermc-server -v "$PWD":/backup alpine \ tar czf /backup/world-backup.tar.gz /data docker compose start
--volumes-from papermc-server copies whatever volume that container actually
uses. Do not name the volume yourself: Compose prefixes volume names with the
folder name, so minecraft-data becomes something like
myserver_minecraft-data, and a wrong guess backs up nothing without telling
you.
Pre-generating the world
Set PREGEN_WORLD=true and PREGEN_RADIUS=5000 in .env before the first
boot, then start the server. A world border is set to WORLD_BORDER_SIZE
(*** blocks by default) so the world cannot grow without limit and fill your
disk.
All three dimensions are generated, one after another:
| Dimension | Setting | Default |
|---|---|---|
| Overworld | PREGEN_RADIUS | 5000 |
| Nether | PREGEN_NETHER_RADIUS | an eighth of the Overworld radius, 625 |
| End | PREGEN_END_RADIUS | 1000 |
The Nether default follows the 1:8 portal scale, so a smaller radius still
covers everywhere players can reach through portals. If your dimensions are not
named world_nether and world_the_end, set PREGEN_NETHER_NAME and
PREGEN_END_NAME to match. Set either of the last two
to 0 to skip that dimension. The Nether and End matter here: Incendium and
Nullscape rewrite those dimensions, so skipping them only moves the cost to the
moment a player first steps through a portal.
It runs once. On success the server writes /data/.pregen-done and every later
boot skips it. Turning PREGEN_WORLD=true on later works normally: set it and
run docker compose up -d.
To pre-generate a second time on the same world, delete the marker first:
bashdocker exec papermc-server rm -f /data/.pregen-done docker compose up -d
Chunks that already exist are skipped quickly, so a re-run mostly costs time on whatever is new.
Give it a minute after the server reports Done (, then check with
chunky progress. The helper waits for the server to finish starting before it
sends any command, so an empty progress reply right after boot is normal.
Expect hours, not minutes. The bundled terrain datapacks are much heavier to generate than vanilla. On a spinning disk, the disk is usually the limit; an SSD helps a lot.
To watch or control it:
bashdocker exec papermc-server rcon-cli "chunky progress" docker exec papermc-server rcon-cli "chunky pause" docker exec papermc-server rcon-cli "chunky continue"
Performance
The image ships with Aikar's G1GC flags, view distance 8, simulation distance 6,
tuned mob spawn limits and entity activation ranges, ore obfuscation, and the
faster ALTERNATE_CURRENT redstone implementation. Chunk generation threads
scale to the host's CPU count at startup.
If the server feels slow, try these in order:
- Lower
VIEW_DISTANCE. Going from 8 to 6 is the biggest single win and costs players little. - Pre-generate the world (above). Most lag on a new server is terrain generation, not player count.
- Give it more RAM with
JAVA_MEMORY, but only if the log mentions GC pauses. More heap does not fix a CPU bottleneck. - Set
ENABLE_DATAPACKS=falsefor a fresh world. The terrain datapacks are the most expensive thing in this image to generate. - Lower
SIMULATION_DISTANCEto 4. Mobs and redstone further out stop ticking, which players rarely notice.
Bedrock players need no special tuning. Geyser runs inside the server process and talks to it directly, with no extra network hop or compression pass.
Included plugins
Everything below is installed and works without configuration unless noted.
To turn any of them off, list them in PLUGINS_DISABLED in your .env:
PLUGINS_DISABLED=DiscordSRV,squaremap,LevelledMobs
Names are case-insensitive. Recognised names: DiscordSRV, DriveBackupV2,
LevelledMobs, SkinsRestorer, Coordinates, squaremap, ViaVersion,
ViaBackwards, CoreProtect, GriefPrevention.
Cross-play: Geyser and Floodgate
Geyser lets Bedrock clients talk to a Java server. Floodgate authenticates those players against Xbox Live, so they need no Java account.
Bedrock usernames get a . prefix so they cannot *** with Java names.
ViaVersion and ViaBackwards
Let players on other Minecraft versions join. Nothing to configure. ViaVersion covers clients newer than the server, ViaBackwards clients older than it, so both are pinned and bumped together.
CoreProtect
Records who placed, broke or took what, so griefing can be undone. Run these in-game as an operator:
/co inspect toggle inspect mode, then click a block /co rollback u:Name t:1d r:30 undo a player's last day within 30 blocks /co restore u:Name t:1d r:30 redo what you just rolled back
GriefPrevention
Players protect their builds by claiming land with a golden shovel. Right-click with a stick to see an existing claim's borders. New players start with a small claim allowance and earn more over time.
Operator commands: /adminclaims, /deleteclaim, /claimslist <player>.
GrimAC (anti-cheat, off by default)
Enable with ENABLE_GRIM=true.
It is off by default because it predicts player movement for one specific Minecraft version. Players connecting on a different version through ViaVersion, or any stretch of low server performance, can get teleported back to spawn while doing nothing wrong. GrimAC itself warns at startup that ViaBackwards on a 26.x server is unsupported and that older clients will have trouble in vehicles. Turn it on once your players are on 26.1.2 and pre-generation has finished. Bedrock players are exempt either way.
Setting it back to false and recreating the container removes it immediately,
so a server with stuck players recovers right away.
LuckPerms
Permissions and rank management.
bashdocker exec papermc-server rcon-cli "lp user YourName permission set luckperms.* true"
For anything more involved, run /lp editor in-game and open the link it
prints. LuckPerms only sends that link to an in-game player, so it does not work
over RCON. Its output behaves the same way: LuckPerms replies asynchronously and
RCON does not capture that, so commands take effect but print nothing.
EssentialsX
The usual admin and player commands: /home, /sethome, /spawn, /tp,
/give, /ban, /kick, /mute. EssentialsXChat formats chat using LuckPerms
prefixes. EssentialsXSpawn controls where new players appear.
squaremap
A live web map of your world at http://your-server-ip:8080.
It fills in as players explore, or immediately if you pre-generated the world. To render everything now:
bashdocker exec papermc-server rcon-cli "squaremap fullrender world"
The map has no password. Anyone who can reach port 8080 can see your world layout and who is online. Remove that port from the compose file, or keep it behind a ***, if that matters to you.
Smaller conveniences
| Plugin | What it does |
|---|---|
| Chunky | Pre-generates terrain, see Pre-generating the world |
| LevelledMobs | Mobs get harder the further you travel from spawn |
| Coordinates | Shows X/Y/Z on screen, toggle in-game with /coords |
| SkinsRestorer | Restores skins when the server runs ONLINE_MODE=false, set one with /skin <username> |
| Vault | A bridge other plugins use to share permission and economy data, nothing to configure |
***SRV (needs setup)
Bridges in-game chat with a *** channel. Put your bot token and channel ID
in /data/plugins/DiscordSRV/config.yml, then:
bashdocker exec papermc-server rcon-cli "discordsrv reload"
Without a token it loads and sits idle.
DriveBackupV2 (needs setup)
Scheduled world backups to Google Drive. Follow the
https://github.com/MaxMaeder/DriveBackupV2/wiki to link your
account, then edit /data/plugins/DriveBackupV2/config.yml.
Backup timestamps use the container's timezone, which compose takes from the
host. This is the one bundled plugin left reporting anonymous usage stats to its
author; set advanced.metrics: false in that same file to turn it off.
Datapacks
The image ships six terrain and content packs, installed on first boot: Terralith and Explorify for the Overworld, Incendium for the Nether, Nullscape for the End, plus Dungeons & Taverns and More Mobs.
They make world generation a lot more varied, and a lot slower. For plain
vanilla terrain, set ENABLE_DATAPACKS=false before the world is created, or
use the minimal image.
To leave out only Incendium, set ENABLE_INCENDIUM=false.
To add your own packs, mount a folder of .zip files at /datapacks. The
repository compose file already does this with ./datapacks:/datapacks:ro. A
mounted pack with the same filename replaces a bundled one.
Datapacks are tied to a Minecraft version. This image is built and tested for
26.1.2, and warns in the log if you override VERSION to anything else.
What happens when a component falls behind
Everything here is pinned to an exact version, so a Minecraft upgrade is only as fast as the slowest component. Three of them carry more risk than the rest, and the rule is the same for all three: a component with no build for the next Minecraft version gets dropped. It does not hold up the release.
| Component | Why it is fragile |
|---|---|
| GrimAC | No tagged release for 26.x; pinned to a dated dev build |
| Coordinates | Declares support only up to 1.21.9; verified working on 26.1.2 by testing |
| Incendium | Upstream marks its 26.1 build _UNSUPPORTED |
The rule exists because ignoring it once kept this image on Minecraft 1.21.4 for the whole 26.1 cycle, waiting for one plugin. Waiting for one component means every user waits too.
Anything dropped is announced in https://codeberg.org/eudes-silva/papermc-geyser-server/src/branch/main/CHANGELOG.md with the reason, the way FarmControl was in v2.0.0. GrimAC and Coordinates are conveniences and would go without a replacement. Incendium is a datapack, so an existing world keeps generating with it and only new worlds notice. Nothing in the cross-play stack is ever dropped: Geyser, Floodgate, ViaVersion and Paper are the image, and a Minecraft version they cannot support is a version this image does not ship.
Troubleshooting
Bedrock players cannot connect, Java players can. Port *** is UDP, not TCP — check the forward. Consoles cannot add a server at all; see Connect.
More RAM changed nothing.
With the repository compose file the setting is JAVA_MEMORY, not MEMORY.
The server keeps restarting.
Read the log with docker compose logs papermc. Usually EULA is not TRUE,
or the container was killed for running out of memory. If it is memory, raise
the container limit or lower JAVA_MEMORY.
I edited server.properties and the change disappeared.
It is rewritten from the environment every boot. Set it in .env instead, then
docker compose up -d. See Configuration.
Changes to .env do nothing.
Run docker compose up -d, not docker compose restart. The container has to
be recreated to pick up new values. Also check you are using the repository's
compose file, which is the one that reads .env.
My Minecraft updated and now I cannot join. A new Java release needs a ViaVersion that knows its protocol. Until this image ships one, set your launcher profile back to the version in Included plugins. Bedrock is the same story on its own schedule.
A player is stuck being teleported back to spawn.
That is GrimAC. Set ENABLE_GRIM=false and run docker compose up -d.
The world is not saving between restarts.
Check your compose file has a volumes: section mounted at /data. Without it
the world lives inside the container and dies with it. If it vanished after a
cleanup, see Never run docker compose down -v.
/lp editor prints nothing.
Run it in-game rather than over RCON. See the LuckPerms section.
The log repeats Block-attached entity at invalid position.
An item frame or painting from one of the bundled worldgen datapacks lost the
block it was attached to, usually where a cave cut through a generated
structure. The server drops the entity and carries on. It is log noise, not
damage, and nothing but that decoration is affected. Set
ENABLE_DATAPACKS=false for a vanilla world if you would rather not see it.
Upgrading from v1.x
v2.0.0 moved the server from Minecraft 1.21.4 to 26.1.2. Back up your world
first (Backing up): the world is converted on first load and
cannot be opened by a v1.x image afterwards. To stay on 1.21.4, pin v1.8.0.
The https://codeberg.org/eudes-silva/papermc-geyser-server/src/branch/main/CHANGELOG.md lists everything that changed, including the removal of FarmControl and the Java 25 requirement.
License
MIT. Based on https://github.com/itzg/docker-minecraft-server.
Maintaining or releasing this image: see https://codeberg.org/eudes-silva/papermc-geyser-server/src/branch/main/MAINTAINING.md.
Source: https://codeberg.org/eudes-silva/papermc-geyser-server
Maintained by silvaeudes, eudes-silva@tutanota.com
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
轩辕镜像加速拉取命令点我查看更多 papermc-geyser-server 镜像标签
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务