Help/Creating a LOTR server

Pre-requisites

 * 1) Motivations: there are already a lot of servers. Why do you want to add another one?
 * 2) Differentiation: what differences will your server brings to players? What do you offer?
 * 3) Responsibility: players will probably invest a lot of time and efforts playing and building on your server. If you resign after a few weeks/months, you'll waste those. Be sure you can commit enough time on a long enough period. Plan your exit (succession plan, files availability for download, schematics of the builds, etc.)
 * 4) Time: even if you're knowledgeable enough to automate some of the work, you'll need to devote time to administration and technical matters. And it won't be playing time...
 * 5) Money: apart from your time, hosting will cost you real money, even if you do it at home. Make a budget estimate...
 * 6) Technical knowledge: just like with a Web server, almost everyone can start a Minecraft server. But to do it properly, fix issues, provide decent performance and avoid being hacked, you'll need some technical knowledge (operating system & network, security, scripting, a bit of Java)
 * 7) Adequate hardware and network bandwidth: if you don't want your players to complain too much about lags (they will anyway!), be sure to have a strong enough computer, with a very good connection to the Internet (this rules out most home installations... Plus you don't want to set your home on fire, don't you?)

Hosting
There are a lot of Minecraft hosters out there. If you use their services, they might provide a more or less advanced server installation as part of their commercial offering.

For what follows, we will assume that you perform your own installation on a computer that you own or rent, whether a dedicated one or a virtual private server.

Home hosting
Well, if you haven't been scared by our previous warnings about home hosting, or just want to make a small scale test, here are some networking issues to ponder (warning: that will be more complicated!).

Will you have enough network bandwidth?

With the ADSL connections that many people are using nowadays, you download quickly, but upload more slowly. Bad luck, because for a server you just want the opposite. You receive few data and send many. This will quickly become a bottleneck to your server performance...

Does your home have a static public IP address or a dynamic one?

Having a static one is best, as you'll just need to declare in your Internet device's administration interface that you want to forward network packets it receives to a computer on your internal network with a static internal IP or constant MAC address (that's Network Address Translation - NAT), whether using the same network port or not (this last case being Port Address Translation - PAT).

If your home has a dynamic public IP address, it will get even more complicated. You'll have to provide your users with an internet name instead of an IP address, and find some way to change the IP address it redirects to, every time your home IP address changes. You can do that, for example, with services like DynDNS.

Unix instructions
You can use any variant of Linux or BSD Unix-like operating systems.

But for a server usage, it's preferable to use them only for this purpose and "headless" (without Graphical User Interface). Else the Windows/MAC comments in the last section apply just the same...

As a rule of thumb, aim for a "Juice" (Just enough Operating System - JeOS) approach: only install and allow to run things (packages & processes) that are expressly required for the usage you want. The BSD operating systems are perfect for that, as they come with no packages installed in the initial setup and lean running processes. The author of this page peculiarly recommends the FreeBSD operating system, which he has been using as a hosting platform since 1996. It's reliable, powerful and secure.

Installation, configuration, optimisation and security hardening of operating systems are beyond the scope of this Wiki page (see the technical knowledge pre-requisite above).

.

Software pre-requisites
As Minecraft, Forge and Bukkit are Java applications rather than operating systems & architecture dependent binary applications, you'll need a special software to run them: a Java Runtime Environment (JRE).

The use of the version included in OpenJDK is recommended. Check your package management system for instructions on how to install it on your favourite OS.

For example, on the FreeBSD OS, you just need to enter the following command (as super user - root): root# Also, be sure to regularly update your JRE to the last available version, as there are frequent security issues with old Java versions...

.

Installing the server
.
 * 1) Create a "minecraft" user and group on the operating system (not a Mojang account!). You'll use this ID to run your Minecraft server and own most of its game related files. In case of security issue (Minecraft 1.7.10 is known to have many security holes), you won't make it too easy for an attacker to achieve a direct and complete takeover of your server...
 * 2) Create a directory to put all your server files, usually under the user filesystem (which allows for special mounting options for more security). If you have SSD drives, be sure to use them as a first choice as they are way quicker than classical hard drives. You'll probably need around 50 to 150 GB of available disk space (after 6 months and 450 different players, my own server used around 70 GB). And more if you want to keep online backups.
 * 3) Download the Recommended Forge version for Minecraft 1.7.10 (use a command line HTTP client such as "fetch", "curl" or "wget". Or transfer it from another machine). Avoid the Latest Forge versions as there are sometimes regressions in them, unless you want a fix very badly (check the Forge changelog). You'll find the download link under the "Installer" icon, after skipping the ad screen.
 * 4) Install Forge (see the command line below). You can delete the installer after that.
 * 5) Make some startup scripts. The examples provided below are simple ones. More interesting settings are possible with additional software such as GNU Screen to keep the ability to pass commands to the Minecraft server console from the operating system command line (check the Forge + Bukkit LOTR server below for examples). It's also usual to provide an automatic start/stop script, but these are dependent upon the OS you use (there are multiple examples on the Minecraft wiki under Server setup). Notice the minimum and maximum amount of memory allowed to the server (in bold). You need, of course, to adapt these figures to your hardware characteristics... Remember that this memory is only the one used by the server, not for the server code itself or the Java runtime environment. If you use the "top" command, check the "SIZE" column to know the sum of the three, and the "mem" line to see if it can fit in what's available, without using swap space.
 * 6) Launch your startup script for the first time. It will immediately fail because Mojang wants you to agree to their EULA (End User Licence Agreement) first. Among the noticeable things, a blank server.properties configuration file and an empty mods directory are created...
 * 7) Agree to the Mojang EULA by changing the eula=false line in eula.txt to eula=true
 * 8) Download and install the LOTR mod in the mods directory. If you can't find the download URL on MediaFire (not so easy!), transfer the file from another machine.
 * 9) Launch the startup script for the second time. It will immediately return you to the command line prompt as your server is running "in the background". It will also create all the missing configuration files. Wait till you see a line saying "Successfully replaced LOTR world info in MiddleEarth" at the end of the nohup.out file, then stop the server.
 * 10) Configure the server (see next section)

