# First Steps

> A practical first-read guide for FiveM server owners using Sky-Systems resources.

This guide explains the basics we expect every server owner or developer to know before editing Sky-Systems resources. Start here if you want a quick, practical overview of configs, resources, server logs, and support reports.

## What You Should Know First

If your anticheat has **Resource Protection** enabled, you **must whitelist every installed Sky resource** before testing. This includes the shared libraries and each product, and applies to Electron and other anticheats. See the [required Resource Protection setup](/docs/guide/anticheat-resource-protection).

A FiveM server is built from resources. A resource is a folder with an `fxmanifest.lua` file inside it. Sky-Systems scripts are resources too, for example `sky_base`, `sky_jobs_base`, `sky_ambulancejob`, `sky_policejob`, or `sky_mechanicjob`.

Your server starts resources from `server.cfg` using `ensure` lines:

```cfg [server.cfg]
add_filesystem_permission sky_base write sky_jobs_base
add_filesystem_permission sky_base write sky_ambulancejob

ensure sky_base
ensure sky_jobs_base
ensure sky_ambulancejob
```

The order matters. Shared dependencies must start before scripts that use them.

Keep [filesystem permissions](/docs/installation#filesystem-permissions) before the Sky `ensure`
lines. Add one grant for each installed Sky Base resource and perform a **full server restart**
after changing these permissions.

Each Sky-Systems resource must stay in its own folder with its own `fxmanifest.lua`.

You may organize resources inside a category folder. Category folders must use square brackets, for example `[sky_scripts]`. The folders inside it are still the real resources.

Do not start the whole category folder for Sky-Systems resources. When you use `ensure [sky_scripts]`, FiveM starts the resources inside that folder alphabetically. That can break the required dependency order, because `sky_base` must start before `sky_jobs_base`, and both must start before the job resources.

Wrong:

```text
resources/
  [sky_scripts]/
    sky_ambulancejob/
      fxmanifest.lua
    sky_base/
      fxmanifest.lua
    sky_jobs_base/
      fxmanifest.lua
```

```cfg [server.cfg]
ensure [sky_scripts]
```

This starts resources alphabetically instead of in the order your scripts need.

Correct:

```text
resources/
  [sky_scripts]/
    sky_base/
      fxmanifest.lua
    sky_jobs_base/
      fxmanifest.lua
    sky_ambulancejob/
      fxmanifest.lua
```

```cfg [server.cfg]
add_filesystem_permission sky_base write sky_jobs_base
add_filesystem_permission sky_base write sky_ambulancejob

ensure sky_base
ensure sky_jobs_base
ensure sky_ambulancejob
```

Use category folders only to keep your `resources` folder clean. Start the actual resources one by one in `server.cfg` so the order is clear.

## Recommended Start Order

Use this general order for Sky-Systems job scripts:

```cfg [server.cfg]
ensure oxmysql
ensure your_framework
ensure your_inventory
ensure your_target

add_filesystem_permission sky_base write sky_jobs_base
add_filesystem_permission sky_base write sky_ambulancejob
add_filesystem_permission sky_base write sky_policejob
add_filesystem_permission sky_base write sky_mechanicjob

ensure sky_base
ensure sky_jobs_base

ensure sky_ambulancejob
ensure sky_policejob
ensure sky_mechanicjob
```

Replace `your_framework`, `your_inventory`, and `your_target` with the resources your server actually uses.

## Important Rules

- Do not rename Sky-Systems resource folders. The resource name is used by exports, events, NUI callbacks, and escrow.
- Do not edit files inside protected escrow code. Use the files in `config/` unless documentation says otherwise.
- Always restart the resource after editing a config file.
- Always read the server console after a restart. Most config mistakes are printed there.
- Stop old conflicting resources when replacing them with a Sky-Systems resource.

## Common Conflicts

If you install a Sky-Systems replacement for an existing job system, do not run both systems at the same time.

Examples:

```cfg [server.cfg]
# Stop these if you use sky_ambulancejob
# ensure esx_ambulancejob
# ensure qb-ambulancejob
# ensure qbx_medical
# ensure qbx-ambulancejob

ensure sky_ambulancejob
```

Two resources controlling the same death, revive, garage, duty, or job logic can create bugs that look random but are caused by duplicate systems.

## Where To Go Next

- [Editing Configs](/docs/guide/editing-configs)
- [FiveM Basics](/docs/guide/fivem-basics)
- [Updates & Backups](/docs/guide/updates-backups)
- [Reporting Issues](/docs/guide/reporting-issues)
- [Common Console Errors](/docs/guide/common-console-errors)
