【英文】在Minecraft服务器上部署Forge

Preface

Deploying Forge on a Minecraft server to enable Mod installation on the server.

Preparation

  • Corresponding version of Forge

Installing Forge on the Client

  • Open Minecraft Launcher -> Installations -> Add the corresponding version of the game.

  • Run the Forge Installer (Select Install client by default).

1
java -jar forge-1.15.2-31.2.22.jar

Downloading Server Forge

  • Create a new directory.
1
mkdir mincraft-server
  • Run the Forge Installer and select Install server. Choose the directory that was just created as the installation location.
1
java -jar forge-1.15.2-31.2.22.jar

Packaging and Uploading to the Cloud

  • Package the downloaded server software that includes Forge.
1
tar -cvf minecraft-server.tar minecraft-server/
  • Upload it to the cloud.
1
scp minecraft-server.tar [email protected]:/root

Unpacking and Installing on the Cloud

  • Unpack the file.
1
tar -xvf minecraft-server.tar
  • First time startup.
1
2
cd minecraft-server
java -Xmx1024M -Xms1024M -jar forge-1.15.2-31.2.22.jar nogui
  • Agree to the EULA.
1
vim eula.txt
  • Change false to true.

  • Second time startup.

1
java -Xmx1024M -Xms1024M -jar forge-1.15.2-31.2.22.jar nogui

Completion

  • Note that the client and server need to have the same version of the game and Forge, and install the same Mods.

References

YouTube - thebluecrusader