Merge pull request #34 from Protogen187/patch-1

Update create-a-server.md
This commit is contained in:
Starystars67 2024-06-10 21:56:09 +01:00 committed by GitHub
commit cb68aa6347
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,37 +4,56 @@
Basics of setting up the server application Basics of setting up the server application
--- ---
### **Overview** ## **Overview**
**Making a server for BeamMP is simple and free!** **Creating a Home Server is free, hosting one with a VPS is easier and more secure**
Servers are an integral part of BeamMP; players are connected to each other through the server. They run natively on Windows and Linux. Servers are an integral part of BeamMP; players are connected to each other through the server. They run natively on Windows and Linux.
You can make private servers, which only people you invite can join, or public servers, which will show in our official server list. You can make private servers, which only people you invite can join, or public servers, which will show in our official server list.
Getting a server up and running is a process with a few steps! It's quite easy, but if you run into any issues, feel free to ask on our [Forum](https://forum.beammp.com) or on our [Discord server](https://discord.gg/beammp) in the `#support` channel. Also refer to the [Server Maintenance](server-maintenance.md) section for more info.  Getting a server up and running is a process of a few steps! If you run into any issues, feel free to ask on our [Forum](https://forum.beammp.com) or on our [Discord server](https://discord.gg/beammp) in the `#support` channel. Also refer to the [Server Maintenance](server-maintenance.md) section for more info.
Please make sure to read the [LICENSE](https://raw.githubusercontent.com/BeamMP/BeamMP-Server/master/LICENSE) of the server before use. Please make sure to read the [LICENSE](https://raw.githubusercontent.com/BeamMP/BeamMP-Server/master/LICENSE) of the server before use.
Note: _The server only supports IPv4\. If you don't know which one you have, look at the IP address you see on_ [_whatsmyip.org_](https://www.whatsmyip.org/) _- if it contains_ `_:_` _colons, it's **IPv6**. In that case, you should investigate further whether you also have an IPv4\. You can call your ISP to find this out, or ask someone who lives with you (if they're tech-savvy, they might know!). IPv6 support is planned._ Note: _The server only supports IPv4\. If you don't know which one you have, look at the IP address you see on [_whatsmyip.org_](https://www.whatsmyip.org/) - if it contains_ `_:_` _colons, it's **IPv6**. In that case, you should investigate further whether you also have an IPv4\. You can call your ISP to find this out, or ask someone who lives with you (if they're tech-savvy, they might know!). IPv6 support is planned._
## Setting up the Server ## Setting up the Server
Setup consists of a few steps, you should follow all of them. Setup consists of the following steps, you should follow all of them.
### 1. Port forwarding ## 1. Port forwarding
_If you are on a VPS (Virtual Private Server) or Rootserver, you can usually skip this step. If you're unsure about what a VPS or Rootserver is, you aren't on one._ _If you are on a VPS (Virtual Private Server) or Rootserver, you can skip this step. If you're unsure about what a VPS or Rootserver is, you most likely aren't on one._
This step is necessary if you want someone outside of your household to join ("outside of your local network"). This step is necessary if you want someone outside of your household to join ("outside of your local network").
This step is the same for almost every game's server, such as Minecraft Servers, so you can find many tutorials online for this, even for your specific router model. A good full guide is [this tutorial](https://www.noip.com/support/knowledgebase/general-port-forwarding-guide/). Make sure you forward port  **30814**, as **TCP** and **UDP**.  ### DISCLAIMER:
By Port forwarding you understand the risks of opening up ports on your home network to the public and therefor void the right to hold BeamMP accountable for any (serious) damages that may happen to you or your household.
Therefore it is recommended to host a Server with one of our partnered Services!
While the default **Port** you want to “forward” is **30814**, you can choose any other number >1024, but you need to note down what you picked if it's not 30814\. You need to forward both **TCP** and **UDP**.  Paid Services
* [Horizon Hosting](https://hrzn.link/beammp)
* [Racing Game Servers](https://racinggameservers.com/games/beamng-drive/)
* [Snakecraft Hosting](https://schost.us/beammp-plans)
* [Connect Hosting](https://connecthosting.net/beammp)
* [Assetto Hosting](https://assettohosting.com/en/games/beamng)
* [WinHeberg](https://winheberg.fr/offres/gaming/beammp?lang=en)
* [Street Inc](https://billing.streetinc.org/)
* [Zap Hosting](https://zap-hosting.com/en/beammp-server-hosting/)
If you have issues, also feel free to ask on our [Forum](https://forum.beammp.com) or on our [Discord server](https://discord.gg/beammp) in the `#support` channel. Free Services
* [Connect Hosting](https://connecthosting.net/beammp)
#### 1.1 Firewall **any other companies offering BeamMP-Server hosting which aren't listed here are not legit and WILL charge you more than our partners**
Now back to Port Forwarding. This step is the same for almost every game's server, such as Minecraft Servers, so you can find many tutorials online for this, even for your specific router model. A good full guide is [this tutorial](https://www.noip.com/support/knowledgebase/general-port-forwarding-guide/). Make sure you forward port  **30814**, as **TCP** and **UDP**. 
While the default **Port** you want to “forward” is **30814**, you can choose any other number >1024, but you need to note down what you picked if it's not 30814\. You need to forward both **TCP** and **UDP**.
It is recommended to stick to the default port as that one is very unlikely to be used by another Service on your PC.
NOTE: If you are hosting multiple Servers on one machine, each Server needs a different Port. Server 1: 30814, Server 2: 30815 for example.
## 1.1 Firewall
Depending on your setup, you may need to let BeamMP-Server through your firewall. This is the case on Windows (turning the firewall off does **not** work usually), and on a lot of preinstalled Linux servers.  Depending on your setup, you may need to let BeamMP-Server through your firewall. This is the case on Windows (turning the firewall off does **not** work usually), and on a lot of preinstalled Linux servers. 
@ -42,13 +61,13 @@ There, just like with the port forwarding, you want to allow the BeamMP-Server t
If you have issues, also feel free to ask on our [Forum](https://forum.beammp.com) or on our [Discord server](https://discord.gg/beammp) in the `#support` channel. If you have issues, also feel free to ask on our [Forum](https://forum.beammp.com) or on our [Discord server](https://discord.gg/beammp) in the `#support` channel.
### 2. Obtaining an Authentication Key ## 2. Obtaining an Authentication Key
The “Authentication Key”, often called “AuthKey”, is necessary for making a **public** server, but **should** be done for private servers, too. The “Authentication Key”, often called “AuthKey”, is necessary for making a **public** server, but **should** be done for private servers, too.
You will need a [Discord](https://discord.com) account for this step. This is necessary to prevent spam. You will need a [Discord](https://discord.com) account for this step. This is necessary to prevent spam.
#### 2.1. Accessing the keys page ### 2.1. Accessing the keys page
Login with Discord to the [Keymaster](https://beammp.com/keymaster). Login with Discord to the [Keymaster](https://beammp.com/keymaster).
From the Keymaster homepage click on "Keys" on the left of the screen: From the Keymaster homepage click on "Keys" on the left of the screen:
@ -57,7 +76,7 @@ From the Keymaster homepage click on "Keys" on the left of the screen:
![](../../assets/content/keymaster_homepage.png) ![](../../assets/content/keymaster_homepage.png)
</figure> </figure>
#### 2.2. Creating a key ### 2.2. Creating a key
To create your key click on the green "+" button in the top right.  To create your key click on the green "+" button in the top right. 
@ -65,7 +84,7 @@ To create your key click on the green "+" button in the top right. 
![](../../assets/content/keymaster_new_key.png) ![](../../assets/content/keymaster_new_key.png)
</figure> </figure>
#### 2.3. Filling out the key information ### 2.3. Filling out the key information
Next, fill out the Server Name field (this is just the key name not the actual name of the server on the list), then click "Create". Example: Next, fill out the Server Name field (this is just the key name not the actual name of the server on the list), then click "Create". Example:
@ -83,7 +102,7 @@ It should, in the end, look something like this:
You have a limited number of keys. One key can be used on one server at a time, so you cannot start two servers at the same time with the same key. You have a limited number of keys. One key can be used on one server at a time, so you cannot start two servers at the same time with the same key.
#### 2.4. Copying the key ### 2.4. Copying the key
Now copy the text in the “Key” field, in this example that is `3173a2e-6az0-4542-a3p0-ddqq5ff95558` and hold onto it for the next step. You can do this by clicking the clipboard on the right of the key: Now copy the text in the “Key” field, in this example that is `3173a2e-6az0-4542-a3p0-ddqq5ff95558` and hold onto it for the next step. You can do this by clicking the clipboard on the right of the key:
@ -91,15 +110,15 @@ Now copy the text in the “Key” field, in this example that is `3173a2e-6az0-
![](../../assets/content/keymaster_copy_key.png) ![](../../assets/content/keymaster_copy_key.png)
</figure> </figure>
### 3. Installation ## 3. Installation
The BeamMP-Server is available for Windows and Linux. The next two sections are dedicated to Windows and Linux each.  The BeamMP-Server is available for Windows and Linux. The next two sections are dedicated to Windows and Linux each. 
#### 3.a. Installation on Windows ### 3.a. Installation on Windows
For the Linux installation, see the next step. For the Linux installation, see the next step.
Please ensure you have port-forwarded before attempting to host a server! Without you ports being forwarded, you cannot host a server to the public! Please ensure you have port-forwarded before attempting to host a server at home! Without you ports being forwarded, you cannot host a server to the public!
1. Ensure you have installed the [Visual C++ Redistributables](https://aka.ms/vs/17/release/vc_redist.x64.exe) in order to run the server. 1. Ensure you have installed the [Visual C++ Redistributables](https://aka.ms/vs/17/release/vc_redist.x64.exe) in order to run the server.
2. Download the server executable from [beammp.com](https://www.beammp.com/). You should end up with an executable file, called something like `BeamMP-Server.exe`. 2. Download the server executable from [beammp.com](https://www.beammp.com/). You should end up with an executable file, called something like `BeamMP-Server.exe`.
@ -109,7 +128,7 @@ Please ensure you have port-forwarded before attempting to host a server! Withou
Now proceed to step "4\. Configuration". Now proceed to step "4\. Configuration".
#### 3.b. Installation on Linux ### 3.b. Installation on Linux
##### Using our build (recommended) ##### Using our build (recommended)
@ -131,7 +150,7 @@ Other distributions in addition to the ones that already have a binary [here](ht
At the end, make sure to run your server once with `./BeamMP-Server` and then proceed to the next step. At the end, make sure to run your server once with `./BeamMP-Server` and then proceed to the next step.
### 4. Configuration ## 4. Configuration
Now that you ran the server once, it should have created some files and probably uttered an error or two. This is because we are not yet done. Your folder should have these files: Now that you ran the server once, it should have created some files and probably uttered an error or two. This is because we are not yet done. Your folder should have these files:
@ -171,22 +190,22 @@ If you picked a different **Port** other than **30814**, make sure to replace it
**IMPORTANT:** Your server will **NOT** show in the server list as long as `Private = True`. _If_ you want it to show in the list, set that to `**Private = False**`. **IMPORTANT:** Your server will **NOT** show in the server list as long as `Private = True`. _If_ you want it to show in the list, set that to `**Private = False**`.
### 5. Validation ## 5. Validation
Now run your server again, and see if it spits out any more `[ERROR]` messages. It should just stay open. At this point, you can start BeamMP through the BeamMP-Launcher and you should find your server by the Name you entered in the `ServerConfig.toml` in the server list. Now run your server again, and see if it spits out any more `[ERROR]` messages. It should just stay open. At this point, you can start BeamMP through the BeamMP-Launcher and you should find your server by the Name you entered in the `ServerConfig.toml` in the server list.
--- ---
## How to add mods to your server ### 5.1 How to add mods to your server
Vehicle mods and map mods are different to install, but both require you to put them in your server's (`Resources/Client`) folder. Simply slide any mod you want to add in that folder.  Vehicle mods and map mods are different to install, but both require you to put them in your server's (`Resources/Client`) folder. Simply slide any mod you want to add in that folder. 
### General Mods ### 5.2 General Mods
If you only wanted to add modded vehicles, you simply put the zip file of the mod in the `Resources/Client` folder. They will automatically be downloaded by anyone who joins your server. If you only wanted to add modded vehicles, you simply put the zip file of the mod in the `Resources/Client` folder. They will automatically be downloaded by anyone who joins your server.
### Maps ### 5.3 Maps
All default maps (maps which aren't mods) work out-of-the-box and do not have to be installed. You simply change the `Map` setting in the `ServerConfig.toml` file to any of [these](server-maintenance.md#all-vanilla-maps-names). For any other modded maps, do this: All default maps (maps which aren't mods) work out-of-the-box and do not have to be installed. You simply change the `Map` setting in the `ServerConfig.toml` file to any of [these](server-maintenance.md#all-vanilla-maps-names). For any other modded maps, do this:
@ -202,22 +221,30 @@ Now, when someone joins your server, it should download the map automatically an
That's it! Your modded map should now be available to join! That's it! Your modded map should now be available to join!
## How to join your server ## 6 How to join your server
How you and other people can join your server. How you and other people can join your server.
### Joining your own server ### 6.1a Joining your own server
You must join your server by direct connecting, to do this, click the **Direct Connect Tab** on the left from the server list. Leave the default info in there (should be 127.0.0.1 and a port of 30814) then hit connect.If you server is hosted outside of your house you must [find your IP](https://whatismyipaddress.com/) on that machine and direct connect that way. You must join your server by direct connecting, to do this, click the **Direct Connect Tab** on the left from the server list. Leave the default info in there (should be 127.0.0.1 and a port of 30814) then hit connect.If you server is hosted outside of your house you must [find your IP](https://whatismyipaddress.com/) on that machine and direct connect that way.
### Other people joining your server (Public) ### 6.1b Other people joining your server
For anyone else to join your server, it first must be port forwarded ([A good guide here](https://www.noip.com/support/knowledgebase/general-port-forwarding-guide/)). To join your public server they can simply go to the server list, type the name of the server, and click connect. If you are unsure of what your server name is, it will be the name you put in the `ServerConfig.toml` ### For private servers:
Start the Server. You have to give the people the IP Address of your Server. However, be careful sharing your homes public IP Address!
### Other people joining your server (Private) ### For public Servers:
Start the Server, wait a few minutes and the Server should be in the **Public Servers** List upon searching it by its name entered into the `ServerConfig.toml`
Make sure search filters are disabled and the Map set to "Any" if you can't find it.
You can also check the [Keymaster](https://beammp.com/keymaster) Website for the Servers IP Address.
For anyone else to join your server, it first must be port forwarded ([A good guide here](https://www.noip.com/support/knowledgebase/general-port-forwarding-guide/)). To join your private server they must go to the **Direct Connect** T**ab** in BeamMP, then type your IP and Port. If you are unsure of your IP [here's a good website](https://whatismyipaddress.com/). If you are unsure of your port the default is 30814, the port will be the same as the port you port forwarded. Should you or your friends experience a "Connection Failed!" Error, check the Launcher Window for codes like 10060, 10061, 10030.
This means you eihter have a CGNAT IPv4, or you have done something wrong during Step **1 Port Forwarding** or **1.1. Firewall**.
To check if you have a CGNAT IPv4, look up the WAN IP Address on your routers interface. Compare it to your public IP listed on [_whatsmyip.org_](https://www.whatsmyip.org/)
IPv6 Support is **NOT** yet implemented.
### Other people joining your server (Hamachi) ## Still facing issues?
Open a Thread on the [Forum](https://forum.beammp.com) or on our [Discord server](https://discord.gg/beammp) in the `#support` channel.
For someone to join your server, they must be on your Hamachi network, you do not need to be port forwarded for this. After joining your Hamachi network they will use the Hamachi IP and default port to direct connect to your server. For more info see our [Hamachi](https://forum.beammp.com/t/tutorial-how-to-host-a-server-with-logmein-hamachi/52) guide.