
Deploy Minecraft Java Server on Paper
Host a Minecraft Java server on Paper with your world saved on a volume.
minecraft
Just deployed
/data
Deploy and Host a Minecraft Server on Railway

Run your own Minecraft Java Edition server on Paper, the high-performance server software with 12,000+ GitHub stars, using the popular itzg/minecraft-server image (14,000+ stars). Your world is saved on a volume and the address your friends paste into Minecraft is ready in the Variables tab. Realms for Java costs $7.99/month with a small player cap — on Railway you choose the plugins, players and settings.
What This Template Deploys
| Service | Purpose |
|---|---|
| minecraft | Minecraft Java server on Paper (itzg/minecraft-server:stable, TYPE=PAPER, latest version), reachable through a TCP proxy on port 25565. |
| Persistent Volume | Mounted at /data — your world, plugins, configs and player data survive restarts and redeploys. |
One service. Memory is set as a share of the service's RAM, so the server fits whatever size you give it, and SERVER_ADDRESS shows the exact address to join.
About Hosting a Minecraft Server
A Minecraft server needs a machine that stays on, a public TCP port, enough memory for Java, regular backups and a way to update the game. Home hosting means port forwarding and a PC left running; free hosts make you wait in a queue and shut down when nobody's online.
On Railway, the server runs 24/7 behind a TCP proxy with its own address, the world lives on a persistent volume, and itzg/minecraft-server downloads and updates Paper for you. Change the version, difficulty or player count from variables and redeploy.
You must accept the Minecraft EULA. Set EULA to TRUE before the first start, or the server won't run. This is an unofficial community server template, not a Mojang or Microsoft product. Turn on the whitelist if you don't want strangers joining.
Typical cost: ~$10–25/month on Railway while the server runs, depending on memory (2–4 GB suits a small group). Minecraft Realms Java is $7.99/month for a few friends, and free hosts like Aternos queue you and stop when the server is empty.
Deploy a Minecraft Server in Under 5 Minutes
- Set
EULAtoTRUE(and your username inOPSto be an operator). - Click Deploy on Railway — Paper downloads and the world generates (~2–4 minutes).
- Copy
SERVER_ADDRESSfrom the service's Variables. - In Minecraft: Multiplayer → Add Server, paste the address and join.
- Set
ENABLE_WHITELISTtoTRUEand list friends inWHITELISTto keep it private.
No port forwarding. No queue. No PC left on overnight.
Common Use Cases
- Realms alternative — "host minecraft server" with plugins and more players
- Private server for friends — whitelisted, always online
- Plugin servers — add Paper plugins to the
/data/pluginsfolder - Modded servers — switch
TYPEto Fabric or Forge - Community and creator servers — scale memory as your player count grows
- Testing builds and redstone — a sandbox world you control
Configuration
| Variable | Required | Description |
|---|---|---|
EULA | ✅ Required | Type TRUE to accept the Minecraft EULA. The server won't start without it. |
SERVER_ADDRESS | ✅ Auto-injected | Address to paste into Minecraft (TCP proxy host and port). |
TYPE / VERSION | Optional | PAPER and LATEST by default; Fabric, Forge, Purpur and specific versions are supported. |
MAX_PLAYERS, DIFFICULTY, MOTD | Optional | Player slots, difficulty and server-list message. |
ENABLE_WHITELIST, WHITELIST, OPS | Optional | Keep strangers out and make yourself an operator. |
INIT_MEMORY, MAX_MEMORY | Optional | Java heap as a share of the service's RAM (25% and 50%). |
RCON_PASSWORD | 🔐 Auto-generated | Password for server console commands through rcon-cli. |
Use the proxy address, not the web domain. Players join through SERVER_ADDRESS (host and port). A plain domain without the port won't connect.
Minecraft on Railway vs. Alternatives
| Minecraft on Railway | Minecraft Realms (Java) | Aternos | Shockbyte | |
|---|---|---|---|---|
| Monthly cost | ~$10–25 usage | $7.99 | Free | Paid plans by RAM |
| Always online | ✅ 24/7 | ✅ Yes | ❌ Stops when empty | ✅ Yes |
| Plugins and mods | ✅ Paper, Fabric, Forge | ⚠️ Limited | ✅ Yes | ✅ Yes |
| Player limit | ✅ You decide | ⚠️ Small group | ⚠️ Shared resources | ⚠️ By plan |
| Queue to start | ✅ No | ✅ No | ❌ Yes when busy | ✅ No |
| Full file access | ✅ Volume + shell | ❌ No | ⚠️ Panel only | ✅ Panel + FTP |
| License | ✅ Apache-2.0 image | ❌ Proprietary | ❌ Proprietary | ❌ Proprietary |
Dependencies for Minecraft Server Hosting
- Railway account — give the service 2–4 GB RAM for a small group; more for big worlds or many plugins.
- Minecraft: Java Edition for each player.
Deployment Dependencies
- itzg/minecraft-server docs — every variable and server type
- PaperMC — the server software
- Minecraft EULA — required to run a server
- Railway TCP Proxy — how players connect
Implementation Details
The container runs itzg/minecraft-server:stable, which downloads Paper for the chosen VERSION on start and keeps everything under /data on the volume. Railway's TCP proxy forwards a public host and port to 25565, exposed to you as SERVER_ADDRESS.
Java heap is sized as a percentage of the service's memory (INIT_MEMORY=25%, MAX_MEMORY=50%), leaving room for the JVM. Use railway ssh and rcon-cli with RCON_PASSWORD for console commands, and enable Railway volume backups to protect your world.
Frequently Asked Questions
How do I host a Minecraft server on Railway?
Set EULA to TRUE, deploy the template, then paste the SERVER_ADDRESS value into Minecraft's Multiplayer → Add Server. Your world is saved on a volume.
How much does it cost compared to Realms? About $10–25/month on Railway depending on memory and uptime. Realms Java is $7.99/month for a small group without full plugin control; free hosts like Aternos stop when nobody's online.
Why can't players connect to my Minecraft server?
Use the full SERVER_ADDRESS (host and port from the TCP proxy), make sure EULA is TRUE, and check ONLINE_MODE and the whitelist settings in the logs.
Do I lose my world when I redeploy?
No. The world, plugins and configs are on the /data volume and survive restarts, redeploys and version changes. Turn on volume backups for safety.
Can I add plugins or mods?
Yes. Paper supports Bukkit and Spigot plugins in /data/plugins; switch TYPE to FABRIC or FORGE for mods.
Is this an official Minecraft server? No. It runs the official Minecraft Java server software via Paper, but this template is a community project and isn't affiliated with Mojang or Microsoft. You must accept the Minecraft EULA.
Why Deploy and Host a 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 a Minecraft Server on Railway, you get an always-on Paper server with a ready-to-paste address, your world on a volume, and full control over plugins and players.
Template Content
minecraft
itzg/minecraft-server:stableEULA
Type TRUE to accept the Minecraft EULA (https://aka.ms/MinecraftEULA). The server won't start without it.
