Conan Exiles

Conan Exiles

70 ratings
How to run a Conan Exiles server on your Linux Box with WINE
By Awful Citizen and 4 collaborators
Knowledge is power.

The purpose of this guide is to show you how to setup a Conan Exiles Windows Server under Linux (CentOS 7) and WINE 2.0. I will cover configuration , firewall ports, deployment and anything else you will need in order to get this server running like it is meant to be run, on Linux, because the only thing you should do in Windows is play bideo games. Huzzah!
 
Rate  
Favorite
Favorited
Unfavorite
Intro


We're publishing this guide because FunCom planned native Linux support for Conan Exiles, but for some reason, we are not aware of the build was pulled. Maybe the build wasn't ready, who knows...

But we are Goons, and we build roads, where there are none. Or in this case servers. Below you will find a step by step guide to completely bypass this oversight by FunCom, and get your Conan Exiles server on your Linux box, using the Windows files that FunCom has already released.

Awfulcitizen
Hardware
We are running our server on a dedicated server. Our server hardware config is:

  • Dual Intel Xeon X5650 2.66 GHZ Hex Core (12 cores)
  • 32 GB DDR3
  • OS Drive is a 240GB SSD
  • 2TB Storage Drive
  • 1 Gigabit Port

It's sitting on top of the Dallas Datamart.

We highly recommend Cloudsouth.com as an excellent Server Colo with great prices:
https://www.cloudsouth.com/dedicated-servers/
Ingredients
Requred Software/Hardware
This list is brought to you by Goons from Something Awful dot com.

What you need:
  • Linux Server (we will be using CentOS 7 64bit, but Ubuntu will work as well, as other distros)
  • SteamCMD for Windows
  • FTP Client (www.filezilla.com or www.panic.com/transmit if you are on Mac)
  • Windows PC for downloading the Windows binaries (Thanks Funcom!)
  • Create a non admin account to run the server from**
  • Don Q Rum, because its the best rum and you can make a killer Cuba-Libre with it and because why not.

For Ubuntu check out this awesome guide: http://steamcommunity.com/sharedfiles/filedetails/?id=869441506

** This step is optional but it is the correct way to do this.
Create sudo account and non-admin account
Steps to Create a New Sudo User

Root should never be used, other than creating other "sudo" accounts. These are the steps to create your "service" account (but you can name it donkeydong if you want or whatever).

  1. Log in to your server as the root user.

    ssh root@server_ip_address

  2. Use the adduser command to add a new user to your system.
    (Be sure to replace username with the user that you want to create.)

    adduser username

    • Use the passwd command to update the new user's password.

      passwd username

    • Set and confirm the new user's password at the prompt. A strong password is highly recommended!

      Set password prompts:
      Changing password for user username.
      New password:
      Retype new password:
      passwd: all authentication tokens updated successfully.

  3. Use the usermod command to add the user to the wheel group.

    usermod -aG wheel username

    (By default, on CentOS, members of the wheel group have sudo privileges.)

  4. Test sudo access on new user account

    • Use the su command to switch to the new user account.

      su - username

    • As the new user, verify that you can use sudo by prepending "sudo" to the command that you want to run with superuser privileges.

      sudo command_to_run

    • For example, you can list the contents of the /root directory, which is normally only accessible to the root user.

      sudo ls -la /root

    • The first time you use sudo in a session, you will be prompted for the password of the user account. Enter the password to proceed.

      output:
      [sudo] password for username:

If your user is in the proper group and you entered the password correctly, the command that you issued with sudo should run with root privileges.

Create a standard account

Using your newly created "service" account (or however you called it)

adduser username
passwd username

Because this is a standard non-admin account you don't need to add it anywhere. You can name this account whatever you want, I named mine steam.
Installing WINE on your server
What is WINE?

Wine is an open source and free application for Linux that enables users to run any windows based application on Unix/Linux like operating system. Wine team is releasing their versions every two weeks.

Finally, the Wine team proudly announced the stable release of Wine 2.0 and made it available for download in source and binary packages for various distributions such as Linux, Windows and Mac.

For a complete summary of major changes, See the release notes of Wine 2.0 at http://www.winehq.org/announce/2.0

In this section I will guide you to the simplest way to install latest release of Wine 2.0 version in CentOS 7.x

You should use your service account for the following steps.

Installing Wine 2.0 Using Source Code

Step 1: Installing Dependency Packages

You will need to install the ‘Development Tools‘ with some core development tools such as gcc, flex, bison, debuggers etc. this software is a must and is required to compile and build new packages, you can install them using YUM command.

