Skip to content

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.

bash
npm install -g @shiva-fw/cli
shiva --version

Step 2 — Clone the Docker Boilerplate

The easiest way to get started is the shiva Docker boilerplate, which bundles all resources and a database container.

bash
git clone --recurse-submodules https://github.com/adrianmejias/shiva
cd shiva

The boilerplate includes:

  • txData/ — FiveM server data (server.cfg, resources)
  • compose.yml — MariaDB + FiveM server containers
  • Pre-configured server.cfg with the correct resource load order

Alternatively, scaffold a blank project with the CLI:

bash
shiva init my-server
cd my-server

Step 3 — Configure Your Database

Edit server.cfg to set your database connection string for shiva-db:

ini
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:

ini
ensure shiva-db      # DB driver — must be first
ensure shiva-core    # Framework engine
# ... all shiva-modules resources ...
ensure shiva-boot    # Boot trigger — must be last

shiva-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

bash
shiva migrate

This creates all the database tables for the default modules.

Step 6 — Start the Server

bash
# With Docker
docker compose up

# With txAdmin
# Point txAdmin at your server directory

# Or directly
./run.sh

Step 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.

Next Steps

Released under the MIT License.