Aller au contenu principal

Config schema

The agent's configuration (A13). The cloud merges system defaults < organization < group (and its parents) < device, and sends the result with a hash; the agent reloads it without restarting. A config.json next to the agent can hold the same settings for offline setup (jodaprint-agent config import|export). Every field is optional in a profile.

KeyTypeDefaultDescription
configVersion11
cloudobject
cloud.urlstring"https://api.jodaprint.dev"Cloud base URL. pattern ^https?://
cloud.heartbeatSecondsinteger30Heartbeat interval. min 5, max 600
localobject
local.enabledbooleantrueRun the local WebSocket server.
local.portsinteger[][8182,8283,8384,8485]at most 10 items
local.standalonebooleanServe signed local requests without cloud activation (self-hosted/offline). Requires local.orgId and security.signingPublicKeys.
local.orgIdstringOrganization ID in standalone mode. pattern ^org_[A-Za-z0-9]{1,64}$
local.rateLimitPerSecondintegerRequests per second allowed from one origin. Defaults to 50. min 1, max 1000
securityobject
security.allowedOriginsstring[][]
security.signingPublicKeysobject[][]
security.requireSignaturebooleantrueReject unsigned requests.
security.unsignedModebooleanfalseAllow unsigned requests after the user approves the site (A10.3).
security.devModebooleanfalseAlso allow http://localhost:* origins.
printersobject
printers.aliasesmap of string{}
printers.defaultsmap of job-options{}
printers.discoveryobject
printers.discovery.networkobject
printers.discovery.network.enabledbooleanfalseScan subnets for port 9100 printers and browse mDNS (_pdl-datastream._tcp).
printers.discovery.network.subnetsstring[][]
printers.defaultstringPrinter used when a job names no printer. Overrides the OS default printer. pattern ^prn_[A-Za-z0-9]{1,64}$
printers.manualManualPrinter[][]Printers the agent cannot discover: network (host:port), serial and Bluetooth SPP (serial port name). at most 100 items
printers.virtualobject
printers.virtual.enabledbooleantrueShow the JodaPrint Virtual printer, which saves jobs to files.
printers.drawerPinsmap of 2 | 5Cash drawer kick pin per printer ID (2 or 5). Defaults to 2.
printers.statusIntervalSecondsintegerHow often idle printers are checked. Defaults to 15. min 5, max 300
queueobject
queue.maxAttemptsinteger5Maximum print attempts per job. min 1, max 20
queue.jobTtlHoursinteger24Queued jobs older than this fail with TIMEOUT. min 1, max 720
queue.keepContentHoursinteger24Keep printed job content for reprints. min 0, max 720
updateobject
update.channel"stable" | "beta""stable"
update.autoUpdatebooleantrueInstall updates automatically.
update.windowstring"02:00-05:00"Local time window for updates, HH:MM-HH:MM. pattern ^([01][0-9]|2[0-3]):[0-5][0-9]-([01][0-9]|2[0-3]):[0-5][0-9]$
logsobject
logs.level"debug" | "info" | "warn" | "error""info"
logs.maxSizeMbinteger20Size of one log file. min 1, max 500
logs.maxFilesinteger5Rotated files to keep. min 1, max 50
uiobject
ui.locale"en" | "fr" | "ht""en"
ui.showTraybooleantrueShow the tray icon.
androidobjectAndroid agent settings (Prompt 7.2). Other agents ignore them.
android.shellobjectWebView shell: opens a web app full screen and gives it window.JodaPrintBridge.
android.shell.urlstringPage the shell opens (https only). Managed configuration can set it too. pattern ^https://
android.shell.fullScreenbooleanHide the status and navigation bars.
android.shell.disableBackbooleanThe back button does not leave the web app (kiosk).
android.shell.autoStartbooleanOpen the shell when the device starts.
templatestemplate[]The organization's templates (Prompt 8.1). The cloud sets them from its template table; profiles cannot. at most 500 items

Types​

ManualPrinter​

FieldTypeRequiredDescription
namestringyesDisplay name.
connection"network" | "serial" | "bluetooth"yes
addressstringyeshost:port (port defaults to 9100) for network; serial port such as COM3 or /dev/ttyUSB0 for serial and bluetooth.
kind"thermal" | "label" | "document"Defaults to thermal.
paperpaper
serialSerialSettings

SerialSettings​

FieldTypeRequiredDescription
baudRate1200 | 2400 | 4800 | 9600 | 19200 | 38400 | 57600 | 115200 | 230400Defaults to 9600.
dataBits7 | 8
parity"none" | "odd" | "even"
stopBits1 | 2

Defaults​

{
"configVersion": 1,
"cloud": {
"url": "https://api.jodaprint.dev",
"heartbeatSeconds": 30
},
"local": {
"enabled": true,
"ports": [8182, 8283, 8384, 8485]
},
"security": {
"allowedOrigins": [],
"signingPublicKeys": [],
"requireSignature": true,
"unsignedMode": false,
"devMode": false
},
"printers": {
"aliases": {},
"defaults": {},
"discovery": {
"network": {
"enabled": false,
"subnets": []
}
},
"manual": [],
"virtual": {
"enabled": true
}
},
"queue": {
"maxAttempts": 5,
"jobTtlHours": 24,
"keepContentHours": 24
},
"update": {
"channel": "stable",
"autoUpdate": true,
"window": "02:00-05:00"
},
"logs": {
"level": "info",
"maxSizeMb": 20,
"maxFiles": 5
},
"ui": {
"locale": "en",
"showTray": true
}
}

This page is generated from protocol/schemas/config.json and agent/internal/config/defaults.json.