If you want to help us maintaining this wiki, check out our discord server: https://discord.gg/3u69jMa 

Run a server on Linux with UCC

From SWRC Wiki
Revision as of 09:16, 14 May 2021 by Plasma (talk | contribs)
Jump to navigation Jump to search

Basic Configuration

First of all, you need all the configuration done, so head over to Setting up a Server.

Requirements

  • Linux machine capable of running wine (No GUI required)
  • Game files on host system (GameData folder)
  • Republic Commando UCC app for starting server

Setup

Now we need to create two .sh files inside System folder.

The first startup script looks like this one:

(start.sh)

screen -AmdS swrc-server /home/XXX/SWRC/GameData/System/startx.sh

Let me explain it:

  • screen -AmdS creates a new screen session for our server.
  • swrc-server is the name of our screen session
  • /home/XXX/SWRC/GameData/System/startx.sh points to a second startup file inside GameData/System folder. Of course you have to adjust the path to the file!

The second file:

(startx.sh)

wine UCC.exe Engine.ServerCommandlet ini=System.ini
  • wine UCC.exe we run our UCC.exe win32 application with wine
  • Engine.ServerCommandlet Start a server in the screen session
  • ini=System.ini Specify our pre configurated ini file

So why do we need two files to start the server. Now first of all we need to create a new screen session and afterwards we can start our UCC.exe which starts the server commandlet.

Now you can start your server by running ./start.sh (Don't forget to chmod 777 start.sh startx.sh)

Using screen

With the command "screen -ls", we can see what screen sessions are running at the moment. Using "screen -R <sessionname>" switches our SSH session to the specified screen session. If you switched, press ctrl + A and afterwards ctrl + D to get back to your SSH session without closing the server screen.

While using the command "screen -R <sessionname>" you may encounter an error. If so, enter "/script/dev/null" and try the command again.

Master Server Query

Also don't forget to put these lines into your /etc/hosts file if you want to see your servers on browser. Clients need to install this patch aswell.

65.112.87.186 swrcommando.ms1.gamespy.com #SWRC MasterServer
65.112.87.186 swrcommando.ms2.gamespy.com #SWRC MasterServer
65.112.87.186 swrcommando.ms3.gamespy.com #SWRC MasterServer
65.112.87.186 swrcommando.available.gamespy.com #SWRC MasterServer
65.112.87.186 swrcommando.master.gamespy.com #SWRC MasterServer