Start

Updating

How to move to a newer FX Phone version without losing your settings or data.

#Steps

  1. Read the changelog in the version checker output on start, or in CHANGELOG.md.
  2. Back up the database and your config.lua, the configs/ folder, config_server.lua and any locale you edited.
  3. Replace the fx-phone folder. Keep logs/ and backups/ if you want their contents, and camera_lens.json if you saved lens settings with /phonecam.
  4. Copy your values back into the new config files. New keys have defaults in the new files.
  5. If you edited a locale, add the new keys from the shipped file to yours. Missing keys fall back to English.
  6. Keep your own .ogg tones and html/assets/sounds/overrides.json.
  7. 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.