Talk:Starting a Server

From wiki
Revision as of 00:11, 24 June 2020 by Piousminion (Talk | contribs) (Linux support)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Getting it to work with linux. I have no experience with wiki editing so here's to hoping someone can move this over. Starts here...


Linux

While the Staxel server does not have official Linux support, it is possible to at least get the server to run on Linux.

Please note: This is an unsupported setup. There may be stability issues. Additionally, the server will run slower, or possibly quite faster, than it would under Windows.

This is only recommended for advanced users!

This guide assumes that you're using Arch Linux, Ubuntu/Debian, or Centos/RedHat/Fedora, and that you know what you're doing - however, the instructions should also work for other Linux distributions.

Requirements

  1. mono, which allows .Net applications to run under operating systems other than Microsoft Windows.
  2. xvfb, only needed if you're running the server headless or otherwise without a gui.

Installing Requirements

Install the previously mentioned software packages with the following commands:

If running a DEB-based(Ubuntu, Debian, etc) distro, type:

sudo apt-get install mono
sudo apt-get install xvfb

If running an RPM-based(RedHat, Centos, Fedora, etc) distro, type:

sudo yum install mono-core
sudo yum install xorg-x11-server-Xvfb

If running an pacman-based(Archlinux, etc?) distro, type:

sudo pacman -Sy mono
sudo pacman -Sy xorg-server-xvfb

Note: In each case, xvfb is optional if you have a desktop display or gui, but doesn't hurt to have it anyway.

Installing Server

Easy Way

You can just zip up the installation directory on windows and copy it over to linux and extract. This is SOO much easier than installing wine, and with it installing Steam or the stand-alone version, with all of their dependencies and whatnot. Just copy it. :P

Hard(er) Way

Another way is with steamcmd. Not as easy as justy zipping it up, but some people like it hard. I don't judge. Install steamcmd following the directions from https://developer.valvesoftware.com/wiki/SteamCMD#Linux

Install Staxel with something like: steamcmd +login ACCOUNT_NAME PASSWORD +force_install_dir C:\steam\games\staxel +app_update 405710 +quit

Starting the server

Configuring your server from the command-line requires you to supply a set of command-line arguments whenever you start up the server.

  • --creative=(false|true): Force Creative Mode to be turned on or off
  • --interface=0.0.0.0: If you need to listen on a specific interface, you can supply it here - Advanced users only!
  • --local=(false|true): Unknown at this time
  • --name=serverName: Set the server name, used when public mode is true
  • --password=password: Set a server password, used on connection
  • --playerlimit=4: Limit the number of players that can be online at once
  • --port=38465: Set the server port to listen for connections on
  • --public=(false|true): Disable or enable public mode
  • --storage=localStorageName: Set the name of the world to use here
  • --upnp=(false|true): Set whether to attempt to use UPnP Port Forwarding
  • --weakAuthentication=(false|true): Set whether to allow unauthenticated users to connect

Remember you do not have to supply every option - you can just supply what you need, and the rest will be defaulted.

You can omit "xvfb-run" if you are running the server on a system that has a desktop/gui, but it doesn't hurt to include it.

Make a sh file named something like "start.sh" and toss the following into it:

mono ./bin/Staxel.Server.exe --creative=false --name=myFarm --password=potato --playerlimit=8 --port=38465 --public=false --storage=myFarm --upnp=false

Make your script executable with:

chmod u+x start.sh

Now you can start your server with:

xvfb-run start.sh

Ends here. Piousminion (talk) 00:11, 24 June 2020 (EDT)