I’ve been playing with Minecraft for a while, playing with the kids on a multiplayer server I’ve set up on our LAN, and when you do that, you soon find out that one world isn’t enough. It’s so much fun to experiment with various world seeds you can find on the Internet, survival v.s. creative, different versions with different mods, the possibilities are endless. At the same time you really want to create multiplayer worlds on a server, so that you can all play and create together on the same world.
So, how do you set up multiple Minecraft worlds on a single server?
As obvious as this question is, the answer is very hard to find on the net. People recommend CraftBukkit – an alternative Minecraft server which should be able to do this with the help of some plugins. Unfortunately CraftBukkit hasn’t been available for download since September of 2014 due to a DMCA take-down request.
In any case, when setting up my first Minecraft server on my LAN (on a CentOS 5 Linux server) I decided that I liked the vanilla server that can be downloaded from the Mojang site the best. It is always up to date with the main Minecraft client releases and it’s very simple to setup, requiring only the single jar file, a single directory and a one-line start-up script.
So, would it be possible to run multiple vanilla server / world instances on the same server machine? Apparently not, because nobody describes it…
Well, it turns out that it’s actually pretty simple to do. The key is the server.properties file. It contains (amongst others) the following lines:
server-port=25565 server-ip= motd=Super Survival Underground Lair
Give each world instance that you want to run its own directory with its own server.properties.
In there make sure that each instance has a unique value of server-port. (If your server has multiple IP addresses you could also play around with server-ip, that’s more of an advanced setup I won’t go into here).
Also give each instance a descriptive motd, so you’ll be able to keep them apart. Run each instance (I use separate screen sessions, you could also use nohup or other means of putting the servers in the background). You can verify that they are running with netstat:
netstat -anp|grep -w LISTEN|grep java
This should show the two (or more) java processes you’ve just started, listening on the ports configured in the server.properties files. Make sure that your server allows connections to these ports from the network. This could mean that you have to update your firewall configuration.
The last step is to configure the clients – on each PC / laptop where you want to play Minecraft start it up, select multiplayer, add server, give the server a descriptive name and then enter the host and port number in the following manner: host:portnumber. Select done, and your client should have added the new server to the list. (Each item in the server list consists of two lines – the descriptive name you’ve just set in the client and below that the motd as set in the server.properties file). Repeat this for each instance you’ve set up on the server. From now on players can connect to each of these worlds with a simple double click.
Obviously there is a limit to how many instances you can run – on my CentOS server each takes about 800 MB of resident RAM, and if you have a large number of concurrent active players in each world that number could rise a lot. Still, on a server with 4 GB RAM you should easily be able to run 4 or 5 servers.
Have fun with multiplayer Minecraft and experimenting with multiple worlds!