Best Steps To Create a new VPS on Virtualizor – OrcaCore
In this article, we aim to guide you through the process of creating a new VPS using the Virtualizor panel. If you’ve been following our series of Virtualizor Tutorials, you’ll know that we’ve covered various setups in previous articles. We highly recommend reviewing those, as some concepts are directly related to this tutorial on how to Create a new VPS on Virtualizor.
How to Create a new VPS in the Virtualizor panel
Let’s break down the steps required to successfully create a functional VPS within the Virtualizor panel. Follow the instructions below to Create a new VPS on Virtualizor.
Step 1 – Create VPS
First, log in to your Virtualizor panel. Typically, this is done by entering ServerIP:4085
in your web browser and providing your login credentials. Once logged in, navigate to the "Virtual Server" section in the left-hand panel and select the "Create VPS" sub-menu. This will open a page where you need to define various parameters for your new VPS. The image below illustrates this page.

Step 1-1 – Basic Settings
The first section focuses on basic settings needed to Create a new VPS on Virtualizor.
First, select the server you wish to host the VPS on. This is often pre-selected.
Next, you need to define the user who will own the VPS. You have two options: create a new user by filling in the "User email," "Password," "First Name," and "Last Name" fields, or select a pre-existing user from the dropdown list (as covered in our Add Users to Virtualizor Panel tutorial).
In the General Settings section, you can select a pre-defined plan (Define Plans on a Virtualizor Panel). Choosing a plan automatically populates all the VPS details. If you don’t select a plan, you’ll need to manually configure settings like CPU, memory, IP address, disk space, and other resources.
Define the hostname and the VPS root password to complete this section. You can generate a random, secure password by clicking the "key" icon.
You also have the option to make the new VPS a demo by checking the "Enable Demo" box. If you enable the demo, you’ll need to specify the demo duration.
Step 1-2 – Advanced Options
The advanced options section provides granular control over your VPS configuration when you Create a new VPS on Virtualizor. It covers five main areas: "Network Settings," "Control Panel," "CPU," "Disk," and "Miscellaneous settings."
As before, selecting a pre-defined plan automatically configures these settings. Otherwise, you must define each manually.
Finally, click "Add Virtual Server" to begin the VPS creation process.
Step 2 – Building VPS
After configuring all the necessary parameters, the VPS creation process will begin.

Note: This process can take some time. You can navigate away from the page without interrupting the installation.
Once the VPS is created, a pop-up box will appear, displaying an overview of the new VPS.

