From c06916084e662c2e29604c8f02d2a453c88af1fc Mon Sep 17 00:00:00 2001 From: miniduikboot Date: Mon, 30 Jan 2023 00:04:55 +0100 Subject: [PATCH] Rewrite Running-the-server.md - Multi-server is removed from the intro - Add Impostor.Http stuff - Stress the importance of public ip --- docs/Running-the-server.md | 48 ++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/docs/Running-the-server.md b/docs/Running-the-server.md index 52e6f66..b018ca3 100644 --- a/docs/Running-the-server.md +++ b/docs/Running-the-server.md @@ -1,35 +1,50 @@ # Running the server -There are currently two modes to run the Impostor server. The first way, Single Server, is the simplest one, can handle up to a few hundred simultaneous players, and is the one you should probably use. Multi-Server mode will distribute players across other servers and is intended for advanced users. +There are currently two install methods for Impostor: You can install it normally or inside of a Docker container. If you do not have a particular preference, we recommend the normal installation over the Docker container method. -## Single server +## General remarks for both install methods -### Without Docker +This section applies to both the normal installation as well as the Docker (Compose) installation -1. Install the [.NET 7.0 runtime](https://dotnet.microsoft.com/download/dotnet/7.0). Installing the SDK also works, but is not necessary unless you plan on developing Impostor or Impostor plugins. If you're asked to pick between the normal, desktop or server runtime, the normal runtime is enough, but some plugins may require the ASP.NET Core Runtime as well. -2. Find the [latest release](https://github.com/Impostor/Impostor/releases) or the [latest CI build](https://nightly.link/Impostor/Impostor/workflows/ci/master). -3. Download the version for your OS (linux/win/osx). Impostor is built for multiple CPU-architectures, you most likely want the x64 version, unless you are running on a Raspberry Pi or another device with an ARM processor. -4. Extract the zip. -5. Modify `config.json` to your liking. Documentation can be found [here](Server-configuration.md) _(this step is mandatory if you want to expose this server to other devices)_ -6. Run `Impostor.Server` (Linux/macOS) or `Impostor.Server.exe` (Windows) -7. (OPTIONAL - Linux) Configure a systemd definition file and enable the service to start on boot - [systemd configuration](Server-configuration.md#systemd) +To connect to the server, you need to configure and install a region file on https://impostor.github.io/Impostor/ + +Depending on your host you may also need to port forward Impostor to the internet or pass Impostor traffic by your firewall. By default Impostor uses two ports: -Depending on your host you may also need to port forward Impostor to the internet. By default Impostor uses port **22023** and the **UDP** protocol. As port forwarding changes per host or router configuration, port forwarding is not covered by this guide. +- Port **22023** using the **UDP** protocol +- Port **22000** using the **TCP** protocol -To connect to the server, you need to configure a region file on https://impostor.github.io/Impostor/ +As port forwarding changes per host or router configuration, port forwarding is not covered by this guide. -### Using Docker +## Normal installation + +1. Install [.NET 7.0](https://dotnet.microsoft.com/download/dotnet/7.0). We recommend either the ASP.NET Core Runtime or the SDK. The SDK is necessary in case you want to develop Impostor or Impostor plugins. +2. Download the [latest release](https://github.com/Impostor/Impostor/releases) or the [latest CI build](https://nightly.link/Impostor/Impostor/workflows/ci/master). Note that Impostor is built for multiple CPU-architectures and operating systems, you most likely want the x64 version, unless you are running on a Raspberry Pi or another device with an ARM processor. +3. Extract the zip. +4. Download the [Impostor.Http](https://github.com/Impostor/Impostor.Http) plugin and put it in your `plugins` folder. +5. Modify `config.json` to your liking. Documentation can be found [here](Server-configuration.md). You need to at least change `PublicIp` to the address people will connect to your server to. +6. Run `Impostor.Server` (Linux/macOS) or `Impostor.Server.exe` (Windows) +7. (OPTIONAL - Linux) Configure a systemd definition file and enable the service to start on boot - [systemd configuration](Server-configuration.md#systemd) + +## Using Docker [![Docker Image](https://img.shields.io/docker/v/aeonlucid/impostor?sort=semver)](https://hub.docker.com/r/aeonlucid/impostor) [![Docker Image](https://img.shields.io/docker/v/aeonlucid/impostor/nightly)](https://hub.docker.com/r/aeonlucid/impostor) +Docker is a program that allows you to run programs like Impostor in a container. + After installing Docker, you can just start a Docker container with `docker run`: ``` -docker run -p 22023:22023/udp aeonlucid/impostor:nightly +docker run -p 22000:22000/tcp -p 22023:22023/udp -e IMPOSTOR_Server__PublicIp=your.public.ip.here aeonlucid/impostor:nightly ``` -### Using Docker Compose +Please replace `your.public.ip.here` with the public IP address of your server. This is the address Among Us will try to reach your client at. + +To configure the docker container, either use environment variables or mount config.json in your container. + +## Using Docker Compose + +Docker Compose allows you to start a Docker container using a prefined configuration. This is an example configuration you can continue on: ``` version: '3.4' @@ -39,7 +54,10 @@ services: image: aeonlucid/impostor:nightly container_name: impostor ports: + - 22000:22000/tcp - 22023:22023/udp + environment: # Either configure Impostor using environment variables or mount a copy of config.json + - IMPOSTOR_Server__PublicIp=your.public.ip.here volumes: - /path/to/local/config.json:/app/config.json # For easy editing of the config - /path/to/local/plugins:/app/plugins # Only needed if using plugins -- 2.39.5