WORKDIR /app
COPY --from=build /app ./
-# Make the HttpServer listen to 0.0.0.0 to expose it to the outside world.
-ENV IMPOSTOR_HttpServer__ListenIp=0.0.0.0
# Override ASPNETCORE_URLS to stop warning.
ENV ASPNETCORE_URLS=
Depending on whether you want to support mobile players, you can set up the HTTP server in one of two ways:
-- Directly expose the HTTP server. Simpler, but only works if you don't want to support mobile players
-- Use a reverse proxy to expose the HTTP safer. More complex, but allows mobile players to connect
+- Directly expose the HTTP server. Simpler, but only works if you don't want to support mobile players.
+- Use a reverse proxy to expose the HTTP server. More complex, but allows mobile players to connect.
## Directly expose the HTTP server.
If you have never set up a reverse proxy before, we recommend you to set up [Caddy](https://caddyserver.com/). It is easy to set up and comes with support for requesting SSL certificates out of the box.
+To prevent people from connecting directly to Impostor, we recommend changing the "ListenIp" in the "HttpServer" section to "127.0.0.1". This makes sure people can't connect to your HTTP server other than via your reverse proxy. Keep the "ListenIp" in the "Server" section at "0.0.0.0" though, running the normal game traffic through a proxy is not supported.
+
### Caddy
To install Caddy, follow the [official installation guide](https://caddyserver.com/docs/install). Then use the following lines as your `Caddyfile` configuration file:
After installing Docker, you can just start a Docker container with `docker run`:
```
-docker run -p 127.0.0.1:22023:22023/tcp -p 22023:22023/udp -e IMPOSTOR_Server__PublicIp=your.public.ip.here aeonlucid/impostor:nightly
+docker run -p 22023:22023/tcp -p 22023:22023/udp -e IMPOSTOR_Server__PublicIp=your.public.ip.here aeonlucid/impostor:nightly
```
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 server at.
image: aeonlucid/impostor:nightly
container_name: impostor
ports:
- - 127.0.0.1:22023:22023/tcp # Remove "127.0.0.1:" if you want to expose Impostor's HTTP server directly to the internet
+ - 22023:22023/tcp # Add "127.0.0.1:" if you're using a reverse proxy to terminate HTTPS
- 22023:22023/udp
environment: # Either configure Impostor using environment variables or mount a copy of config.json
- IMPOSTOR_Server__PublicIp=your.public.ip.here
Impostor has an Http Server that is used by recent versions of Among Us to connect to. See [the Http Server page](Http-server.md) for more details on how to set this up.
-| Key | Default | Description |
-|----------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **Enabled** | `true` | Whether the http server should be enabled. |
-| **ListenIp** | `127.0.0.1` | The network interface to listen on. Use `127.0.0.1` if you use a reverse proxy or just run locally. Use `0.0.0.0` if you are directly exposing this server to the internet (not recommended) |
-| **ListenPort** | `22023` | The listen port of this server. For port forwarding purposes, this is an TCP port. |
+| Key | Default | Description |
+|----------------|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| **Enabled** | `true` | Whether the http server should be enabled. |
+| **ListenIp** | `0.0.0.0` | The network interface to listen on. Use `127.0.0.1` if you use a reverse proxy or just run locally. Use `0.0.0.0` if you are directly exposing this server to the internet |
+| **ListenPort** | `22023` | The listen port of this server. For port forwarding purposes, this is an TCP port. |
### AntiCheat
/// Gets or sets the IP address the HTTP Matchmaking server will listen on.
/// </summary>
/// Use "127.0.0.1" if you are running behind a reverse proxy or just testing locally.
- /// Use "0.0.0.0" if you are directly exposing this server to the internet (not recommended).
- public string ListenIp { get; set; } = "127.0.0.1";
+ /// Use "0.0.0.0" if you are directly exposing this server to the internet.
+ public string ListenIp { get; set; } = "0.0.0.0";
/// <summary>
/// Gets or sets the port the HTTP Matchmaking server will listen on.
},
"HttpServer": {
"Enabled": true,
- "ListenIp": "127.0.0.1",
+ "ListenIp": "0.0.0.0",
"ListenPort": 22023
},
"AntiCheat": {
},
"HttpServer": {
"Enabled": true,
- "ListenIp": "127.0.0.1",
+ "ListenIp": "0.0.0.0",
"ListenPort": 22023
},
"AntiCheat": {