Railway

Deploy Minecraft | Paper Server on Java 25 with a Real Volume

Minecraft on Railway: current Java, a volume, and a world that survives

Deploy Minecraft | Paper Server on Java 25 with a Real Volume

/data

Deploy and Host a Minecraft Server on Railway

A Paper server on the official itzg image, with a persistent volume for the world and a TCP proxy so players can connect with a normal Minecraft client.

About Hosting a Minecraft Server

The world, the player data, the plugins and server.properties all live in /data. This template mounts a volume there, which is the difference between a server and a demo: without one, every redeploy hands your players a freshly generated world and wipes their inventories.

The image is pinned, and pinned to a Java 25 build on purpose. Paper 26.1 and newer refuse to start on Java 21 - a server left on an older Java tag crashes on boot the first time it pulls a current Paper build.

Common Use Cases

  • A survival or creative server for friends, reachable from anywhere
  • A Paper server with plugins, dropped into /data/plugins
  • A short-lived server for an event, deleted when it is over

Dependencies for Minecraft Hosting

  • A persistent volume, included, mounted at /data
  • A TCP proxy, included, forwarding to port 25565. Minecraft speaks its own protocol, not HTTP, so it needs a raw TCP address rather than a web domain.
  • Accepting the Mojang EULA. The template asks for EULA before it will deploy, because that agreement is between you and Mojang.

Deployment Dependencies

Implementation Details

After deploying, open the service, find the TCP proxy address, and add it in the Minecraft client as host:port - for example mainline.proxy.rlwy.net:14767. Both parts matter; the port is not 25565 from the outside.

VariableWhy
EULAYou accept Mojang's agreement. Required, no default
TYPE, VERSIONPaper, latest release. Change VERSION to pin a specific Minecraft version
MEMORY2G. Raise it for a bigger world or more players - it is the main cost driver
USE_AIKAR_FLAGSJVM flags tuned for Minecraft garbage collection
RCON_PASSWORDGenerated. RCON listens on the private network only, but it should not sit on a default password
DIFFICULTY, MAX_PLAYERS, MOTDThe usual server.properties settings, editable as variables

One thing deliberately left off: autopause. It stops the JVM while nobody is online, which sounds ideal for usage-based billing, but it needs raw packet capture to detect an incoming connection and Railway does not grant that capability - knockd fails with "Operation not permitted" and the container logs the failure every thirty minutes. Templates that ship ENABLE_AUTOPAUSE=true on Railway are not saving anyone money; they are just logging errors.

Why Deploy a Minecraft Server on Railway?

No machine to keep patched, no port forwarding, no dynamic DNS. A volume keeps the world, the TCP proxy gives players a stable address, and when the server is no longer wanted you delete the project.


Template Content

More templates in this category

View Template
Rocky Linux
[Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
30
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51