CtrlOps
|Docs
Product ModulesAI Terminal

Script Directory

Run 18 built-in Linux monitoring and alert scripts or save your own one-click Scripts in CtrlOps, with variables, categories and tags, available on every server you connect to.

Scripts are your library of shell commands. Save the things you run all the time (restart nginx, tail an error log, check disk usage) and run them with one click on any server. CtrlOps also ships 18 built-in scripts for the checks most servers need: disk, CPU, memory, services, SSH logins, certificates and websites. Scripts live on your computer, not the server, so they follow you around to every connection. For an overview of the script directory before you build your library, see the feature page.

Open the Script Directory

There are two ways in, and they show the same library:

WhereUse it for
Home → TOOLS → Script DirectoryThe full page. Browse every script as cards, filter by category, sort, and manage the built-in set.
AI Terminal header → ScriptsA side panel next to the terminal, for running a script on the server you have open. Same search and category filter, no sort.

With built-in scripts shown (the default) the directory is never empty. The "No custom scripts yet" empty state only appears when you have hidden the built-in set and have not saved a script of your own.

Find a script

The toolbar above the cards narrows the list:

ControlWhat it does
SearchMatches the script name, category, description, or any tag
All categoriesShow one category: Load Monitoring, Website Monitoring, Process Monitor, Server Alerts, or Custom. Custom is where your own and imported scripts live
SortLast added (default), Earliest added, Name (A to Z), or Name (Z to A)
Built-in scripts (toggle)Hide or show the 18 bundled scripts. Hiding never deletes anything

Built-in scripts all share the same creation date, so under Last added your own scripts sit at the top and the built-in set follows in A to Z order.

The Built-in scripts toggle also hides them in the terminal's Scripts panel, where it appears as an eye icon. It does not touch the script picker in Cron Jobs, which always lists every script so you can schedule any of them.

Built-in scripts

Every built-in script carries a green Built in badge next to its category. They are written to run on any Linux server, and each setting you might want to change is a {{variable}} with a sensible default, so the same script works on a 1 GB VPS and a 64 GB database box. Run one as-is from the terminal, or customize it into your own copy.

Load Monitoring

ScriptWhat it doesVariables (default)
System Load SummaryPrint a portable snapshot of uptime, load, memory, and mounted filesystem usage.none
Filesystem Usage ThresholdFail when the selected filesystem reaches or exceeds a configured usage percentage.{{mountPath}} (/), {{warningPercent}} (85)

Website Monitoring

