Git Product home page Git Product logo

mcsrvod's Introduction

mcsrvod - Minecraft Server on Demand

GitHub Release Docker Cloud Build Status

What is this?

This is your ultimate docker container for running minecraft 1.7.10+ in any forms available, not wasting your resources.

tl;dr

  1. Check your desired server software is compatible with 1.7.10+
  2. Install docker on your host: (Ref)
  3. Dont forget to accept the eula and configure everything, including the memory limit!
  4. The port of your server software must listen on port 25565, this is the default.
  5. Copy paste the sample docker-compose file

How does it work?

Mount your server folder unter /srv/mcsrvod/ and rename your jar file to server.jar.

The container will start the attached jar file when an connection to port 3000 is etablished. This is the public port for minecraft, you can change the outside mapping to whatever you like.

Known limitations

  • This docker image is only suitable for minecraft 1.7.10+
  • The log is not directly visible in docker logs, it must be read from the according file, due to independence of the server software

Configuration

Timeout to shutdown server after idle

You can specify the interval in seconds the server should shutdown than no one is online. To do so specify the environment variable KILL_INTERVAL

Customize start arguments

You can customize the jvm start arguments via an envrionment variable called JAVA_OPTS. Same goes for your server arguments, to specify them simply set the env for SERVER_OPTS

Troubleshooting

Server is not running after first launch

Please check if the eula.txt is created and its agreement is set, this must be done by yourself.

Server is not responding on connection immediately

The server may need some time to completely start, till that you will see an long running poll. For normal installations this is normally not that long, depending on your machine power. For modpacks this may take some time.

Ready-To-Use docker-compose File

version: '2.4'
services:
  hobbyMinecraftServer:
    image: timoreymann/mcsrvod:latest
    restart: always
    ports:
     # map to default port
     - 25565:3000 
    environment:
    # Set some max memory args
     - JAVA_OPTS=-Xms256M -Xmx1128M -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
     # we dont want a console in there
     - SERVER_OPTS=nogui --noconsole
     - KILL_INTERVAL=900
    volumes:
    # Mount the folder with the server.jar and stuff
     - ./minecraft:/srv/mcsrvod
     # we dont want to waste our servers resources ;)
    mem_limit: 1200M

mcsrvod's People

Contributors

timo-reymann avatar

Watchers

 avatar

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.