How to Save and Run Command Snippets on iPhone (and Use the Built-In DevOps Presets)
Snippets are saved commands you run with a tap. ServerPanel ships preset categories (System, Docker, Kubernetes, Network, Logs, Services, Files & Disk, Git). Free keeps up to 8 snippets; Premium unlocks unlimited snippets and the full preset library.
The problem
You type the same handful of commands again and again: systemctl status nginx, journalctl -u app -n 100 --no-pager, docker compose logs -f --tail=100, df -h. On a laptop your shell history does the work. On a phone you retype, mistype and forget the flags. The more stressed you are, for example during an outage, the more likely a typo.
What snippets do
A snippet is a saved command with a name. Tap it in the terminal and it runs. Build your own, or start from presets organised by task:
- System: top CPU and memory processes, a system overview
- Docker: compose logs, cleanup and more
- Kubernetes: recent events and basics
- Network: public IP, TLS certificate expiry
- Logs: recent journal, today’s errors
- Services
- Files & Disk: largest items here, largest directories, files over 100M
- Git
How to set up
- Open the snippet library from the terminal or Settings.
- Add presets you’ll actually use, or create your own with a clear name.
- In a session, tap a snippet to run it.
- Keep the ones for your routine checks, not a hundred you’ll never touch.
What’s free
You can keep 8 snippets on the free plan. Premium unlocks unlimited snippets and the full preset library. Eight is enough for a core routine: status, logs, disk, memory, restart, and so on.
Writing good snippets
- Make them read-only first. Checks and log tails are safe to run with one tap. Be careful with destructive ones (restarts, deletes) so a stray tap does nothing harmful.
- Name them for what they do (“Nginx errors today”), not the command.
- Limit the output with
tailorheadso it fits a phone screen. - No secrets. Snippets are app data. Use SSH keys or environment variables on the server instead of pasting tokens in a command.
Pair with the compose bar
For one-off commands, use the compose bar. Save the ones you repeat as snippets.
FAQ
How many snippets are free? Up to 8. Premium removes the limit and unlocks the full preset library.
What presets are there? Categories including System, Docker, Kubernetes, Network, Logs, Services, Files & Disk and Git, with commands such as top CPU processes, Docker cleanup, TLS certificate expiry and the largest directories.
Do snippets sync? With Premium and iCloud sync, snippets are stored with your other app data across your devices. Don’t store secrets in them.