Installation
Install Codeon Shield on your FiveM server step by step, from the purchase to every resource protected.
Requirements
- A FiveM server with recent artifacts and OneSync enabled (
set onesync on). Without OneSync the entity, position and health detections do not work, and the console warns you. - A Codeon Shield license (Lifetime or Monthly) in your website account.
- Access to the server console (txAdmin or terminal) and to the server files.
You do not need any extra resource: screenshots, clips, Spectate, the staff menu and the protection all work with CodeonShield itself.
1. Get your license
Buy a plan from the store or, if you were given a key, open the Dashboard and go to Redeem Key. The license appears in Home → My servers.
2. Download the resource
In the Dashboard, open Download and press Download latest. It always downloads the latest published version. This section is only unlocked once you have an active license.
3. Copy the folder to the server
Unzip the .zip inside your resources folder. The folder must be named exactly CodeonShield:
resources/
└── CodeonShield/
├── fxmanifest.lua
├── .license ← your key goes here
├── .version
├── bans.json ← bans of your server
└── src/
├── client/
├── html/
├── include/
├── locales/
├── server/
└── shared/
CodeonShield.4. Paste your license
Copy your key from Home → My servers (click it and it is copied) and paste it in the .license file, replacing PASTE_YOUR_LICENSE_HERE. Lines starting with # are ignored:
# Codeon Shield License
CS-XXXXXXXX-XXXXXXXX-XXXXXXXX
5. Add it to server.cfg
Add these three lines to your server.cfg, right after your base resources (database and framework) and before the rest of your scripts:
ensure oxmysql
ensure es_extended # or qb-core, vrp...
add_ace resource.CodeonShield command allow
add_unsafe_child_process_permission "CodeonShield"
ensure CodeonShield
# ...the rest of your resources
add_unsafe_child_process_permission lets Codeon Shield add its protection to the fxmanifest.lua of your other resources, which recent artifacts block by default. add_ace lets it restart the server on its own after installing that protection. Put both lines before ensure CodeonShield.6. Start the server
On start, Codeon Shield checks every resource of your server and adds its protection at the top of the fxmanifest.lua of the ones that do not have it yet:
shared_script '@CodeonShield/src/include/shield.lua'
If it had to add it anywhere, it restarts the server on its own 5 seconds later so every resource loads the protection:
[Codeon Shield] Protection added to 87 resources. Restarting the server in 5 seconds...
- The first time it restarts once. After that it starts normally:
Protection installed in all 87 resources. - With txAdmin the server comes back on its own. Without txAdmin, start it again yourself.
- It only restarts right after boot with nobody connected, and at most twice every 15 minutes, so it never loops.
- When you install a new resource, the protection is added to it on the next start and the server restarts again on its own.
- The protection cannot be uninstalled: if someone removes the line from a resource, it is added again on the next start. The
monitorresource (txAdmin) is never modified.
Could not protect ... resources, the add_unsafe_child_process_permission "CodeonShield" line is missing from your server.cfg or is placed after ensure CodeonShield. Add it as shown in step 5 and restart the server.With a valid license you will see the Codeon Shield banner and a summary like this one:
[Codeon Shield] License validated. Configuration synchronized from the dashboard.
License: CS-************************XXXX (lifetime, active)
Owner: your_username
Server: My RP Server | 51.xx.xx.xx:30120
Language: en
Detections: 53/53 enabled
Webhooks: 0/4 configured
Staff: 0 identifiers, 0 groups (permissions enabled)
7. Add yourself as staff
In the Dashboard open Home → Configure Server on your server and, under Permissions, press Add Identifier. Add your Discord ID with the Owner level and save. See Permissions and staff for details.
What the protection does
Every resource is protected: if someone stops one, Codeon Shield starts it again. And thanks to the line added to every fxmanifest.lua, if someone stops CodeonShield, the other resources start it again. If it cannot be started, it keeps retrying every few seconds until the anticheat runs again, without kicking anyone. See Anti-stop protection.
Done!
In the Dashboard, your server card shows Protected when everything works. Now set up your webhooks, review the detections and open the staff menu with /csmenu.