If you want to help us maintaining this wiki, check out or discord server: https://discord.gg/3u69jMa
Run a server on Linux with UCC
Back to basics
First of all, we need all the configuration done, so if you didn't do that yet, head to Setting up a Server.
Requirements for running a Republic Commando server on Linux are quite simple. We need all the game files on our Linux host system, so just upload the whole GameData folder.
Since the executable has been made for a windows system we need to install wine in order to execute win32 applications on a Linux system. Just google your Linux distribution and how to install wine. Installation can vary on different Linux distributions.
Anyway after we successfuly installed wine and we know its working (just run cmd.exe), we can setup our startup script for the server. Also in addition to detach the server window from our SSH session window, install the package screen.
You may ask don't my host system need a GUI for wine applications to run. Well in general yes but not for this case. Since we run a commandline application and not a graphical component, we can just start the win32 app inside our shell.
Also install Republic Commando UCC on your host system.
Now we need to create two .sh files inside System folder.
The first startup script looks like this one:
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:
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)
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.
184.108.40.206 swrcommando.ms1.gamespy.com #SWRC MasterServer 220.127.116.11 swrcommando.ms2.gamespy.com #SWRC MasterServer 18.104.22.168 swrcommando.ms3.gamespy.com #SWRC MasterServer 22.214.171.124 swrcommando.available.gamespy.com #SWRC MasterServer 126.96.36.199 swrcommando.master.gamespy.com #SWRC MasterServer