This docker image allows you to run a server for FiveM, a modded GTA multiplayer program.
This image includes txAdmin, an in-browser server management software.
Upon first run, the configuration is generated in the host mount for the /config
directory, and for the /txData
directory (that contains the txAdmin configuration).
This bundle is made with a inbuild Mariadb server.
A freely obtained licence key is required to use this server, which should be declared as FIVEM_LICENCE_KEY
. A tutorial on how to obtain a licence key can be found here
Use the docker-compose script as provided:
---
version: '2'
services:
# -------------------------------------------------------------------
fivem:
image: henkallsn/fivem_esx_bundle
stdin_open: true
tty: true
volumes:
# Remember to change.
- "/path/to/resources/folder:/config"
# Remember to change.
- "/path/to/txAdmin/config:/txData"
# Remember to change. Do not place this on a ZFS.
- "/path/to/mysql/data:/var/lib/mysql"
ports:
- "30120:30120"
- "30120:30120/udp"
- "40120:40120"
environment:
SERVER_PROFILE: "default"
FIVEM_PORT: 30120
TXADMIN_PORT: 40120
HOST_UID: 1000
HOST_GID: 100
# Remember to change.
FIVEM_HOSTNAME: hostname-to-fivem-gameserver
# Remember to change.
FIVEM_LICENCE_KEY: license-key-here
# Remember to change.
STEAM_WEBAPIKEY: api-key-herer
# Database stuff ---------------
DATABASE_SERVICE_NAME: fivem
MYSQL_DATABASE: FiveMESX
MYSQL_USER: database username
MYSQL_PASSWORD: database password
MYSQL_RANDOM_ROOT_PASSWORD: 1
# Change to your timezone
TZ: Europe/Copenhagen
# -------------------------------------------------------------------
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
ports:
- 8100-8105:80
environment:
- PMA_HOST=fivem
depends_on:
- fivem
# -------------------------------------------------------------------
It is important that you use interactive
and pseudo-tty
options otherwise the container will crash on startup
See issue #3
Tag name | Description |
---|---|
latest | This tag is used by default. Makes the database use innodb engine. |
zfs | This tag has to be added. This makes the database able to run on a system with zfs. Using myisam engine. |
Variable name | Description | Value |
---|---|---|
TXADMIN_PORT | Port used for getting to txAdmin webgui. Will be used in the server.cfg. | 40120 |
FIVEM_PORT | Port used to connect to the FiveM Server. Will be used in the server.cfg. | 30120 |
STEAM_WEBAPIKEY | This is you Steam Web api key. Will be used in the server.cfg. | |
FIVEM_HOSTNAME | This will be the FiveM Server name in game. Will be used in the server.cfg. | FiveMESX Game |
FIVEM_LICENCE_KEY | This is you FiveM License key wich is needed to start the server. Will be used in the server.cfg. | |
DATABASE_SERVICE_NAME | Has to be the same as the service name. Will be used in the server.cfg. (connection string) | fivem |
MYSQL_DATABASE | This is what you want your database to be named. Will be used in the server.cfg. (connection string) | FiveMESXDB |
MYSQL_USER | This is the database user name. Change to what you want. Will be used in the server.cfg. (connection string) | user |
MYSQL_PASSWORD | This is the database password. Change to what you want. Will be used in the server.cfg. (connection string) | passsword |
RCON_PASSWORD
- A password to use for the RCON functionality of the fxserver. If not specified, a random 16 character password is assigned. This is only used upon creation of the default configsHOST_GID
- The files that are generated by the container will be written with this group ID. You must use numeric IDs. If not specified, will use0
(root).HOST_UID
- The files that are generated by the container will be written with this user ID. You must use numeric IDs. If not specified, will use0
(root).SERVER_PROFILE
- profile name used by txAdmin. If not specified, will usedev_server
.
- This image is based on the yobasystems/alpine-mariadb image.
- Thanks to tabarra as the creator and maintainer of the txAdmin repository!
- Thanks to Andruida that I forked this code from