Deploy Minecraft

Minecraft Java server: Paper plugins, Fabric or Forge mods, or a modpack

Deploy Minecraft

Just deployed

Deploy and Host Minecraft Server on Railway

This template runs a Minecraft Java server, by default on Paper, using itzg/minecraft-server, a Docker image with over 400 million pulls. It can also run Fabric or Forge with your own mods, or a whole modpack from Modrinth. The world is stored on a Railway volume, and the address your friends type into Minecraft is ready in the Variables tab.

I made it because the Minecraft templates on Railway are old or unreliable: the busiest one had a health score of 58 when I last checked (November 2026), and several others are below 35. This one tracks the itzg image's stable tag, so new Minecraft and Paper versions work without a template update.

About Hosting Minecraft Server

The deploy form asks for one thing: type TRUE in EULA to accept the Minecraft EULA. The server doesn't start without it.

When the deploy is done, copy SERVER_ADDRESS from the Variables tab of the minecraft service (it looks like something.proxy.rlwy.net:12345). In Minecraft, open Multiplayer, Add Server, and paste it.

In my last test (Paper 26.3, November 2026) a Server List Ping, which is what the Multiplayer screen sends, answered in about half a second with the version and player count. After a restart the server was ready 18 seconds after the container started and loaded the same world from the volume. An empty Paper server used 1.16 GB of RAM on a Hobby plan, about $12 a month at Railway's RAM price; on the 1 GB trial it used 0.86 GB. The heap starts small and grows as players load chunks, so the bill follows how much the server is used.

Common Use Cases

  • A private survival world for a group of friends, with ENABLE_WHITELIST and WHITELIST to keep strangers out
  • A Paper server with plugins from Modrinth, such as LuckPerms or EssentialsX
  • A modpack server for Cobblemon, Create or any other pack on Modrinth
  • A Fabric or Forge server with your own list of mods

Dependencies for Minecraft Server Hosting

A Minecraft Java Edition account for every player. Bedrock (phones and consoles) needs UDP, which Railway's TCP proxy doesn't carry.

Deployment Dependencies

Implementation Details

Plugins and mods: list them in MODRINTH_PROJECTS, comma-separated, using the name from their Modrinth URL. With the default Paper server that means plugins:

MODRINTH_PROJECTS=luckperms,chunky

I tested this one: both were downloaded on the next start and loaded. When I removed chunky from the list, the next start deleted it and kept LuckPerms. For mods, set TYPE to FABRIC, FORGE or NEOFORGE first. MODRINTH_DOWNLOAD_DEPENDENCIES is set to required, so the mods they need (Fabric API, for example) are installed with them.

Modpacks: set TYPE to MODRINTH and MODRINTH_MODPACK to the pack, for example cobblemon-fabric for https://modrinth.com/modpack/cobblemon-fabric. The image installs the pack's loader and its server-side mods. One catch I hit while testing: the default image runs Java 25, which Minecraft 26.x needs, but most packs are still built for Minecraft 1.21.1 and need Java 21. Cobblemon refused to start on Java 25 and the server kept restarting. For those packs, open the service's Settings, Source and change the image to itzg/minecraft-server:java21. After that switch Cobblemon started and answered the ping, using 1.4 GB of RAM with nobody online.

Set OPS to your Minecraft username to become an operator on first start. For console commands, open a shell with railway ssh from the Railway CLI and run rcon-cli, for example rcon-cli whitelist add Steve. RCON's password is generated for you, and its port isn't exposed to the internet.

Change VERSION to pin a Minecraft version such as 26.2. LATEST follows new releases, which can break plugins the day a new version comes out.

INIT_MEMORY and MAX_MEMORY are shares of the service's RAM (25% and 50%), so the same settings fit every plan. Java sees Railway's limit: on the trial's 1 GB it saw 953 MB and capped the heap at 478 MB, and on Hobby's 8 GB it's 4 GB. Big modpacks list the RAM they want on their page. The other half is for Java itself. My first version used a fixed 2 GB heap, which a 1 GB trial service can't hold. If you prefer a fixed size, set MAX_MEMORY to something like 6G and leave room for Java on top.

Railway's TCP proxy gives a random port, so the address isn't a plain domain you can hand out. If you want play.yourdomain.com, add an SRV record at your DNS provider that points to the proxy host and port.

Why Deploy Minecraft Server on Railway?

There's no machine to keep on at home and no router ports to open. The world is on a volume that survives redeploys, and you pay for the RAM the server uses instead of a fixed plan.


Template Content

More templates in this category

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

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0