For example, on the FreeBSD system, this translates to the following commands (each one on a single line, without the root# prefix): root# pw groupadd minecraft

root# pw useradd minecraft -w no -d /home/minecraft -g minecraft -c "Minecraft server owner"

root# mkdir /home/minecraft

root# cd /home/minecraft

root

root# java -jar forge-1.7.10-10.13.4.1448-1.7.10-installer.jar --installServer

root# rm forge-1.7.10-10.13.4.1448-1.7.10-installer*

root# echo 'su -m minecraft -c "./forge.sh"' > start.sh

root# echo 'nohup java -Xms2G -Xmx8G -jar forge.jar nogui &' > forge.sh

root# echo 'kill -15 `ps -ax | grep forge.jar | grep -v grep | sed "s/ .*//"`' > stop.sh

root# ln forge-1.7.10-10.13.4.1448-1.7.10-universal.jar forge.jar

root# chmod a+x *.sh

root# chown -R minecraft:minecraft /home/minecraft

root# ./start.sh

root# sed "s/eula=false/eula=true/" eula.txt > $$.tmp ; mv $$.tmp eula.txt

root# cd mods

root# fetch http://download2074.mediafire.com/dow6uwny9bkg/55hi865d4e83b5h/%5B1.7.10%5D+The+Lord+of+the+Rings+Mod+B24.4.jar -o The_Lord_of_the_Rings_Mod_B24.4.jar

root# cd ..

root# ./start.sh

root# sleep 20 ; tail nohup.out

root# ./stop.sh.

Configuring the server
All the files under the config directory are generally OK for everyone's use, the only possible exception being the LOTR mod configuration file that some of you may want to tweak (you will at least want to review it).

What really needs editing is the Minecraft configuration file: server.properties

Please use the Minecraft wiki link above to set generic gameplay options (or this old one for 1.7.x Minecraft versions).

The technical things relevant for a server are: The last thing you might want to do before restarting your server, would be to provide a server icon (displayed in the server list of player's Minecraft clients). To do so, just put a PNG file (typically of 64x64 pixels size) named server-icon.png in your server directory.

.

World setup
Before opening your server and advertising it, you might want to build one or more spawn points for your players, and add some major builds. This is of course beyond the score of this wiki page.

.

Client mods
With all the good mods available, you might be tempted to add things beyond the LOTR mod. Keep in mind that players lacking any of your client mods won't be able to connect to your server! Also keep in mind that many players (quite often those using mod packs) don't have the knowledge to add additional mods to their Minecraft client. So this decision could have an impact on your potential number of users.

That said, you usually just have to add the JAR file of these other mods to your mods subdirectory, review or modify their configuration file, then restart your server and verify in the logs/fml-server-latest.log file that everything went well.

The LOTR mod is a huge modification of Minecraft. Be extra careful when adding other big mods as there will surely be side effects or even head start crashes... To stay on the safe side, check the Compatibility with other mods wiki page first!

.

Server only mods
Apart from the FastCraft optimization mod, than most people know, and which is both a client-only and server-only mod, there are a handful of server only mods that you can use on your 1.7.10 servers.

Among these, we can mention:
 * ForgeEssentials : apparently aims to be a Forge replacement for popular Bukkit plugins such as Essentials, PermissionsEx, WorldGuard and others.

.

Introduction to a complicated story
Bukkit is a widely sprayed, alternative way to extend Minecraft, beside Forge. Bukkit extensions are called plugins and run only on the server side, thus allowing players to use a vanilla Minecraft client. Compared with mods, they also tend to get along between themselves a lot better. There are more than 15 000 plugins available and the majority of Minecraft servers are using them.

If Bukkit is an alternative to Forge and the LOTR mod a Forge extension, how can we combine the two?

The answer is to use a special software called Cauldron (formerly MCPC+). Cauldron is a combination of Minecraft Forge and the Spigot project to allow you to run a Forge server with plugins installed. While Spigot is a high performance Minecraft server, which in itself makes another excellent reason to consider it! (see the article Improving your Minecraft server’s performance for some examples of Spigot optimizations).

Just when you thought you reached the Nirvana of Minecraft gaming, it happens that the legal status of Bukkit and derivatives, including Spigot and Cauldron, is currently in turmoil, which has caused the end of their updates and downloads.

Fortunately, a Russian developer called Prototik has stepped in, and offers a Forge up-to-date alternative named KCauldron (available for download on his repository or on the excellent Yive's Mirror).

The last issue is that Mevans, the LOTR mod author, does not recommend using Cauldron to run his software, as you can read in the FAQ.

However, so far, the LOTR mod does indeed work near perfectly under (K)Cauldron, this unsupported combination being used in almost all the existing LOTR modded servers (with the notable exception of the official one).

.

Software pre-requisites
For some reason, the classical syntax to launch a process in the "background" and detach it from the terminal ("nohup command &") won't work with Bukkit and derivatives such as (K)Cauldron.

In order to launch the Minecraft server and then disconnect from the computer, we will have to install an additional software called terminal multiplexer, the best known ones being GNU Screen and Tmux.

Again, check your package management system for instructions on how to install them on your favourite OS.

For FreeBSD, you would just need to enter the following command (change screen by tmux, if you want that one): root# pkg install sysutils/screen These commands (also usable with Forge servers) bring an additional benefit: the ability to communicate with the Minecraft console from the command line (to enter Minecraft commands or talk in the chat).

On a more trivial side, you'll also need to install an Unzip package to uncompress the KCauldron distribution: root# pkg install archivers/unzip .

Installing the server
.
 * 1) Create a "minecraft" user and group (same as above).
 * 2) Create a directory to put all your server files (same as above).
 * 3) Download the latest KCauldron version for the Recommended Forge version for Minecraft 1.7.10 (use a command line HTTP client such as "fetch", "curl" or "wget". Or transfer it from another machine).
 * 4) Install KCauldron (see the commands lines below).
 * 5) Make some startup scripts. The examples provided below use the GNU Screen utility.
 * 6) Launch your startup script for the first time, It will immediately return you to the command line prompt as your server is running "in the background". It will also create all the missing configuration files and an empty mods directory . Wait till you see a line saying "Done (x.yyys)!  For help, type "help" or "?"" at the end of the logs/latest.log file, then stop the server.
 * 7) Download and install the LOTR mod in the mods directory (same as above).
 * 8) Launch the startup script for the second time (same as above).
 * 9) Agree to the Mojang EULA (End User Licence Agreement) by creating a eula.txt file with eula=true (for compliance with Mojang requirements and good karma).
 * 10) Configure the server (see next section).

