This server is supported on Linux and macOS. Windows is not officially supported.
Before building the server, install the required dependencies:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"brew install gccsudo apt updatesudo apt install -y gcc make/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"brew install gccTo compile the server, use the following command:
gcc server.c -o my_server -lpthreadReplace my_server with your desired filename. This will generate an executable with the specified name.
Before running the server, you need to grant execution permissions:
chmod +x my_serverThen start the server with:
./my_serverMake sure to replace my_server with the name you used during compilation.
The server is simple to use and supports Linux and macOS. After starting the server, enter the following command to see all available options:
-helpThe server currently supports English and German.
The system consists of one server and two or more clients.
- Start a client.
- Enter a username when prompted.
- Use
-helpto see available commands. - To send a message to another user:
This allows direct communication between clients via the server.
-cms <username> <message>
There are two methods to update the server:
- Run the following command:
-get update
- The server will stop, download the latest version, and restart automatically.
- Navigate to the
versionfolder. - Select the folder for your preferred language.
- Download the latest server file.
- Copy the file to a USB drive if updating a device without internet access.
- Grant execution permissions:
chmod +x server
- Start the server:
./server
- Download the latest source code.
- Compile it as described in the Build section.
- Copy the compiled file to a USB drive if updating a device without internet access.
- Follow the Start instructions to run the new version.
Check out my YouTube channel for tutorials and more: SloopyCode
curl -L -o install.sh "https://raw.githubusercontent.com/SloopyCode/Server-System/refs/heads/main/main/install.sh" chmod +x install.sh ./install.sh
curl -L "https://raw.githubusercontent.com/SloopyCode/Server-System/refs/heads/main/main/install.sh" | bash