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:
| Where | Use it for |
|---|---|
| Home → TOOLS → Script Directory | The full page. Browse every script as cards, filter by category, sort, and manage the built-in set. |
| AI Terminal header → Scripts | A 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:
| Control | What it does |
|---|---|
| Search | Matches the script name, category, description, or any tag |
| All categories | Show one category: Load Monitoring, Website Monitoring, Process Monitor, Server Alerts, or Custom. Custom is where your own and imported scripts live |
| Sort | Last 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
| Script | What it does | Variables (default) |
|---|---|---|
| System Load Summary | Print a portable snapshot of uptime, load, memory, and mounted filesystem usage. | none |
| Filesystem Usage Threshold | Fail when the selected filesystem reaches or exceeds a configured usage percentage. | {{mountPath}} (/), {{warningPercent}} (85) |
Website Monitoring
| Script | What it does | Variables (default) |
|---|---|---|
| Website Status Check | Request a URL and fail unless its HTTP status matches the expected value. | {{url}} (https://example.com/), {{expectedStatus}} (200) |
| TLS Certificate Expiry Check | Fail when a website certificate expires within the configured number of days. | {{hostname}} (example.com), {{port}} (443), {{warningDays}} (14) |
Process Monitor
| Script | What it does | Variables (default) |
|---|---|---|
| Process Running Check | Find processes whose full command line contains a configured pattern and fail when none match. | {{processPattern}} (nginx) |
| Process Resource Snapshot | Show 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.
| Script | What it does | Variables (default) |
|---|---|---|
| High CPU Usage Alert | Alerts 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 Alert | Alerts when used memory (not cache) stays above the limit, with the biggest processes. | {{thresholdPercent}} (90), {{sustainedChecks}} (2) |
| Swap Usage Alert | Alerts when swap use stays high, the early sign that RAM has run out. | {{thresholdPercent}} (80), {{sustainedChecks}} (2) |
| Out-of-Memory Kill Alert | Alerts when the kernel kills a process because memory ran out. Needs read access to the kernel log. | none |
| Disk Space Alert | Alerts when a filesystem crosses the limit, with the largest folders. Use all to watch every real mount. | {{thresholdPercent}} (85), {{mountPath}} (all) |
| Inode Usage Alert | Alerts before a filesystem runs out of inodes, which blocks new files even with space free. | {{thresholdPercent}} (90) |
| Service Stopped Alert | Alerts 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 Alert | Alerts when any systemd unit enters the failed state, and again when another one fails. | none |
| Server Reboot Alert | Alerts once per boot, so crashes and surprise restarts never go unnoticed. | none |
| Website Down Alert | Alerts when a URL stops returning the expected status after retries. Sends one recovery message. | {{url}}, {{expectedStatus}} (200), {{retries}} (2) |
| SSL Certificate Expiry Alert | Reminds 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 Alert | Alerts when failed SSH logins since the last check go over the limit, with the top source IPs. | {{maxFailures}} (20) |
Customize a built-in script
Built-in scripts cannot be deleted, and their card has no Delete button. They can be customized:
- Click the edit icon on the card. Its tooltip reads Customize, and the editor opens as Customize built-in script.
- Change the commands, the defaults, the name, the category, or the tags.
- 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.
Fill in the basics
| Field | What to enter |
|---|---|
| Name | A short name like restart-nginx or tail-error-logs. Up to 50 characters. |
| Category | Required. 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. |
| Tags | Optional, up to 10. Helps you filter the list later. |
| Description | Optional. 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.logSave
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.
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.
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.
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.
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".
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.
AI SSH Terminal
CtrlOps AI SSH Terminal is a full Linux terminal with a built-in AI terminal assistant. Ask questions in plain English, get the right Linux commands, review before execution, and let AI explain every output. It turns natural language into bash - instantly.
Web Search
Let the CtrlOps AI Assistant look up live docs, error messages, and package versions on the web. Pick from Tavily, Brave, or DuckDuckGo as your provider.