This video by Leon van Zyl demonstrates how to run Claude Code on a remote VPS (Virtual Private Server) using the SSH connection feature in Claude Code Desktop. Instead of running Claude Code locally on your laptop or desktop, you can connect to a cloud server, giving you more flexibility, better hardware resources, and the ability to access your projects from any device.
When you run everything locally, shutting down your computer means stopping all processes. A VPS stays running in the cloud 24/7. Claude Code can continue making changes even when your personal machine is powered off. If you lose your local machine, your code is safe on the server.
Instead of installing project dependencies, databases, and toolchains on your personal computer, you move everything to the VPS. Your local machine only needs Claude Code Desktop installed, which connects remotely to the server where all the heavy lifting happens.
If your project requires significant compute resources (game development, machine learning, large builds), your local hardware may be a bottleneck. A VPS can be provisioned with more CPU, RAM, and storage than your personal device offers.
Because the code and Claude Code live on the VPS, you can connect from your laptop, your work PC, or any other device. You are no longer tied to a single machine. This is especially useful if you switch between devices throughout the day.
You need a remote server. Options include spinning up an AWS EC2 instance, using DigitalOcean, or using a VPS provider like Hostinger. The video demonstrates Hostinger, which provides a dashboard and built-in terminal access.
Connect to your VPS terminal and run the Claude Code installation command. After installing, update your PATH variable and run source ~/.profile to make the claude command available. Then authenticate Claude Code using your subscription or API tokens.
On the VPS, run whoami to get the username (typically root). Note the server's IPv4 address from your VPS dashboard. The SSH port is 22 by default.
On your local computer (Windows, Mac, or Linux), open a terminal and run:
ssh-keygen -t [type] -C "your label"
Press Enter through the prompts to accept defaults. This creates a public/private key pair in your ~/.ssh/ directory.
Copy the contents of your public key file (the one ending in .pub). On Windows, use clip; on Mac, use pbcopy. Then on the VPS terminal, run these commands:
mkdir -p ~/.sshecho "YOUR_PUBLIC_KEY" >> ~/.ssh/authorized_keyschmod 700 ~/.sshchmod 600 ~/.ssh/authorized_keysIn Claude Code Desktop, go to the Code tab, start a new session, and click "Add SSH Connection." Fill in the fields:
root)~/.ssh/id_[name] (without the .pub extension)Create a new session, select the remote server connection, choose a folder on the remote machine, and trust the workspace. You are now running Claude Code on the VPS through Claude Code Desktop on your local machine.