Deploy Minecraft Server | Paper Java Edition with Persistent World

Paper Minecraft Java server with a persistent world and safe redeploys

Deploy Minecraft Server | Paper Java Edition with Persistent World

/data

Deploy and Host Minecraft Server on Railway

A Minecraft Java Edition server running Paper, the fast, plugin-compatible server most communities use. Deploy it, copy one address into Minecraft, and play with your friends — no port forwarding, no machine running at home.

About Hosting Minecraft Server

This template runs the widely used itzg/minecraft-server image with Paper 26.3 on Java 25. The world, plugins, configs and logs live on a persistent Railway volume mounted at /data, and players connect through a Railway TCP proxy.

What it does differently from a bare container:

  • Your world survives redeploys. Railway's default is to kill a container the instant it is told to stop, which can cut a world save in half. This template gives the server a 90-second drain window and a 60-second save budget, so every redeploy and restart ends with all dimensions saved to disk. Verified: the same world (same seed) came back across repeated redeploys.
  • No surprise upgrades. Both the server image and the Minecraft version are pinned. A redeploy never moves your world to a newer game version, which matters because a world cannot be downgraded and plugins break between versions. You raise VERSION when you decide to.
  • Secure by default. ONLINE_MODE is on, so every player is verified with Mojang and nobody can join under someone else's name. RCON stays inside the container and is not exposed to the internet.
  • Nothing to fill in. Every variable has a working default; the deploy screen asks for nothing.

Getting Started

  1. Deploy the template and wait about a minute for the first boot (it downloads Paper and generates the world).
  2. Open the service's Variables tab and copy CONNECT_ADDRESS — it looks like example.proxy.rlwy.net:12345.
  3. In Minecraft Java Edition go to Multiplayer → Add Server and paste that address.
  4. Make yourself an admin: set OPS to your Minecraft username and redeploy.

To keep the server private, set WHITELIST to a comma-separated list of usernames.

Common Use Cases

  • Friends and family server: a private survival world that stays online without anyone's PC running
  • Small community server: Paper plugins (EssentialsX, LuckPerms, GriefPrevention and others) dropped into /data/plugins
  • Modded play: switch TYPE to FABRIC, FORGE or NEOFORGE
  • Testing builds and plugins: a disposable server you can redeploy in seconds

Dependencies for Minecraft Server Hosting

Deployment Dependencies

  • itzg/minecraft-server — pinned to 2026.10.0-java25
  • Paper — the newest stable build of the pinned Minecraft version, downloaded on start
  • A Minecraft Java Edition account for each player (online mode)

Implementation Details

VariableDefaultPurpose
VERSION26.3Minecraft version. Raise it deliberately; back up /data first
TYPEPAPERServer software: PAPER, VANILLA, FABRIC, FORGE, NEOFORGE, PURPUR
MEMORY2GJava heap. 2G for up to ~10 players, 4G for more or for heavy plugins
OPSemptyUsernames to make operators
WHITELISTemptyUsernames allowed to join; setting it enables the whitelist
ONLINE_MODETRUEMojang account verification
DIFFICULTY, MAX_PLAYERS, MOTDnormal, 20, a greetingUsual server settings
RAILWAY_DEPLOYMENT_DRAINING_SECONDS90Shutdown grace period so the world is saved

Any other server setting the image supports (VIEW_DISTANCE, SEED, MODE, PVP, …) can be added as a variable — see the image documentation.

To run console commands, open a shell in the service (railway ssh) and use rcon-cli, for example rcon-cli op YourName.

Resources and cost. Minecraft keeps its whole heap in memory all the time. With the default MEMORY=2G the service uses about 2.7 GB of RAM at idle and a fraction of a CPU, which on Railway's usage pricing is roughly $25–30 per month while the server runs. Lower MEMORY to spend less, raise it for more players. Players connect through Railway's TCP proxy; pick the service region closest to your players for the lowest ping.

Backups. The world lives on the volume. Railway volume backups (service → Volume → Backups) give you point-in-time copies; take one before changing VERSION or TYPE.

Why Deploy Minecraft Server on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Minecraft Server on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
50
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