Key takeaways
- VPS setup starts with the right provider, operating system, resources, and management level.
- Secure setup includes a non-root user, updates, SSH keys, and firewall rules.
- Linux and Windows VPS environments require different setup methods.
- Test access, backups, networking, and resource use before adding applications.
A virtual private server gives you an isolated hosting environment with dedicated resource allocations and more control than shared hosting. That control also makes you responsible for configuring the server correctly, particularly when you choose an unmanaged plan.
This VPS setup guide walks through the main steps for configuring Linux and Windows servers. It focuses on provisioning and configuring the VPS itself, with links to separate connection instructions when you need help accessing the server from your local computer.
Get premium VPS hosting
High-performance VPS hosting that delivers unrivaled power, the fastest speeds available, and 24/7 expert support
What you need before setting up a VPS
Before starting, gather your VPS IP address, root or administrator credentials, operating system details, required ports and services, application requirements, backup or snapshot access, and domain name if applicable.
You should also have access to your provider’s browser-based console or recovery environment in case remote access fails.
Keep your original server session open while changing SSH or firewall settings. Test each change in a second session before closing the first one. This reduces the risk of locking yourself out of the server.
Learn more: A complete beginner’s guide to virtual private servers →
Step 1: choose a VPS provider and plan
Provider selection affects more than the initial price. Support scope, backups, scaling, data center locations, operating system choices, and recovery tools all influence how easily you can configure and maintain the server.
Choose the appropriate resources
Estimate the CPU, RAM, storage, bandwidth, traffic, user count, database size, background processes, and future growth your application requires.
Leave enough capacity for normal traffic changes and operating system activity, but avoid paying for resources the workload won’t use.
Choose a data center location
Select a data center near the people or systems that will connect to the VPS. A closer location may reduce latency for websites, applications, remote desktops, and file transfers.
Location alone doesn’t determine performance. The provider’s network quality, routing, capacity, and reliability also affect connection speeds.
Decide between managed and unmanaged VPS hosting
The management level determines who handles server administration.
| Responsibility | Managed VPS | Unmanaged VPS |
| Server provisioning | Usually included | Usually included |
| Operating system updates | May be included | Customer |
| Firewall configuration | Depends on plan | Customer |
| Monitoring and backups | May be included | Customer |
| Application administration | Usually customer | Customer |
| Troubleshooting | Defined by support scope | Primarily customer |
Review the provider’s management scope instead of relying on the word “managed.” Some providers manage the operating system and control panel but leave application code, databases, plugins, and third-party software to the customer.
Managed hosting can also help experienced teams spend less time on routine administration.
Step 2: choose an operating system and provision the VPS
Choose an operating system based on application compatibility, administration experience, licensing, and support requirements.
Linux VPS options
AlmaLinux and Rocky Linux are common choices for VPS hosting, especially for server environments that use cPanel or other RHEL-compatible software. Both use the DNF package manager and follow a similar administration process.
Ubuntu and Debian are also widely supported. Their setup process is similar, but they use the APT package manager and some commands and service names differ.
Before choosing a distribution, confirm that it supports your application, control panel, database, and required software packages. Also check how long the operating system will receive security updates.
Windows VPS options
Choose Windows Server when your workload requires IIS, ASP.NET, .NET Framework, Microsoft SQL Server, Windows authentication, Remote Desktop, or Windows-only business applications.
Windows may feel more familiar to teams that prefer graphical administration, but familiarity shouldn’t determine the operating system by itself. Choose the platform that best supports the workload.
Windows Server also carries licensing costs that most Linux distributions don’t require.
Provision the server
Most VPS providers provision the server through an account dashboard. During provisioning, you may need to select the operating system, server size, data center location, hostname, SSH key, control panel, backup service, and management level.
After provisioning, save the server’s IP address, hostname, username, temporary password, operating system version, and console details.
Step 3: access your VPS
After provisioning, confirm that you can access the server before making configuration changes.
Access a Linux VPS
Linux VPS environments typically use SSH for remote administration. Connect using the server IP address and the credentials or SSH key created during provisioning.
If you already administer VPS environments, use your preferred SSH client and workflow.
If you need a refresher on connecting to your VPS, see our guide on how to connect to a VPS.
Access a Windows VPS
Windows Server environments typically use Remote Desktop for remote administration. Connect using the VPS IP address and administrator credentials provided during provisioning.
Restrict Remote Desktop access to trusted IP addresses or a VPN when possible rather than exposing RDP broadly to the internet.
For instructions on connecting to a Windows VPS from your local computer, see Using Remote Desktop Protocol (RDP) to log into your Windows server.
Step 4: create a secure administrator account
Don’t use the root account for routine Linux administration. Create a named user and grant administrative privileges.
AlmaLinux and Rocky Linux
Create the account:

Set a password:

Add the user to the wheel group:

Open a second session and test administrative access before changing the root login configuration.
Ubuntu and Debian
The process is similar, but Ubuntu and Debian use the sudo group instead of wheel.
Create the user:

