### Install .NET SDK on Debian Source: https://github.com/0x0ade/celestenet/wiki/Hosting-a-Server These commands configure the Microsoft package repository and install the .NET SDK on Debian systems. ```sh wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb rm packages-microsoft-prod.deb sudo apt-get update sudo apt-get install dotnet-sdk-8.0 ``` -------------------------------- ### Check installed .NET SDKs and Runtimes Source: https://github.com/0x0ade/celestenet/wiki/Hosting-a-Server Use these commands to verify which versions of the .NET runtime and SDK are currently installed on your machine. ```sh dotnet --list-runtimes dotnet --list-sdks ``` -------------------------------- ### Run CelesteNet Server on Windows via CLI Source: https://github.com/0x0ade/celestenet/wiki/Hosting-a-Server Use this command in a terminal within the net7.0 folder to start the server on Windows. ```sh dotnet ./CelesteNet.Server.dll ``` -------------------------------- ### Run the CelesteNet server Source: https://github.com/0x0ade/celestenet/wiki/Hosting-a-Server Navigates to the release directory and executes the server assembly. ```bash cd CelesteNet.Server/bin/Release/net8.0/ dotnet ./CelesteNet.Server.dll ``` -------------------------------- ### Build the entire CelesteNet repository Source: https://github.com/0x0ade/celestenet/wiki/Hosting-a-Server Builds the entire repository. It is acceptable if the CelesteNet.Client project fails to build during this process. ```bash dotnet build -c Release ``` -------------------------------- ### Run CelesteNet Server on Linux Source: https://github.com/0x0ade/celestenet/wiki/Hosting-a-Server Navigate to the net7.0 directory and execute the server using the dotnet runtime. ```sh cd net7.0/ dotnet ./CelesteNet.Server.dll ``` -------------------------------- ### Verify server readiness via log output Source: https://github.com/0x0ade/celestenet/wiki/Hosting-a-Server The server is ready to accept connections when the log output slows down around the specified line. ```text (10/21/2024 00:59:46) [CRI] [main] Ready ``` -------------------------------- ### Build specific CelesteNet server modules Source: https://github.com/0x0ade/celestenet/wiki/Hosting-a-Server Builds the shared and server-specific modules using the .NET SDK. This command requires the lib-stripped folder to contain FNA.dll. ```bash dotnet build -c Release -t:CelesteNet_Shared:Rebuild -t:CelesteNet_Server_ChatModule:Rebuild -t:CelesteNet_Server_FrontendModule:Rebuild -t:CelesteNet_Server_SqliteModule:Rebuild -t:CelesteNet_Server:Rebuild ``` -------------------------------- ### Initialize Netdata Status Hook Source: https://github.com/0x0ade/celestenet/blob/main/CelesteNet.Server.FrontendModule/Content/frontend/index.html This script initializes the Netdata status display by setting global configuration variables and establishing an interval to hook into the NETDATA object once it becomes available. ```javascript // netdata is fuuuun~ window.netdataStatusHolder = document.getElementById("status"); window.netdataStatusInnerHTML = window.netdataStatusHolder.innerHTML; // can be slate or white window.netdataTheme = "slate"; window.netdataNoBootstrap = true; function netdataHook() { if (!window.NETDATA) return; clearInterval(window.netdataHookInterval); //NETDATA.options.current.legend\_right = false; NETDATA.options.current.legend\_toolbox = false; NETDATA.options.current.destroy\_on\_hide = false; NETDATA.options.current.parallel\_refresher = true; NETDATA.options.current.stop\_updates\_when\_focus\_is\_lost = true; } window.netdataHookInterval = setInterval(netdataHook, 100); ```