I wrote this guide only to help people who didn't even know what to do with the code. I offer no support, so please do not contact me asking for help/support.
You better buckle up, because this thing is as tedious as they get. This entire guide will focus on a Windows installation, although it shouldn't be any more difficult for a *nix user to follow.
You should set this whole thing up in a VPS, but your computer at home will do just fine as well. A VPS will offer the ability of hosting this 24/7 and being able to handle many concurrent users, probably better server performance and a much better data security.
So you have two options from the get-go:
After you decide on that, you need to know that in this guide, you'll be required to download over 500MBs of source code and probably almost as much of applications. If you already have a VPS, follow the guide from within that.
You'll want to grab a Git shell first. This one is pretty popular and the one used in this guide as well. The installation offers many options, so just don't touch anything you don't know about. The default options work just fine. Just make sure to have Git add to PATH
, like here:
Next, find which one of your hard drives have the most space; you'll need at least 2 gigabytes of it. Now open up Command Prompt
and switch to that drive. So if it's driver D:
, just type in D:
.
Create a folder somewhere in that drive and copy its path, now do cd [space] [your path]
in the command prompt.
For example, cd D:\Somewhere\Elsewhere
.
Time to get all them codes! Execute these commands on the command prompt (you can copy+paste them). The order is irrelevant and you can open multiple command prompts to have them all done at once, just make sure to cd
into the directory you created previously.
git clone https://github.com/SoapboxRaceWorld/soapbox-race-core
git clone https://github.com/VladManyanov/sbrw-mp-sync-2018
git clone https://github.com/WorldUnitedNFS/freeroam
git clone https://github.com/SoapboxRaceWorld/openfire
git clone https://github.com/igniterealtime/openfire-nonSaslAuthentication-plugin
git clone https://github.com/SoapboxRaceWorld/openfire-restAPI-plugin
git clone https://github.com/berkayylmao/setting-up-sbrw
You now have the code, but you'll need applications to make use of them. The following are merely suggestions, but are used in this guide, tested thoroughly and practically work out-of-the-box.
A database service: MySQL
Select Custom
for the setup type and only pick the following (the versions should match, in my case they are all version 8.0.23
):
Select Development Computer
if you're installing MySQL on your home computer, Server Computer
otherwise.
Open Windows Firewall ports for network access
.Just click Next
here.
Pick a nice password for the root user here and make sure to save it somewhere and have backups of it as well. I recommend using this to generate passwords (you'll need to do more of this later).
Then keep clicking Next
until the installation finishes.
MySQL Workbench will open, just click on the Local instance
connection.
File->Open SQL Script
setting-up-sbrw/Files/MySQL scripts
.1. Base
's tab and change the 2 passwords, preferably generating them from the link before.Query->Execute (All or Selection)
. MySQL Workbench
. We'll come back to it later.JDK10: AdoptOpenJDK10
Set a user environment variable named JAVA_HOME
and set its value to C:\AdoptOpenJDK10
.
Edit the user or system PATH environment variable and add the folder C:\AdoptOpenJDK10\bin
.
Maven: Apache Maven
C:\ApacheMaven\bin
.GoLang: GoLang
setting-up-sbrw/Files/build-script.bat
.setting-up-sbrw/Files/start-sbrw.bat
.There will be errors and the core server can close itself at this time, this is okay.
Open your favourite browser and navigate to http://localhost:9090/setup/index.jsp
. My setup and Openfire pages can look visually different, e.g. the Openfire version at the top-right, but you should be able to follow this 1:1.
Select a language and click Continue
.
XMPP Domain Name
and Server Host Name
to your IP address. The IP address should be in the IPv4 format, e.g., xxx.xxx.xxx.xxx
. Afterwards, click Continue
.
Standard Database Connection
and click Continue
.Database URL
to jdbc:mysql://localhost:3306/OPENFIRE?rewriteBatchedStatements=true&characterEncoding=UTF-8&characterSetResults=UTF-8&serverTimezone=UTC
.openfire
as the Username
and the password you chose for the openfire user back in the 1. Base
MySQL script as the Password
.Default
and click Continue
.Continue
.Login to the admin console
.admin
as the username and the password you just picked as the password. Server Settings->Registration & Login
and disable Inband Account Registration
. Click Save Settings
.Server Settings->Compression Settings
and set both settings to Not Available
. Click Save Settings
.Server Settings->REST API (SBRW)
and set it to Enabled
. Pick the Secret key auth
option and note down the Secret key
(this is unique already, so you don't need to change it). Click Save Settings
.Close all of the command prompt windows that are open.
Make sure no Java process is left hanging.
Task Manager
, going to the Details
tab and killing all java.exe
/javaw.exe
processes.Open the MySQL Workbench
that you minimized before.
Schemas
panel. Click on Refresh All
.soapbox->Tables
and select the parameter
table. Click on the rightmost icon with a lighting bolt on it.ENABLE_REDIS
' value and change it to false
.OPENFIRE_TOKEN
. Double click on its value and change it to the secret key
you noted down (from the Rest API section in Openfire).SERVER_ADDRESS
. Double click on its value and change it to the the IP address you noted down back in the Openfire setup in this format: http://THE_IP_ADDRESS_HERE
.UDP_FREEROAM_IP
, UDP_RACE_IP
and XMPP_IP
to the IP address you noted down back in the Openfire setup.Apply
, then Apply
again.Finish
and close MySQL Workbench
.Go to the folder where you downloaded all the code. Open setting-up-sbrw/Files/sbrw/core/project-defaults.yml
in a text editor, I recommend Notepad++. If you don't want to install any more things, you can use WordPad.
password
(by default, secret
) to the password you chose for the soapbox user back in the 1. Base
MySQL script.Open Windows Firewall with Advanced Security
.
Inbound Rules
and then click on New Rule...
on the right panel.Select Port
. Click Next
.
Select TCP
, enter 80, 8080, 5222
as the ports. Click Next
.
Allow the connection
. Click Next
.Next
.Finish
.UDP
and enter 9998, 9999
as the ports.Outbound Rules
(for TCP and UDP).All that's left now is to run it. Go to the folder where you downloaded all the code. Run setting-up-sbrw/Files/start-sbrw.bat
.
If you did everything correctly and no breaking changes happened in SBRW after this guide was written, the server will start without any errors. You'll know if it ran successfully by seeing the statement Thorntail is Ready
on the core server's console window.
Open the SBRW Launcher.
Click on the +
button at the top-right.
OK
. Restart the launcher, select your server from the list, register, login and play!The scripts build-script.bat
and start-sbrw.bat
won't work if you install anything to a path different than what is advised in this guide. Their goal is to help you build the code, they depend on those paths.
Powerups, events or anything related to multiplayer will not work by default. This is partly caused by the current SBRW team relying on their mod framework ModNet
to do it instead of adding the necessary code to the core server itself. To get a very basic ModNet setup for your server:
You need to host an http server on port 80.
The server should have an index.json
in its root folder with the following format:
{
"built_at": "2021-02-28T23:01:24.394847+03:00",
"entries": []
}
You need to add the entries MODDING_BASE_PATH (value: same as SERVER_ADDRESS)
, MODDING_ENABLED (value: true)
, MODDING_FEATURES (value: "")
, MODDING_SERVER_ID (value: a unique name for your server, it won't be visible to the public)
to the parameter
table in the MySQL->soapbox
database.
Note: This is a very basic setup of the SBRW server. I only had the time to cover this much of it.
If you encounter any issues, please report it here for the community to discuss. Give as much detail as possible.
Any and all PRs are welcome.