]> git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - local-test-server-on-gnu-linux.md
Upload attachment zzz-bai-sounds-v11.pk3
[xonotic/xonotic.wiki.git] / local-test-server-on-gnu-linux.md
1 This tutorial explains how to setup a local test server that can be launched on the same machine as client.
2
3 # Official release
4
5 This section explains how to setup a server from the official release of Xonotic. It assumes that you have extracted it in `~/Games/Xonotic/Release`.
6
7 First you need to create a file called `~/.xonotic/data/server.cfg` with the following content:
8
9 ```
10 sv_public 1
11 hostname "My Test server"
12 ```
13
14 This config creates a vanilla deathmatch server that will be visible to other players on the server list.
15
16 Next, you will probably want to create a launcher for your server so you can launch it from your desktop. Create a file called `~/Desktop/Xonotic Server.desktop` with the following content:
17
18 ```
19 [Desktop Entry]
20 Version=1.0
21 Type=Application
22 Terminal=true
23 Exec=/home/user/Games/Xonotic/Release/xonotic-linux64-dedicated -sessionid 1
24 Name=Xonotic Server
25 Icon=/home/user/Games/Xonotic/Release/misc/logos/icons_png/xonotic_32.png
26 Path=/home/user/Games/Xonotic/Release/
27 ```
28
29 Now try double clicking on that launcher in your desktop and it should launch a dedicated server. Then you can launch client and connect to it.
30
31 # Git version
32
33 This section explains how to setup a server from the git repository of Xonotic. It assumes that you have cloned it in `~/Games/Xonotic/Git/xonotic`.
34
35 You can use `server.cfg` from the previous section.
36
37 Create a file called `~/Desktop/Xonotic Git Server.desktop` with the following content:
38
39 ```
40 #!/usr/bin/env xdg-open
41
42 [Desktop Entry]
43 Version=1.0
44 Type=Application
45 Terminal=true
46 Exec=/home/user/Games/Xonotic/Git/xonotic/darkplaces/darkplaces-dedicated -xonotic -sessionid 1
47 Name=Xonotic Git Server
48 Icon=/home/user/Games/Xonotic/Git/xonotic/misc/logos/icons_png/xonotic_32.png
49 Path=/home/user/Stuff/Games/Xonotic/Git/xonotic/
50 ```
51
52 Again, double click on this launcher to launch server. Have fun!