Host a Minecraft server with mods on Railway

By Tracklayer · Updated 2026-11-20

Short answer: deploy a Minecraft Java Edition server as one Railway service with a volume for the world, a TCP address for players and a Railway Bucket for backups. Tracklayer’s template runs Paper by default on Minecraft 26.2 with a 3 GB heap, and can switch to Fabric, Forge, NeoForge or a Modrinth or CurseForge modpack through variables. You must accept Mojang’s EULA yourself.

Deploy Minecraft server on Railway

When this fits

A Railway-hosted server suits a private world for friends and family, a small Paper community with plugins, modded play, or a test server for plugins and datapacks. You pay for the memory and CPU the server uses, instead of renting a fixed VPS. It does not fit Bedrock players, and a Minecraft world runs in one process, so it scales by giving that process more memory, not by adding replicas.

TemplateCreatorDeploymentsServices
Minecraft ServerThalles Passos's Projects1,5591
PterodactylAlexandru Vlad's Projects1,2443
Minecraft Server [Updated Nov ’26] (Open-Source Game Hosting Platform)shinyduo's Projects2191
Minecraft 26.2 Modpack Server (Paper, Fabric, Forge)Tracklayer152

Railway marketplace data as of 2026-11-19. Full ranking: Best game server templates on Railway.

The table lists game server templates on Railway by deployments, including other Minecraft templates.

Deploy, step by step

  1. Accept the EULA. Set EULA to TRUE after reading it. Defaults are Paper, Minecraft 26.2 and a 3 GB heap.
  2. Wait for the server. Watch the Minecraft logs for “Done”.
  3. Share the address. Copy the TCP proxy address from Minecraft, Settings, Networking. Players add it as {host}:{port}.
  4. Open the console. Sign in to the Console URL as admin with CONSOLE_PASSWORD, then run op {YourName} to make yourself an operator.

Mods, plugins and modpacks

Set TYPE to choose the server:

For modpacks, set VERSION to the pack’s Minecraft version (or LATEST) and raise MEMORY to 6G to 8G. Packs that need an older Java can use MC_IMAGE_TAG=2026.10.0-java21 or -java17. Optional variables such as OPS, WHITELIST and MODRINTH_PROJECTS are supported. Paper accepts plugins as usual.

Operating the server

Run commands from the web console or through railway ssh. The console talks to the server’s WebSocket console over Railway’s private network, behind basic authentication, so the game server does not need a public admin port. The only public entry for players is the TCP proxy. Stopping the service lets the server save worlds before the container exits, which is why the template avoids hard restarts for routine changes. After changing TYPE, VERSION or MEMORY, redeploy and watch the logs for the download and the “Done” line before inviting players.

Backups and persistence

The world lives on a volume at /data, so it survives redeploys. Backups go to the Bucket on the schedule described in the FAQ. Take a backup before changing MC_IMAGE_TAG or VERSION: worlds can be upgraded but not downgraded.

Costs

These are estimates from the template’s TEMPLATE.md, not measurements. Railway bills RAM and CPU by usage.

Scenario Estimate
Idle, 3 GB heap about $39 per month
Typical, 5 to 10 players about $51 per month
Modpack with MEMORY=8G roughly $100 to $120 per month

The idle figure is high because MEMORY=3G sets initial and maximum heap, so memory settles near 3.5 GB even when no one is online. Autopause is off by default because it would still bill RAM. Lowering VIEW_DISTANCE and SIMULATION_DISTANCE saves resources. Bucket storage is billed separately, and a week of compressed backups for a small world is a few GB.

Limits and licence notes

Other options

For a browser-based Linux machine on Railway, see Linux desktop in the browser. For all game server templates, see the game server ranking. More guides are listed at /guides/.

FAQ

Can Bedrock Edition players join?

No. The template supports Minecraft Java Edition clients only, because Railway has no UDP and Bedrock needs it.

How do players connect?

Through the Railway TCP proxy address shown under Minecraft, Settings, Networking, entered as host:port. The port is assigned by Railway and is not 25565. For a cleaner address, point an SRV record at the proxy host and port on a custom domain.

Do I have to accept the Minecraft EULA?

Yes. The template does not start the server until you set EULA to TRUE after reading Mojang's EULA. The template does not redistribute Minecraft; the base image downloads the server software at first start. It is a community template, not approved by or associated with Mojang or Microsoft.

How do backups and restores work?

Every BACKUP_INTERVAL_HOURS (default 6) the server pauses world saves over RCON and uploads a compressed archive to a Railway Bucket, keeping BACKUP_RETENTION_DAYS (default 7) days. Run mc-backup now or mc-backup list through railway ssh. To restore, set RESTORE_BACKUP to latest or a file name and redeploy; the previous data is kept in /data/.pre-restore-{time}.

Can I run it on the Trial plan?

No. The template lists Hobby as the minimum, because Trial's 1 GB per service cannot hold the default 3 GB heap.