---
title: "Deploy Minecraft Server | Paper Java Edition with Persistent World"
description: "Paper Minecraft Java server with a persistent world and safe redeploys"
category: "Other"
url: https://railway.com/deploy/minecraft-java-server
---

# 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 on Railway](https://railway.com/template/minecraft-java-server)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/minecraft-java-server/manifest.json

- **Creator:** katsuba.dev
- **Category:** Other

## Template content

### Minecraft https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/minecraft.svg

- **Image:** itzg/minecraft-server:2026.10.0-java25

## Documentation

# 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](https://github.com/itzg/docker-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](https://github.com/itzg/docker-minecraft-server) — pinned to `2026.10.0-java25`
- [Paper](https://papermc.io/) — the newest stable build of the pinned Minecraft version, downloaded on start
- A Minecraft Java Edition account for each player (online mode)

### Implementation Details

| Variable | Default | Purpose |
|---|---|---|
| `VERSION` | `26.3` | Minecraft version. Raise it deliberately; back up `/data` first |
| `TYPE` | `PAPER` | Server software: `PAPER`, `VANILLA`, `FABRIC`, `FORGE`, `NEOFORGE`, `PURPUR` |
| `MEMORY` | `2G` | Java heap. 2G for up to ~10 players, 4G for more or for heavy plugins |
| `OPS` | empty | Usernames to make operators |
| `WHITELIST` | empty | Usernames allowed to join; setting it enables the whitelist |
| `ONLINE_MODE` | `TRUE` | Mojang account verification |
| `DIFFICULTY`, `MAX_PLAYERS`, `MOTD` | `normal`, `20`, a greeting | Usual server settings |
| `RAILWAY_DEPLOYMENT_DRAINING_SECONDS` | `90` | Shutdown 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](https://docker-minecraft-server.readthedocs.io/).

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.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/minecraft-java-server
