How to Automate VPS Tasks with Recipes in Virtualizor

Knowledgebase / How to Automate VPS Tasks with Recipes in...

How to Automate VPS Tasks with Recipes in Virtualizor

0 found helpful (0 votes) ...
Back to Knowledgebase

Virtualizor Recipes are saved bash scripts that you can run on your VPS directly from the control panel — no SSH session required. Recipes are useful for automating repetitive tasks such as installing software, applying configuration changes, or running maintenance routines across one or more VPS instances.


How to create a recipe

  1. Log in to the Virtualizor Enduser Panel.
  2. In the sidebar, click Recipes.
  3. Click Add Recipe.
  4. Fill in the form:
    • Name: a short descriptive label (e.g. Update All Packages)
    • Description: an optional note explaining what the recipe does
    • Script: paste your bash script into the editor
  5. Click Save. The recipe is stored in your account and can be run on any VPS at any time.

Example recipe: update all packages

The following script updates the package list and installs all available upgrades. Use the correct version for your VPS operating system:

  • Debian / Ubuntu: apt update && apt upgrade -y
  • CentOS / AlmaLinux / Rocky Linux: yum update -y

How to run a recipe

  1. In the Recipes section, find the recipe you want to run.
  2. Click the Run button next to the recipe.
  3. A selection screen will appear — choose the target VPS from the list.
  4. Click Confirm. Virtualizor will execute the script on the selected VPS as the root user.
  5. A log of the script output will be shown once execution completes. Review the output to confirm the script ran successfully.

How to edit or delete a recipe

  1. Go to the Recipes section.
  2. Find the recipe you want to modify.
  3. Click Edit to open the recipe form and update the name, description, or script, then click Save.
  4. To remove a recipe, click Delete next to it and confirm the deletion. Deleting a recipe does not undo any scripts that have already been run.

Important notes

  • Recipes run as root: scripts have full system privileges on the target VPS. Test all scripts in a non-production environment or on a snapshot backup before running them on a live server.
  • Recipes are private: only you and the TPC Hosting server administrator can view your saved recipes. They are not shared with other Virtualizor users.
  • No scheduling built in: recipes are triggered manually. If you need scheduled execution, set up a cron job inside the VPS via SSH instead.

Troubleshooting

  • Recipe fails with a permission error: confirm that the Virtualizor guest agent is installed and running on the VPS. The agent is required for recipe execution. Contact TPC Hosting support if the agent is not present.
  • Script output is empty: some scripts produce no output on success. If no error message is shown, the script likely completed without issues. Verify by logging in to the VPS via SSH and checking the expected result of the script.
  • Recipe ran but changes were not applied: review the script output for error messages. Common causes include a wrong package manager command for the installed OS, or a service that was not restarted after a configuration change.

Was this article helpful?



Still need help?

Open a support ticket →

On This Page