Basic concepts

CTFreak is an on-premise IT task scheduler: a single self-hosted web application to create, schedule, execute and monitor tasks on your servers and databases.

No agent is installed on the targets: CTFreak connects to servers through SSH or WinRM, and to databases through their native protocols.

How it fits together

  • A task is a process that can be executed: a command, a script, a SQL query, an HTTP request, a workflow.

  • An execution is one run of a task. It has a status (pending, running, done, failed, aborted) and a log, and is kept for a configurable retention period.

  • A project groups tasks. Access rights are granted per project, so a Backup project can be reserved for sysadmins while a Reporting project is open to the marketing team.

  • A node holds the parameters used to connect to a server (hostname, protocol, credential, …). Nodes are grouped by node sources, either added one by one or imported in bulk from a file or a URL. A credential is a password or an SSH private key shared by one or many nodes.

  • A database holds the parameters used to connect to a PostgreSQL, MySQL, MariaDB, Oracle or SQL Server database.

  • A notifier informs a third-party service (Slack, email, Jira, …) when an execution starts or ends.

  • A calendar refines when the scheduled executions of a task actually fire.

  • A constant is a key-value pair that tasks can refer to instead of a hard-coded value.

  • A user signs in to CTFreak, alone or as a member of a team. What a user can do depends on the role held on each project. An administrator manages everything, including nodes, databases and credentials, which are global resources shared across projects.

Task types

Task type What it does Runs on
Local command Runs a command directly on the server hosting CTFreak The CTFreak host
Command Runs a command line through SSH or WinRM Nodes
Bash script Runs a bash script through SSH Unix nodes
Powershell script Runs a powershell script through SSH or WinRM Windows nodes
Ansible playbook Runs an ansible playbook Nodes
SQL script Runs a SQL script Databases
SQL report Generates a report with charts and tables from SQL queries Databases
HTTP request Calls an API endpoint (outgoing webhook, ping, …) Any URL
Workflow Executes other tasks, sequentially or concurrently Other tasks

How executions are triggered

An execution of a task can be started:

  • Manually, from the web interface or the REST API, by an administrator or a user holding a role on the project
  • On schedule, from a cron expression optionally combined with a calendar
  • From an incoming webhook, e.g. a push on a git repository or an alert from a monitoring tool
  • From a parent workflow task

Tasks can also declare parameters, so that the same task can be run with different values from a web form, an API call or a webhook payload.

Editions

Without a license key, CTFreak runs in FREE Edition: most features are available, with limits on the number of tasks, users and concurrent executions. Some features, such as SCIM provisioning, require a paid edition. See Licensing for the details of each edition.

Use cases

Now that you’ve got the big picture, follow the Quickstart to run your first task.