---
title: "Deploy Minecraft Forge Server on Railway"
description: "Self Host Minecraft Server. Run RLCraft, ATM, or any Forge modpack"
category: "Other"
url: https://railway.com/deploy/minecraft-forge
---

# Deploy Minecraft Forge Server on Railway

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

**[Deploy Minecraft Forge Server on Railway on Railway](https://railway.com/template/minecraft-forge)**

- **Creator:** Heimdall
- **Category:** Other
- **Total deploys:** 23

## Template content

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

- **Image:** itzg/minecraft-server:latest

## Documentation

![Minecraft Forge logo](https://minecraft.wiki/images/thumb/Minecraft_forge_in_launcher.png/1200px-Minecraft_forge_in_launcher.png?f1a21)

# 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

- `itzg/minecraft-server:latest` — Docker Hub image by Geoff Bourne; handles Forge download, install, and server lifecycle. GitHub: https://github.com/itzg/docker-minecraft-server

### Environment Variables Reference

| Variable | Description | Required |
|---|---|---|
| `EULA` | Must be `TRUE` to accept Minecraft's EULA — server won't start without it | ✅ Yes |
| `TYPE` | Set to `FORGE` to enable the Forge mod loader | ✅ Yes |
| `FORGE_VERSION` | Forge build to install. `latest` picks the recommended build; pin to e.g. `43.2.0` for reproducibility | Optional |
| `VERSION` | Minecraft Java version (e.g. `1.20.1`, `1.12.2`). Defaults to latest stable | Optional |
| `MEMORY` | JVM heap size (e.g. `4G`, `8G`). Set based on modpack weight and player count | Optional |
| `USE_AIKAR_FLAGS` | `true` enables Aikar's optimised GC flags — recommended for all Forge servers | Optional |
| `TZ` | Container timezone (e.g. `UTC`, `America/New_York`). Affects log timestamps | Optional |
| `MODS` | Comma-separated direct URLs to mod `.jar` files (e.g. from Modrinth or CurseForge CDN). Downloaded at startup | Optional |
| `MODPACK_URL` | Direct download URL to a full CurseForge modpack zip. Use instead of `MODS` for full packs | Optional |
| `WHITELIST` | Comma-separated player names to whitelist | Optional |
| `OPS` | Comma-separated player names to grant operator permissions | Optional |
| `MOTD` | Message of the day shown in the server browser | Optional |

### Deployment Dependencies

- Docker image: `itzg/minecraft-server:latest` — https://hub.docker.com/r/itzg/minecraft-server
- GitHub: https://github.com/itzg/docker-minecraft-server
- Forge documentation: https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/server-types/forge/
- Port: `25565` TCP (exposed via Railway TCP proxy)

## Minecraft Forge vs Fabric vs Vanilla

| Feature | Forge | Fabric | Vanilla |
|---|---|---|---|
| Mod ecosystem | Largest (since 2011) | Growing fast (since 2018) | Plugins only (Spigot/Paper) |
| Large modpacks | ✅ Best-in-class | ⚠️ Limited | ❌ Not supported |
| Startup time | 2–3 minutes (heavy) | 30–45 seconds | ~10 seconds |
| Version update speed | Weeks–months | Hours–days | Immediate |
| Memory usage | High (4–8 GB typical) | Lower | Lowest |
| Best for | Big content modpacks | Performance mods, QoL | Vanilla + 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

| Resource | Minimum | Recommended |
|---|---|---|
| RAM | 3 GB | 6–8 GB (large modpacks) |
| CPU | 2 vCPU (single-core performance matters) | 4 vCPU |
| Storage | 5 GB | 20+ GB (world + mods grow over time) |
| Java | Bundled in `itzg/minecraft-server` | — |
| Network | Stable TCP, low latency | 100 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.

## 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-forge
