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 file or folder is synchronized when it is directly linked to a StorageConfiguration whose provider supports synchronization. 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.

Folder Properties

Property Description
mountWatchContents Enable live change monitoring for immediate change detection
mountScanInterval Seconds between rescans (0 = no periodic scan)
mountTargetFileType Node type created for discovered files (default: File)
mountTargetFolderType Node type created for discovered folders (default: Folder)
mountDoFulltextIndexing Add discovered files to the fulltext index

Storage Configuration Entries

Entry Description
mountTarget Path to the directory on the server filesystem (local provider)
sync.direction Direction of synchronization: in (external → Structr, the default when absent), out (Structr → external), or both
sync.deleteStale If true, rescans delete nodes whose backing entry vanished from the external storage (inbound scans 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.