Documention type: Tutorial
Last updated: 2003c90b4aecc5150116e83a0f14d18f44bf3536
This project isn't really geared towards an player of the game, but if you want to try it out, this is how to do so:
// TODO: Link to the install docs for each item
- Internet
- Linux
- Git
- Docker
- Docker Compose
- NodeJS (v20.x - v21.x)
- The debug copy of the game
After getting the requirements above ready, perform the following steps:
- Open a terminal or command prompt
- Type
git clone https://github.com/rustymotors/server.git rusty-server
and press enter - Type
cd rusty-server
and press enter - Type
./mcos/pull_nginx_image.sh
and press enter (this step may take a while, depending on your internet speed) - Type
docker-compose up -d
and press enter - Type
corepack enable pnpm
and press enter - Type
pnpm install
and press enter - Type
pnpm run build
and press enter - Type
cp .env.example .env
and press enter - Open the
.env
file with your favorite text editing program (the simpler the better) and edit the values as follows: a.EXTERNAL_HOST=
- Add the hostname or ip of the computer you are running this server on. This value MUST be reachable from where you install the game. b.CERTIFICATE_FILE=
- The relitive path from therusty-server
folder to the SSL certificate. If you want to use the one I have included with the repository (highly recomended), the value will bedata/mcouniverse.crt
c.PRIVATE_KEY_FILE
- The path to the private key. Usedata/private_key.pem
for the working copy d.PUBLIC_KEY_FILE
- The path to the public key. Usedata/pub.key
for the working copy - Type
npm start
and press enter - If the last message on your screen is
Server listening at http://0.0.0.0:3000
, then the server is running!
- Open a web browser
- In the address bar, type
<enternal_ip>/cert
where <enternal_ip> is the value you saved in the .env file on the server. Do not include the brackets, and press enter - Some text should load. The first line should contain
BEGIN CERTIFICATE
- Click "Save" when asked if you want to open or save
- Select the folder you want to save in (I like the Desktop), but before you press "save", make sure to edit the file name so it says
"cert.crt"
. THE QUOTES ARE IMPORTANT - Sorry for the caps. Click "Save" if you haven't already
- In the folder where you saved the certificate, you should see a file named "cert" with an icon that looks like a certificate. Double-click on it.
7.5. From this point on, I'm going to tell you to do a bunch of things that Windows will warn you NOT to do. This is because in order to have the game connect to our server we have to use some very old security methods that are no longer advised to be used. If you don't trust me, that's fine. But it won't work otherwise. Let's proceed.
-
We are looking at a windows that says "The CA Root Certificate is not trusted". Press "Install Certificate"
-
Click "Next"
-
You are now on a screen that asks where you want to save this certificate.
-
Click on the "Place all certificates in the following store" and click "browse"
-
Select "Trusted Roor Certification Authorities". This should be the second one down.
-
Click "Ok"
-
Click "Next"
-
Click "Finish" 16 You now have a window warning you that you are installing a untrusted root certificate that is unknown to Windows. Click "Yes"
-
Click "ok" and then click "Ok" again.
-
Return to your web browser.
-
In the address bar, type
<enternal_ip>/key
where <enternal_ip> is the value you saved in the .env file on the server. Do not include the brackets, and press enter -
A long string of letters and numbers should load.
-
Click "Save" when asked if you want to open or save
-
Select the folder you want to save in (I like the Desktop), but before you press "save", make sure to edit the file name so it says
"pub.key"
. Again, make sure to include the quotes -
Click "Save"
-
Copy the file you just saved to your game install folder. Tell Wndows it is ok to overwrite the existing file of the same name.
-
Return to your web browser
-
In the address bar, type
<enternal_ip>/registry
where <enternal_ip> is the value you saved in the .env file on the server. Do not include the brackets, and press enter -
Some text will load. The first line should contain "Windows Registry Editor"
-
Click "Save" when asked if you want to open or save
-
Select the folder you want to save in (I like the Desktop), but before you press "save", make sure to edit the file name so it says
"client.reg"
. Again, make sure to include the quotes -
Click "Save"
-
This next step has a slight change, depending on what version of Windows you have installed the game under a. If you are using Windows XP (or lower), you will need to edit this file we just save. To do so, right-click on the saved file and choose "edit" If Windows prompts you that the file is not signed, click "open". Every line that starts
HKEY_LOCAL_MACHINE\Software\WOW6432Node\
, change to sayHKEY_LOCAL_MACHINE\Software\
. Leve the rest of the line. Save. b. If you are using a version of Windows that is newer then Windows XP, no action is needed here -
Double-click on the saved file.
-
f Windows prompts you that the file is not signed, click "open".
-
Windows will ask you if you are sure you want to import this registry file. Click "yes"
-
Click "Ok"
If you haven't followed all the steps under the Setup section, this will probably not work well
- Double-click the debug copy of the game
- There are two pre-created logins, depending on what part you to see: a. Username: "admin", Password: "admin" - No existing account, profile creation possible (not playabl, even if it says it was created) b. Username: "molly", Password: "molly" - Existing account, can login to the server and reach the lobby. Any activities past that probably won't work.