With WinSCP still opened and logged into your VM, You'll see a tab at the top called "Commands". Click on it and you'll see a option that allows for you to access your server teminal through putty (in this case the "open in Putty" option).
Click on it and you'll be greeted to your VM's terminal asking to enter it's password. Don't worry if nothing shows up as your typing it out. This is for security purposes to ensure no will try to steal it. Go ahead and do so and once logged in, You should come to a screen showcasing your VM's system specs and statistics.
With you now logged into your terminal as the root admin, It's recommended that We create another user that'll specifically be for hosting your ring racers server. For the sake of this guide in keeping things as simple as possible, we'll name it “ringracers” for now. To do so, Type in
adduser ringracers
From there, It'll ask to set up a password for it as well as other user info questions. These aren't mandatory so you can skip them by pressing enter for each one after setting your ring racers password. Make sure to set it to one you know you'll remember down the line for future purposes or make a note of it somewhere where it's only accessable to you and no one else. With the ringracers user now added to your VM, You'll then need to give it admin priveleges. This can be done by typing in
usermod -aG sudo ringracers
This is one of the key steps in what you'll need in being able to run terminal commands that would only be limited to the root user. This command overrides that and grants admin permissions by using the “sudo” command. With both the ring racers user being created as well as it having admin preveledges, We can close out of the current putty session and head back into WinSCP. From here you'll need to open up a new tab and follow the same steps back in part 3 in entering your VM Credentials, Only this time you'll be using the ones you created for the ring racers username. In this case it should look like something along the lines of this.
Once finished, Save it as a new site and log into your VM again through WinSCP using your Ring Racers Username. With us now back inside and Moving onwards with adding everything else we'll need, Starting with Byobu, We'll go ahead and install that first onto your VM. This is what will be used to access the game's console window to be able to check up on the server as you normally would in-game weather it be to input game commands to directly talking to players inside your server. Go ahead and login to your newly created ringracers user account through putty using the "open in Putty" option again and from there, type in your server terminal window
sudo apt install byobu
For security purposes, it'll ask to put in your password again. Once entered, it'll search for it and ask to confirm if you want to install it onto your VM with the options to either type "y" for yes or "n" for no. go ahead and type in y, Press enter and it'll begin to install byobu onto your VM. Once it's finished, Now comes installing both the dependencies and extra programs needed in compiling the game. To do so, Copy and paste this into the terminal window.
sudo apt-get install build-essential git p7zip-full p7zip-rar nasm libpng-dev zlib1g-dev libsdl2-dev libsdl2-mixer-dev libgme-dev libopenmpt-dev libcurl4-openssl-dev make cmake htop libogg-dev libvorbis-dev libvpx-dev libyuv-dev tmux unzip wget
From there, it'll start searching for each of what's listed above and begin the installation process. Once everything is installed, Now comes actually compiling and installing Ring Racers on your VM. For starters, we'll need to get a hold of the source code first. In the case for this guide, We'll be using a custom version provided by NepDisk that has all of the necessary fixes applied to it that the base game does'nt have, Allowing for users to be able to properly host and run their servers with very little issues as much as possible. That being said with the terminal still opened, Go ahead and type in
sudo git clone https://codeberg.org/NepDisk/RR-Host.git
This'll make a copy of the source code that's hosted within the link above and add it directly to your VM. With the source code now added, Go ahead and type in
cd RR-Host
This'll change the current folder directory you were in previously to the one you just typed in on the terminal window. In this case, this is where the source code itself is located and where we need to be in order for us to compile everything. Continuing onwards, We'll need to make a build folder for it. This is where you'll find the game itself once it's fully compiled. To do so, Go ahead and type in
sudo mkdir build
From here we need to navigate to it using the cd command again, In this case, it'll be
cd build
With us now inside along with the dependencies we installed earlier, Now we'll need to create the cmake files for it as this is a key step in being able to properly compile the game. To do so, Type in
sudo cmake ..
This'll begin the process in creating the files needed in being able to make a build of the game which should be instant. With that being said now comes compiling the game itself. To do so, Simply type in
sudo make -j$(nproc)
This'll begin the process in compiling both the source code for the game along with the dependencies that we installed earlier which should only take a few minutes for it to finish. Once the process has successfully compiled everything, We'll need to navigate to where the build of the game itself is. This can be done by typing incd bin
From here, We'll then need to move it to your main ringracers user folder. To do so, type in
sudo mv ringracers_hosterfix ringracers
If done correctly, You should be able to see the build within your VM through WinSCP.
Now that we have the game fully compiled, Now comes getting the assets needed in order for it to boot and run. Going back into your terminal, type in “cd” to return to your main user folder. From here, we'll need to make a install folder for ring racers itself. This can be done by typing in
sudo mkdir .ringracers
With the install folder created, We can now move the build for ring racers into the .ringracers folder. To do so, type in
sudo mv ringracers /home/ringracers/.ringracers
From here, We'll need to get a hold of the game's main file assets. This can be done using the “wget” command and typing (Copying and Pasting this also works) this into the terminal
wget https://github.com/KartKrewDev/RingRacers/releases/download/v2.3/Dr.Robotnik.s-Ring-Racers-v2.3-Assets.zip
This'll download what we need directly onto your VM. With the ZIP file for the assets on hand, We'll need to extract it to the .ringracers folder. To do so, type in
unzip Dr.Robotnik.s-Ring-Racers-v2.3-Assets.zip -d /home/ringracers/.ringracers
If all done correctly, Both the build of ring racers we compiled earlier, along with the assets we just now extracted should all be within the .ringracers folder. For the sake of testing purposes, We'll need to make sure that we can be able to boot into the game through your VM now that everything is set in place for it. This'll also be a good way to test things out on the chance if you plan on having it set up as a core based server with no mods. We'll first need to navigate to the .ringracers folder through the terminal. This can be done by typing in
cd .ringracers
With us now inside, We'll need to put in the command that'll allow us to boot up the game as well as having it set as a dedicated server which will allow it to show up on the master server. To do so, Type in
./ringracers -dedicated
From there, It'll begin booting up the server, along with the files needed that we downloaded earlier from the assets. If all went accordingly, You've successfully installed ring racers onto your VM. Knowing now that everything is set in place and that we can be able to boot into the game, shut down the game for now by typing in quit and We can proceed into the next set of steps from here.
With the game now compiled and installed onto your VM, We'll need to add the mods themselves onto it as well as installing a HTTP server that'll allow for automatic downloads for addons upon entering your ring racers server. This'll also act as your server repository for keeping your addons stored. Starting with adding your mods first, navigate to the game's install folder on your VM (In this case the .ringracers folder), You'll see another one that should say "addons". Navigate to it and once inside, You'll need to make a new set of folders inside it. This'll help into keeping specific addons organized into thier respective categories. As for the folder names in mind, you'll need ones for...
Once each folder is made, Go ahead and add whatever mods you intend to have loaded onto your server into each folder respectively, Making sure that they reflect the ones you listed as part of the txt file you saved back in "step 2". Leave the index folder empty for now as we still need to set up a HTTP file source first for the next set of steps later on.
Once you've added the addons you intend to use for your server into the folders, Go back into the game's install folder and from there, You should see a file that says “ringserv.cfg”. This is where a good chunk of where your server setting will be stored at and what will be loaded upon booting up the game through your VM. If one does'nt exist, you can make one of your own. Once Opened, Going back a bit further to "step 2" in regards to the text file you saved earlier containing the addons list we put together, Open that back up, Copy the list and paste it directly into your ringserv.cfg file. Before saving it, We'll need to add some “wait” commands to ensure that all of the addons load with no issues. I recommend adding it after every 3 to 5 addons and setting the wait timer to 5. For Example purposes, You should have something that looks along the lines of this.
addfile Test1.pk3Once that's done, Go ahead and save your ringserv.cfg and close it for now. We'll need to come back to this again later. With both the addons inside their folders and the addons list added into the ringserver.cfg, we can move on into installing the HTTP file system on your VM. To do so, you'll need to install a program onto your VM known as Nginx. To get started, Go back into your server terminal through putty and from there, type in
sudo apt-get install nginx
From here, Simply follow the prompts afterwards to finish the install. Once done, We'll need to test and see if it installed properly by opening up your web browser and typing in your VM's IPV4 Address. You'll know it worked if you are greeted to the Nginx welcome page.
With Nginx installed, Now we need to edit the config file to have it set to where it'll search for the index folder that you created in the previous step, as well as creating a shortcut that'll allow for your HTTP server to be linked with it. to do so, Go into your server terminal and type in
sudo nano /etc/nginx/sites-available/default
A new screen should pop up afterwards that should look like this.
Once opened, Navigate through it using the up and down arrow keys until you come the section that says...
location / {Directly under that, Add this to it.
location /repo/ {If enter correctly, it should look like this.
location / {From there, Press ctrl+O (Hold the ctrl key then press O) to save the config file and once done, Press ctrl+X to exit. With the HTTP set in place, Now comes creating a shortcut for it that'll link it to the game's index folder. To do so while still in the server terminal, type in
sudo ln -s /home/ringracers/.ringracers/addons/index /var/www/html/repo
From here, press enter and Once done, You'll need to restart the service for Nginx in order for the changes to take effect. To do so, Simply type in
sudo service nginx restart
For testing purposes, add any mod of your choosing to the index folder in WinSCP and from there, Go back into your web browser and type in you server's IPV4 address again but this time, Add /repo/ at the end of it (http://youripv4address/repo/). If all went correctly, You should see the addon you just added to your index folder in your HTTP repo. On the chance if you happen to get a 403 error, This is due to certain permissions not being set properly in WinSCP. To fix this, navigate to "/home/ringracers" and right-click on the .ringracers folder. From there, click on "properties" and make note of the "Permissions" Section. You'll see a number that's listed there. change it to 0755 and click on "Ok". From there, refresh your HTTP repo on your web browser and everything should show up as intended.
With your server's HTTP file repo setup, Now you'll have to add the link for it to the game's config file for your server. To do so, Go back into winscp and navigate back to "/home/ringracers/.ringracers" and from there, You should see a file named "dringconfig.cfg". This is also the file where you can be able to set up other aspects of your server settings from cutomizing the player count, editing the name of your server, etc. Once opened, scroll through it until you see a section that says
http_source ""
Within the two quotation marks, copy and paste the url of your HTTP repo into them. it should look something like this afterwards.
http_source "http://youripv4address/repo/"
From there, you can save and close it.
With that now in place, we can add the addons to the repository itself. to do so, add the same ones that you added seperately into folders previously only except this time, we'll be making copies of each addon and putting them all
directly into the index folder instead. Once done, You should now be able to see all of the addons for your server inside of your HTTP repo through your web browser.
Should you decide to update your server in adding new mods to it weather it be for characters, tracks or LUA, make sure to also update the list inside your ringserv.cfg file as well. With both the mods added to your server as well as your HTTP being set up, We'll once again need to test to make sure that everything works as intended. To do so, Go back into the terminal through putty and navigate back into the .ringracers folder using the command cd .ringracers and then typing in ./ringracers -dedicated. This'll boot the game up again but this time, the mods we added earlier will also be loaded along side it. With all of this now set in place, use the quit command again to shut down the game.
This is a bit of a minor step but it's one that'll be helpful in managing and updating addons for your server repository weather it be for adding or removing them without the need of having to manually update the index folder each time. This script will basically copy all of the addons that's currently inside all of the seperate folders (characters, tracks, etc.) and paste them directly into the index folder automatically without the need of you having to do it yourself. Moving forward as to how to set up the script itself, Head back into your terminal window and type in
sudo nano ~/.ringracers/update.sh
This'll go ahead and create a new blank script file. From here, You can proceed into copying and pasting this into the script.
#!/bin/bashWith this now set in place, Go ahead and save it by using "ctrl+o" and then exit out of nano by using “ctrl+x”. To test in making sure that the script works, We'll need to use the “bash” command to execute it. In this case, It'll be
bash ~/.ringracers/update.sh
Press Enter and if done correctly, Your server repo should now be updated with any new mods that you've added or removed. On the chance if you get a error saying ln: addons/index/: hard link not allowed for directory, This is due to one or all of the other seperate folders not having any addons inside of them. To ensure that the script runs with no issues, make sure to have at least one addon in each folder respectively outside of the index folder itself. With all of what we need setup for Nginx, We can proceed onwards into the next phase.