Jump to content

Home server multiple instances


Kamenzee

Recommended Posts

Hey, guys!

 

Thanks for taking the time to read my post!

 

First off, I'm going to go ahead and say I'm an absolute novice with Linux.  I've had a friend help me with most of it and the knowledge that I've gained is limited to basic commands, pathing, and shell scripts.  So, forgive me if I ask for some elaboration on a few things.

 

I've read that it is possible to have multiple instances of the game running, but I've yet to read anywhere that tells you how or any steps to follow.  Is it as simple as adding a new user and following the standard dedicated host setup?  Currently, I just have the first game up with no manager service.

 

Thanks!

 

- Kamenzee

Link to comment
Share on other sites

If you don't need more than one server at the same time and have enough disk space, you could just create a few new users, copy your working instance of 7D2D into all the other home dirs (including .local/share/7DaysToDie/), then adjust the other instances to your liking. All the servers will be on the same port of the machine so only one can be running at the same time.

 

If you need them to run concurrently, you have to edit the port numbers (main port, telnet port, etc.) in all the serverconfig.xml's to not conflict with each other. And because standard 7D2D uses not only 26900 as the main port but "secretly" 26901-26903 as well you should NOT use consecutive numbers for main ports but at least add 4 to get the next number or use totally different random port numbers.

 

This is probably the easiest way to get more servers and it has the advantage that you can keep some of them at old alpha versions and update others, they are completely separate.

 

It probably would still be a good idea to keep that friend around when you do the copying. He probably will remind you that after copying stuff from one home directory to another you have to change the owner of the files too (Use something like "sudo chown -R newuser /home/newuser/<7daysdirectory> ; sudo chown -R newuser /home/newuser/.local/share/7DaysToDie ").

I would also suggest to test the new instances immediately after copying (they should all work identical) before you make changes to their setup. If you later get into problems you know it wasn't the copying that is at fault.

 

 

Link to comment
Share on other sites

Thanks for the response, @meganoth!

 

I do need them to run consecutively, one is for my friends and I, a foul mouthed group of people; the second is for my siblings and I and they're a little younger.

 

So, to paraphrase what you said, basically copy the files over to another user, edit the ports and configuration, make sure the new user is set to own the files, and to run that instance, I'm assuming I will need to do it under that user's profile? 

Link to comment
Share on other sites

Yes. It is sort of the easiest solution because it separates the different instances perfectly, their settings, their save game locations.

 

If they were in one account starting them would be slightly easier, but then you have to make sure they don't get into each others way. Which isn't all that hard if they don't need to run at the same time, just make sure you always use unique names for the worlds and seeds you use.

But it can bite you in unexpected ways. for example if they share the same serveradmin.xml. That isn't a problem at all, except if you have different versions of the game installed and those versions have differences in the syntax of that file.

 

But it isn't difficult to create scripts that change into the right account before starting the game, so that disadvantage isn't really one. You could even start a server automatically when you log into such an acount.

 

Also the separation makes sure you don't kill both servers if you make a mistake.

 

Link to comment
Share on other sites

You are the absolute BOMB!

 

I got it set up and both instances are currently running.  The thing that took me the longest was getting a bash script to launch the game, though that's just for future laziness.

 

Thanks again for your help!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...