diff options
author | james-amarth <116909003+james-amarth@users.noreply.github.com> | 2023-01-31 09:47:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-31 15:47:13 +0100 |
commit | b0cf49faceb6847eba7d1c0c4811e03ec697c4d1 (patch) | |
tree | edeb8e1bcb3bdc0299ea995e37d7557d7bd62206 /docs | |
parent | b70bf4e4c48178e0ca3c36d53c4b37f9d8c96601 (diff) | |
download | NorthstarWiki-b0cf49faceb6847eba7d1c0c4811e03ec697c4d1.tar.gz NorthstarWiki-b0cf49faceb6847eba7d1c0c4811e03ec697c4d1.zip |
Merge Docker instructions into main hosting on Linux section (#111)
* added nsfetch.sh
* merged pg's docker-install guide
changes made
- removed Filezilla recommendation as the windows installer contains PUPs in the installer as options enabled by default
- added pg's `nsfetch.sh`
- changed example volumes to use defined paths instead of relative
- changed CONVARs list link to dedicated-server instead of listen
* test
* added docker-engine install guide
added Ubuntu
* Update hosting-on-linux.md
* updated docker install guide
- added debian
- added fedora
* Delete pg9182-docker-installation-guide.md
merged to Hosting on Linux
* Update docs/hosting-a-server-with-northstar/dedicated-server/hosting-on-linux.md
* commiting suggested changes
* removed pg9182-docker-installation-guide.md
* remove docker install section
* Update docs/hosting-a-server-with-northstar/dedicated-server/hosting-on-linux.md
* Delete playing-on-linux-legacy-guide.md
no longer needed, version gated
* Update docs/hosting-a-server-with-northstar/dedicated-server/hosting-on-linux.md
* re-create legacy linux guide (oops)
* Update docs/hosting-a-server-with-northstar/dedicated-server/hosting-on-linux.md
* added ending statement & link to complex docker-compose example
* Revert accidental changes to legacy guide
* added glibc statement
* undid change meant for other pr
* Update docs/hosting-a-server-with-northstar/dedicated-server/hosting-on-linux.md
* remove /mnt/ advice during file copy process & image links
* Update docs/hosting-a-server-with-northstar/dedicated-server/hosting-on-linux.md
* Apply suggestions from code review
Diffstat (limited to 'docs')
3 files changed, 96 insertions, 100 deletions
diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 8ce0af8..71ea83c 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -34,7 +34,6 @@ * [RCON](hosting-a-server-with-northstar/dedicated-server/rcon.md) * [Troubleshooting](hosting-a-server-with-northstar/troubleshooting.md) * [Guides](hosting-a-server-with-northstar/guides/README.md) - * [Docker Install](hosting-a-server-with-northstar/guides/pg9182-docker-installation-guide.md) ## Modding and Development diff --git a/docs/hosting-a-server-with-northstar/dedicated-server/hosting-on-linux.md b/docs/hosting-a-server-with-northstar/dedicated-server/hosting-on-linux.md index 7493b6f..d53e095 100644 --- a/docs/hosting-a-server-with-northstar/dedicated-server/hosting-on-linux.md +++ b/docs/hosting-a-server-with-northstar/dedicated-server/hosting-on-linux.md @@ -10,9 +10,103 @@ If you do not have a DirectX 11 capable GPU in your system (for example if you a # <a name="Headless_Servers">Headless Servers</a> ## Using Docker -[pg9182/northstar_dedicated](https://github.com/pg9182/northstar-dedicated) : Docker image with server management tools and better performance -Check the `README` page for instructions on the appropriate repository to set up your server. +The preferred method for running a Northstar server in Docker is using pg9182's image which can be found in this GitHub repo: [https://github.com/pg9182/northstar-dedicated](https://github.com/pg9182/northstar-dedicated) + +### Prerequisites + +| Requirement | Description | +| ----------- | ------------------------------------------------------- | +| Kernel | Linux 5.3+, but 4.9+ should work | +| CPU | x86\_64, at least 3 cores minimum | +| RAM | 2GB (Typically peaks at 1.6GB) | +| Disk | 5GB | +| Network | Recommended at least 7-20Mbps up | +| Docker | Have Docker and Docker-Compose installed on the machine | + +### Installation + +#### Install Docker and Docker-Compose + +If you don't already have Docker and Docker-Compose installed, you can learn how to install them for your distro [from this guide](https://docs.docker.com/engine/install/). Once you have them installed, you can move on to the next section. + +### Prepare Titanfall2 Server files + +You will need obtain Titanfall2's game files, typically by copying over your Titanfall2 installation folder and placing it on the Linux machine. Most of these files are for singleplayer and therefore we can delete them from the installation folder and prune the file size down to \~5GB. + +Easiest way to do this is to copy the entire Titanfall2 folder to the server and delete the [following files](https://github.com/pg9182/northstar-dedicated#reducing-the-size-) \ +Alternatively download and run [this shell script](https://gist.github.com/pg9182/9a962adbfc27e93237cd14e4523c9da8) to download only the game files necessary to run a server. + +#### Copy Titanfall2 folder over to the Linux machine + +1. Access the files on your Linux machine using tools like [WinSCP](https://winscp.net/eng/download.php) or any tool that allows for SSH file transfer, or transfer files via USB drive if you can physically access your server. +2. Navigate to the folder where you want to store the files. You can put them into `home/YOUR-USERNAME/Titanfall2` for example. +3. Copy the newly pruned Titanfall2 folder to the server. + +#### Copy mods to server + +If you have configured some mods, these can be placed at a similar location, like `home/YOUR-USERNAME/mods` for example. + +Note that Northstar itself is already installed in the Docker image. Therefore unless you are testing a development version you should NOT copy over the `Northstar.XYZ` mods. + +#### Create docker-compose file + +We are going to be using Docker-Compose to set up our container. This gives us much more flexibility and allows us to make changes to the start up arguments much cleaner. This example will let you start your servers without needing to have your compose file in the same folder and directory as Titanfall2 and your mods folder. Create a compose file in your home directory, or wherever is most convenient. + +``` +nano docker-compose.yml +``` + +Example `docker-compose.yml` \ +(Note that you will have to adjust some lines to make it work on your machine) + +```yaml +version: '3' +services: + northstar-attrition: + image: ghcr.io/pg9182/northstar-dedicated:1-tf2.0.11.0 + pull_policy: always + environment: + - NS_PORT=37015 + - NS_PORT_AUTH=8081 + - 'NS_SERVER_NAME=Enter Server Name here' + - 'NS_SERVER_DESC=Enter your description here' + - NS_EXTRA_ARGUMENTS= + +setplaylist aitdm # Attrition + +mp_gamemode aitdm # Attrition + +map mp_angel_city + +ns_private_match_countdown_length 0 + +ns_should_return_to_lobby 0 + +net_compresspackets_minsize 64 + +net_compresspackets 1 + +spewlog_enable 0 + +sv_maxrate 127000 + volumes: + - /home/YOUR_USERNAME_HERE/Titanfall2:/mnt/titanfall:ro + - /home/YOUR_USERNAME_HERE/Titanfall2/mods:/mnt/mods:ro + ports: + - '37015:37015/udp' + - '8081:8081/tcp' + restart: always +``` + +A list of all the CONVARs are [here](../../hosting-a-server-with-northstar/dedicated-server#convars) + +A more complex docker-compose example for hosting a server can be found [here](https://github.com/pg9182/northstar-dedicated#container), along with some extra information. + +### Starting + +#### Run the following command + +To run this container go to the folder where you saved the `docker-compose.yml` in and type + +``` +docker-compose up +``` + +Your server should be up and running now. Check the in-game server browser or the [online server list](https://northstar.tf/servers) to see if it's online. + +Should your server not show up or should you encounter any other issues, check the [server troubleshooting section](https://r2northstar.gitbook.io/r2northstar-wiki/hosting-a-server-with-northstar/troubleshooting) of the wiki. ## Without using Docker diff --git a/docs/hosting-a-server-with-northstar/guides/pg9182-docker-installation-guide.md b/docs/hosting-a-server-with-northstar/guides/pg9182-docker-installation-guide.md deleted file mode 100644 index 4a9710f..0000000 --- a/docs/hosting-a-server-with-northstar/guides/pg9182-docker-installation-guide.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -description: >- - pg9182 has provided a complete docker image to run on Linux servers. This - provides some server management tools and offers better performance. No - physical GPU is needed. ---- - -# Docker Install - -The aim of this guide is to show the steps to build a docker-compose container that starts on boot and to show basic configuration. Docker image can be found in this GitHub repo: [https://github.com/pg9182/northstar-dedicated](https://github.com/pg9182/northstar-dedicated) - -### Prerequisites - -| Requirement | Description | -| ----------- | ------------------------------------------------------- | -| Kernel | Linux 5.3+, but 4.9+ should work | -| CPU | x86\_64, at least 3 cores minimum | -| RAM | 2GB (Typically peaks at 1.6GB) | -| Disk | 5GB | -| Network | Recommended at least 7-20Mbps up | -| Docker | Have Docker and Docker-compose installed on the machine | - -### Installation - -#### Prep Titanfall Server files - -You will need to copy over your Titanfall installation folder and place it on the Linux machine. Most of these files are for SP and therefore we can delete from the installation folder and prune the file size down to \~5GB. - -Easiest way to do this is copy the entire Titanfall2 folder to your desktop and delete the [following files](https://github.com/pg9182/northstar-dedicated#reducing-the-size-). - -#### Copy Titanfall Folder over to the Linux Machine - -1. Access the files on your Linux machine using tools like [Filezilla](https://filezilla-project.org/) or [WinSCP](https://winscp.net/eng/download.php) -2. Navigate to the folder where you want to store the files. You can put them into `~/Titanfall2` for example. -3. Copy the newly pruned Titanfall folder to the server. - -![Game files copied to `/mnt/Titanfall` as an example](https://i.postimg.cc/15HbbzFr/image.png) - -#### Copy mods to server - -If you have configured some mods,these can be placed at a similar location, like `~/mods` for example(https://i.postimg.cc/tRD5jnrJ/image.png) - -#### Create docker-compose file - -We are going to be using Docker-Compose to set up our container, this gives us much more flexibility and allows us to make changes to the start up args much cleaner. Create a compose file in the same location you've put your `Titanfall2` and `mods` folder for example. - -``` -nano docker-compose.yml -``` - -Example docker-compose.yml - -```yaml -version: '3' -services: - northstar1: - image: ghcr.io/pg9182/northstar-dedicated:1-tf2.0.11.0 - pull_policy: always - environment: - - NS_PORT=37015 - - NS_PORT_AUTH=8081 - - 'NS_SERVER_NAME=[Region]Enter Server Name here' - - 'NS_SERVER_DESC=Enter your description here' - - | - NS_EXTRA_ARGUMENTS= - +setplaylist aitdm - +mp_gamemode aitdm - +map mp_angel_city - +ns_private_match_countdown_length 0 - +ns_should_return_to_lobby 0 - +net_compresspackets_minsize 64 - +net_compresspackets 1 - +spewlog_enable 0 - +sv_maxrate 127000 - volumes: - - ./Titanfall2:/mnt/Titanfall:ro - - ./mods:/mnt/mods:ro - ports: - - '37015:37015/udp' - - '8081:8081/tcp' - restart: always -``` - -**Note:** `./<foldername>` in volumes means that the location is relative to your compose file. The general syntax for adding volumes is `<location on host>:<location in container>[:<modifier like read-only>]` (the part in `[...]` is optional). - - -A list of all the CONVARs are [here](../../basic-listen-server/#server-configuration) - -### Starting - -#### Run the following command - -To run this container go to the folder you saved the `docker-compose.yaml` in and type - -``` -docker-compose up -``` |