setting up brand new vds linux

"Setting Up a Brand New VDS Linux: A Step-by-Step Guide"

By Melissa Anderson
AD

Setting up a brand new Virtual Data Server (VDS) equipped with Linux offers an array of possibilities, from hosting your own website to managing complex applications. This comprehensive guide walks you through the process, ensuring your VDS Linux environment is up and running in no time. Let's dive in.

The first step is to choose a Linux distribution that suits your needs. Ubuntu, CentOS, and Debian are popular choices due to their stability, robustness, and extensive community support. For this guide, we'll use Ubuntu Server as an example.

Preparing Your VDS

Before you begin, ensure that your VDS has the necessary resources. You'll need a minimum of 1GB RAM, 1 vCPU, and 20GB of storage, with a preference for more when possible. Also, ensure that your VDS has a 64-bit architecture, as 32-bit is deprecated in many Linux distributions.

AD
30 LINUX COMMANDS EVERY DEVELOPER SHOULD KNOW
30 LINUX COMMANDS EVERY DEVELOPER SHOULD KNOW
a laptop with the words top 7 linux operating systems you should try in a virtual machine
a laptop with the words top 7 linux operating systems you should try in a virtual machine
How to Set Up WireGuard VPN on Ubuntu (A Step-by-Step Guide)
How to Set Up WireGuard VPN on Ubuntu (A Step-by-Step Guide)

Once the hardware is sorted, let's proceed to the software side of things.

Installing Ubuntu Server

Start by downloading Ubuntu Server from the official website (). Then, use your VDS's console or an IP KVM tool to access its console. Upload the ISO file, and create a virtual optical drive. From there, boot from the ISO, and follow the installation instructions.

a girl reading a book about linux essentials
a girl reading a book about linux essentials
Windows vs Linux
Windows vs Linux
Perfecting Linux virtualization: 10 essential VirtualBox settings
Perfecting Linux virtualization: 10 essential VirtualBox settings

The installation process is straightforward. Choose your language, location, and keyboard layout. Set up your username and password, and decide whether to encrypt your home directory. Finally, select the software to install. For now, you only need the standard system utilities, LAMP stack (Linux, Apache, MariaDB, PHP, and Perl), and OpenSSH server.

Configuring Your VDS

Upon successful installation, log in as the root user. Your first task is to set up a regular user with sudo privileges. This user will handle day-to-day operations, making your VDS more secure.

AD

Next, update your package list and upgrade installed packages. This ensures you have the latest versions of all software installed during the setup, making your VDS secure and efficient.

The Best Linux Software and Apps
The Best Linux Software and Apps
Alpine Linux set up WireGuard VPN server - nixCraft
Alpine Linux set up WireGuard VPN server - nixCraft
Ubuntu / Linux Setup / Robotics
Ubuntu / Linux Setup / Robotics
Complete Linux Roadmap for Beginners 2026
Complete Linux Roadmap for Beginners 2026
9 New Linux Distros to Try
9 New Linux Distros to Try
an image of a computer screen with a dragon logo on the monitor and other icons
an image of a computer screen with a dragon logo on the monitor and other icons

Setting Up Essential Services

Your VDS will need several services to function optimally. Let's set them up one by one.

The first service to configure is the firewall. Ubuntu Server comes with UFW (Uncomplicated Firewall), a user-friendly firewall. Allow SSH traffic to allow remote connections, and open the necessary ports for the services you plan to use.

AD

Securing SSH

SSH (Secure Shell) allows you to connect to your VDS remotely. However, it's also a common attack vector. To secure SSH, disable root login, change the default SSH port, and limit login attempts. Additionally, consider using public key authentication for added security.

a black and white poster with the words linux on it
a black and white poster with the words linux on it
the linux application is shown with icons and text, including an image of a computer
the linux application is shown with icons and text, including an image of a computer
Level Up Coding on LinkedIn: π—›π—Όπ˜„ 𝗱𝗼 π—Ÿπ—Άπ—»π˜‚π˜… π—½π—²π—Ώπ—Ίπ—Άπ˜€π˜€π—Άπ—Όπ—»π˜€ π˜„π—Όπ—Ώπ—Έ? Linux is a…
Level Up Coding on LinkedIn: π—›π—Όπ˜„ 𝗱𝗼 π—Ÿπ—Άπ—»π˜‚π˜… π—½π—²π—Ώπ—Ίπ—Άπ˜€π˜€π—Άπ—Όπ—»π˜€ π˜„π—Όπ—Ώπ—Έ? Linux is a…
The 5 Best Linux Distros for Artists, Musicians, and Editors
The 5 Best Linux Distros for Artists, Musicians, and Editors
the diagram shows how linux works and what it is doing to work with them on
the diagram shows how linux works and what it is doing to work with them on
the linux directory guide is shown in black and white, with arrows pointing to different locations
the linux directory guide is shown in black and white, with arrows pointing to different locations
Setting Up My Linux Environment
Setting Up My Linux Environment
Linux Basics for Beginners 2026 | Complete Starter Guide
Linux Basics for Beginners 2026 | Complete Starter Guide
10 Lightweight Linux Distros For Old PCs
10 Lightweight Linux Distros For Old PCs
the linux folders structure is shown in this screenshoter screengrafion
the linux folders structure is shown in this screenshoter screengrafion
MANGOWM Linux Desktop Setup 2026
MANGOWM Linux Desktop Setup 2026
noob vs pro
noob vs pro
the linux firewall frontends wheel is shown with icons and symbols in it
the linux firewall frontends wheel is shown with icons and symbols in it

To further secure your VDS, consider using a service like Fail2Ban. It automatically blocks IP addresses that show malicious activity, such as repeated failed login attempts.

Setting Up users and Groups

You've already created a user with sudo privileges. Now, add more users for specific tasks. For example, create a web user for managing your website and a database user for handling MariaDB.

AD

You can also create groups to manage rights and permissions. This approach is more secure and easier to manage than granting permissions to individual users.

Hosting Your Website

Now that your VDS is secure and configured, it's time to host your website. The LAMP stack installed earlier makes this a breeze.

Apache needs to know where your website's files are. By default, it checks `/var/www/html`. Here, you can create a new directory for your website and copy your files into it. Then, configure Apache to serve these files instead.

Configuring Your Domain

To access your website, you need to update your domain's DNS records. Add an A record pointing to your VDS's IP address. If your domain registrar doesn't support this, consider transferring your domain to a registrar that does.

Once your DNS records propagate, you should be able to access your website at your domain name.

Securing Your Website

While your VDS is secure, your website might not be. To secure it, use HTTPS instead of HTTP. This encrypts data passed between your website and your visitors, preventing eavesdropping and man-in-the-middle attacks.

Use a service like Let's Encrypt to generate a free SSL/TLS certificate. Then, configure Apache to use this certificate.

Congratulations! You've successfully set up a brand new VDS running Linux, configured essential services, and hosted your website. Regularly update your VDS to ensure it remains secure, and periodically review your services and users to maintain optimal performance and security. Now, go ahead and explore the countless possibilities that your VDS offers.

AD