Hosting a server
Right now hosting a server is only possible using the command line.
There are many different worlds that you can create, a few of them are provided in the configs/
directory. Feel free to modify them or create your own. I haven't yet wrote documentation on how exactly things are configured, see the source code (and in particular src/net/server/config.rs
) for more information.
To start a server, simply run ./spaceships server configs/CONFIG.ron
, replacing configs/CONFIG.ron
with the exact configuration to use. On Windows, you would run ./spaceships.exe server ...
.
The server program outputs logs to the terminal (in particular, stderr), which include information about players joining and leaving the game. The server also provides a simple REPL interface which allows more advanced configuration.
If you're running an internet server with an associated domain name, if users want to connect to the server by entering the domain name you will need a valid TLS (also called SSL) certificate. To run the server to use this certificate, run ./spaceships ... --cert-path PATH --key-path PATH
, replacing PATH
with the paths of the certificate and private key. These paths are to files in the PEM format.