Add the user to the sudo group:

Test administrative access:

The output should return:

Windows administrator accounts
Create a separate named account for routine administration instead of relying exclusively on the default Administrator account.
Use Computer Management > Local Users and Groups or an approved PowerShell process to create the account, set a strong password, and add it to the appropriate administrator group.
Follow the principle of least privilege. Give each account only the access it needs.
Step 5: update the operating system
Run updates before installing the application stack. Review the output for failed packages, repository errors, or restart requirements.
Update AlmaLinux or Rocky Linux
Run:

Restart when required:

Reconnect after the server finishes restarting.
Update Ubuntu or Debian
Ubuntu and Debian use APT instead of DNF:

Restart the server when an update requires it:

Update Windows Server
Open Settings > Windows Update or Server Manager and check for updates.
Install the available security and quality updates, restart the VPS when prompted, and check again after the restart. Some Windows updates require more than one installation cycle.
Step 6: configure SSH key authentication for Linux
SSH keys provide stronger authentication than passwords alone. Add an approved public key to the named administrator account and test key-based access before disabling password login.
If you need instructions for creating or installing an SSH key from Windows, macOS, or Linux, see our guide on how to connect to a VPS.
Configure the public key on the VPS
The user’s public key belongs in:

Confirm that the .ssh directory and authorized_keys file have the correct ownership and permissions for the named administrator account.
Test key-based access in a second session before making further SSH changes.
Disable root and password login
Only continue after the named user can connect through the SSH key.
Open the SSH configuration file:

Review or add these settings:

Validate the configuration before restarting SSH:

If the command returns no errors, restart the SSH service.
AlmaLinux or Rocky Linux may use:

Ubuntu or Debian may use:

Open another session and test the new configuration. Don’t close the original session until the second connection succeeds.
Step 7: configure the firewall
A firewall controls which network connections can reach the VPS. Allow only the ports and services the workload requires.
Make sure the firewall permits your current remote administration method before enabling stricter rules.
Configure firewalld on AlmaLinux or Rocky Linux
Check the current zone:

Allow SSH:

Allow HTTP and HTTPS when the VPS will host a website:

Apply the rules:

Review them:

Configure UFW on Ubuntu or Debian
Ubuntu and Debian commonly use UFW for simpler firewall management.
Install UFW when necessary:

Allow SSH:

Enable the firewall:

Review the rules:

For a web server, you may also need:

Configure Windows Firewall
Navigate to the Start menu and search for Windows Firewall with Advanced Security or open it from the Control Panel.
Review the existing inbound and outbound rules before adding new ones. Confirm what each rule allows, which network profiles it affects, and whether the server still needs it.
Create rules based on specific programs, ports, services, protocols, and source addresses. Restrict administrative ports to trusted IP addresses when possible.
Common VPS ports
| Service | Port | When to allow it |
| SSH | 22 | Remote Linux administration is required |
| HTTP | 80 | The server hosts a website or redirects to HTTPS |
| HTTPS | 443 | The server hosts secure web traffic |
| RDP | 3389 | Remote Windows administration is required |
| MySQL | 3306 | A remote application requires database access |
| PostgreSQL | 5432 | A remote application requires database access |
Don’t expose database ports publicly unless the application requires remote access. Restrict access by IP address, private network, or VPN whenever possible.
Test the VPS before installing applications
A successful login doesn’t mean the VPS is ready for production. Test access, services, resources, networking, firewall rules, and recovery options before installing the application stack.
Verify remote access
For Linux, confirm that the named administrator account can connect, SSH key authentication works, administrative commands run correctly, and root or password restrictions work as intended.
For Windows, confirm that the named administrator account can connect through Remote Desktop and has the required permissions.
Also confirm that you can reach the provider’s browser console or recovery environment if your normal remote-access method fails.
Check for failed services
On Linux, run:

Investigate any failed service before continuing.
Inspect an individual service with:

Review resource use
Use these Linux commands:

They show memory availability, storage use, and running processes.
On Windows Server, review Task Manager, Resource Monitor, Event Viewer, and Performance Monitor.
Look for unusually high processor, memory, storage, or network use before installing more software.
Test network connectivity
Test whether the VPS can resolve domains and reach the internet:

