Saved Scripts
Saved scripts let you store frequently used shell commands as reusable templates. Instead of typing the same cleanup, backup, or maintenance commands each time, save them once and run them on any server.
Creating a Script
Section titled “Creating a Script”- Navigate to Saved Scripts in the sidebar
- Click Create Script
- Give it a name (e.g., “Docker Cleanup” or “Database Backup”)
- Write the script content
- Optionally add a description
- Click Save
Script names must be unique within your organization.
Example Scripts
Section titled “Example Scripts”Docker image cleanup
Section titled “Docker image cleanup”docker image prune -af --filter "until=168h"docker builder prune -f --filter "until=24h"echo "Cleanup complete. Disk usage:"df -h /Database backup
Section titled “Database backup”TIMESTAMP=$(date +%Y%m%d_%H%M%S)pg_dump -U postgres mydb | gzip > /backups/mydb-${TIMESTAMP}.sql.gzecho "Backup saved: /backups/mydb-${TIMESTAMP}.sql.gz"ls -lh /backups/ | tail -5Application log rotation
Section titled “Application log rotation”cd /opt/appdocker compose logs --tail=10000 > /var/log/app/archive-$(date +%Y%m%d).logdocker compose logs --since=1hRunning Scripts
Section titled “Running Scripts”Saved scripts can be executed directly on a server from the command execution interface, or scheduled to run automatically using Scheduled Operations.
Managing Scripts
Section titled “Managing Scripts”- Edit: Update the name, content, or description at any time
- Delete: Remove scripts you no longer need
Scripts are scoped to your organization. All members with server access can view and use them.
Next Steps
Section titled “Next Steps”- Scheduled Operations to run scripts on a schedule
- GitHub Actions to trigger scripts from CI/CD