Railway

Deploy Minecraft Forge Server on Railway

Self Host Minecraft Server. Run RLCraft, ATM, or any Forge modpack

Deploy Minecraft Forge Server on Railway

Just deployed

/data

Minecraft Forge logo

Deploy and Host a Minecraft Forge Server on Railway

Self-host a fully modded Minecraft Java Edition server using Minecraft Forge — the most established mod-loading framework in Minecraft history, powering iconic modpacks like RLCraft, All The Mods, and Pixelmon.

Deploy Minecraft Forge on Railway in one click using the itzg/minecraft-server Docker image, with Aikar's GC flags, persistent world data, and a Railway TCP proxy pre-configured so players can connect the moment the server is live.

Getting Started with Minecraft Forge on Railway

Once the deployment is live, Railway will provision a TCP proxy address (e.g. gondola.proxy.rlwy.net:25862) — this is what your players connect to from the Minecraft Java client.

Open Minecraft, go to Multiplayer → Add Server, paste the proxy address, and join. On first boot, the server downloads and installs the Forge installer automatically; allow 2–5 minutes before it becomes joinable.

To add mods, set the MODS environment variable to a comma-separated list of direct .jar download URLs from Modrinth or CurseForge — the server will fetch and install them on startup. For a full modpack, set MODPACK_URL to the CurseForge pack download link instead. Use the VERSION env var to pin a specific Minecraft version, and FORGE_VERSION to pin a Forge build — both can be changed and the container will reinstall on next deploy.

About Hosting Minecraft Forge

Minecraft Forge is a modding framework for Minecraft Java Edition that has been the foundation of large-scale mod development since 2011. It provides a rich API layer that lets mod developers hook into nearly every part of the game — adding new biomes, dimensions, items, mobs, and full gameplay overhauls. Key features:

  • Largest mod ecosystem in Minecraft — thousands of mods on CurseForge and Modrinth
  • Supports complex, multi-hundred-mod kitchen-sink modpacks (e.g. ATM, SkyFactory, FTB)
  • Automatic Forge installer download and version management via itzg/minecraft-server
  • Persistent world data and mod storage via the /data volume
  • RCON support for remote server console access
  • Aikar's JVM flags (USE_AIKAR_FLAGS=true) for GC-optimised performance at scale

Why Deploy Minecraft Forge on Railway

One-click Railway deployment skips the entire manual setup — no Java version pinning, no volume wiring, no port forwarding.

  • TCP proxy provisioned automatically — players connect with a hostname, no IP exposure needed
  • Persistent /data volume keeps your world, mods, and configs safe across redeploys
  • Change FORGE_VERSION or VERSION and redeploy — Forge reinstalls cleanly
  • Vertical scaling in Railway's dashboard when player count or modpack weight grows
  • No Docker config, container orchestration, or VPS firewall rules to manage

Common Use Cases

  • Private friend group modpacks — run RLCraft, Create, or Pixelmon for a small whitelist of players without renting a dedicated game server
  • Modpack development and testing — spin up a fresh Forge environment per modpack version, tear it down after testing
  • Community servers — run public modded servers with automatic restarts and Railway's uptime monitoring
  • Retro modpack revival — pin VERSION=1.12.2 and a specific FORGE_VERSION to reproduce classic modpack environments exactly

Dependencies for Minecraft Forge

Environment Variables Reference

VariableDescriptionRequired
EULAMust be TRUE to accept Minecraft's EULA — server won't start without it✅ Yes
TYPESet to FORGE to enable the Forge mod loader✅ Yes
FORGE_VERSIONForge build to install. latest picks the recommended build; pin to e.g. 43.2.0 for reproducibilityOptional
VERSIONMinecraft Java version (e.g. 1.20.1, 1.12.2). Defaults to latest stableOptional
MEMORYJVM heap size (e.g. 4G, 8G). Set based on modpack weight and player countOptional
USE_AIKAR_FLAGStrue enables Aikar's optimised GC flags — recommended for all Forge serversOptional
TZContainer timezone (e.g. UTC, America/New_York). Affects log timestampsOptional
MODSComma-separated direct URLs to mod .jar files (e.g. from Modrinth or CurseForge CDN). Downloaded at startupOptional
MODPACK_URLDirect download URL to a full CurseForge modpack zip. Use instead of MODS for full packsOptional
WHITELISTComma-separated player names to whitelistOptional
OPSComma-separated player names to grant operator permissionsOptional
MOTDMessage of the day shown in the server browserOptional

Deployment Dependencies

Minecraft Forge vs Fabric vs Vanilla

