Overview

Use this guide when you want to host a standalone server, separate from the Citron application.


Page Navigation



<aside> đź“” TABLE OF CONTENTS


</aside>

Steps


  1. Open the file explorer on your system and navigate to the Citron Directory.

  2. Open your text editor of choice and create a new file called host.bat.

  3. Copy the contents from the template below into the new file you created.

  4. Modify the contents with your desired information, replacing the “<…..>” with the actual values you want. Remove any values you don’t want to set.

    1. For example, if you don’t want a password or persistent ban list, remove the lines.

    <aside> <img src="/icons/info-alternate_blue.svg" alt="/icons/info-alternate_blue.svg" width="40px" />

    INFO: If you set a path to the bans list but it does not exist, it will create it but will throw an error message the first time you run it. This message can be ignored.

    </aside>

    Template

    citron-room ^
    	--room-name "<NAME>" ^
    	--room-description "<DESCRIPTION>" ^
    	--preferred-game "<TITLE OF GAME>" ^
    	--preferred-game-id "<TITLE ID OF GAME>" ^
    	--port <PORT> ^
    	--max_members <NUMBER OF PLAYERS> ^
    	--web-api-url "api.ynet-fun.xyz" ^
    	--token "yuzu" ^
    	--ban-list-file "<PATH TO BAN FILE>" ^
    	--password "<PASSWORD>"
    pause
    

    Example

    citron-room ^
    	--room-name "Stars & Stripes" ^
    	--room-description "Description" ^
    	--preferred-game "Mario Kart 8 Deluxe" ^
    	--preferred-game-id "0100152000022000" ^
    	--port 24872 ^
    	--max_members 4 ^
    	--web-api-url "api.ynet-fun.xyz" ^
    	--token "yuzu" ^
    pause
    
  5. Save the file.

  6. Open a terminal in the Citron Directory.

  7. Run the program using the following command.

    1. PowerShell: .\\host.bat
    2. Command Prompt: host.bat
  8. The program should now be running, printing a successful registration message

    [   0.000031] Network <Info> dedicated_room\\citron_room.cpp:main:302: Bind address is empty: defaulting to 0.0.0.0
    [   0.000032] Network <Info> dedicated_room\\citron_room.cpp:main:324: Hosting a public room
    [   0.395905] WebService <Info> web_service\\verify_user_jwt.cpp:GetPublicKey:30: Fetched external JWT public key (size=1979)
    [   0.396417] Network <Info> dedicated_room\\citron_room.cpp:main:369: Room is open. Close with Q+Enter...
    [   1.168203] WebService <Info> network\\announce_multiplayer_session.cpp:Register:47: Room has been registered
    

    image.png

Resources


Citron Website

Download Citron

Citron Source Code

Citron Discord