David Posted January 10, 2022 Share Posted January 10, 2022 Been asking around on discord and nobody answers so I'll ask here: I bought a vps to host a zomboid server for some friends and wanted to know if there was a way of hosting two servers on the same vps rather than just one. Link to comment Share on other sites More sharing options...
Boqa Posted January 10, 2022 Share Posted January 10, 2022 If you are going to host 2 or more servers on 1 ip address, you need to use port offset. Let's say the first server is running on the standard port 16261+32 players (for example) then the second server should use 16294 and higher. It is also probably necessary to reconfigure the steam ports. For each server, you need to configure the path to the cache directory using the startup argument -cache dir="path" (I use a translator sorry for the inaccuracies) Link to comment Share on other sites More sharing options...
ProjectSky Posted January 10, 2022 Share Posted January 10, 2022 ./start-server.sh -port 12345 -servername test David 1 Link to comment Share on other sites More sharing options...
David Posted January 11, 2022 Author Share Posted January 11, 2022 (edited) 15 hours ago, ProjectSky said: ./start-server.sh -port 12345 -servername test This allows me to do it but I wonder why it overrides whatever I put into the ini file when it first generates. It just recreates one from scratch it seems for me. Is there a way to prevent this? Edited January 11, 2022 by David Link to comment Share on other sites More sharing options...
ProjectSky Posted January 11, 2022 Share Posted January 11, 2022 5 hours ago, David said: This allows me to do it but I wonder why it overrides whatever I put into the ini file when it first generates. It just recreates one from scratch it seems for me. Is there a way to prevent this? not happened my server, did you do that after shutting down the server? Link to comment Share on other sites More sharing options...
David Posted January 11, 2022 Author Share Posted January 11, 2022 6 hours ago, ProjectSky said: not happened my server, did you do that after shutting down the server? Before I made this thread, someone told me to use -servername to see if what I was asking for would work. It did as it generated its own .ini and sandbox files to whatever I named it. I assume that if the name already exists, it would just load from the settings under that name. I changed the default port for this server in the ini file and made sure it saved before using -servername again however it simply overwrites whatever changes I made and everything is made default again, this also makes it give the error that the port is already in use because I already have a server running on default port so the server cannot start. The -port flag seemed to stop it from changing the ini file and allowed it to start. Link to comment Share on other sites More sharing options...
David Posted January 17, 2022 Author Share Posted January 17, 2022 On 1/10/2022 at 5:41 AM, Boqa said: For each server, you need to configure the path to the cache directory using the startup argument -cache dir="path" Can you explain more what this does? Link to comment Share on other sites More sharing options...
Ralms Posted January 22, 2022 Share Posted January 22, 2022 If I were you, I would just split the server completely, as have it installed twice on separate folders. On top of that, they need to be using separate cache folders for the world save, world configuration, etc. Lastly, will just be a matter of using separate ports and that's it. Reusing the same server files for 2 instances of it running, just sounds as a horrible idea to me, as someone that is at the point of change things on the server on a code level. Link to comment Share on other sites More sharing options...
getstoopid Posted February 21, 2022 Share Posted February 21, 2022 You could use docker container. Then you only have to worry about the port-mapping and nothing else. I am using afey/zomboid but there are plenty more out there as of now I'd guess. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now