> For the complete documentation index, see [llms.txt](https://docs.fivemstats.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fivemstats.net/tgiann-fivem-stats-script.md).

# tgiann-fivem-stats-script

The server-side script that connects your FiveM server to fivemstats.net.

This script connects your FiveM server to the [FiveM Stats panel](https://www.fivemstats.net/dashboard/my-servers). Statistics, screenshots, logs and database backups are stored on your own server; the panel reads them with your secret key.

## Set it up in 4 steps

1. **Install the script** and add three lines to `server.cfg`: [Installation](https://docs.fivemstats.net/tgiann-fivem-stats-script/installation.md)
2. **Open the ports** in your firewall: [Ports and Firewall](https://docs.fivemstats.net/tgiann-fivem-stats-script/ports-and-firewall.md). Host with a DDoS filter (Vibegames and others)? [DDoS-Protected Hosts](https://docs.fivemstats.net/tgiann-fivem-stats-script/ports-and-firewall/ddos-protected-hosts.md)
3. **Turn on HTTPS** so pictures show in the panel: [HTTPS](https://docs.fivemstats.net/tgiann-fivem-stats-script/https.md). Have a domain? [Cloudflare Tunnel](https://docs.fivemstats.net/tgiann-fivem-stats-script/https/cloudflare-tunnel.md)
4. **Add your server** in the panel: [Adding a Server](https://docs.fivemstats.net/panel/adding-a-server.md)

Something does not work? [Common Problems](https://docs.fivemstats.net/tgiann-fivem-stats-script/common-problems.md).

## Everything else

| Page                                                                                                                      | What is in it                                                         |
| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| [Updating from an Older Version](https://docs.fivemstats.net/tgiann-fivem-stats-script/updating-from-an-older-version.md) | Updating the script without losing your data                          |
| [Media Service](https://docs.fivemstats.net/tgiann-fivem-stats-script/media-service.md)                                   | Where files are stored, every convar, file formats, Windows and Linux |
| [Database Backups](https://docs.fivemstats.net/tgiann-fivem-stats-script/database-backups.md)                             | Turning on backups and restoring one                                  |
| [For Developers](https://docs.fivemstats.net/tgiann-fivem-stats-script/for-developers.md)                                 | Screenshots, uploads and logs from your own scripts                   |
| [Panel](https://docs.fivemstats.net/panel.md)                                                                             | What every page and setting of the panel does                         |
