- docker (Docker Desktop for Mac, Docker Desktop for Windows, Docker for Linux)
- docker-compose (comes with docker-desktop, might be an extra install on Linux)
When given the choice, choose to run Docker in WSL2
The following you will need to replace in the next steps:
<your-server-directory-name>example:my-server<server-name>example:My awesome server<account-name>this is just your GR account name<lan-ip>this is the IP your computer has on your local network. Example:192.168.100.5<external-ip-or-hostname>this is the IP provided by your internet provider. If you have a domain set up pointing to your external ip, you can put that here instead. Example8.8.8.8ormydomainname.com
USE_ENV=true
SERVER=<your-server-directory-name>
PORT=14900
LOCALIP=<lan-ip>
SERVERIP=<external-ip-or-hostname>
INTERFACE=0.0.0.0
SERVERNAME=<server-name>
STAFFACCOUNT=<account-name>version: "3"
services:
gserver:
image: "xtjoeytx/gserver-v2:latest"
restart: always
env_file: server.env
volumes:
- ./server:/gserver/servers/<your-server-directory-name>
ports:
- 14900:14900- file
docker-compose.yml - file
server.env - directory
server
Open up a terminal/command prompt and go to the path of your main directory, then write this in the terminal and press enter: docker-compose up -d
This will run the gserver instance and will auto-restart the server on crash.
And since the server directory is mapped into the docker container, your files will be persistent.