Click the "Virtual Server Overview" link (highlighted in blue) to view a list of all the VPS instances you’ve created.
Conclusion
Congratulations! You’ve learned how to Create a new VPS on Virtualizor using the Virtualizor panel. It’s important to remember that understanding the concepts covered in our previous posts is crucial for successfully navigating these steps. If you have any questions, feel free to leave a comment below.
Alternative Solutions for Creating a VPS
While the Virtualizor panel provides a user-friendly interface for creating VPS instances, alternative methods exist. Let’s explore two such options: using the Virtualizor API and leveraging Infrastructure as Code (IaC) tools like Terraform.
Alternative 1: Using the Virtualizor API
Virtualizor offers a comprehensive API that allows you to manage your VPS environment programmatically. This is particularly useful for automating VPS creation and management tasks. Instead of relying on the web interface, you can use scripts or applications to interact directly with the Virtualizor server.
Explanation:
The Virtualizor API exposes a set of endpoints that you can call using HTTP requests. These endpoints allow you to perform various actions, such as creating, deleting, starting, stopping, and managing VPS instances. To use the API, you’ll need to obtain an API key from your Virtualizor panel and include it in your requests.
Code Example (Python):
This example demonstrates how to create a VPS using the Virtualizor API with a Python script. This requires the requests
library: pip install requests
. Note that this code assumes you already have the appropriate values for the parameters. It is meant to illustrate the API call.
import requests
import json
# Virtualizor API URL
api_url = "https://your_virtualizor_server:4085/index.php" # Replace with your actual URL
# API Key and other parameters
api_key = "YOUR_API_KEY" # Replace with your API key
act = "vpsmanage"
vpsid = 0 #0 create a new one, otherwise edit
osid = 123 #Replace with your OS template id
hostname = "newvps.example.com" #Replace with your hostname
ram = 1024 #RAM in MB
bandwidth = 1000 #Bandwidth in GB
# Construct the API request parameters
params = {
"api": "json",
"apikey": api_key,
"act": act,
"vpsid": vpsid,
"do": "create",
"osid": osid,
"hostname": hostname,
"ram": ram,
"bandwidth": bandwidth
}
try:
# Make the API request
response = requests.post(api_url, data=params, verify=False) # disable SSL verification if you have a self-signed certificate
response.raise_for_status() # Raise HTTPError for bad responses (4xx or 5xx)
# Parse the JSON response
data = response.json()
# Check the response status
if data["status"] == 1:
print("VPS creation successful!")
print("VPS ID:", data["vpsid"])
else:
print("VPS creation failed.")
print("Error:", data["error"])
except requests.exceptions.RequestException as e:
print(f"Request failed: {e}")
except json.JSONDecodeError:
print("Failed to decode JSON response.")
except KeyError as e:
print(f"Missing key in JSON response: {e}")
This script sends a POST request to the Virtualizor API endpoint with the necessary parameters for creating a VPS. It then parses the JSON response and prints the result. You will need to modify the parameters such as the API key, hostname, RAM and OS ID to match your desired configuration. The verify=False
option is used to bypass SSL verification if you’re using a self-signed certificate, but it’s recommended to use a valid SSL certificate in a production environment. Error handling is also included to manage potential issues during the API call.
Alternative 2: Using Infrastructure as Code (IaC) with Terraform
Terraform is an Infrastructure as Code (IaC) tool that allows you to define and manage your infrastructure using declarative configuration files. You can use Terraform to automate the creation of VPS instances on Virtualizor, providing a more scalable and maintainable approach.
Explanation:
Terraform uses providers to interact with different infrastructure platforms, including Virtualizor. The Terraform Virtualizor provider allows you to define VPS instances as resources in your Terraform configuration files. When you apply the configuration, Terraform will automatically create the VPS instances according to your specifications.
Code Example (Terraform):
This example shows how to create a VPS using Terraform with the Virtualizor provider. You’ll need to install Terraform and configure the Virtualizor provider.
terraform {
required_providers {
virtualizor = {
source = "virtualizor/virtualizor"
version = "~> 1.0.0" # Or the latest version
}
}
}
provider "virtualizor" {
host = "your_virtualizor_server:4085" # Replace with your Virtualizor server IP and port
api_key = "YOUR_API_KEY" # Replace with your API key
verify_ssl = false # Set to 'true' if you have a valid SSL certificate
}
resource "virtualizor_vps" "example" {
hostname = "terraform-vps.example.com" # Replace with your desired hostname
os_id = 123 # Replace with your OS template ID
ram = 1024 # RAM in MB
bandwidth = 1000 # Bandwidth in GB
user = "existinguser@example.com" # Replace with the email of an existing Virtualizor user or create a new one
password = "securepassword" # Replace with a secure password for the root user
# Optional settings
cpu = 1 # Number of CPUs
disk = 20 # Disk space in GB
}
output "vps_ip" {
value = virtualizor_vps.example.ips[0] # Access the first IP address
}
To use this Terraform configuration:
- Install Terraform: Download and install Terraform from the official Terraform website.
- Configure the Virtualizor Provider: Replace
"your_virtualizor_server:4085"
and"YOUR_API_KEY"
with your actual Virtualizor server address and API key. - Define the VPS Resource: Modify the
virtualizor_vps
resource block to match your desired VPS configuration, including the hostname, OS template ID, RAM, bandwidth, user and password. - Initialize Terraform: Run
terraform init
in the directory containing your Terraform configuration file. This will download the Virtualizor provider plugin. - Apply the Configuration: Run
terraform apply
. Terraform will display a plan of the changes it will make. Confirm the changes by typingyes
.
Terraform will then create the VPS on your Virtualizor server. The output "vps_ip"
block will display the IP address of the newly created VPS after the process is complete.
Using Terraform offers several advantages:
- Declarative Configuration: You define the desired state of your infrastructure, and Terraform handles the process of achieving that state.
- Version Control: You can store your Terraform configuration files in a version control system like Git, allowing you to track changes and collaborate with others.
- Automation: Terraform automates the process of creating and managing VPS instances, reducing the risk of errors and saving time.
These alternative methods provide flexibility and automation capabilities beyond the standard Virtualizor panel interface. Choosing the right approach depends on your specific needs and technical expertise. The Virtualizor API is suitable for simple scripting and automation tasks, while Terraform is better suited for managing more complex infrastructure deployments.