User Tools

Site Tools


goldeneye:server_install_linux

Linux Server Install

This article is currently being overhauled and may be inaccurate or missing important information.

Before You Begin

If you wish to run a public (Internet) server, here are some important recommendations for you to consider before you install your server.

(If your intention is to run a LAN server, this section may not apply to you)

  • It is recommended that the server has a static IP address
    If your public-facing IP address changes, it will make it hard for returning players to find your server. When self-hosting, you typically need to pay your provider extra for a Static IP.
  • It is required that your Internet is fast enough
    This means not just speed, but latency as well. Speedtest.net or the DSLReports Speedtest can show you your Internet speed and latency (ping).

    Recommended Internet Speed: 1Mbps download, 8Mbps upload (16-player server).

    Recommended Ping (round-trip time): No more than 25ms to a nearby speedtest server. More will work, but players who are distant or have less capable connections will suffer.

If you don't have a capable Internet connection or the instructions seem daunting to you, you are encouraged to use services provided by a game server host such as Jest.

2013/04/21 19:21

Server Setup

Running the server natively on Linux has proven to be highly problematic, so for the time being, we have prepared instructions for running the server using Wine. This guide was written for Ubuntu Server 18.04, but you could likely adapt it to other distributions as well.

In short, the installation process is:

  • Install required packages:
    • Wine
    • winbind
    • Xvfb (X virtual framebuffer)
    • SteamCMD (Linux version)
  • Download the Windows version of Source 2007 Dedicated Server
  • Download GE:S
  • Create service files to run the server automatically

It is recommended that you create a user for the game and X server to run as – do not run as root. You can name the user whatever you like, but in this guide we use the example geserver.

Add the required repositories and install the packages:

sudo add-apt-repository multiverse 
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt install wine-stable winbind xvfb steamcmd

Create the server folder tree and set permissions:

sudo mkdir -p /servers/geserver
sudo chown -R geserver:geserver /servers/ 
cd /servers/geserver

Start SteamCMD:

steamcmd

It will update and eventually you'll land at the Steam> prompt. Now, we'll download the Windows version of the Source 2007 Dedicated Server. Note that it is important to specify the full path to the install directory here.

@sSteamCmdForcePlatformType windows
logon anonymous
force_install_dir /servers/geserver
app_update 310
quit

Grab the Server install archive from the Server Downloads page. Then, extract the gesource folder to /servers/geserver.

With the files in place, it's time to make the systemd service. First, we'll create a service file for Xvfb. This will allow the X server to run on startup and provide a display for Wine to use.

Create and open the file /etc/systemd/system/xvfb.service:

sudo nano /etc/systemd/system/xvfb.service

Now, paste the following:

[Unit]
Description=X Virtual Frame Buffer Service
After=network.target

[Service]
User=geserver
ExecStart=/usr/bin/Xvfb :99 -screen 0 640x480x16

[Install]
WantedBy=multi-user.target

Press Ctrl-O to save and then Ctrl-X to exit. Type the following to enable the service at startup:

sudo systemctl enable xvfb

Start the service:

sudo systemctl start xvfb

If all goes well, the virtual X display is ready and we can create the service file for the GE:S server.

Create and open the file /etc/systemd/system/geserver.service:

sudo nano /etc/systemd/system/geserver.service

Paste the following:

[Unit]
Description=GoldenEye: Source server
After=xvfb.service

[Service]
Type=simple
User=geserver
Environment="DISPLAY=:99"
WorkingDirectory=/servers/geserver
ExecStart=/usr/bin/wine srcds.exe -console -game gesource +map ge_archives
Restart=on-failure
RestartSec=10s

[Install]
WantedBy=multi-user.target

Save and close the file. Enable and start the service:

sudo systemctl enable geserver
sudo systemctl start geserver

The game server will now run on startup of your Linux server. As you need to configure your server, you can use the following commands to start, stop, and restart your server:

Action Command
Start sudo systemctl start geserver
Stop sudo systemctl stop geserver
Restart a running server sudo systemctl restart geserver

The game server should now be running and ready for configuration, which you can learn about using the other articles on this wiki.

Accessing Your Server From the Internet

To access your server over the Internet, you need to allow port 27015 TCP and UDP through any firewalls. If you're behind a NAT router, you also need to forward these ports to the device hosting your server.

Note: A local server will always appear under the LAN tab, not the Internet tab. The best way to verify the server is reachable online is for a friend to connect to it.

If you're running multiple servers from a single host, you may want to specify a custom port number for each server using the -port launch option. For example, you would add -port 27016 to the launch parameters. You do, of course, need to whitelist/forward whatever port number(s) you decide to use.

2013/04/21 19:21

Configuring Your Server

After you have a functional GoldenEye: Source server, you can customize settings to your liking. For information on server customization, please check the GE:S Server Guides page.

2013/04/21 19:21
goldeneye/server_install_linux.txt · Last modified: 2018/09/03 10:16 by soupcan