# sudo yum -y groupinstall 'Development Tools' # sudo yum -y install libX11-devel libxml2-devel libxslt-devel freetype-devel flex bison

Step 2: Downloading Wine 2.0

Download the source file using Wget command under /tmp directory as a normal User.


Step 3: Extracting Wine 2.0

Once the file is downloaded under /tmp directory, use the below commands to extract it.

$ tar -xvf wine-2.0.tar.bz2 -C /usr/src/

Step 4: Installing Wine 2.0

It is recommended to compile and build Wine installer as a normal User. Run the following commands as normal user.

Note : The installer might take up-to 20-30 minutes and in the middle it will ask you to enter root password.

---------- On 32-bit Systems ----------
$ cd wine-2.0/ $ ./configure --with-png $ ./tools/wineinstall $ make # make install [Run as root User]
---------- On 64-bit Systems ----------
$ cd wine-2.0/ $ ./configure --with-png --enable-win64 $ make # make install [Run as root User]

Note: --with-png: Conan Server throws a ton of errors about not being able to save PNGs when you build Wine without that flag
Setting up FirewallD
Firewalld is a complete firewall solution available by default on CentOS 7 servers. In this guide, we will cover how to set up a firewall for your server and show you the basics of managing the firewall with the firewall-cmd administrative tool (if you'd rather use iptables with CentOS, follow the next guide).

Installing Firewalld on CentOS 7

# yum install firewalld -y

Turning on the Firewall

Before we can begin to create our firewall rules, we need to actually turn the daemon on. The systemd unit file is called firewalld.service. We can start the daemon for this session by typing:

sudo systemctl start firewalld.service

We can verify that the service is running and reachable by typing:

firewall-cmd --state

output
running

We can see which zone is currently selected as the default by typing:

firewall-cmd --get-default-zone

output
public

firewall-cmd --get-active-zones

output
public interfaces: eth0 eth1

Here, we can see that we have two network interfaces being controlled by the firewall (eth0 and eth1). They are both currently being managed according to the rules defined for the public zone.

How do we know what rules are associated with the public zone though? We can print out the default zone's configuration by typing:

firewall-cmd --list-all


output
public (default, active) interfaces: eth0 eth1 sources: services: dhcpv6-client ssh ports: masquerade: no forward-ports: icmp-blocks: rich rules:

We can tell from the output that this zone is both the default and active and that the eth0 and eth1 interfaces are associated with this zone (we already knew all of this from our previous inquiries). However, we can also see that this zone allows for the normal operations associated with a DHCP client (for IP address assignment) and SSH (for remote administration).

Setting Rules for your Applications

Note: You don't need to do these two methods. Do one OR the other... No need to do both.

The basic way of defining firewall exceptions for the services you wish to make available is easy. We'll run through the basic idea here.

Adding a Service to your Zones

The easiest method is to add the services or ports you need to the zones you are using. Again, you can get a list of the available services with the --get-services option:

firewall-cmd --get-services

output:
RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps ipp ipp-client ipsec kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind samba samba-client smtp ssh telnet tftp tftp-client transmission-client vnc-server wbem-https

Create a service file:

sudo nano /etc/firewalld/services/conan.xml

<?xml version="1.0" encoding="utf-8"?> <service> <short>Conan</short> <description>ConanSandboxServer requires ports 27015 and 7777 on UDP to be open and listening. DurrHurr</description> <port protocol="udp" port="7777"/> <port protocol="udp" port="27015"/> </service>

Save and close the file.

Reload your firewall to get access to your new service:

sudo firewall-cmd --reload

You can see that it is now among the list of available services:

firewall-cmd --get-services

output
RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns conan ftp high-availability http https imaps ipp ipp-client ipsec kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind samba samba-client smtp ssh telnet tftp tftp-client transmission-client vnc-server wbem-https

Opening a Port for your Zones

The easiest way to add support for your specific application is to open up the ports that it uses in the appropriate zone(s). This is as easy as specifying the port or port range, and the associated protocol for the ports you need to open.

For instance, the Conan Exiles server runs on ports 7777 and 27015 and uses UDP. We will add this to the "public" zone for this session using the --add-port= parameter. Protocols can be either tcp or udp:

sudo firewall-cmd --zone=public --permanent --add-port=7777/udp sudo firewall-cmd --zone=public --permanent --add-port=27015/udp

To review your changes:

sudo firewall-cmd --zone=public --permanent --list-ports

output
success success 7777/udp 27015/udp

Reload your firewall to get access to the new ports:

sudo firewall-cmd --reload
Installing SteamCMD
In order to make this work, we can't use SteamCMD on Linux, because it won't download the correct version. So for this part of the Guide, you need to do it on a Windows PC (Thanks FunCom). Preferably on a Windows 10 64bit PC.

Downloading SteamCMD

  1. Download SteamCMD from: https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip
  2. Extract the contents of the zip
  3. Install SteamCMD to a directory for example: c:/steamcmd

    Note: For faster response install to a SSD.

Running SteamCMD from Windows

cd C:\steamcmd steamcmd
(or wherever you installed it)

SteamCMD Login

login anonymous force_install_dir=c:/conanKFC app_update 443030 validate

If you want to be an autistic sperglord and you want to get complicated, you can also make a .bat file and put the following command in it:

steamcmd +login anonymous +force_install_dir c:\conanKFC +app_update 443030 +quit

Running SteamCMD from Linux (to update Windows server)

(Coming Soon)
Installing Conan Server in your Linux thingy
Copying the files to your Linux server

The next step involves transferring the files in the directory you installed the Conan Server folder and using File Transfer Protocol or FTP, and put them up in your Linux server. For this I **HIGHLY** recommend you to zip the folder from the root c:/conanserver (or however you called it) and upload the zipped file (which is about 11.5GB) to your server.

In my case I logged into the Linux Server using the steam (non-admin) account we created earlier and uploaded the file to /home/steam

Once this file is uploaded type unzip conserver.zip. If your server doesn't have the unzip command, you will need to install it via YUM: yum install zip unzip -y

When you finish unzipping the zip file, your home folder path should say /home/steam/conanserver
(to check your path, type pwd you espastic moron)

Using WINE to launch ConanSandboxServer.exe

Go into the folder you copied your files to, in my case its /home/steam/exiles and assuming you have been following this guide to the foot of the letter type:

/usr/src/wine-2.0/wine ConanSandboxServer.exe -log

(Thats it, nothing else)

The server will run, and will create a bunch of config files. It will also spit out a bunch of errors or garbage. Just ignore it.



Leave it running for a minute or two, then press CTRL-C to bring it down. Do this once, then when the server stops unloading files press CTRL-C again.



Now, ftp into the server again, and navigate to where your server is installed in our case /home/steam/exiled and dive into /home/steam/exiles/ConanSandbox/Config

In the essence of giving you a starting point here are examples on a couple of files. Watch the locations on the path because FunCom hasn't decided how these files are going to work and some locations might look the same but they have different content.

/home/steam/exiles/ConanSandbox/Config/DefaultEngine.ini
https://gist.github.com/tempusthales/717370cbeb3737de3a7a54db3af29a40#file-defaultengine-ini

/home/steam/exiles/ConanSandbox/Config/DefaultServerSettings.ini
https://gist.github.com/tempusthales/423638a20420a555115d1a6e15411add#file-defaultserversettings-ini

/home/steam/exiles/ConanSandbox/Config/DefaultGame.ini
https://gist.github.com/tempusthales/e0bc44290acb4a6f3bd93e9dbb35edad#file-defaultgame-ini

/home/steam/ConanSandbox/Saved/Config/WindowsServer/ServerSettings.ini
https://gist.github.com/tempusthales/ba5c7275b4e677da4d6412e7d9e1e998#file-serversettings-ini
Setting up Conan to run as a system service
The following assumes you're doing everything as root (or just add sudo to every command). It also assumes that you've created a user called steam and installed the Conan Exile server files into /home/steam/exiles/.

1. Install xvfb

In order to run Conan as a headless system service, you'll need to install the Xvfb X11 library:

$> yum install xorg-x11-server-Xvfb

2. Create the startup script

Next, create a script that will contain all of the commands that must be run to start Conan. Create /home/steam/exiles/start_conan.sh and add the following to it:

#!/bin/sh export WINEARCH=win64 export WINEPREFIX=/home/steam/.wine64 xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' /usr/src/wine-2.0/wine /home/steam/exiles/ConanSandboxServer.exe -log

Finish up by making the script executable:

$> chmod +x /home/steam/exiles/start_conan.sh

If you created the file as root, update the permissions so that the steam user can access it:

$> chmod 0777 /home/steam/exiles/start_conan.sh $> chown steam:steam /home/steam/exiles/start_conan.sh

3. Create a systemd service

We can use systemd to run Conan in the background. To begin, create /etc/systemd/system/conan.service and add the following:

[Unit] Description=Conan - dong sliders to MAX After=syslog.target network.target [Service] ExecStart=/home/steam/exiles/start_conan.sh User=steam Type=simple Restart=on-failure RestartSec=42s [Install] WantedBy=multi-user.target

Next, tell systemd to update its list of services:

$> systemctl daemon-reload

4. Start the service

Interact with the service via the systemctl command:

$> systemctl start conan.service

To set the Conan service to start automatically on boot, enable it:

$> systemctl enable conan.service

If you don't want it to start automatically, just disable it:

$> systemctl disable conan.service

You can see logs generated by the service with the following:

$> journalctl -u conan.service
Updating Conan Server with SteamCMD
If you have followed the steps till here, you know now how to run the Conan Exiles server as a Service within your Linux box.

The next step is to have a script that automates upgrading your server painlessly without losing any configuration files and brings the server back on gracefully via Services.

Update Script

#!/bin/sh # Script by: Rejd @ https://discord.gg/AkcVFAX # Goon Engineering NetWorks # # NOTE: This script might need to be run with sudo, due to systemctl requiring root privileges # # Stop conan.service and wait until ConanSandboxServer has shut down # echo "Stopping conan.service..." sudo systemctl stop conan.service while ps axg | grep -F 'Z:\home\steam\exiles\ConanSandbox\Binaries\Win64\ConanSandboxServer-Win64-Test.exe' | grep -v -F 'grep' > /dev/null; do sleep 1; done # Backup configuration files # echo "Backing up configuration files" tarballName="configBackup_$(date +%Y-%m-%d_%H-%M).tar.gz" tarball2Name="savedConfigBackup_$(date +%Y-%m-%d_%H-%M).tar.gz" mkdir -p /home/steam/exiles/configBackups tar -zcvf /home/steam/exiles/configBackups/$tarballName -C /home/steam/exiles/ConanSandbox/Config . tar -zcvf /home/steam/exiles/configBackups/$tarball2Name -C /home/steam/exiles/ConanSandbox/Saved/Config/WindowsServer . # Run steam update # echo "Updating..." /home/steam/steamcmd/steamcmd.sh +@sSteamCmdForcePlatformType windows +force_install_dir /home/steam/exiles +login anonymous +app_update 443030 validate +quit # Restore backup, keep tarball just incase (Might autodelete later when we know they aren't really needed) # temporarily commented out, need to test if configs in saved will suffice #echo "Restoring backup" #tar -zxvf /home/steam/exiles/configBackups/$tarballName -C /home/steam/exiles/ConanSandbox/Config #tar -zxvf /home/steam/exiles/configBackups/$tarball2Name -C /home/steam/exiles/ConanSandbox/Saved/Config/WindowsServer # Start conan.service # echo "Starting conan.service" sudo systemctl start conan.service

Create your script and drop it in your conan server folder. Remember that to execute it you need to use [sudo]: sudo updateconan.sh
Automating check if there is an updated server with SteamCMD
So what are you going to do if Conan Exile Server is updated at an ungodly hour and you are either sleeping or at work and you can't update it right away? If you are like us, that we have peons and little people (midgets from China) doing work for us then you got no problem... But other people who are not Goons don't have those means so here is the solution for you. It's pretty awesome.

Automating updateChecker.sh

We created the script below to monitor the state of the version currently available via SteamCMD. If the script reports (via a nifty config in SteamCMD) that the server version has gone changed, then it executes our script updateconan.sh, that we described in the previous chapter.

#!/bin/sh # NOTE: app_info_print/update uses the cache rather than pulling new information. Probably unintended. Definitely not useful for this application. # Hence we need to delete the appcache to force a refresh # On our system, the appcache can be found in /home/steam/Steam/appcache # Delete appcache rm -rf /home/steam/Steam/appcache/ # Pull new info and compare new timestamp to saved timestamp # You may need to initially run the command for currentTimestamp manually and redirect it to /home/steam/exiles/lastUpdate currentTimestamp=$(/home/steam/steamcmd/steamcmd.sh +login anonymous +app_info_update 1 +app_info_print 443030 +quit | grep -EA 1000 "^\s+\"branches\"$" | grep -EA 5 "^\s+\"public\"$" | grep -m 1 -EB 10 "^\s+}" | grep -E "^\s+\"timeupdated\"\s+" | tr '[:blank:]"' ' ' | awk '{print $2}') lastTimestamp=$(cat /home/steam/exiles/lastUpdate) if [ $currentTimestamp -gt $lastTimestamp ]; then /home/steam/exiles/updateconan.sh echo "$currentTimestamp" > /home/steam/exiles/lastUpdate fi

We have the checkup running every 30 minutes on our server. In order to do that you need to add a Crontab.

Step 1: Type
sudo su
Step 2: Type
crontab -e
Step 3: Within Crontab type i (for insert)
then enter:
0,30 * * * * /home/steam/exiles/updateChecker.sh
Step 4: to save enter :wq
Conclusion, final notes and thanks
Ok now what?

Now you can use your the steam account you created and launch the server just as you did initially. Don't be stupid, do not add any other parameters, we already went through the trouble of experimenting with this and this is the best possible path if you configured everything like we have been showing you.

Mentions


Thanks to the following sperglords for helping when I got stuck while trying to get this to work:

IamKale, Kimsemus, Fallout, Hazlen, Hindered, RainbowSticket, Rejd, Eonwe, Forge and Taylor Swift

...and to anyone else from Something Awful I might have missed. It was totally on purpose.


And special thanks to MaStr for publishing their rust_dedicated_linux[github.com] repo - that helped a lot in getting past the X errors --IamKale
Come play with us
If you want to play in a fun server, with intrepid people come join us on our server:


[US-PVP]Something Dongful *NO GRIEFING* 24-7 Admin
38.130.223.197:7777
Changelog
v.0001 - Release
v.0002 - Corrected typos, added Running Conan Server as a Service
v.0003 - Added new section about automating a script to backup and update the server, and added the Changelog section.
v.0004 - Updated Conan Server Upgrade Script
v.0005 - Corrected more typos
v.0006 - Fixed some of the scripts, cleaned them up. Added section to come play with us.
v.0007 - Force refresh of app_info by clearing the cache
< >
78 Comments
Awful Citizen  [author] Aug 11 @ 10:17pm 
I agree 100% but this is Funcom.
Morggin Aug 10 @ 9:57pm 
They realy need a linux binary for this ... if other games based on UE4 have a linux binary it shouldn't be to hard to do here.
[DFB] Shadur May 5 @ 2:14am 
Installing winetricks and letting it download the VC++ apis solved that problem.

Also, it turns out you don't need the windows version of steamcmd - you can install the linux version, then tell it to download the windows version of Conan Exiles by @sSteamCmdForcePlatformType = Windows
Awful Citizen  [author] May 4 @ 5:10pm 
I honestly don't know. Nothing of what you described should affect those settings.
k3rn31p@n1c Apr 14 @ 3:43pm 
Followed the guide to perfection great guide btw! And I have hit a roadblock, for about 5 days I have been researching as to why my server settings and Server name will not save, the default settings keep popping up, I have put my server name under [OnlineSubsystemsSteam] in the correct syntax in Engine.ini, and my AdminPassword in the ServerSettings.ini, I connect to the server no issue there, but can't login to Admin, and my server name still shows "Conan Exiles Server" so made sure that Game.ini and Engine.ini were read only, my specs are exactly the same as yours only mine is rackmounted here at my home using Ubuntu. Not too sure but it seems as if my settings are being overrode by the defaults since I can't change them, does anyone have any ideas as to what might be the case here?
Awful Citizen  [author] Apr 13 @ 9:30pm 
thats why this was built from scratch using the files from a windows build straight into linux
not that anyone is playing it lately.
TBK Apr 12 @ 4:01pm 
Oh forgot to mention that the missing stuff "Engine/Content/EditorResources" was part of the package one month ago and is missing from the last couple of versions - https://steamdb.info/depot/443032/history/
TBK Apr 12 @ 3:54pm 
@maep I downloaded the Linux x64 version and got the needed libsteam_api.so file from the Steamworks SDK 1.38a: sdk\redistributable_bin\linux64 - https://partner.steamgames.com/downloads/list

The current Linux build is missing a lot of files, so I got them from the Windows version.

If you look at https://steamdb.info/depot/443031/ then the only file that is included in the Linux build is Linux equivalent of conanexiles\ConanSandbox\Binaries\Win64\ConanSandboxServer.exe

The rest of conanexiles\ConanSandbox\<SUBFOLDERS> and conanexiles\Engine are missing.

The easiest way to assembly it is all is to download the Linux and Windows versions and then copy the Linux file structure into the Windows version.

To run it cd to conanexiles\ConanSandbox\Binaries\Linux and run ./ConanSandboxServer remember to create a ServerSetting.ini file.

Right now I am at an impasse - http://imgur.com/a/hxNqF

I think the build is dependent on some UE4 dev stuff and that is why I can not get any further.
maep Mar 20 @ 1:09pm 
Hi, it appears there is a Linux version available. I ran app_update 443030 on the Linux steamcmd and got a ELF64 binary. I can't launch it because it can't find libsteam_api.so but that should be trivial to fix. Is this new?
۞ Kami Mar 2 @ 1:37am 
# You may need to initially run the command for currentTimestamp manually and redirect it to /home/steam/exiles/lastUpdate

How do I do that ? Ubuntu 14.04