References

Services

CronService

Executes user-defined functions, static schema methods and service class methods on a configurable schedule. Tasks run as superuser.

Settings

Setting Description
CronService.tasks Whitespace-separated list of method names to schedule
<methodName>.cronExpression Six-field cron expression: <s> <m> <h> <dom> <mon> <dow>
CronService.allowparallelexecution Allow concurrent execution of the same task (default: false)

Markdown Rendering Hint: Children of Service(CronService) not rendered because ServiceMarkdownFormatter prevents rendering of children.

FtpService

Provides FTP access to Structr’s virtual filesystem. Users authenticate with their Structr credentials and see files according to their permissions.

Settings

Setting Default Description
application.ftp.port 8021 Port the FTP server listens on
application.ftp.passivePortRange – Port range for passive mode, for example “50000-50100”. Required when running in Docker.

Markdown Rendering Hint: Children of Service(FtpService) not rendered because ServiceMarkdownFormatter prevents rendering of children.

MailService

Fetches emails from Mailbox objects via IMAP or POP3 and stores them as EMailMessage objects. Detects duplicates using Message-ID headers and extracts attachments automatically.

The service never fetches on its own. A mailbox is fetched when fetchMails() is called on it; to fetch on a schedule, register a method that calls it with the CronService. Every fetch is logged at info level, with a short status of the service.

Settings

Setting Default Description
mail.maxemails 25 Maximum emails to fetch per mailbox per fetch; with IMAP, a larger backlog is fetched over several runs
mail.attachmentbasepath /mail/attachments Path for storing email attachments
mail.connecttimeout 30000 How long to wait for a server to accept a connection, in milliseconds
mail.readtimeout 60000 How long to wait for a server to answer once connected, in milliseconds
mail.maxconcurrentfetches 4 How many mailboxes are fetched at the same time

Related Types

Mailbox, EMailMessage

Markdown Rendering Hint: Children of Service(MailService) not rendered because ServiceMarkdownFormatter prevents rendering of children.

SSHService

Provides SSH access to an interactive Admin Console and SFTP/SSHFS access to Structr’s virtual filesystem. Only admin users can connect. Authentication requires a public key configured in the user’s publicKey property.

Settings

Setting Default Description
application.ssh.port 8022 Port the SSH server listens on
application.ssh.forcepublickey true Require public key authentication, disabling password login

Markdown Rendering Hint: Children of Service(SSHService) not rendered because ServiceMarkdownFormatter prevents rendering of children.

StorageSyncService

Synchronizes the Structr filesystem (File and Folder nodes) with external storage backends. Storage providers that support synchronization monitor their backend themselves and report changes to this service, which creates, updates, moves and deletes the corresponding nodes. Replaces the former DirectoryWatchService; the old service name is still accepted in configured.services as a deprecated alias.

Configuration

A folder is synchronized when it is directly linked to a StorageConfiguration whose provider supports synchronization. A file linked to such a configuration only stores its content there; it is not scanned or watched. For the local filesystem provider, mount a directory by adding a mountTarget entry to the storage configuration. The service watches for changes and periodically rescans the backend.

Storage Configuration Entries

Entry Description
mountTarget Path to the directory on the server filesystem (local provider)
sync.watchContents true enables live change monitoring for immediate change detection, where the provider supports it; absent means not watched
sync.scanInterval Seconds between rescans; absent or 0 means no periodic scan
sync.fileType Node type created for discovered files (default: File)
sync.folderType Node type created for discovered folders (default: Folder)
sync.direction Direction of synchronization: in (external → Structr, the default when absent), out (Structr → external), or both
sync.onVanished What happens to a node whose backing entry vanished from the external storage: ignore (keep it, the default when absent), delete, or readonly (keep it, mark it isExternallyDeleted and refuse changes until it reappears). Applies to live watch events and to rescans, inbound only

Settings

Setting Description
application.filesystem.followsymlinks Follow symbolic links when scanning directories
log.directorywatchservice.scanquietly Suppress per-scan logging

Notes

  • Nested folders with their own StorageConfiguration are synchronized independently of their parent
  • File contents remain in the external storage and are not imported into the database
  • Changes made to files in Structr are written to the external storage by the storage provider

Markdown Rendering Hint: Children of Service(StorageSyncService) not rendered because ServiceMarkdownFormatter prevents rendering of children.