Git Product home page Git Product logo

forgemod-docker's Introduction

Forgemod/CurseForge Docker - Builder Scripts

This repo contains a set of scripts that can be used to install Forgemod/CurseForge servers as Docker containers. Users can interact with the Minecraft servers using Twitch modpacks for Minecraft. These containers should not be exposed to the internet without additional iptable rules that restrict access to a set of trusted IP addresses. This build is ideal for home labs and/or local LANs.

These instructions will use Forgemod|CurseForge interchangably. Minecraft Forge is the project that builds Mincraft so that it can be modded. CurseForge is a set of modpacks that are built using the Minecraft Forge server.

Whats Included:

  • Script to install the required dependencies for Docker, Gvisor, and Git
  • Installation of Gvisor runsc runtime - Application Kernel for Containers
  • Installation of Docker
  • Installation of Mcrcon for managing running servers
  • Start scripts for select modservers on Forgemod | CurseForge
  • Default INPUT iptable rules that only allow 22/tcp for SSH. Note: Exposed Minecraft ports will still be open due to PREROUTING rules that are maintained by Docker when a container is running.

Twitch modpacks

For instructions on getting started with Minecraft on Twitch, reference How to Play Minecraft with Twitch App

Forgemod|CurseForge Server Setup

This setup assumes a fresh install of Ubuntu 20.04. The following actions will clone this repo and install all the requited software and dependencies to get started.

# Clone this repo
git clone https://github.com/af001/forgemod-docker.git
cd forgemod-docker/docker-ubuntu-setup
chmod 755 setup-ubuntu.sh
sudo sh setup-ubuntu.sh

Forgemod|CurseForge Docker Creation

The default rcmon password is changemepassword. If you wish to change or disable rcmon, it is recommended to make the changes prior to running one of the start scripts. In the following example, the CurseForge server that is intended to be started is Valhelsiaa. On an internal LAN, the risk is minimal since the Docker is running Alpine with Gvisor.

# Valhelsia
cd forgemod-docker/valhelsia-forge
vim server.properties

# Enigmatica
cd forgemod-docker/enigmatica-forge
vim server.properties

# To disable rcon
:%s/enable-rcon=true/enable-rcon=false/g

# To change the rcon password
:%s/rcon.password=changemepassword/rcon.password=<new_password>/g

To build a container with one of the provided CurseForge modded servers, the following helper scripts can be used. This should be executed after modifying server.properties, although modifying server.properties is not required.

# Build a Docker container and run it to expose a port.
cd forgemod-docker/docker-ubuntu-setup

# Start Valhelsia Docker
sudo sh start-valhelsia.sh

# Start Enigmatica Docker
sudo sh start-enigmatica.sh

Multiplay Connect

After using one of the start scripts, the port to the Minecraft server will be displayed to the screen. For instructions on connecting to the server, follow the instructions for multiplayer setup and replace the the server:port with the port provided by the script and your server's IP address.

Mcrcon Connection

By default, Mcrcon is installed on the server hosting Docker containes. This could also be compiled on a remote host for remote management. This tool allows admins to sends rcon commands to a Minecraft server. The Rcon port will be displayed at the end of the startup scrip after displaying the server's Minecraft port.

# Connect to a Minecraft server on the Ubuntu machine hosting docker containers. This should be modified if connecting from a remote machine on the same LAN. 
sudo mcrcon -H 127.0.0.1 -P <rcon_port> -p chamgemepassword

Current Forge Server Scripts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.