ScriptWhat it doesVariables (default)
Website Status CheckRequest a URL and fail unless its HTTP status matches the expected value.{{url}} (https://example.com/), {{expectedStatus}} (200)
TLS Certificate Expiry CheckFail when a website certificate expires within the configured number of days.{{hostname}} (example.com), {{port}} (443), {{warningDays}} (14)

Process Monitor

ScriptWhat it doesVariables (default)
Process Running CheckFind processes whose full command line contains a configured pattern and fail when none match.{{processPattern}} (nginx)
Process Resource SnapshotShow PID, CPU, memory, and command details for matching processes.{{processName}} (nginx)

Server Alerts

These twelve are built for cron: each one alerts once when something crosses the line and sends one recovery message when it clears.

ScriptWhat it doesVariables (default)
High CPU Usage AlertAlerts when CPU stays above the limit for several checks in a row, with the top processes. Sends one recovery message.{{thresholdPercent}} (85), {{sustainedChecks}} (2)
High Memory Usage AlertAlerts when used memory (not cache) stays above the limit, with the biggest processes.{{thresholdPercent}} (90), {{sustainedChecks}} (2)
Swap Usage AlertAlerts when swap use stays high, the early sign that RAM has run out.{{thresholdPercent}} (80), {{sustainedChecks}} (2)
Out-of-Memory Kill AlertAlerts when the kernel kills a process because memory ran out. Needs read access to the kernel log.none
Disk Space AlertAlerts when a filesystem crosses the limit, with the largest folders. Use all to watch every real mount.{{thresholdPercent}} (85), {{mountPath}} (all)
Inode Usage AlertAlerts before a filesystem runs out of inodes, which blocks new files even with space free.{{thresholdPercent}} (90)
Service Stopped AlertAlerts when a systemd service is not running, with its last log lines. Can restart it automatically.{{serviceName}} (e.g. nginx), {{autoRestart}} (no)
Failed Systemd Units AlertAlerts when any systemd unit enters the failed state, and again when another one fails.none
Server Reboot AlertAlerts once per boot, so crashes and surprise restarts never go unnoticed.none
Website Down AlertAlerts when a URL stops returning the expected status after retries. Sends one recovery message.{{url}}, {{expectedStatus}} (200), {{retries}} (2)
SSL Certificate Expiry AlertReminds as a certificate gets close to expiry: at the warning window, then 7, 3 and 1 days, and when expired.{{hostname}}, {{port}} (443), {{warningDays}} (14)
SSH Brute Force AlertAlerts when failed SSH logins since the last check go over the limit, with the top source IPs.{{maxFailures}} (20)

Running a Server Alerts script from the Script Directory is a one-off check in the terminal. To run the same check on a schedule and get a Slack, Telegram or webhook message when it trips, switch the check on in the Alerts tab, or schedule any script from Cron Jobs.

Customize a built-in script

Built-in scripts cannot be deleted, and their card has no Delete button. They can be customized:

  1. Click the edit icon on the card. Its tooltip reads Customize, and the editor opens as Customize built-in script.
  2. Change the commands, the defaults, the name, the category, or the tags.
  3. Click Save custom copy.

CtrlOps saves your version as a normal custom script and leaves the original untouched. If you kept the name, the copy gets (Custom) added to the end so you can tell them apart. To get the built-in set out of the way instead, turn off the Built-in scripts toggle.

Create a script

Open the new-script form

In the Script Directory header → Click New script

The script editor opens.

New script sits at the top right of the Script Directory, above the toolbar and the script cards.

Fill in the basics

FieldWhat to enter
NameA short name like restart-nginx or tail-error-logs. Up to 50 characters.
CategoryRequired. Your own scripts default to Custom; pick Load Monitoring, Website Monitoring, Process Monitor, or Server Alerts to file it next to the built-in scripts of that kind.
TagsOptional, up to 10. Helps you filter the list later.
DescriptionOptional. A line about what the script does, up to 120 characters.

Write the script

In the content area, write your commands. Use {{variable_name}} placeholders for anything you want to be prompted for at run time:

sudo tail -f /var/log/{{service}}/error.log
Every {{variable}} you type is auto-detected and listed under Variables on the right, where you can give it a default or mark it secret.

Save

The script appears in the Script Directory immediately, under the category you picked. It's available across every server, so you only have to write it once.

Any {{variable}} you use is auto-detected and listed on the right. Click Create script to save.

Run a saved script

Find the script

In the Scripts panel, scroll, search, or pick a category to find it. Built-in scripts run the same way as your own.

The Scripts button in the terminal header opens the panel, with search and a category filter above the script cards.

Click the Run icon (play)

If the script has no variables, it runs immediately in the terminal. You'll see a success toast when it finishes.

Each script card carries its own green Run button, next to the view and edit icons.

Fill in variables (if any)

If the script uses {{variable}} placeholders, a Run modal opens with a text input for each one, pre-filled with the default where the script has one. As you type, the WILL RUN panel underneath shows the exact command that's about to execute, with your values substituted in - read it before you commit. Fill the inputs in and click Run in terminal.

Inputs come pre-filled with the script's defaults. The WILL RUN panel shows the exact command before anything executes.

See the output

The command runs in the terminal area. Output appears live. A success toast confirms "<script_name> completed". If it fails, the toast says "Script failed, check terminal output".

Output prints in the terminal between the script's header and footer rules, ending with its exit status.

Tips

Start from a built-in. Customize Disk Space Alert or Website Status Check and change the defaults rather than writing a disk or HTTP check from scratch. The copy is yours to edit, and the original stays available.

Save your three most-used troubleshooting commands as Scripts (tail -f your app log, pm2 restart, df -h). One click beats typing them out every time. For PM2 specifically, the PM2 Process Manager tab already gives you restart, reload, and stop as buttons, so save Scripts for the things it does not cover.

Use categories for the broad split and tags for the detail. File a script under Website Monitoring, then tag it nginx or staging, and the search box finds it by either.

Use {{variable}} placeholders liberally. A single tail-log script with a {{service}} variable beats writing one script per service.

Scripts run when you click Run, but they do not have to. To put one on a timer, open the Cron Jobs tab on a connected server and create a job with the Script directory task type. It runs this same saved script on a schedule, keeps every run with its output, and can alert you when one fails.

Troubleshooting

A script runs in the terminal tab you have open, on that server. To run one somewhere else, switch to that terminal tab first, or open the other server in its own server tab.

Look for a "Script failed, check terminal output" toast at the top of the screen. The actual error is printed in the terminal area, scroll up if it's already gone past.

You cannot delete a built-in script, and there is no Delete button on its card. You can customize it. Click the edit icon, change what you need, and click Save custom copy. CtrlOps saves your version as a normal custom script and leaves the original in place. To get built-in scripts out of the way, turn off the Built-in scripts toggle instead.

The toggle only hides the 18 bundled scripts, it does not delete them. If you have no scripts of your own yet, the list shows "No custom scripts yet". Flip the Built-in scripts toggle back on, or click Clear filters, and they come back.

The Built-in scripts toggle affects the Script Directory page and the Scripts panel in the terminal. The script picker in Cron Jobs always lists every script, built-in and custom, so you can schedule any of them.

Scripts are stored locally in the app's data directory. Reinstalling without exporting first will wipe them. There's no cloud sync today, so back them up by copying the file from the app's data folder.