Use traceroute on Linux or tracert on Windows when you need to inspect the network path between systems.
Test required ports from an external system. Confirm that required services respond and unnecessary ports remain closed.
Create a backup or snapshot
Create a restore point after the base configuration works and before adding the application stack.
A snapshot can help you recover from a failed installation or configuration change, but it shouldn’t replace regular off-server backups.
Install only the services the workload needs
Each unnecessary package adds storage use, maintenance work, and potential security exposure. Start with the smallest practical configuration and add services when the workload requires them.
Install a web server
Common options include Nginx, Apache, and IIS on Windows Server.
After installation, start and enable the service, configure the document root or application path, allow ports 80 and 443 through the firewall, point the domain’s DNS records to the VPS, and test the site from an external device.
Install a database server
Common options include MySQL, MariaDB, PostgreSQL, and Microsoft SQL Server.
Create separate database users for applications, restrict remote access, use strong credentials, and back up the database independently from the VPS.
Avoid opening the database port to the public internet unless the application requires it.
Install Docker
Docker can package applications and their dependencies into containers, which may simplify deployment across environments.
Docker doesn’t replace server security. You still need to update the host operating system, protect remote access, review container images, configure firewall rules, monitor resources, and back up persistent data.
Install Docker only when it fits the application’s deployment model.
Configure SSL and HTTPS
For a public website, point the domain to the VPS, install the web server, open ports 80 and 443, request an SSL certificate, configure automatic renewal, redirect HTTP traffic to HTTPS, and test the certificate.
Let’s Encrypt and Certbot provide one common certificate option for Linux web servers.
Secure the VPS beyond the initial setup
SSH keys and a firewall provide a foundation, but they don’t cover every security requirement.
Additional measures may include:
- Installing Fail2Ban or another brute-force protection tool
- Restricting SSH and RDP by IP address
- Enabling multifactor authentication
- Configuring automatic security updates
- Using supported endpoint protection on Windows
- Rotating credentials
Application security remains separate from server security. Keep websites, frameworks, databases, plugins, and application dependencies current.
Common VPS setup mistakes
- Working as root every day. Routine root use increases the effect of mistakes and compromised credentials. Use a named administrative account instead.
- Disabling password access too early. Don’t disable password authentication until you have tested the SSH key in a separate session.
- Enabling the firewall before allowing SSH. A firewall can block your own connection. Add the SSH rule before enabling it.
- Opening every familiar port. Open only the ports your workload needs. Restrict administrative and database access whenever possible.
- Choosing an unsupported operating system. An unsupported operating system no longer receives regular security updates. Check the support lifecycle before provisioning the VPS.
- Assuming managed hosting covers everything. Read the management scope. The provider may manage the server while your team remains responsible for the application and its data.
Troubleshooting VPS setup problems
SSH connection refused
Check the VPS power status, IP address, SSH service, SSH port, firewall rules, provider network rules, and username.
Use the provider’s browser console or recovery environment when SSH doesn’t work. If you need to review the connection process from your local computer, see our guide on how to connect to a VPS.
Permission denied
Confirm that the named account exists, belongs to the appropriate administrative group, and has the correct public key in its authorized_keys file.
Locked out after changing the firewall
Use the hosting provider’s console or recovery system to restore the previous firewall configuration.
Keep the original session open during firewall changes to reduce this risk.
Package update failed
Check internet and DNS connectivity, repository availability, disk space, operating system support status, package conflicts, and the error messages in the update output. Don’t ignore failed security updates.
The website does not load
Confirm that the web server runs, the application listens on the expected port, the firewall allows HTTP or HTTPS, DNS points to the correct IP address, and the document root contains the expected files.
Review the application and web server logs for errors.
Remote Desktop does not connect
Check that Remote Desktop is enabled on the VPS, the Windows Firewall allows the required traffic, the account has the appropriate permissions, and provider-level network rules permit access.
Maintain the VPS after setup
Weekly tasks
- Review failed login attempts
- Check memory and storage use
- Confirm backups completed
- Review failed services
- Check application availability
Monthly tasks
- Install approved updates
- Test a restore
- Review user access and firewall rules
- Remove unused packages
- Check system and application logs
- Review certificate renewal status
As the workload grows
Track CPU, memory, storage, and network trends. Upgrade resources based on measured demand rather than short-term spikes.
Also review whether the current management level still fits the team. A growing application may justify managed support even when the team originally launched it on an unmanaged VPS.
Liquid Web VPS hosting
Liquid Web by Nexcess offers managed and self-managed VPS hosting for customers who want different levels of server control and administrative support. Managed plans include provider assistance with defined server tasks, while self-managed VPS hosting gives experienced administrators more direct control.
Liquid Web also offers Linux and Windows VPS options, scalable resources, control panel choices, monitoring, backups, and 24/7 support, depending on the selected plan. Confirm the current plan specifications and management scope before choosing a configuration.
VPS setup FAQs
VPS setup next steps
A secure VPS setup includes more than provisioning the server. Configure access, users, updates, SSH authentication, firewall rules, monitoring, backups, and recovery before adding production applications.
Start by documenting your operating system, required services, open ports, administrative users, and management responsibilities. Then complete and test each setup step before moving to the next one.
Explore Liquid Web VPS hosting to compare managed and self-managed options, current configurations, available operating systems, and support levels for your workload.
Get premium VPS hosting
High-performance VPS hosting that delivers unrivaled power, the fastest speeds available, and 24/7 expert support
Related Resources
Managed VPS vs Unmanaged VPS: What’s the Difference?
Caching Options for Optimizing Your VPS
5 Simple VPS Management Tools You Need
Why VMware performance monitoring is a must for your enterprise
Top 10 bare metal cloud hosting providers in 2024
Comparing hosts and servers: Key differences explained

