You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is recommended that you use [docker compose](https://docs.docker.com/compose) to set up, configure, and run your server
23
23
24
+
A simple `compose.yml` example:
25
+
26
+
```yml
27
+
services:
28
+
luanti_server:
29
+
image: ghcr.io/luanti-org/luanti:latest
30
+
restart: unless-stopped
31
+
volumes:
32
+
- ./config:/etc/minetest:ro
33
+
- ./data:/var/lib/minetest
34
+
- ./games:/var/lib/minetest/.minetest/games:ro
35
+
- ./mods:/var/lib/minetest/.minetest/mods:ro
36
+
ports:
37
+
- "30000:30000/udp"
38
+
```
39
+
40
+
Before starting the container:
41
+
42
+
- create the necessary directories:
43
+
44
+
```bash
45
+
mkdir -p data/.minetest config games mods
46
+
```
47
+
48
+
- change ownership of `data` to `minetest` user (UID 30000)
49
+
50
+
```bash
51
+
sudo chown -R 30000:30000 data/
52
+
```
53
+
54
+
- copy content of the [minetest.conf.example](https://github.com/luanti-org/luanti/blob/master/minetest.conf.example) file to `config/minetest.conf`
55
+
56
+
- install the game you want to play in `./games/`. Follow [this guide](https://content.luanti.org/help/installing/#installing-using-the-command-line). For example, to install `voxelibre` using `git`
`./data/.minetest/` has the directory `worlds/`, where the world will be saved.
68
+
69
+
`./config/minetest.conf` has settings of the server.
70
+
71
+
If you have multiple games or worlds, you can specify which one to run in `compose.yml`. For example:
72
+
73
+
```yml
74
+
services:
75
+
luanti_server:
76
+
image: ghcr.io/luanti-org/luanti:latest
77
+
restart: unless-stopped
78
+
volumes:
79
+
- ./config:/etc/minetest:ro
80
+
- ./data:/var/lib/minetest
81
+
- ./games:/var/lib/minetest/.minetest/games:ro
82
+
- ./mods:/var/lib/minetest/.minetest/mods:ro
83
+
ports:
84
+
- "30000:30000/udp"
85
+
command: --config /etc/minetest/minetest.conf --gameid voxelibre --worldname world
86
+
```
87
+
88
+
`--config /etc/minetest/minetest.conf` tells the server where to find the config file inside the container. Keep this flag as-is when using the volume mount from this guide.
89
+
90
+
To see available flags run:
91
+
92
+
```bash
93
+
docker exec -it luanti_server luantiserver --help
94
+
```
95
+
24
96
### Podman
25
97
26
98
It is recommend that you use [podman quadlets](https://www.redhat.com/en/blog/quadlet-podman) to set up, configure, and run your server
27
99
28
100
## Next Steps
29
101
30
-
Continue on to [next steps](/for-server-hosts/setup/#port-forwarding).
102
+
Continue on to [next steps](/for-server-hosts/setup/#port-forwarding).
0 commit comments