Data Storage
Vehicle Studio can store its saved data in local resource files or in a MySQL database through oxmysql.
The data storage switch lives in config/config.lua:
Config.DataStorage = "local"Valid values are:
Value
Requires oxmysql
Best for
"local"
No
Simple installs, testing, single-server usage
"database"
Yes
Shared data, easier backups, production usage
Image uploads are configured separately with Config.ImageStorageProvider. Data storage decides where Vehicle Studio stores metadata such as vehicle image references, presets, and settings. It does not make preset thumbnails or generated image files database blobs.
What Gets Stored
Vehicle Studio stores:
Vehicle gallery index data.
Image references and public image URLs.
Presets.
Preset thumbnail references.
Gallery settings.
Generated image files and preset thumbnail files use the configured image upload provider:
"local"saves files inside the resource."s3","r2", and"fivemanage"save files remotely and store the returned URL as a reference.
Local Storage
Local storage is the default option and does not require any database setup.
In config/config.lua:
With local data storage, Vehicle Studio writes JSON data inside the resource to a folder called local_data/.
Typical local data files include:
local_data/index.jsonlocal_data/presets/index.jsonlocal_data/presets/<preset-id>.jsonlocal_data/settings.json
Use local storage if:
You want the simplest setup.
You do not want
oxmysqlas a dependency.You are testing the resource locally.
You are only running one server instance.
Local Storage Notes
Do not commit your live config/ folder or generated data files. The resource includes config_example/ for defaults, while config/ is intended for your server-specific settings.
If you use local image uploads too, make sure the local image upload guide is also configured correctly.
Database Storage
Database storage stores Vehicle Studio data in MySQL through oxmysql.
In config/config.lua:
You must also start oxmysql before Vehicle Studio in server.cfg:
Vehicle Studio uses oxmysql exports, so oxmysql is only required when Config.DataStorage is set to "database".
Database Tables
The database schema lives in:
That SQL file is the source of truth for both automatic setup and manual setup.
It creates these tables:
jg_vehiclestudio_vehicles
Vehicle entries in the gallery index
jg_vehiclestudio_images
Image references for each vehicle
jg_vehiclestudio_presets
Saved preset data and summary fields
jg_vehiclestudio_settings
Resource settings saved from the UI
Automatic Setup
When database storage is enabled, Vehicle Studio tries to run sql/jg_vehiclestudio.sql automatically on startup.
For automatic setup to work:
oxmysqlmust be started.The MySQL connection must be valid.
The configured database user must have permission to create tables.
sql/jg_vehiclestudio.sqlmust be included with the resource.
Manual Setup
If automatic setup fails, manually run:
Run it in your MySQL database using your preferred database tool, then restart Vehicle Studio.
Troubleshooting
Database Storage Says oxmysql Is Missing
oxmysql Is MissingCheck that oxmysql is installed and started before Vehicle Studio:
Tables Are Not Created Automatically
Check:
The MySQL connection string used by
oxmysql.The database user has
CREATE TABLEpermission.sql/jg_vehiclestudio.sqlexists in the resource.The server console for SQL errors.
You can manually run sql/jg_vehiclestudio.sql if needed.
Images Or Preset Thumbnails Are Not In The Database
This is expected. Vehicle Studio stores image files through Config.ImageStorageProvider, then saves references to those files in local data or database data.
Use the image upload provider docs if generated images or preset thumbnails are not uploading correctly.
Last updated
Was this helpful?

