I have a little time to kill this holiday weekend and wanted to try something fun (at least before it gets warm enough to go outside for the rest of the day). Some friends and I have been playing Tekkit Lite off and on, and being the resident IT geek, I’m hosting the server.
I’m going to set up my own Tekkit Lite server, using the 1:1500 Earth Map, and running as a service on my machine.
Before You Begin
- Lock down your machine. This is important. If you’re hosting on your own server, it’s going to have to involve some port forwarding and letting the internet into your machine. Lock it down with appropriate firewall knowledge. If you don’t do this, then you’re going to have a terrible time at some point.
- Get a FreeDNS account at afraid.org. Your machine has an IP that might change, and if you’re not paying for a domain name, getting one of their free subdomains is an easy way to allow access to your machine without having to give our your IP every time it changes.
- Do all of the proper port forwarding. I’m not going to explain that here, as it’s different for every ISP/router. If you don’t know how to port forward and port trigger, look it up elsewhere first (unless you want to just play by yourself. Which is a little sad.)
Obtaining the Software
- The Tekkit Lite Server Files. Head to the link and click “Download latest Tekkit Lite Server”.
- The 1:500 Earth Map files. This is a huge download, so you may want to kick it off early.
- YAJSW (Yet Another Java Service Wrapper). Download the code from SourceForge. It’s a handy little utility to configure your Java Install as a Windows Service.
- Extract the LetLente! Earth maps. This will take a while.
- Extract the Tekkit Lite Server Files. Use 7-Zip or Windows to Extract the Zip files.
- Extract the yajsw files.
- Rename the Tekkit Lite folder to the name of your server (I called mine
- In the root of the Tekkit Lite folder, there is a
server.propertiesfile. Configure it according to however you’d like the world to be. See this wiki page as a starting guide.
- I suggest at least setting your player handle as an op in the
ops.txtfile as well.
- If you have multiple servers running, be sure to set the
- In your server folder, create a folder called
- Copy the Earth map files into that
- Create a folder called
- Copy the yajsw files into the
servicefolder. (I recommend copying the files so that you can go
service > yajsw > [files]. Remove the second layer of ‘yajsw’ folder that gets extracted.)
launch.batto start up the server. Make sure there aren’t any fatal errors.
- Open your Technic Launcher and try to connect to
localhost:25565(the default port). You should be able to see the world and connect to it.
- Once you can connect to the world, exit it but don’t shut down the launch.bat window.
The Server Becomes the Service
Now that we have a working installation, we want to make this a legitimate service that runs all the time in the background.
- Copy your server files to “Program Files”. I do this because it’s a really good way to ensure that you don’t delete them when you clear out your downloads folder.
Find the PID of your server. I recommend using a tool like procexp to view all your processes. You need to find the
java.exeprocess that is running the Tekkit Lite server. It will likely be something like
java -Xmx3G -Xms2G -jar TekkitLite.jar nogui. The PID for this will be a number (procexp is helpful and lists it for you).
Generate your wrapper.conf file. Open a command prompt and navigate to the
your minecraft server\service\yajsw\bat). Run
genConfig [pid], where you replace
[pid]with the process ID.
- e.g. if the PID you found was 1234, you’d run “genConfig 1234”.
- This will create the wrapper.conf file that you need.
Edit your generated wrapper.conf file
In the yajsw folder, find the
confdirectory and edit the
wrapper.conffile. You need to make the following changes:
Memory Levels: At the end of the file, you’ll see
-Xmx3Gor some variant.
-Xmxis the maximum memory.
-Xmsis the minimum memory. the 3G, 2G etc. represent x GB of memory (hence the G). Adjust these to your desired values.
No GUI: Ensure that the
wrapper.app.parameter.1 = noguiis present. This is what will stop a window from needing to show up when the service is running.
Working Directory: Make sure that
wrapper.working.diris set to the directory of your server (it normally is by default since the generator does it for you.)
- For example, with my server called
MinecraftServer_EarthMap, the line reads
- Service Name: This is what will appear on your “Services” screen.
wrapper.ntservice.name=yajswto the name of your server. e.g.
Auto Start: If you want to set the service to auto start (and I did), un-comment the
wrapper.netservice.starttypeline, which will set it to auto-start.
- To un-comment, just remove the pound (
#) sign and space in front of the line.
Finishing the Service Installation
- Open a new command prompt.
- Navigate to your
service\yajsw\batfolder and run
installService.bat. It should complete without errors.
Starting it up!
- Open the services window. You can do this via control panel or typing
services.mscinto your start window.
- Find your service name.
- Right-click the service and select
- Open your client and connect.
If you try this, let me know how it works out for you in the comments. Happy gaming!