Installation
This guide gets you from zero to a running Shiva server. Estimated time: 15 minutes.
Prerequisites
Before you start, make sure you have:
- A FiveM server (txAdmin or bare server) — FiveM docs
- MariaDB 10.6+ or MySQL 8+ accessible from your server
- Node.js 18+ (for the Shiva CLI)
- A license key from Cfx.re Keymaster
Step 1 — Install the CLI
The Shiva CLI is how you manage modules, run migrations, and scaffold new code.
npm install -g @shiva-fw/cli
shiva --versionStep 2 — Clone the Docker Boilerplate
The easiest way to get started is the shiva Docker boilerplate, which bundles all resources and a database container.
git clone --recurse-submodules https://github.com/adrianmejias/shiva
cd shivaThe boilerplate includes:
txData/— FiveM server data (server.cfg, resources)compose.yml— MariaDB + FiveM server containers- Pre-configured
server.cfgwith the correct resource load order
Alternatively, scaffold a blank project with the CLI:
shiva init my-server
cd my-serverStep 3 — Configure Your Database
Edit server.cfg to set your database connection string for shiva-db:
set mysql_connection_string "mysql://shiva:your-password-here@127.0.0.1:3306/shiva"Docker
If you're using the included compose.yml, run docker compose up -d. The MariaDB credentials are pre-filled in the default server.cfg.
Step 4 — Verify Resource Load Order
server.cfg must ensure resources in this exact order:
ensure shiva-db # DB driver — must be first
ensure shiva-core # Framework engine
# ... all shiva-modules resources ...
ensure shiva-boot # Boot trigger — must be lastshiva-boot being last is critical — it signals shiva-core to begin the 7-phase boot pipeline only after all module resources have loaded.
Step 5 — Run Migrations
shiva migrateThis creates all the database tables for the default modules.
Step 6 — Start the Server
# With Docker
docker compose up
# With txAdmin
# Point txAdmin at your server directory
# Or directly
./run.shStep 7 — Verify
Connect to your server with FiveM. Open F8 and check for errors.
If you see [shiva-core] ✓ Shiva started in the console, you're good.