FeatureForgeFabricVanilla
Mod ecosystemLargest (since 2011)Growing fast (since 2018)Plugins only (Spigot/Paper)
Large modpacks✅ Best-in-class⚠️ Limited❌ Not supported
Startup time2–3 minutes (heavy)30–45 seconds~10 seconds
Version update speedWeeks–monthsHours–daysImmediate
Memory usageHigh (4–8 GB typical)LowerLowest
Best forBig content modpacksPerformance mods, QoLVanilla + plugins

Forge is the right choice when the modpack you want to run targets Forge — most of the iconic, large-scale modpacks (RLCraft, ATM series, Tekkit successors) are Forge-only.

Minimum Hardware Requirements for Minecraft Forge

ResourceMinimumRecommended
RAM3 GB6–8 GB (large modpacks)
CPU2 vCPU (single-core performance matters)4 vCPU
Storage5 GB20+ GB (world + mods grow over time)
JavaBundled in itzg/minecraft-server
NetworkStable TCP, low latency100 Mbps+ for 10+ players

Forge servers are CPU-bound on a single thread; single-core clock speed matters more than core count. Aikar's flags (USE_AIKAR_FLAGS=true) significantly reduce GC pauses at 4 GB+ heap sizes. Large kitchen-sink modpacks (150+ mods) typically need 8–12 GB.

Self-Hosting Minecraft Forge

Run locally with Docker:

docker run -d \
  --name minecraft-forge \
  -p 25565:25565 \
  -e EULA=TRUE \
  -e TYPE=FORGE \
  -e FORGE_VERSION=latest \
  -e MEMORY=4G \
  -e USE_AIKAR_FLAGS=true \
  -v /opt/minecraft/data:/data \
  itzg/minecraft-server:latest

Or with Docker Compose (recommended for persistent setups):

services:
  minecraft:
    image: itzg/minecraft-server:latest
    ports:
      - "25565:25565"
    environment:
      EULA: "TRUE"
      TYPE: FORGE
      VERSION: "1.20.1"
      FORGE_VERSION: "latest"
      MEMORY: "4G"
      USE_AIKAR_FLAGS: "true"
      TZ: UTC
      # Add individual mods via direct CDN URLs:
      MODS: "https://cdn.modrinth.com/data/xxxx/versions/yyyy/modname-1.0.jar"
      # Or install a full modpack:
      # MODPACK_URL: "https://www.curseforge.com/minecraft/modpacks/your-pack/download/1234567"
    volumes:
      - ./data:/data
    restart: unless-stopped
    tty: true
    stdin_open: true

Is Minecraft Forge Free?

Minecraft Forge is completely open-source and free to use. The Minecraft Java Edition server itself is free to run; you only need a valid Minecraft account on the client side. On Railway, cost equals infrastructure — compute, memory, and storage consumed by your service. The itzg/minecraft-server Docker image is also free and open-source (MIT-licensed). There are no licensing fees, no Forge subscription tiers, and no per-player costs.

FAQ

What is Minecraft Forge? Minecraft Forge is a modding framework for Minecraft Java Edition. It provides a stable API that mod developers use to add content — new items, biomes, dimensions, mobs, and mechanics — while keeping mods compatible with each other. It has been the dominant mod loader since 2011.

Do my players need to install Forge too? Yes — players need a Forge client (from https://files.minecraftforge.net) matching the server's Minecraft and Forge version. They also need to install any client-side mods your server uses. Server-only mods (e.g. performance or admin mods) don't require client installation.

How do I add mods to the server? Set the MODS environment variable in Railway to a comma-separated list of direct .jar download URLs — for example from Modrinth (https://cdn.modrinth.com/data/.../modname.jar) or CurseForge's CDN. The server fetches and installs them automatically on startup. For a complete modpack, use MODPACK_URL pointing to a CurseForge modpack download link instead. Always match mod versions to your server's VERSION and FORGE_VERSION.

Can I run popular modpacks like RLCraft or All The Mods on this template? Yes. Set MODPACK_URL to the direct CurseForge modpack download URL and the server will install it automatically on first boot. For individual mods, use the MODS env var with comma-separated Modrinth or CurseForge CDN URLs. Increase MEMORY to at least 6G for large modpacks.

Can I use this in production for a public server? Yes. Set ONLINE_MODE=TRUE (default) to enforce Mojang account verification. Use WHITELIST and OPS env vars to control access. Monitor memory via Railway's metrics tab and scale vertically if TPS drops below 20.


Template Content

More templates in this category

View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
View Template
(v1) Simple Medusa Backend
Deploy an ecommerce backend and admin using Medusa

Shahed Nasser
View Template
peppermint
Docker-compose port for peppermint.sh

HamiltonAI