Jump to content

CnCNet Forums

Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
mohsen9010

CnCNet server systemd (Auto Start Service)

Recommended Posts

This is a solution to become a CnCNet host server in linux servers that have systemd for service control (Debian, Ubuntu, CentOS...):

Do it as a root or add 'sudo' before every command:
 

useradd -m cncnet

wget -c https://downloads.cncnet.org/cncnet-server-core.tgz -O - | tar xz -C /home/cncnet

chown cncnet:cncnet /home/cncnet/cncnet-server-core

wget -O /etc/systemd/system/cncnet.service https://files.catbox.moe/dz1q2i.service

# Change 'my new name server' to your own server name

sed -i 's/My cool server/my new name server/g' /etc/systemd/system/cncnet.service

systemctl daemon-reload

systemctl enable cncnet.service

systemctl start cncnet.service

Make a service is better than crontab for auto start solution!

This topic is related to https://forums.cncnet.org/topic/6325-how-to-host-a-cncnet-server/

 

cncnet.txt

Edited by mohsen9010
Update for new version of cncnet (no need mono)
  • Like 1

Share this post


Link to post
Share on other sites

Nice solution!How does the CnCnet servers work in general?  I only play RA1.  https://cncnet.org/status 

I have spun up a VPS and got it going (Sadspider's server) 

However how do I connect to it or is it just used by default?

 

Edited by sadspider
update

Share this post


Link to post
Share on other sites
11 hours ago, sadspider said:

Nice solution!How does the CnCnet servers work in general?  I only play RA1.  https://cncnet.org/status 

I have spun up a VPS and got it going (Sadspider's server) 

However how do I connect to it or is it just used by default?

 

I'm not sure about RA1 game, but already for Tiberian Sun was a way to choose a tunnel server. But for now this is only automatically choose.

In this topic FunkyFr3sh say:

Quote

Note: Servers are chosen automatically by CnCNet and are only used in case 2 players fail to establish a Peer-To-Peer connection.

I think it could be better to people can choose a tunnel server.

Edited by mohsen9010
  • Like 1

Share this post


Link to post
Share on other sites
14 hours ago, mohsen9010 said:

I'm not sure about RA1 game, but already for Tiberian Sun was a way to choose a tunnel server. But for now this is only automatically choose.

In this topic FunkyFr3sh say:

I think it could be better to people can choose a tunnel server.

Totally.  A tunnel server would be far superior than p2p.  There are so many games where all it takes is a bad conn between 2 players to lag everybody out.

Also being able to select a server would increase incentives for more people to host them.  I know they have official servers with high capacity already but why not utilise them fully?

Share this post


Link to post
Share on other sites

years ago it used to be like this, everyone could choose a server when they hosted a game but that didn't work out too well.

Imagine someone from Germany hosted a game (he would choose a server in Germany obviously), now 2 players from Australia join his game. What happens now is that Australia1 has to send the data to the German server, then the German server needs to send the data back to Australia2 and you end up with a round trip time of 800ms, it's going to be unplayable... The games can't handle more than 400ms latency.

Back then I tried to solve the problem by adding country flags to the game rooms to ensure players know that the server is too far away from them, I also tried to show warning messages to ensure they know that the game won't be playable like this, but everyone ignored it. The only way to make such a setup working is to hide games hosted on servers with too big distance, but that's a terrible solution (we can't really separate our small community like this..).

 

As a comparison, with our current setup there is no problem at all with 1 player from Germany and 2 players from Australia. The round trip time will be 400ms only since that's the time from Germany to Australia while the 2 players from Australia will connect directly to each other with just 50ms latency rather than 800ms as explained in the example above.

 

Share this post


Link to post
Share on other sites
23 hours ago, FunkyFr3sh said:

years ago it used to be like this, everyone could choose a server when they hosted a game but that didn't work out too well.

Imagine someone from Germany hosted a game (he would choose a server in Germany obviously), now 2 players from Australia join his game. What happens now is that Australia1 has to send the data to the German server, then the German server needs to send the data back to Australia2 and you end up with a round trip time of 800ms, it's going to be unplayable... The games can't handle more than 400ms latency.

Back then I tried to solve the problem by adding country flags to the game rooms to ensure players know that the server is too far away from them, I also tried to show warning messages to ensure they know that the game won't be playable like this, but everyone ignored it. The only way to make such a setup working is to hide games hosted on servers with too big distance, but that's a terrible solution (we can't really separate our small community like this..).

 

As a comparison, with our current setup there is no problem at all with 1 player from Germany and 2 players from Australia. The round trip time will be 400ms only since that's the time from Germany to Australia while the 2 players from Australia will connect directly to each other with just 50ms latency rather than 800ms as explained in the example above.

 

Thanks.

 

I guess servers would only make sense for a higher player count to justify having regions, i.e EU, NA, ASIA etc.   My reasoning was that if they connected to a server then it didn't matter so much if you had 8 players from say... UK, Germany, Australia, North America etc.  As they will connect to one central server.  But I suppose with p2p they will connect to one host anyways.  It's just that it's a shame when you have a few players with good internet and it just takes 2 other people, like UK and Russia to have a bad connection that will lag everybody.

It is amazing the work you have done to revive this game.  I used to play on xwis all the time back in the day and the CnCnet client is something really amazing.  

Where do you see the future of CnCnet?  Also what is the best way to help contribute the project and community?

Share this post


Link to post
Share on other sites
On 5/18/2019 at 7:53 PM, FunkyFr3sh said:

years ago it used to be like this, everyone could choose a server when they hosted a game but that didn't work out too well.

Imagine someone from Germany hosted a game (he would choose a server in Germany obviously), now 2 players from Australia join his game. What happens now is that Australia1 has to send the data to the German server, then the German server needs to send the data back to Australia2 and you end up with a round trip time of 800ms, it's going to be unplayable... The games can't handle more than 400ms latency.

Back then I tried to solve the problem by adding country flags to the game rooms to ensure players know that the server is too far away from them, I also tried to show warning messages to ensure they know that the game won't be playable like this, but everyone ignored it. The only way to make such a setup working is to hide games hosted on servers with too big distance, but that's a terrible solution (we can't really separate our small community like this..). 

  

As a comparison, with our current setup there is no problem at all with 1 player from Germany and 2 players from Australia. The round trip time will be 400ms only since that's the time from Germany to Australia while the 2 players from Australia will connect directly to each other with just 50ms latency rather than 800ms as explained in the example above. 

  

Be better to show ping instead of country flags of tunnel servers. (like Valve servers)

I think instead of main tunneling, We should have combination of p2p and main tunneling.

What is that?

That mean just one player that have bad connections can choose a tunnel server to connect other people p2p (but by the tunnel server).

Every client can choose a tunnel server to be main host or connect to other games.

It's like a VPN for a client... .And every client can choose a p2p tunnel server or direct connection.

We tested this way already and it's a good idea for bad connection people.

Edited by peylight

Share this post


Link to post
Share on other sites

We've been using this now for some time and it's great, thanks for the suggestion @mohsen9010

 

dkeeton did some changes to it, what we use is here:

 

wget downloads.cncnet.org/v2tunnel.sh
wget downloads.cncnet.org/v3tunnel.sh

sh v2tunnel.sh "My Cool Server"
sh v3tunnel.sh "My Cool Server"

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • By bk57
      Finnaly learned to use SHP. editor and after cople of days of hard work made some new skins for Tiberian Sun
      They could be used on cncnet even after modifying files you will still be able to play multiplayer

      Download: GDI sidec01.mix - Nod sidec02.mix
      Put them in "...TiberianSun_Online\MIX\put_here" replace "sidec01.mix" and "sidec02.mix".
      Backup files before in case you change your mind to use old ones after again. Enjoy!
      ____________GDI____________



      ___________Nod___________



      Note: I found sample templates online all I had to do was photoshop for some time.
    • By Volkov Boris
      Can any one make a mod for red alert remastered that allows the ai build super weapons,special and T3 units and naval units? 
    • By FunkyFr3sh
      All Medals were reset and a new map was created, please check the new rules below
       
      Rules:
      1. Settings = Color: Yellow, Country: Germany, Speed: 7
      2. You must destroy all enemy tanks before the time runs out
      3. You need to win using hotkeys like in the video shown below (ctrl shift etc..)
      4. Stacking/fooling the AI is not allowed - Do not park any tanks next to the kennels to destroy/block them on purpose (no force fire etc..)
      5. Your screen resolution must be 1280x width or below and 720x height or below (1024*768, 1920x1080 etc... are not allowed)
      6. 1 trusted spectator must watch you playing the map (See names below)
      7. The spectator must host the game room and not the player
      8. The game must run at an acceptable speed, laggy games don't count
       
       
      Spectators: robskate, Bravo, At0m1, FunkyFr3sh, Lauta, D1GA, Commander, Lovehandles, Ferret, ra168uk, lordy
       
      Note to Spectators: After the game you must check the resolution of the player in the score screen to ensure the player did not use a too high resolution. When the ready button was clicked there should be no cheat warning.
       
      Example video: https://www.youtube.com/watch?v=JDzDXvyPjCw
       
       
      Search for "Gold Medal Challenge V2.1" or type the following command inside a game room: 
      /map 72f6a01ff66dbc3e193cdbe84adf51f6636f4956
       
       

    • By default user
      Hi everyone,
      I know there several posts out there on Virtual Machine LAN networking, but I haven't come across any referencing VMware ESXi.  Was hoping I could start one.
      Here's what I'm trying to do...
      I have a ESXi host running vSphere 6.5.  On it are several VM guests running Windows 10 (build 1903).  All VMs are using VMNET3 virtual NICS, w/8GB RAM, and quad core vprocs.
      I'm having a heckuva time getting LAN networking to run for any CNC game (Dune 2000, TD, TS, RA - doesn't matter, symptoms are the same).
      On the VM, all games install successfully using the latest builds.  All will run without error too.  
      On the example below, I'm running Dune 2000.  As you can see in 'screenshot 1', it does not allow me to join or create a new game.  What's interesting is that the IRC client does not appear to load despite being previously installed.   The Windows firewall is turned off.
       
      Now, by contrast, on a regular laptop - the same game installer will allow me to create a new game or join an existing one.
      I welcome your thoughts.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...