Log in

View Full Version : JJ2 Dedicated Servers - The Digiex way


Nimrod
Sep 7, 2009, 02:21 PM
A few people knew a while ago I worked on a way to make a Dedicated Box into a multiple JJ2 serving box, where many instances of JJ2 could run and be rented out / given away to different people.

After much work with BlurredD and others I got it fully working, and in the deployable stage. I hoped to bring it to JJ2'ers but at Digiex were struggling with resources, and our 3 Dedicated Boxes dont have the resources spare, therefore I am outlining the methods we used, so hopefully some fans can take it further and even produce dedicated servers.

First of all, the resources needed are (to do it this way, theres many different approaches like Linux Boxes, Virtual Machines which can be done):

A Dedicated Windows Box running any NT based (Windows Server Web 2003 is the best and cheapest just for this).
Multiple IP's (unless you want to run on different ports and force clients to have JJ2+ or a port changing program)

The best place to get these, and on the cheap is www.ovh.co.uk (theres also .fr .nl and other OVH's across europe) and pick up a cheap Kimsufi Server for around 20 euros and some extra IP's at 1 per euro (with 2 free).

First of all, you will need a copy of FireDaemon (http://www.firedaemon.com/). You can get the normal one, and use the IIS addon to allow web access, or you can get the Trinity version which costs more but has the web server built in.

You will also need a copy of ForceBlindIP (http://www.r1ch.net/stuff/forcebindip/) if your going to use JJ2 on the standard ports, with multiple servers on different IP's.

You will need an FTP server, Windows has a built in one in IIS or you could get a free one like FileZilla Server.

And of course, you will need JJ2+ as Windows Server has DEP protection built in, I worked with BlurredD and he made the latest JJ2+ work with DEP on, the stock JJ2 game will not work with DEP enabled for applications.

Here is how this all works togeather:

You create a service in FireDaemon which loads ForceBlindIP onto the network adaptor inquestion, with JJ2 launched via command line arguements. (I cant remember them perfectly, but its along the lines of):

C:\ForceBindIP 1.2.3.4 C:\Server1\jazz2+.exe -server -battle -list -minimize

(Replacing 1.2.3.4 with the network adaptor IP)

You assign rights in FireDaemon for the service to be started and stopping via the WebGUI with a username and password.

You then create an account in your FTP Server for the directory C:\Server1\ so users can upload levels or edit LevelLists or Configuration files.

Then by combining remote start / stop with FTP Access and JJ2+ Remote Ingame Admin, someone can have full access to a server, without requiring Remote Desktop permissions on the actual server. Also by running as a Windows Service (Which FireDaemon makes it) means Windows will manage it, and restart it when it crashes as well as keep it running regardless of a user logging on or off and also starting it up when Windows boots.

You can then repeat this process with additional copies of JJ2 in different folders like C:\Server2\ etc and continue.

You can also run them in different usernames so registry settings do not get mixed.

To stop CPU issues, you can assign prorities to jazz2 (i always recommend anything lower than Normal, or Windows cannot run background tasks) or if you have a multi CPU, assigning a core per jazz2 process.

I know this works, because I tested it and it worked fine, if I had the resources I'd love to host a few dedicated servers, but things are difficult at the moment.

You can now host a JJ2 Dedicated Server, using the jazz 2 executable with Plus without waiting for a dedicated server project to come along :)

DarkB
Sep 7, 2009, 11:11 PM
Then by combining remote start / stop with FTP Access and JJ2+ Remote Ingame Admin, someone can have full access to a server, without requiring Remote Desktop permissions on the actual server. Also by running as a Windows Service (Which FireDaemon makes it) means Windows will manage it, and restart it when it crashes as well as keep it running regardless of a user logging on or off and also starting it up when Windows boots.

And how I do this :-?

Foly
Sep 8, 2009, 12:06 AM
Any chance i would be able to host with a dedicate server? (Im pinging when I host it normally)

DarkB
Sep 8, 2009, 12:44 AM
I was able to run server, but its something strange in it.
Here it is:
http://i30.tinypic.com/25q84ck.jpg
I have 0 baud but I didn't get any CTO..strange.

Grytolle
Sep 22, 2011, 03:15 PM
THX NIMROD IT WORKS GREAT!!!!

Jgke
Sep 22, 2011, 10:34 PM
*cough*not a real dedicated server*cough*

Grytolle
Sep 23, 2011, 02:35 AM
if it's on 24/7 it's dedicated

djazz
Nov 29, 2012, 02:27 PM
Thread revival!

Teaser:
http://i.imgur.com/A3hnX.png

Will add simple user interfaces for editing the various setting files (plus, admin, levellist), some kind of FTP to upload files, a console where you can chat as server (might be hard, need WinAPI bindings) or as admin bot.
It automatically restarts a server if it crashes. Made for Linux (Running it on a headless Debian right now). The JJ2 windows lives in the taskbar of an empty 1x1-pixel-sized X server (no desktop). Every user have their own folder, the needed JJ2-files gets symlinked there, to allow the same JJ2 executable to run in different folders with different files.
It would be awesome if the 10-server-per-ip-maximum was removed from JJ2+.

yup.

FihuFiL
Dec 1, 2012, 09:24 AM
As a linuxfag I was dreaming about something similar! Thank you! Looking forward to release :D

Hare
Dec 1, 2012, 12:44 PM
So, let me see if I'm following correctly. This software will allow someone to set up their computer so multiple players can use it as a host for their dedicated servers? complete with user accounts and ftp access for uploading levels and tilesets?

Because if it does, that's pretty darn cool. :-)

djazz
Dec 1, 2012, 02:26 PM
So, let me see if I'm following correctly. This software will allow someone to set up their computer so multiple players can use it as a host for their dedicated servers? complete with user accounts and ftp access for uploading levels and tilesets?

Because if it does, that's pretty darn cool. :-)

Yes, that's the plan/idea.

Here's a work-in-progress screenshot of the file manager, showing warnings about missing files, and if level/tileset is TSF-only.

http://i.imgur.com/VAOmh.png

djazz
Dec 11, 2012, 01:23 PM
https://github.com/daniel-j/jj2dedicated

:Z This project is in hibernation, but please have a look at the code :H

MrAlextov
Jul 11, 2013, 05:14 AM
Thats cool project, why don't finish it?