Skip to content

Latest commit

 

History

History
139 lines (117 loc) · 6.1 KB

README.md

File metadata and controls

139 lines (117 loc) · 6.1 KB

docker-citra-room logo

A Docker image for the Citra multiplayer server based on the official Alpine Linux image.
The server allows you to play many supported local wireless games via netplay using the Citra emulator.


Docker Tag Version Platform Description
latest 1.4 amd64, arm64 Latest release (Canary 2798)
1.4 1.4 amd64, arm64 Latest release (Canary 2798)
1.3 1.3 amd64 v1.3 (Legacy) (Canary 2798)

Environment variablesPassword protectionUsageUsing ComposeManual buildLicense


Environment variables

Some environment variables can be tweaked when creating a container to define the server configuration:

Click to expand
Variable Default value Description
CITRA_PORT 24872 Port to listen on (TCP/UDP).
CITRA_ROOMNAME Citra Room Name of the room.
CITRA_PREFGAME Any Name of the preferred game.
CITRA_MAXMEMBERS 4 Maximum number of members (2-16).
CITRA_BANLISTFILE bannedlist.cbl File which Citra will store ban records in.
CITRA_LOGFILE citra-room.log File path to store the logs.
CITRA_ROOMDESC (Optional) Description of the room.
CITRA_PREFGAMEID 0 (Optional) Preferred game title identifier. You can find the Title ID with the game list of Citra (right-click on a game -> Properties).
CITRA_PASSWORD (Optional) Room password (NOT recommended, see the section below).
CITRA_ISPUBLIC 0 (Optional) Make the room public. Valid User Token and Web API URL are required.
CITRA_TOKEN (Optional) The user token to use for the room. Required to make the room public.
CITRA_WEBAPIURL (Optional) URL to a custom web API. Required to make the room public.

Password protection

The server can be protected with a (clear, unencrypted) password by:

— Bind mounting a text file containing the password into the container.
The mount point path must be /run/secrets/citraroom.
This is the recommended method. See the second example in the section below.

— Using the CITRA_PASSWORD environment variable when creating the container.
This method is NOT recommended for production, as all environment variables are visible via docker inspect to any user that can use the docker command.

Usage

Example 1:
Run a public server for TLOZ: Triforce Heroes on default port 24872 with a maximum of 12 members:
You need a valid User Token to make the server reachable via the public room browser.

docker run -d \
  --name citra-room \
  -p 24872:24872/tcp \
  -p 24872:24872/udp \
  -e CITRA_ROOMNAME="USA East - Tri Force Heroes" \
  -e CITRA_ROOMDESC="A room dedicated to TLOZ: Tri Force Heroes" \
  -e CITRA_PREFGAME="Tri Force Heroes" \
  -e CITRA_PREFGAMEID="0004000000177000" \
  -e CITRA_MAXMEMBERS=12 \
  -e CITRA_ISPUBLIC=1 \
  -e CITRA_TOKEN="<USER_TOKEN>" \
  -e CITRA_WEBAPIURL="<CUSTOM_API_URL>" \
  -i k4rian/citra-room

Example 2:
Run a password-protected server with default settings on port 44872:
In this example, the password is stored in the secret.txt file located in the current working directory.

docker run -d \
  --name citra-room \
  -p 44872:44872/tcp \
  -p 44872:44872/udp \
  -e CITRA_PORT=44872 \
  -v "$(pwd)"/secret.txt:/run/secrets/citraroom:ro \
  -i k4rian/citra-room

Example 3:
Run a password-protected testing server on port 6666:

docker run -d \
  --name citra-room-test \
  -p 6666:6666/tcp \
  -p 6666:6666/udp \
  -e CITRA_PORT=6666 \
  -e CITRA_PASSWORD="testing" \
  -i k4rian/citra-room

Using Compose

See compose/README.md

Manual build

Requirements:
— Docker >= 18.09.0
— Git (optional)

Like any Docker image the building process is pretty straightforward:

  • Clone (or download) the GitHub repository to an empty folder on your local machine:
git clone https://github.com/K4rian/docker-citra-room.git .
  • Then run the following command inside the newly created folder:
docker build --no-cache -t k4rian/citra-room .

The building process can take up to 10 minutes depending on your hardware specs.
A quad-core CPU with at least 1 GB of RAM and 2 GB of disk space is recommended for the compilation.

License

GPL-2.0