Today, we’ll be figuring out how to easily and quickly install Tekkit server using SSH. In just a few quick steps, your server will be up and running with the latest version of Tekkit.
Note: For this tutorial, we’ll be using Ubuntu 14.04. Everything should work regardless of Linux distribution, but we take no responsibility if cosmic rays break your server in the process.
To start off this how-to, you’ll need to download a program to log into SSH with. For the sake of the article, we’ll be using PuTTY, but any SSH client will work.
Step 1: Log into your server, install needed software, and create a user for Tekkit.
We’ll be needing Java 7, a program called unzip, and a program called screen in order to get Tekkit running, so let’s install those now and get that out of the way.
sudo apt-get update sudo apt-get install openjdk-7-jre-headless unzip screen
A bunch of lines of text will pop up telling you what will be installed, and giving suggestions for what to install. We’re really just interested in pressing the “y” key so that it installs everything needed. This shouldn’t take long, you probably have time to crack your knuckles to relax.
Now we’ll make an unprivileged user. Creating a user specifically for Tekkit will prevent malicious people from exploiting it and gaining full access to your server. While not absolutely needed, it’s considered good practice to run public-facing software as an unprivileged user.
To do this, run this command as root:
useradd -s /bin/bash tekkit
… And we’ll want to give this account a strong password, so run the following and it’ll ask you to type in a password.
Note: It won’t display what you type, for security reasons, so write the password down somewhere.
Step 2: Download Tekkit and unzip it.
You’ll need to get a link to the Tekkit server file. Go here, scroll down to the bottom, right click on the link to the right of ‘Server Owners’ and click the URL of the link.
Move back over to PuTTY and we’ll switch to the “tekkit” user that we made earlier, and then download and set up Tekkit with the link we just copied.
su tekkit cd ~
Those commands will switch us to the user we made earlier, and then move us to the “home” directory, located at
wget link-you-copied unzip Tekkit*.zip
(Replace “link-you-copied” with the actual link that you copied)
That will download and unzip the server zip file.
chmod 744 launch.sh
And that will give you permission to execute launch.sh, which is the script that will start the server up for you.
Step 3: Modify the startup script to run using Screen
Alright, let’s switch back to root for the rest of this tutorial. If you used “su tekkit” earlier, you can just type “exit”. If you used your own method, you can probably figure out how to switch back to root.
Now, let’s get cracking. Move back to the tekkit home directory and open “launch.sh” with “nano”, which is pre-installed on Ubuntu 14.04 like so:
cd /home/tekkit/ nano launch.sh
Use your arrow keys to move the cursor (green blinking square) and modify what you see from something like this:
#!/bin/sh java -Xmx3G -Xms2G -jar Tekkit.jar nogui
To something like this:
#!/bin/sh /usr/bin/screen -dmS tekkit java -Xmx3G -Xms2G -jar Tekkit.jar nogui
Make sure you change the -Xmx and -Xms flags to accommodate for your server resources. -Xmx3G means you’re giving it a heap size of 3GB of RAM. You can change G to M for MB like so: -Xmx512M
If you had a server with 1GB of RAM and you were only wanting to run a Minecraft server on it we’d recommend changing the values to something like this:
#!/bin/sh /usr/bin/screen -dmS tekkit java -Xmx800M -Xms500M -jar Tekkit.jar nogui
Then hold down “control” and press “x”, press “y” and then “enter” to save.
Now if you want to check on your server while it’s running, all you have to do is type “screen -r tekkit” and it will load up the console.
Step 4: Make the server run the startup script on boot.
To make the startup script on boot, we’ll need to add it to the tekkit user’s crontab.
crontab -e -u tekkit
That command will open up an editor to edit the user’s crontab with. If it’s your first time trying to edit the crontab, it may ask you which text editor you want to use. Since we’ve used nano already, select nano if it asks.
Now you’ll need to hold down the bottom arrow key until we hit the bottom of the file, and paste the following:
@reboot sh ~/launch.sh
Once you’ve pasted it, hit enter to add a blank line after it, and then save and exit using the same procedure from before (control+x, y, enter). It should look like this:
Tekkit will now launch when your server is rebooted. If Tekkit closes for some reason and you need to start it back up manually, log in via SSH as the tekkit user and run “sh launch.sh”. To exit out of the screen (but keep it running), hold down “control”, press and release “a”, and press and release “d”. This will exit out of “screen” without killing it.
You can re-enter the screen by logging into SSH as the tekkit user and typing “screen -r tekkit”.
You’re done! You’ve followed all the steps, and now Tekkit is set up on your server. You can configure it to your liking, add yourself as an op, and everything else. Have fun with it!
If you want tips to help populate your brand-new Tekkit server, check out “Form a Successful Server in Four Simple Steps“.