Skip to main content

FiveM refresh, ensure or restart: which command do you need?

Written by FiveMCoach · AI-assisted editorial guide; official sources checked

Last updated

FiveM refresh vs ensure vs restart: Resource Commands

An evergreen developer guide to choosing refresh, start, ensure or restart, with an isolated resource example and a repeatable troubleshooting record.

Quick answer

Use refresh to rescan resource folders and manifests. Use start for a stopped resource, restart for one that is already running, and ensure when you want it started or restarted according to its current state. Choose deliberately: ensure can interrupt an already-running resource, so it is not a read-only availability check.

On this page

What problem does each command solve?

Discovery and execution are different steps. Adding a folder while FXServer is running does not mean its scripts have executed. Conversely, rerunning a resource command does not repair a missing file or an invalid manifest. The official server command reference defines refresh, start, stop, ensure and restart; use it when deciding what your next command should do.

This is an evergreen guide checked on 12 September 2026, written with AI assistance by FiveMCoach. The procedure below is our proposed diagnostic exercise. It does not announce a new artifact, certify framework compatibility or report an FXServer test performed by us.

How can you rehearse the difference safely?

Use an isolated development server. Create a new resource called fmc_command_probe in its resources directory. Do not replace a live resource or paste this manifest over a purchased script. The probe has no database access, network events or player actions; it only writes a recognizable message when its server entry runs.

Directory layout:

resources/
  fmc_command_probe/
    fxmanifest.lua
    server.lua

Put this in the new fxmanifest.lua:

fx_version 'cerulean'
game 'gta5'
server_script 'server.lua'

Put this in the new server.lua:

print('fmc_command_probe: server entry loaded')

Cfx.re documents the manifest in the resource folder, the game declaration and the server-script entry. The manifest runs separately from your resource scripts. Check the manifest reference and resource directory guide. Keep the folder and file names exact when repeating the exercise.

What should you run in the server console?

On that isolated server, run these commands one at a time and inspect the output after each:

refresh
start fmc_command_probe
ensure fmc_command_probe
stop fmc_command_probe
start fmc_command_probe

Expected observation: discovery is followed by the entry message when the probe starts; ensuring it while running runs it again. Stopping it and starting it gives another explicit startup. These expectations follow the documented command behavior. They are not a captured test result. Do not paste the block as a batch: seeing each transition is the purpose of the exercise.

Now stop the probe before removing its two files from the test environment. If you added it to any test startup configuration, remove that entry too. Leave unrelated resources and their configuration alone.

What if the resource still does not start?

Record the exact command, resource folder, first relevant error and what changed. First check discovery: is the manifest inside the actual resource folder, rather than an unintended archive wrapper? Then check the manifest entries against the filenames that exist. If the loader reaches a named script and reports a file or line, investigate that specific failure rather than repeatedly restarting the server.

A resource dependency declaration requires the named resource to load before the current one. It does not install the dependency or establish compatibility between arbitrary versions. Read the resource maintainer's supported setup before changing dependencies. See the dependency entry. Avoid adding a framework dependency to this standalone probe: it would change the question the exercise is testing.

How do you decide whether a real restart is appropriate?

Before touching a production resource, name the player journey it supports and the state that could be interrupted. Does it handle inventory, a purchase, a job action or a shared interface? Ask its maintainer for supported restart and recovery instructions. A resource appearing started is not evidence that its player-facing behavior or saved data is correct.

Choose one change and repeat the same check in staging. Keep the previous resource and configuration available through your normal recovery procedure. If the change causes a regression, restore the known version and repeat the check before widening the rollout. Do not use a whole-category command when you only intend to operate on one resource.

For runtime performance symptoms, continue with the lag diagnosis playbook. For cross-framework questions, use the framework-fit comparison. If you want structured learning and project guidance, explore the developer path. This guide checks command and manifest syntax against official documentation; the example has not been executed in FXServer during this editorial review.

Checklist
  • Decide whether the immediate problem is discovery, startup or runtime behavior.
  • Capture the command and first relevant error before changing files.
  • Rehearse with a separate probe resource on a development server.
  • Check the real resource maintainer's dependency and restart instructions.
  • Repeat the player journey after a change and keep a recovery path.
Console command Intended effect
refresh Rescan folders and load manifests
start name Start a stopped resource
ensure name Start it, or restart it if running
restart name Restart a running resource
stop name Stop a running resource
Common mistakes

Do not use ensure as if it only checks whether a resource exists. Avoid operating on a whole category to fix one script, overwriting a vendor manifest with a generic example, or treating successful startup as a complete application test. If the probe fails, preserve the error and fix one file or path at a time; if a real resource regresses, use its documented recovery process.

FiveMCoach perspective

We recommend choosing a command by the state transition you intend, then writing down the result. That small habit turns repeated console guesses into an investigation another developer can follow. The useful deliverable is a reproducible explanation of the failure and the next check, not a console history full of repeated restarts.

Does refresh start my new FiveM resource?
Refresh scans resource folders and loads their manifests. You still need an appropriate startup action for the resource; inspect its output instead of treating discovery as successful execution.
Is ensure safe to use on an already-running resource?
Ensure restarts it when it is running. Whether that interruption is acceptable depends on the resource and its current work. Check the maintainer's restart procedure and rehearse away from live players.
Will restart start a resource that is stopped?
The official command reference describes restart for a resource that was already started. Use start for a stopped resource, or choose ensure deliberately when its start-or-restart behavior is intended.
Does a dependency line prove two resources are compatible?
No. It declares a loading requirement. You still need the maintainer's supported versions, configuration and functional checks for the resources you intend to combine.

Ready for the next step?

Stop guessing. Get a concrete plan for your server and move with confidence.

Written by
FiveMCoach · AI-assisted editorial guide; official sources checked
A FiveMCoach contributor responsible for this guide's visible content.