Gouldron
Member
so, after painstakingly doing this myself on a freebsd server through an SSH connection, i'd figure i should document it somewhere if anyone else want or need to do the same thing. but before we start...
anyone that has ever worked with servers professionally before have certainly ran into a headless server at least once in their lifetime. a typical headless server tends to run a Linux distro of some sort, where the server often tend to be a large box located somewhere in a server rack. however, a headless server can also be as small as a wallet: see the Raspberry Pi or BeagleBone Black for devices that are common as headless servers for personal use. in my case, however, i'm using a traditional pc without a monitor hooked up to it.
but before we are able to install SRB2 on the server, we need to do some preparation. start by creating a new user to run SRB2 under, preferrably named
this is necessary to get rid of as many non-mandatory dependencies as possible, simplifying the install process and eliminating possible problems that may arise during build.
and that's it! SRB2 should now be running in a headless server. from now on, you can configure the server to your heart's content, just like you would with any other SRB2 dedicated server.
what is a headless server
just so we are all on the same page, let me first explain what a headless server is. basically, a headless server is a server with no graphical capabilities whatsoever. they're normally controlled through a secondary device, like a serial cable or, in my case, an SSH connection.anyone that has ever worked with servers professionally before have certainly ran into a headless server at least once in their lifetime. a typical headless server tends to run a Linux distro of some sort, where the server often tend to be a large box located somewhere in a server rack. however, a headless server can also be as small as a wallet: see the Raspberry Pi or BeagleBone Black for devices that are common as headless servers for personal use. in my case, however, i'm using a traditional pc without a monitor hooked up to it.
preparation
this guide assumes you have some experience with a Unix-like operating system such a Debian or FreeBSD. if this is not the case, chances are that you're most likely better off just setting up a headed server to avoid the needless complexity.but before we are able to install SRB2 on the server, we need to do some preparation. start by creating a new user to run SRB2 under, preferrably named
srb2
just to make things easy to remember, and make sure they have their own home directory. this is crucial, since SRB2 requires a bunch of files to be located relative to the home directory, which is not going to happen if SRB2 don't have it's own user to run as. then, make sure to do everything that doesn't need root privileges as this user, to avoid screwing up permissions on the system.installing SRB2
once this is done, we need to retrieve the source code via Git, which can be done by following this guide. just keep in mind that, when configuring the build, you need to make sure that the build is configured with these settings:
Code:
NOPNG=1
NOOPENMPT=1
NOMIXER=1
NOHS=1
NOHW=1
SDL_TTF=0
SDL_IMAGE=0
running SRB2 headless
once this is done and the build process is complete, you should have an executable ready. however, it cannot be started directly, since SDL2 requires some sort of graphical interface to run. fortunately, this can be easily worked around by simply settingSDL_VIDEODRIVER=dummy
as an environment variable and exporting it to the shell. this tells SDL2 to not use any video driver, allowing it to run in a headless environment. after that, you can safely launch SRB2 as a dedicated server by passing -dedicated
as a command line parameter to SRB2.and that's it! SRB2 should now be running in a headless server. from now on, you can configure the server to your heart's content, just like you would with any other SRB2 dedicated server.