# Running one loading screen across several servers

> Reuse one FiveM loading screen across several servers: a shared resource with per-server config, reading convars in the loadscreen through handover data, server-specific names, colours, rules and music, keeping one codebase in Git, and when a hosted loading screen builder is simpler.

Source: https://fam-tools.com/guides/fivem-loading-screen-for-multiple-servers · FAM Tools · published 2026-09-11 · updated 2026-09-11 · about 8 min

**Short answer.** Keep one loading screen resource in Git and pass per-server values at runtime: set convars in each `server.cfg` (for example `set loading_variant "whitelist"`), read them on the server with `GetConvar` and send them with `deferrals.handover` in `playerConnecting`, and let the page pick name, colours, rules and music from that. Static differences can live in one JSON config keyed by server.

## Key points

- One codebase, per-server values.
- Convars in `server.cfg` pick the variant.
- Handover data carries values into the loadscreen.
- JSON config keyed by server for static content.
- Test each variant before release.

Communities often run more than one server — main and whitelist, EU and NA, or live and development. Maintaining a separate loading screen for each means fixing the same bug three times. One codebase with per-server settings keeps them consistent and still lets each server show its own name, colours and rules.

## Per-server convars

*server.cfg (whitelist server)*

```cfg
set loading_variant "whitelist"
set loading_discord "discord.gg/example"
```

Each server sets its own values; the resource files stay identical.

## Passing values with handover data

*server.lua (in the loadscreen resource)*

```lua
AddEventHandler('playerConnecting', function(_, _, deferrals)
    deferrals.handover({
        variant = GetConvar('loading_variant', 'main'),
        discord = GetConvar('loading_discord', ''),
    })
end)
```

*loading screen page*

```js
const data = window.nuiHandoverData || {};
const variant = data.variant || 'main';
document.documentElement.dataset.variant = variant;
```

Details and limits: [handover data](https://fam-tools.com/guides/fivem-loading-screen-handover-data).

## Static content per server

*variants.json*

```json
{
  "main":      { "name": "Night City RP", "accent": "#7c5cff", "music": "main.mp3" },
  "whitelist": { "name": "Night City WL", "accent": "#ff5c8a", "music": "wl.mp3" },
  "dev":       { "name": "Night City DEV", "accent": "#999999", "music": null }
}
```

Include `variants.json` and assets in the manifest `files` list so the page can load them — see [NUI asset paths](https://fam-tools.com/guides/fivem-nui-assets-paths).

## Workflow

1. Keep the resource in one Git repository.
2. Deploy the same version to every server.
3. Change only convars per server.
4. Test each variant on the dev server with the same convars.

> **Hosted alternative** — A hosted loading screen builder can hold one design per server and generate the resource for each, so non-developers can edit rules and music without touching code.

## Questions

### Can two FiveM servers share one loading screen?

Yes — use the same resource and switch name, colours and content with per-server convars passed through handover data.

### How does a loading screen read server.cfg values?

Read the convar on the server with `GetConvar` and pass it with `deferrals.handover`; the page reads `window.nuiHandoverData`.

### Where should per-server text live?

In a JSON config keyed by variant, listed in the manifest files.

### Should the dev server use the same loading screen?

Yes, with a dev variant — it is the best place to test changes before live.

## Related

- https://fam-tools.com/guides/fivem-loading-screen-handover-data
- https://fam-tools.com/guides/fivem-nui-assets-paths
- https://fam-tools.com/guides/fivem-loading-screen-rules-and-info
- https://fam-tools.com/guides/fivem-loading-screen-design-tips
