Skip to content

An easily deployable Minecraft server template for Replit.

License

Notifications You must be signed in to change notification settings

etcherfx/MCServerTemplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCServerTemplate

An easily deployable Minecraft server template.

CodeFactor License GitHub issues
GitHub Release

Links

Projects Used

Deployment

Method 1 - Deploy from Github:

Run on Replit

  • Open the Run on replit button in a new tab and press Import from Github

Method 2 - Manual Cloning:

  • Create a new Bash repl

  • Type the following command into the shell:

    git clone https://github.com/etcherfx/MCServerTemplate.git && shopt -s dotglob && mv MCServerTemplate/* MCServerTemplate/../ && rm -rf MCServerTemplate main.sh
    

Setting Java Versions

  • In the files section on replit, click the three dots and hit Show hidden files

    Sometimes, there might only be a Hide hidden files option. In that case, you already have hidden files shown.

  • Navigate to the replit.nix file and click on it to open it

  • Choose the Java version you want to use from below and replace the default Java version with the one you want to use:

    The default Java version is pkgs.openjdk8-bootstrap

    Minecraft Version Java Version
    1.21+ pkgs.jdk21_headless
    1.17 - 1.20 pkgs.openjdk17-bootstrap
    1.16- pkgs.openjdk8-bootstrap

Creating Enviornment Variables

  • Click on the Secrets button in the tools section on the far left side of your screen

  • Click on the New secret button

  • Create a new secret with the key named ngrok_token and the value as your authtoken

    Note: You need to create an ngrok account to get an authtoken

  • Do the same for the variables in the list below:

    Key Value
    SERVER The server software in all lowercase. e.g purpur
    VERSION Version of Minecraft your server is running on. e.g 1.19.4
    BUILD The build number of your server software. Only use this if you have paper as the server software
  • List of server software supported:

    • Purpur (1.16.1 and above)
    • Paper (1.8.8 and above)
    • Magma (1.12.2, 1.16.5, 1.19.3, 1.20.1)
  • Here are some recommended build numbers for paper:

    Minecraft Version Build #
    1.20.6 147
    1.19.4 550
    1.18.2 388
    1.17.1 411
    1.16.5 794
    1.15.2 393
    1.14.4 245
    1.13.2 657
    1.12.2 1620
    1.11.2 1106
    1.10.2 918
    1.9.4 775
    1.8.8 445

    To get a list of all build numbers for paper, visit here

Running the Server

  • Run the repl and follow the instructions on the console
  • Once the console displays Done! For help, type "help", navigate to status.log and copy the IP address on line 7 and enter it inside of Minecraft. The address should be something like tcp://9.tcp.eu.ngrok.io:46797 and you want to copy IP part, which is the entire address EXCEPT the tcp:// part.

Server Optimization

  • Follow this server optimization guide