For example, on the FreeBSD system, this translates to the following commands (each one on a single line, without the root# prefix): root# pw groupadd minecraft

root# pw useradd minecraft -w no -d /home/minecraft -g minecraft -c "Minecraft server owner"

root# mkdir /home/minecraft

root# cd /home/minecraft

root# fetch http://tcpr.ca/files/kcauldron/KCauldron-1.7.10-1481.148.zip

root# unzip KCauldron-1.7.10-1481.148.zip

root# rm KCauldron-1.7.10-1481.148.zip

root# ln KCauldron-1.7.10-1481.148-server.jar kcauldron.jar

root# mkdir setuid

root#  echo  ' su  -m minecraft -c "setuid/start.sh"' > start.sh

root# cat > setuid/start.sh << EOF "#!/bin/sh""unset LANG""unset LC_ALL""unset MM_CHARSET""cd /home/minecraft""screen -S KCauldron -t MyWorld -dm setuid/startkcauldron""EOF" root# cat > setuid/startkcauldron << EOF "#!/bin/sh""unset LANG""unset LC_ALL""unset MM_CHARSET""java -Xms2G -Xmx8G  -jar kcauldron.jar nogui""EOF" root#  echo  ' su  -m minecraft -c "setuid/stop"' > stop

root# cat > setuid/stop << EOF "#!/bin/sh""screen -S KCauldron -p MyWorld -X stuff 'save-all'\`printf \\\\\\r\`""screen -S KCauldron -p MyWorld -X stuff 'stop'\`printf \\\\\\r\`""EOF" root#  echo  ' su  -m minecraft -c "setuid/say"' > say

root# cat > setuid/say << EOF "#!/bin/sh""screen -S KCauldron -p MyWorld -X stuff 'say \$*'\`printf \\\\\\r\`""EOF" root# chmod a+x start.sh stop say setuid/*

root# chown -R minecraft:minecraft /home/minecraft

root# ./start.sh

root# sleep 20 ; tail logs/latest.log

root# ./stop

root# cd mods

root# fetch http://harda.tournier.org/files/The_Lord_of_the_Rings_Mod_B24.4.jar

root# cd ..

root# ./start.sh

root# sleep 20 ; tail logs/latest.log

root# ./stop

root# cat > eula.txt << EOF "#By creating the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).""#`date`""eula=true""EOF".

Some comments about these command lines: .
 * The GNU Screen utility is touchy about the user ID. Between the first and subsequent commands used on a screen, it has to be the same UID.
 * Minecraft takes into account the languages environment variables. For example, if we use values suitable for French at server launch, the error messages displayed in game would be in that language too. That's why we unset them before launching the server.
 * We could have used a stop command similar to the one provided for Forge (just replacing forge.jar by kcauldron.jar), but now that we can "talk" to the Minecraft console it was more interesting to use the save-all and stop commands (the result is the same).
 * The say command is just an example to communicate with the Minecraft players from the Unix command line. The messages sent as parameters will be prefixed in the chat with a "[Server]" mention.
 * You can create additional commands but notice you don't have to use the slash prefix for them.

Configuring the server
All the things described in the Forge server configuration section apply just the same for (K)Cauldron.

But there are new configuration files to check: bukkit.yml, spigot.yml, cauldron.yml and kcauldron.yml.

The remaining ones, commands.yml, help.yml, permissions.yml and tileentities.yml, are either OK or superseded by very common plugins that you will certainly use, such as Essentials or PermissionsEx, so you don't have to mind about them for the moment.

Here are the settings that you should consider:

.

Installing and configuring plugins
Under construction...

.

World setup
There are no differences than with a Forge install. See above.

Windows/MAC comments
Operating Systems choices have almost the same potential for bickering as religious matters...

These operating systems are not recommended (by this page author) as they devote a lot of your preciousss server resources to the interation with the console user, need a lot of administration on their own (well at least for Windows) and their complexity creates additional security issues (remember your server will be on the Internet? You certainly don't want to serve as a relay to attack others or provide wide access to your home computers!).

On the other hand, as Mac OS X and FreeBSD are closely related, especially at the "user land" utilities level (with the notable exception of the packaging system), the command lines provided here should be relatively close to work out of the box on a modern Mac.