Requirements
Must have
- MySQL 5.7+ or MariaDB 10.0+ database - This will be the same database that your FiveM gameserver uses.* Make sure that your database table structure is following the below structure (the structure is based on the most recent ESX version).
- Fulltext search - Needs to be available.
- ESX "base" tables (e.g.,
users
,jobs
, see below tables list of which tables need to exist for FiveNet to work). - The server you want to run FiveNet on, must have network access to the database server (e.g., exposing the database server via
bind-address
is one way of doing it).
- NATS message queue server or cluster (prefered)
- With JetStream and memory storage enabled (you probably also want to have at least
3
to20MB
of memory storage available).
- With JetStream and memory storage enabled (you probably also want to have at least
- Storage space: Either local filesystem directory or S3 bucket storage. - Used for avatars, faction logs and more.
- Domain/Subdomain name - It must point to the server/reverse proxy that you run FiveNet on (in case of, e.g., Docker that should be your container reverse proxy, Kubernetes Helm installation the ingress controller).
- HTTPS certificates - The reverse proxy must terminate HTTPS/SSL before handing the traffic to FiveNet. In case you are using something like Cloudflare Tunnels, you don't need certificates as Cloudflare terminates HTTPS/SSL in front of the tunnel.
Optional
- Tracing: For OpenTelemetry based tracing support.
- Currently only Jaeger is supported as an exporter target.
- For Development:
- Nuxt UI Pro license - If you want to make changes to FiveNet's code and built your own images from "scratch" you need a Nuxt UI Pro license key. Recommendation is to use the official FiveNet images as your base.
Database
This is a list of the minimum expected tables with their columns:
Tables
jobs
Table
name
label
job_grades
Table
job_name
grade
label
licenses
Table
type
label
owned_vehicles
Table
owner
-varchar(64) NOT NULL
plate
type
model
(Optional, can be overriden viadatabase.custom.columns.vehicles.model
config option)
users
Table
id
-int(11) NOT NULL AUTO_INCREMENT
identifier
-varchar(64) NOT NULL
group
firstname
lastname
dateofbirth
job
job_grade
sex
height
phone_number
visum
(Optional, can be overriden viadatabase.custom.columns.user.visum
config option)playtime
(Optional, can be overriden viadatabase.custom.columns.user.playtime
config option)
user_licenses
Table
type
owner
-varchar(64) NOT NULL
Database/Table Collation
You must ensure that the collation of your database, tables and columns is the same!
A difference in collation between tables can occur, e.g., when the database server has been switched. The database server defines the "default collation" used unless otherwise specified. If the collation is not the same across at least the tables listed below, FiveNet's database migrations have a very high likely hood of failing due to that.
utf8mb4_general_ci
and the charset utf8bm4
.To check the collation of your database tables, you can use the following SQL queries:
USE `__YOUR_DATABASE_NAME_HERE__`;
SHOW TABLE STATUS;
Changing the database, table, column Collation
I personally have used How to easily convert utf8 tables to utf8mb4 in MySQL 5.5 - Database Administrators Stack Exchange, but, as pointed out by the comments, with SET foreign_key_checks = 0;
before you would run the generated queries and SET foreign_key_checks = 1;
after you ran the generated queries.
Creating Database User
These are sample queries to create a database user named fivenet
with "full" access to the database (database_name
).
You are expected to change the password in the first query and specify the right database name in the GRANT
query second line.
CREATE USER 'fivenet'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON 'database_name'.* TO 'fivenet'@'%';