> For the complete documentation index, see [llms.txt](https://theobsidianstudio-1.gitbook.io/theobsidianstudio-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://theobsidianstudio-1.gitbook.io/theobsidianstudio-docs/helpful/basic-server-knowledge.md).

# Basic Server Knowledge

Understanding a few basic server concepts can help avoid common installation issues and make script setup easier.

{% hint style="info" icon="chart-diagram" %}
Server Structure
{% endhint %}

A standard FiveM server usually contains:

* `server.cfg` → main server configuration file
* `resources` folder → where scripts are installed
* `cache` folder → temporary generated files
* artifact files → server runtime files

{% hint style="info" icon="user-gear" %}
Resource Management
{% endhint %}

Every script must be placed inside the `resources` folder and started through `server.cfg`.

Example:

```
ensure scriptname
```

{% hint style="info" %}
Dependencies
{% endhint %}

Some resources require additional dependencies before they can work correctly.

Common examples:

* `oxmysql`
* `ESX`
* `ox_lib`

Always ensure dependencies start before the script that requires them.

{% hint style="info" icon="database" %}
Database Usage
{% endhint %}

Many scripts use SQL tables for storing:

* player data
* items
* jobs
* settings

If a script includes an SQL file, import it before starting the resource.

{% hint style="info" icon="broom-wide" %}
Cache Clearing
{% endhint %}

If a script behaves unexpectedly after changes:

* stop the server
* delete cache files (except important folders)
* restart the server

{% hint style="info" icon="greater-than" %}
Artifact Compatibility
{% endhint %}

Some scripts may require newer or stable artifact builds. Keeping artifacts updated helps reduce compatibility issues.

{% hint style="info" icon="square-question" %}
Common Troubleshooting
{% endhint %}

If a script does not start:

* check server console errors
* verify dependency order
* confirm SQL import
* check config values

{% hint style="info" icon="lightbulb-exclamation-on" %}
Recommended Practice
{% endhint %}

Always keep backups before:

* updating artifacts
* importing SQL
* editing configs
* replacing resources


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://theobsidianstudio-1.gitbook.io/theobsidianstudio-docs/helpful/basic-server-knowledge.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
