Trilium Electron API
    Preparing search index...

    Interface ElectronSecurityApi

    Security settings that live outside the database (in data_dir/security.json) to prevent malicious scripts from modifying them. Changes require a native OS confirmation dialog and an app restart to take effect.

    interface ElectronSecurityApi {
        setBackendScriptingEnabled(enabled: boolean): Promise<boolean>;
        setLanAccessEnabled(enabled: boolean): Promise<boolean>;
        setSqlConsoleEnabled(enabled: boolean): Promise<boolean>;
    }

    Hierarchy (View Summary)

    Index
    • Requests backend script execution be turned on or off.

      Parameters

      • enabled: boolean

      Returns Promise<boolean>

    • Requests enabling/disabling LAN access. When enabled, the desktop binds its TCP listener to all interfaces (instead of loopback) so other devices can reach it — e.g. to sync from another device. Same confirmation + restart flow as above.

      Parameters

      • enabled: boolean

      Returns Promise<boolean>

    • Requests the SQL console be turned on or off.

      Parameters

      • enabled: boolean

      Returns Promise<boolean>