Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a dedicated Hosting on windows file #223

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
* [Hosting a Basic Listen Server](hosting-a-server-with-northstar/basic-listen-server.md)
* [Hosting a Dedicated Server](hosting-a-server-with-northstar/dedicated-server/README.md)
* [Best practices](hosting-a-server-with-northstar/dedicated-server/best-practices.md)
* [Hosting on Windows](hosting-a-server-with-northstar/dedicated-server/hosting-on-windows.md)
* [Hosting on Linux](hosting-a-server-with-northstar/dedicated-server/hosting-on-linux.md)
* [Server settings](hosting-a-server-with-northstar/server-settings/README.md)
* [Startup arguments](hosting-a-server-with-northstar/server-settings/startup-args.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Hosting on Windows

## Hardware

{% hint style="info" %}
TODO: If you have experience in hosting Northstar servers and want to share your knowledge, please open a [pull request](https://github.com/R2Northstar/NorthstarWiki/pulls).
{% endhint %}
Comment on lines +5 to +7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't feel fitting for Windows hosting page tbh ^^

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tooooo much copy paste


## Minimum requirements

The current minimum requirements are as follows:

**Requirements per server:**

- 8GB free disk space (5GB of the game and 3 for Origin/EA app)
- 3+ cores (2 might work, though)
- 3GB+ total memory (RAM or swap will do)
- Windows 8.1

**Per instance:**

- 2GB RAM (this is what's actually used; it does drop to ~1.2GB after a bit)
- 15 Mbps network upload, but 10 is workable, 25 if you want to avoid players getting disconnected when going back to the lobby after a match

**Note:** It is recommended to surpass the listed requirements. Currently the number of available servers covers the daily playerbase more than enough. If you're planning to host public servers for the community it is therefore recommended to either fill a niche (like a gamemode that is so popular that all existing servers are full) or provide a better service than existing hosts (less lag, more stable, etc.).


## Setup

Dedicated servers allow you to host a Northstar server without having to use a full client, making them more lightweight and easier to host for longer periods of time.\
To start a dedicated server on Northstar, launch NorthstarLauncher.exe with the argument `-dedicated`, this can be done manually, but releases also provide the batch file `r2ds.bat`, which will also do this.\
When using a dedicated server, arguments are read from `ns_startup_args_dedi.txt`, rather than `ns_startup_args.txt`.

#### Useful configuration files

* `ns_startup_args_dedi.txt`\
contains the [startup arguments](../server-settings/README.md/#startup-arguments)
* `R2Northstar\mods\Northstar.CustomServers\mod.json`\
contains [ConVars](../server-settings/convars.md) default values
* `R2Northstar\mods\Northstar.CustomServers\mod\cfg\autoexec_ns_server.cfg`\
contains [ConVars](../server-settings/convars.md) and [overrides](../server-settings/playlistvars.md)

### Dedicated Server Caveats

At the moment, dedicated servers still require DirectX 11 to work, which typically requires a physical GPU, though they use almost no GPU processing power while in use, this can be an issue especially on GPU-less setups, so the launch argument `-softwared3d11` can be used to force DirectX to run in software mode.\
While this is absolutely not ideal, it's the best solution for truly headless dedicated servers at the moment, and surprisingly hardly uses any CPU time, though it can use roughly up to 1GB of RAM.\
Regarding RAM usage, dedicated servers also use significant amounts of RAM at the moment, often requiring 1.5-2GB, though I expect this to lower as development continues.

## Optimization Commands (Optional)

| Command | Description |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `net_compresspackets 1` | Enable compress packets |
| `net_compresspackets_minsize 64` | Decrease usage from ~12-16 mbps to ~6-8 mbps on 20 player PVP server and ~9-12mbps to ~5-7 mbps on 12 player gun game server |
| `sv_maxrate 127000` | Sets the maximum bandwidth rate allowed (both incoming/outcoming) per second (in bytes) |

**Note:** The effect is dependent on your network, system, etc. Therefore, you should really add the command one by one and test it to see if there is any benefit for your server.