-
Notifications
You must be signed in to change notification settings - Fork 23
/
bedrock_server_how_to.html
485 lines (463 loc) · 17 KB
/
bedrock_server_how_to.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<style type="text/css">
body {
max-width: 700px;
font-family: Arial;
}
blockquote,
pre {
border: 1px solid #000;
margin: 5px 0;
padding: 5px;
font-family: "Courier New";
font-size: 11pt;
background: #eee;
}
code {
background: #eee;
padding: 2px;
}
table {
border-spacing: 0;
border-collapse: collapse;
}
table th,
table td {
border: 1px solid #000;
padding: 5px;
}
</style>
</head>
<body class="c31">
<h1>How to use the dedicated server</h1>
<h2>Pre-Disclaimer</h2>
<p>
This file has been directly lifted from Mojang's server code and added to the repo so users of the Node wrapper can read it before Mojang's server code is automatically downloaded. You'll probably be most interested in the 'configuration'
section, since this node app will start the server for you.
</p>
<h2>Disclaimer</h2>
<p>
This is an early release (alpha) which we don't fully support yet. It might contain severe issues and we could stop supporting it at any time.
</p>
<h2>Platforms</h2>
<h3>Linux</h3>
<p>
Unzip the container file into an empty folder. Start the server with the following command:
</p>
<blockquote>
LD_LIBRARY_PATH=. ./bedrock_server
</blockquote>
<h3>Windows</h3>
<p>
Unzip the container file into an empty folder. Start the server by executing the <code>bedrock_server.exe</code> file.
</p>
<p>
On some systems, when you wish to connect to the server using a client running on the same machine as the
server is running on, you will need to exempt the Minecraft client from UWP loopback restrictions:
<blockquote>CheckNetIsolation.exe LoopbackExempt –a –p=S-1-15-2-1958404141-86561845-1752920682-3514627264-368642714-62675701-733520436</blockquote>.
</p>
<h2>Configuration</h2>
<p>
The server will try to read a file named <code>server.properties</code>. Some of these options are only read when a new world is created, while some others are read every startup. The file should contain a list with keys and values separated with
an equal sign, one per line.
</p>
<p>
The following options are available. If a value as a number in parenthesis, that number can be used instead of the text value.
</p>
<table>
<thead>
<tr>
<th>Option name</th>
<th>Possible values</th>
<th>Default value</th>
<th>When is it used</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>gamemode</td>
<td>survival (0), creative (1), adventure (2)</td>
<td>survival</td>
<td>Always or only for new players</td>
<td></td>
</tr>
<tr>
<td>difficulty</td>
<td>peaceful (0), easy (1), normal (2), hard (3)</td>
<td>easy</td>
<td>Always</td>
<td></td>
</tr>
<tr>
<td>level-type</td>
<td>FLAT, LEGACY, DEFAULT</td>
<td>DEFAULT</td>
<td>World creation</td>
<td></td>
</tr>
<tr>
<td>server-name</td>
<td>Any string</td>
<td>Dedicated Server</td>
<td>Always</td>
<td>This is the server name shown in the in-game server list.</td>
</tr>
<tr>
<td>max-players</td>
<td>Any integer</td>
<td>10</td>
<td>Always</td>
<td>The maximum numbers of players that should be able to play on the server. <b>Higher values have performance impact.</b></td>
</tr>
<tr>
<td>server-port</td>
<td>Any integer</td>
<td>19132</td>
<td>Always</td>
<td></td>
</tr>
<tr>
<td>server-portv6</td>
<td>Any integer</td>
<td>19133</td>
<td>Always</td>
<td></td>
</tr>
<tr>
<td>level-name</td>
<td>Any string</td>
<td>level</td>
<td>Always</td>
<td>The name of level to be used/generated. Each level has its own folder in <code>/worlds</code>.</td>
</tr>
<tr>
<td>level-seed</td>
<td>Any string </td>
<td></td>
<td>World creation</td>
<td>The seed to be used for randomizing the world. If left empty a seed will be chosen at random.</td>
</tr>
<tr>
<td>online-mode</td>
<td>true, false</td>
<td>true</td>
<td>Always</td>
<td>If true then all connected players must be authenticated to Xbox Live.
Clients connecting to remote (non-LAN) servers will always require Xbox Live authentication regardless of this setting.
If the server accepts connections from the Internet, then it's <b>highly</b> recommended to enable online-mode.</td>
</tr>
<tr>
<td>white-list</td>
<td>true, false</td>
<td>false</td>
<td>Always</td>
<td>If true then all connected players must be listed in the separate <code>whitelist.json</code> file.
See the <i>Whitelist</i> section.</td>
</tr>
<tr>
<td>allow-cheats</td>
<td>true, false</td>
<td>false</td>
<td>Always</td>
<td></td>
</tr>
<tr>
<td>view-distance</td>
<td>Any integer</td>
<td>10</td>
<td>Always</td>
<td>The maximum allowed view distance. <b>Higher values have performance impact.</b></td>
</tr>
<tr>
<td>player-idle-timeout</td>
<td>Any integer</td>
<td>30</td>
<td>Always</td>
<td>After a player has idled for this many minutes they will be kicked. If set to 0 then players can idle indefinitely.</td>
</tr>
<tr>
<td>max-threads</td>
<td>Any integer</td>
<td>8</td>
<td>Always</td>
<td>Maximum number of threads the server will try to use.</td>
</tr>
<tr>
<td>tick-distance</td>
<td>An integer in the range [4, 12]</td>
<td>4</td>
<td>Always</td>
<td>The world will be ticked this many chunks away from any player. <b>Higher values have performance impact.</b></td>
</tr>
<tr>
<td>default-player-permission-level</td>
<td>visitor, member, operator</td>
<td>member</td>
<td>Always</td>
<td>Which permission level new players will have when they join for the first time.</td>
</tr>
<tr>
<td>texturepack-required</td>
<td>true, false</td>
<td>false</td>
<td>Always</td>
<td>If the world uses any specific texture packs then this setting will force the client to use it.</td>
</tr>
<tr>
<td>content-log-file-enabled</td>
<td>true, false</td>
<td>false</td>
<td>Always</td>
<td>Enables logging content errors to a file.</td>
</tr>
</tbody>
</table>
<h3>Example server.properties file</h3>
<blockquote>
server-name=Dedicated Server<br />
gamemode=survival<br />
difficulty=easy<br />
allow-cheats=false<br />
max-players=10<br />
online-mode=true<br />
white-list=false<br />
server-port=19132<br />
server-portv6=19133<br />
view-distance=10<br />
tick-distance=4<br />
player-idle-timeout=30<br />
max-threads=8
</blockquote>
<h2>Folders</h2>
<p>
When unpacking you will see a few folders and the binary executable. When starting the server for the first time a bunch of new (empty) folders will be created. The folders you should care about are the following:
</p>
<table>
<thead>
<tr>
<th>Folder name</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td>behavior_packs</td>
<td>This is where new behavior packs can be installed. At the moment there's no way of activating
them in a level.</td>
</tr>
<tr>
<td>resource_packs</td>
<td>This is where new resource packs can be installed. At the moment there's no way of activating
them in a level.</td>
</tr>
<tr>
<td>worlds</td>
<td>This folder will be created at startup if it doesn't already exist. Every world created will have a folder named according to their <code>level-name</code> inside the <code>server.properties</code> file.</td>
</tr>
</tbody>
</table>
<h2>Whitelist</h2>
<p>
If the <code>white-list</code> property is enabled in <code>server.properties</code> then the server will only allow selected users to connect. To allow a user to connect you need to know their Xbox Live Gamertag. The easiest way to add a user to
the whitelist is to use the command <code>whitelist add <Gamertag></code> (eg: <code>whitelist add ExampleName</code>). Note: If there is a white-space in the Gamertag you need to enclose it with double quates: <code>whitelist add "Example
Name"</code>
</p>
<p>
If you later want to remove someone from the list you can use the command <code>whitelist remove <Gamertag></code>.
</p>
<p>
The whitelist will be saved in a file called <code>whitelist.json</code>. If you want to automate the process of adding or removing players from it you can do so. After you've modified the file you need to run the command <code>whitelist
reload</code> to make sure that the server knows about your new change.
</p>
<p>
The file contains a JSON array with objects that contains the following key/values.
</p>
<table>
<thead>
<tr>
<th>Key</th>
<th>Type</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td>The gamertag of the user.</td>
</tr>
<tr>
<td>xuid</td>
<td>String</td>
<td>Optional. The XUID of the user. If it's not set then it will be populated when someone with a matching name connects.</td>
</tr>
<tr>
<td>ignoresPlayerLimit</td>
<td>Boolean</td>
<td>True if this user should not count towards the maximum player limit. Currently there's another soft limit of 30 (or 1 higher than the specified number of max players) connected players, even if players use this option. The intention for
this is to have some players be able to join even if the server is full.</td>
</tr>
</tbody>
</table>
<p>
Example <code>whitelist.json</code> file:
</p>
<pre>
[
{
"ignoresPlayerLimit": false,
"name": "MyPlayer"
},
{
"ignoresPlayerLimit": false,
"name": "AnotherPlayer",
"xuid": "274817248"
}
]</pre>
<h2>Permissions</h2>
<p>
You can adjust player specific permissions by assigning them roles in the <code>permissions.json</code> that is placed in the same directory as the server executable. The file contains a simple JSON object with XUIDs and permissions. Valid
permissions are: <code>operator</code>, <code>member</code>, <code>visitor</code>. Every player that connects with these accounts will be treated according to the set premission. If you change this file while the server is running, then run the
command <code>permissions reload</code> to make sure that the server knows about your new change. You could also list the current permissions with <code>permissions list</code>. Note that <code>online-mode</code> needs to be enabled for this
feature to work since xuid requires online verification of the user account. If a new player that is not in this list connects, the <code>default-player-permission-level</code> option will apply.
</p>
<p>
Example <code>permissions.json</code> file:
</p>
<pre>
[
{
"permission": "operator",
"xuid": "451298348"
},
{
"permission": "member",
"xuid": "52819329"
},
{
"permission": "visitor",
"xuid": "234114123"
}
]</pre>
<h2>Crash reporting</h2>
<p>
If the server crashes it will automatically send us various information that helps us solve it for the future.
</p>
<h2>Commands</h2>
<p>
You can issue commands to the server by typing in the console. The following commands are available. < > means a parameter is required, [ ] means it's optional and | denotes different allowed values. Strings can be enclosed in double
quotes, ", if they contain spaces.
</p>
<table>
<thead>
<tr>
<th>Command syntax</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>kick <player name or xuid> <reason></td>
<td>Immediately kicks a player. The reason will be shown on the kicked players screen.</td>
</tr>
<tr>
<td>stop</td>
<td>Shuts down the server gracefully.</td>
</tr>
<tr>
<td>save <hold | resume | query></td>
<td>Used to make atomic backups while the server is running. See the backup section for more information.</td>
</tr>
<tr>
<td>whitelist <on | off | list | reload></td>
<td>
<p>
<code>on</code> and <code>off</code> turns the whitelist on and off. Note that this does not change the value in the <code>server.properties</code> file!
</p>
<p>
<code>list</code> prints the current whitelist used by the server
</p>
<p>
<code>reload</code> makes the server reload the whitelist from the file.
</p>
<p>
See the Whitelist section for more information.
</p>
</td>
</tr>
<tr>
<td>whitelist <add | remove> <name></td>
<td>Adds or removes a player from the whitelist file. The name parameter should be the Xbox Gamertag of the player you want to add or remove. You don't need to specify a XUID here, it will be resolved the first time the player
connects.<br /><br />See the Whitelist section for more information.</td>
</tr>
<tr>
<td>permissions <list | reload></td>
<td>
<p>
<code>list</code> prints the current used operator list.
</p>
<p>
<code>reload</code> makes the server reload the operator list from the ops file.
</p>
<p>
See the Permissions section for more information.
</p>
</td>
</tr>
<tr>
<td>op <player></td>
<td>
<p>
Promote a player to <code>operator</code>. This will also persist in <code>permissions.json</code> if the player is authenticated to XBL. If <code>permissions.json</code> is missing it will be created. If the player is not connected to
XBL, the player is promoted for the current server session and it will not be persisted on disk. Defualt server permission level will be assigned to the player after a server restart.
</p>
</td>
</tr>
<tr>
<td>deop <player></td>
<td>
<p>
Demote a player to <code>member</code>. This will also persist in <code>permissions.json</code> if the player is authenticated to XBL. If <code>permissions.json</code> is missing it will be created.
</p>
</td>
</tr>
<tr>
<td>changesetting <setting> <value></td>
<td>Changes a server setting without having to restart the server. Currently only two settings are supported to be changed, <code>allow-cheats</code> (true or false) and <code>difficulty</code> (0, <code>peaceful</code>, 1, <code>easy</code>,
2, <code>normal</code>, 3 or <code>hard</code>). They do not modify the value that's specified in <code>server.properties</code>.</td>
</tr>
</tbody>
</table>
<h2>Backups</h2>
<p>
The server supports taking backups of the world files while the server is running. It's not particularly friendly for taking manual backups, but works better when automated. The backup (from the servers perspective) consists of three commands.
</p>
<table>
<thead>
<tr>
<th>Command</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>save hold</td>
<td>This will ask the server to prepare for a backup. It’s asynchronous and will return immediately.</td>
</tr>
<tr>
<td>save query</td>
<td>After calling <code>save hold</code> you should call this command repeatedly to see if the preparation has finished. When it returns a success it will return a file list (with lengths for each file) of the files you need to copy. The
server will not pause while this is happening, so some files can be modified while the backup is taking place. As long as you only copy the files in the given file list and truncate the copied files to the specified lengths, then the backup
should be valid.</td>
</tr>
<tr>
<td>save resume</td>
<td>When you’re finished with copying the files you should call this to tell the server that it’s okay to remove old files again.</td>
</tr>
</tbody>
</table>
</body>
</html>