Building Server Guide

Back

This guide is for manually building the server binary

License Build


Requirements

If you are using the source zip directly then extract it to a folder and skip the “Clone Repository” step


Combined Answer

If you want skip all the steps and just have a list of commands to paste in for the default setup you can paste the following command into your terminal. (This is using the bash syntax for multiple commands)

git clone --depth 1 https://github.com/PocketRelay/Server.git pocket-relay && cd pocket-relay && cargo build --release

1) Clone Repository

If you have already directly downloaded the repository source code from GitHub you can skip this step.

First you will need to clone the GitHub repository for the server. The following command will clone only the latest code changes from the GitHub repository

git clone --depth 1 https://github.com/PocketRelay/Server.git pocket-relay

2) Directory

In order to build the server using commands you will need to open the server source code directory that you’ve just cloned within your terminal. You can do that using the cd command. The following command will set your current directory to the server source code:

cd pocket-relay

The above command will only work if you run it in the same place that you’ve cloned the repository to


3) Compiling

Now to compile the server source into a binary that you can run you need to run the following command:

cargo build --release

4) Server Binary

Once the server building finishes you can now find the server executable which will be located in the following folder

target/release

If you are on Windows the file will be named pocket-relay.exe and if you are on Linux it will be named pocket-relay

Now you can use that binary the same way as the pre-built binaries. Refer back to the Server Executable Guide for what to do next