Start
Updating
How to move to a newer FX Phone version without losing your settings or data.
#Steps
- Read the changelog in the version checker output on start, or in
CHANGELOG.md. - Back up the database and your
config.lua, theconfigs/folder,config_server.luaand any locale you edited. - Replace the
fx-phonefolder. Keeplogs/andbackups/if you want their contents, andcamera_lens.jsonif you saved lens settings with/phonecam. - Copy your values back into the new config files. New keys have defaults in the new files.
- If you edited a locale, add the new keys from the shipped file to yours. Missing keys fall back to English.
- Keep your own
.oggtones andhtml/assets/sounds/overrides.json. - Start the server.
#Database changes
With Config.AutoSchema = true new tables and column changes are applied on start and recorded in fx_phone_meta, so each runs once. The console line database ready: ... says how many ran.
With Config.AutoSchema = false, import the new setup/install.sql before you start the server. It creates new tables. Column changes to existing tables run only on start, so set Config.AutoSchema = true for one start after an update.
#Coming from a single config.lua
Earlier versions kept every setting in one config.lua. Settings now live in configs/, in the file named after the key: Config.Wisp is in configs/config_wisp.lua, Config.Health in configs/config_health.lua, and so on. The values did not change. Copy each block from your old file into the matching new file. The table on config.lua lists which file holds which key.
#The lb-phone shim
If you run the lb-phone compatibility shim, copy the new fx-phone/html/compat/lb-components.js over lb-phone/ui/components.js after every update. See lb-phone compatibility.
#Bundled apps and assets
Update the app resources in [fx-apps] and fx-phone-assets together with the phone. fx-phone-assets has no scripts; players who were online when it was replaced reconnect to see new models.
#Version check
With Config.VersionCheck = true the server prints on start whether your build is current. If the check cannot reach GitHub it prints Version check failed: GitHub could not be reached, which is harmless. Set Config.VersionCheck = false to silence it.
#Editing the import map
If you edit the inline <script type="importmap"> in html/index.html, the hash in the page's Content-Security-Policy must be updated to match the new text, or the phone stays blank. The hash is the SHA-256 of the exact text between the tags, base64 encoded, placed in script-src as 'sha256-<result>'.
html/index.html?dev=1 is a development tool that is not part of the release. Test changes in game.