How to Install Kali Linux on a KVM VPS

How to Install Kali Linux on a KVM VPS

Step-by-step: convert a Debian 13 KVM VPS to Kali Linux over SSH, install the headless Kali tools, and keep the server secure and within the rules.

To run a Kali Linux VPS without uploading an ISO, start from a clean Debian 13 server on KVM, point APT at Kali’s kali-rolling repository, run a full upgrade, then install the kali-linux-headless metapackage. The whole job takes about 30 minutes over SSH and leaves you with a real Kali system, not a set of borrowed tools.

This guide is for penetration testers, CTF players and security students who want Kali on a server they can reach from anywhere. You need root access, a VPS that runs KVM (OpenVZ and other container platforms will not work), and permission to test whatever you point Kali at.

Why install Kali on a VPS at all?

A Kali VPS gives you a public IP, a fast connection and a machine that stays on, which helps with external scans, callback listeners, CTF infrastructure and long-running tasks you do not want tying up a laptop. Kali is built on Debian Testing, so a Debian server is the natural starting point.

It needs KVM because Kali’s tools expect a real kernel. Packet capture, custom network interfaces, VPN tunnels and kernel modules all work on full virtualisation and often fail inside containers.

What do you need before you start?

  • A KVM Linux VPS freshly installed with Debian 13 (Trixie). Use a new server rather than one that already runs services.
  • Root SSH access. If you have not logged in yet, follow how to connect to a Linux VPS with SSH.
  • Access to your provider’s web console, in case SSH drops during the upgrade. Our guide on getting back into a locked-out server explains how the console works.
  • About 30 minutes, and a backup or snapshot if the server holds anything you care about.

Step 1: Update Debian first

Bring the Debian system fully up to date before switching repositories, so the jump to Kali starts from a clean state.

apt update
apt full-upgrade -y
reboot

Step 2: Add Kali’s signing key

APT needs Kali’s archive key to trust the new repository. Download the current keyring from Kali’s archive server into the system keyring folder.

apt install -y wget
wget https://archive.kali.org/archive-keyring.gpg -O /usr/share/keyrings/kali-archive-keyring.gpg

Step 3: Replace the Debian repositories with kali-rolling

Move the Debian sources out of the way rather than mixing Debian and Kali repositories. Mixing them is a common cause of broken upgrades.

mkdir -p /root/debian-apt-backup
mv /etc/apt/sources.list.d/debian.sources /root/debian-apt-backup/ 2>/dev/null
mv /etc/apt/sources.list /root/debian-apt-backup/ 2>/dev/null

cat > /etc/apt/sources.list.d/kali.sources <<'EOF'
Types: deb
URIs: http://http.kali.org/kali/
Suites: kali-rolling
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/kali-archive-keyring.gpg
EOF

This matches the default repository layout in Kali’s own APT sources documentation.

Step 4: Run the upgrade to Kali

Now refresh the package lists and upgrade. This replaces most of the Debian packages with Kali’s versions and can take 10 to 20 minutes.

apt update
apt full-upgrade -y

If the installer asks whether to replace /etc/ssh/sshd_config or network configuration files, choose to keep the currently installed version. Replacing them can lock you out of SSH or drop the server’s network settings. When the upgrade finishes, reboot.

reboot

Step 5: Install the Kali tools

Kali groups its tools into metapackages. On a server you want the headless set, which installs the command-line tools without a desktop.

apt install -y kali-linux-headless

Check the result:

cat /etc/os-release

The output should name Kali GNU/Linux Rolling. If you need a narrower toolset, Kali’s metapackages list shows smaller groups for web, wireless, password and forensic tools.

Which metapackage should you install?

Metapackage What it adds Good for
kali-linux-core The base Kali system only Building your own minimal toolset
kali-linux-headless The standard tools, without a desktop Most VPS installs
kali-linux-default The standard tools plus the desktop packages Servers where you will add a remote desktop
kali-linux-large A much bigger tool collection Larger plans with plenty of disk

Step 6: Lock the server down

A Kali VPS is a target as much as a tool. Before you run anything, harden it.

  • Use SSH keys and turn off password logins.
  • Allow only the ports you need through a firewall. The commands in our UFW firewall guide work on Kali too.
  • Add Fail2Ban to block SSH brute-force attempts.
  • Close listeners and callback ports when a test ends. Do not leave them open between engagements.

Only test systems you own or have written permission to test. Scanning or attacking third parties breaks the law in most countries and breaks our Abuse Policy, which can end with the server being suspended.

Which VPS plan suits Kali?

For a headless install, the Cloud Core plan (2 vCores, 4 GB RAM, 250 GB HDD, €25 a month) is enough for scanning, listeners and scripting. Choose Cloud Turbo (6 vCores, 8 GB RAM) if you plan to add a remote desktop, run several tools at once, or use password-cracking tools that lean on CPU. Every plan is KVM with full root access, and you can reinstall Debian from the panel if you want to start again.

Frequently asked questions

Is this an official way to install Kali?

Kali’s official images are ISOs, virtual machine images and cloud images. Converting a Debian server through the kali-rolling repository is widely used and gives a working Kali system, but it is not one of Kali’s packaged install methods, so keep a backup and a console session handy.

Can I get a free Kali Linux VPS?

Some cloud free tiers let you run a Debian VM, and the same steps work there. Check the provider’s acceptable use policy first, because many forbid security testing tools on free accounts.

Can I use a desktop on a Kali VPS?

Yes. Install kali-linux-default or the XFCE desktop and connect with xRDP. Give it at least 8 GB of RAM for a smooth session.

How do I undo the change?

The simplest way is to reinstall Debian from your VPS control panel. That wipes the disk, so copy off anything you need first.

Next step: get a KVM server and start clean

Kali behaves best on a fresh KVM server with Debian 13 and nothing else installed. If you want to reach your listeners through a hostname rather than an IP, register a domain for the lab. To manage the server from public Wi-Fi more safely, our NordVPN plans add an encrypted connection between you and the box.

Post Your Comment

Knowledgebase
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.