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

Difference between revisions of "Run a server on Linux with UCC"

From SWRC Wiki
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Back to basics==
==Basic Configuration==
First of all, we need all the configuration done, so if you didn't do that yet, head to [[Setting up a Server]].
First of all, you need all the configuration done, so head over to [[Setting up a Server]].


==Requirements==
==Requirements==
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.
* Linux machine capable of running wine (No GUI required)


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.
* Game files on host system (GameData folder)


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.
* Republic Commando UCC app


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.
==Setup==
* Install wine (32 Bit) on your linux machine accordingly to instructions


Also install [[Republic Commando UCC]] on your host system.
* Install screen application


==Setup==
* Upload game files to linux machine (GameData folder)
Now we need to create two .sh files inside System folder.
 
* Download [[Republic Commando UCC]] and put it into GameData/System folder


The first startup script looks like this one:
* Create a bash script inside GameData/System to start server:


(start.sh)
<pre>
<pre>
screen -AmdS swrc-server /home/XXX/SWRC/GameData/System/startx.sh
screen -d -m -S swrc wine UCC.exe Engine.ServerCommandlet
</pre>
</pre>


Let me explain it:
* Server will run now on screen process and will be detached from your terminal
*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:
==Using screen==
To look up all running screen sessions, use:


(startx.sh)
<pre>
<pre>
wine UCC.exe Engine.ServerCommandlet ini=System.ini
screen -ls
</pre>
</pre>


*wine UCC.exe              we run our UCC.exe win32 application with wine
To switch into a screen session, use:
*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.
<pre>
 
screen -r <screen name>
Now you can start your server by running ./start.sh  (Don't forget to chmod 777 start.sh startx.sh)
</pre>
 
==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.
To detach screen from terminal, press ctrl + A and ctrl + D


==Master Server Query==
==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 [http://www.moddb.com/mods/star-wars-republic-commando-graphics-fix/downloads/republic-commando-multiplayer-fix-updated this] patch aswell.
Install multiplayer browser fix from [[Useful Stuff for Client]].
 
<pre>
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
</pre>

Latest revision as of 22:15, 9 November 2021

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

Setup

  • Install wine (32 Bit) on your linux machine accordingly to instructions
  • Install screen application
  • Upload game files to linux machine (GameData folder)
  • Create a bash script inside GameData/System to start server:
screen -d -m -S swrc wine UCC.exe Engine.ServerCommandlet
  • Server will run now on screen process and will be detached from your terminal

Using screen

To look up all running screen sessions, use:

screen -ls

To switch into a screen session, use:

screen -r <screen name>

To detach screen from terminal, press ctrl + A and ctrl + D

Master Server Query

Install multiplayer browser fix from Useful Stuff for Client.