Railway

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

Minecraft on Railway: a real volume, current Java, Trial plan or above

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.

Sizing, and Which Plan You Need

This template needs the Trial plan or above. It cannot run on Free. Free allows 0.5 GB of RAM per service, and a Paper server does not fit in that: deployed under a 0.5 GB cap the container is killed before the world finishes generating - it reaches 0.478 GB, never logs Done, and the deployment ends up crashed. Lowering MEMORY does not rescue it. The JVM's non-heap footprint alone is about 0.37 GB here, so even a 128M heap would sit on the limit, and Paper is not usable at that size anyway.

The defaults are set to fit the Trial plan, which allows 1 GB of RAM and a 0.5 GB volume per service. Measured on a running server: MEMORY=512M with Aikar's flags off settles at about 0.9 GB resident, and /data reaches about 0.4 GB once the world has generated. Both fit, with little room to spare.

That is a server for a few players and a small world. If you are on Hobby or Pro, raise MEMORY - 2G is a comfortable starting point and uses about 2.8 GB resident - and turn USE_AIKAR_FLAGS back on, since those flags are tuned for heaps of 4G and up.

Two things to watch as the world grows: the volume fills as players explore, and a world that outgrows the plan's volume limit will stop saving. Raising MEMORY is a variable change; raising the volume needs a bigger plan.

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.
  • The Mojang EULA, accepted by deploying this template. EULA is preset to TRUE; deploying is your acceptance of the agreement 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
EULATRUE. Accepts Mojang's agreement. The server only starts on TRUE - any other value produces a green deploy with a stopped server
TYPE, VERSIONPaper, latest release. Change VERSION to pin a specific Minecraft version
MEMORY512M, sized for the Trial plan's 1 GB. Raise it on Hobby or Pro - it is the main cost driver
USE_AIKAR_FLAGSOff. These JVM flags are tuned for heaps of 4G and up; turn them on together with a larger MEMORY
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
41
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