Code Monkey home page Code Monkey logo

docker-fivem's Introduction

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.

Latest Version Docker Pulls Docker Stars Donate

Licence Key

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

Usage

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

Important Tags

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.

Environment Varibles

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 configs
  • HOST_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 use 0 (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 use 0 (root).
  • SERVER_PROFILE - profile name used by txAdmin. If not specified, will use dev_server.

Credits

docker-fivem's People

Contributors

henkall avatar frebib avatar adam-ant avatar andruida avatar giroudmathias avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.