Executable
Learn how to create a server using a server executable.
1) Download the server
First, download the server executable for your desired platform:
If you prefer to compile your own binary, follow the Manual Building guide.
Variant | Link |
---|---|
Windows | Download |
Linux | Download |
2) Creating a server folder
As the server is going to create itself a data folder you are going to want to place the server executable in its own folder with no other files.
The server will generate its own "data" folder in this folder
3) Starting the server
- Windows
- Linux
./pocket-relay.exe
chmod +x ./pocket-relay
Then start the server with the following command:
./pocket-relay
The server uses port 80 by default, which may be in use on your system. Stop the other application using port 80 or change this port. On Linux, starting the application on port 80 requires using "sudo"
To change this port, refer to Configuration.
4) Connection URL
Once your server is running, it will output possible Connection URLs. These URLs will also appear in the server log file (server.log). You will need to provide one of these Connection URLs to anyone you want to join the server.
You can find the server log file at the following path (relative to the folder where the server executable is stored):
data/server.log
Server log files may contain personal access tokens, so it is recommended NOT to post them publicly. Share them only with the Pocket Relay developer if its required for debugging.
In the server log file, you should see a line similar to the following:
[2022-11-28T15:14:35.555306400+13:00 INFO pocket_relay] Connection URLS (LAN: 192.168.88.251, WAN: IP_REDACTED, LOCAL: 127.0.0.1)
In order to determine which Connection URL you should give to someone see the table below:
Type | Who you should give it to |
---|---|
LAN | Someone on the same wifi network as you |
WAN | Someone on a different wifi network (over the internet) |
LOCAL | Can be used if the server is running on the same computer as the client |
To use your WAN address, portforward the server port (TCP) in your router or host. The default port is 80. Alternatively you can use a tool like ngrok to do this instead.
Done
This is the end of the executable server setup guide. From here you can check out the Configuration guide to further configure your server
If you intend to host a WAN server (One where players outside of your local network can join and player together) see the WAN guide