Install Script Schema
Install scripts are JSON objects with the following structure:
Root Properties
version
(required): Must be1
currently. Used for future migration compatibility.ensure_directories_exists
(optional): Array of directories to create before installationensure_permissions_exists
(optional): Array of permission modifications for specific pathsapp_values
(required): Configuration object passed directly to TrueNAS API
Basic Example Structure
json
{
"version": 1,
"ensure_directories_exists": [
"/path/to/directory",
{
"path": "/path/with/options",
"network_share": true,
"posix": true
}
],
"ensure_permissions_exists": [
{
"path": "/path/to/set/permissions",
"username": "netdata",
"access": "read",
"posix": { "groupname": "docker" }
}
],
"app_values": {
// TrueNAS app configuration
// Structure varies by application
}
}
Directory Creation (ensure_directories_exists
)
- String format: Simple path string
- Object format:
path
: Directory path (required)network_share
: Boolean, whether to expose as network shareposix
: Boolean, whether to use POSIX permissions
Permission Management (ensure_permissions_exists
)
Required for apps that need specific user/group permissions (like PostgreSQL).
path
: Directory path to modifyusername
: User to grant access toaccess
: Access level ("read", "write", etc.)posix
: Object with additional POSIX settings (e.g.,groupname
)
App Values (app_values
)
This object is passed directly to TrueNAS's app installation API. The structure varies by application and corresponds to the app's configuration schema in the TrueNAS apps repository. For example, you can see Plex's schema for the storage
property here.