A server of your own, secured, with Claude Code installed on it and driven from your phone, then your domain name connected. This is everything I do when someone asks me to install it for them, written so you can do it yourself: 56 steps, in order, with the exact commands.
Updated October 7, 2026 · Ubuntu 24.04 · Claude Code 2.x · prices in € (OVHcloud) and $ (Claude)
Rather have me install it for you?I install it for €1 →

Claude Code is the coding tool from Anthropic, the company behind the Claude AI. Unlike the Claude chat you may know, it works directly on the files of a computer or a server: it reads your project, writes and edits the code, runs the commands it needs and explains what it does. You talk to it in plain language; it handles the technical part. You can use it in a terminal, in the desktop app, or from the Claude app on your phone thanks to Remote Control.
On your computer, Claude Code stops when you close it, and whatever it builds is only visible to you. On a server, it stays on day and night: you talk to it from your phone, wherever you are, and what it builds is immediately online, at your own address. Your computer stays clean, and everything you create belongs to you: no imposed website builder, no platform subscription.
The program installs for free, but you need a paid Claude account to use it: the Claude Pro plan (about $20 per month) is enough to start, Max (from about $100 per month) is for heavy use, and API credits are billed per use. Using it from your phone requires Pro or Max. Add the server: about €5.81 per month (roughly $7) at OVHcloud for the entry-level model, fine to get started, plus a domain name if you want one (about $15 a year for a .com).
A server is rented from a hosting provider. This guide uses OVHcloud (cheap, European, what I use), but parts 3 to 9 work on any Ubuntu 24.04 VPS: Hetzner, DigitalOcean, Scaleway, Linode… Allow 10 minutes.
Go to ovhcloud.com, click “My account” then “Create an account”. Pick “Individual” (or “Company” if you have a business registration number).
Name, postal address, email, phone. Use your real address: the provider is required to verify it on a first purchase.
You receive an email with a link: click it. Without this confirmation you cannot order anything.
At least 12 characters, with digits and symbols. Save it in your phone’s password manager: you will need it several times.
In My account → Security, enable verification by SMS or authenticator app. A server is a machine that belongs to you: lock the front door.
In My account → Payment methods, register a card or PayPal. You can also pay at checkout, but a saved card makes the monthly renewal painless.
A VPS is a small virtual computer, switched on day and night in a data center. For one or two websites, the smallest model is plenty.
In the OVHcloud menu: Bare Metal Cloud → VPS (or type “VPS” in the site search). You land on the list of models.
Take the VPS-1, the entry-level model (2 cores, 4 GB of memory, 40 GB of storage): about €5.81 per month (roughly $7) including VAT, daily backup included. You can upgrade later without reinstalling.
Under “Image” or “Operating system”, choose Ubuntu 24.04. It is the system this guide follows, the most common and the best documented.
Choose the one closest to your visitors (Canada, the UK, France, Germany, Singapore, Australia…). If one is “out of stock”, take another: it changes nothing for you.
The “Automated backup” option (around €0.35 per month) keeps a copy of your server every night. Take it: it is your safety net.
Duration “1 month” (no commitment), then “Order”. Pay with your card. On a very first purchase, the provider sometimes verifies your identity: check your email and send the requested document.
Between a few minutes and an hour. The email “Your VPS is ready” contains the IP address of your server (four numbers separated by dots, for example 92.222.25.227) and the password of the ubuntu user. Keep it safe.
Even before you have a domain, your server will answer at an address like https://92-222-25-227.sslip.io (your IP with dashes). Write it down: it is how you will check that everything works.
You drive a server by typing commands in a “terminal”. Nothing scary: copy, paste, press Enter.
On Mac: the Terminal app (Applications → Utilities). On Windows: Windows Terminal or PowerShell. On iPhone / iPad: an app like Termius or Blink Shell.
Type (replacing the IP with yours):
ssh ubuntu@92.222.25.227At the question “Are you sure you want to continue connecting?”, answer
yes. Then paste the password from the email: nothing shows while you type, that is normal.Right after the first login:
passwdEnter the old one, then the new one twice. A password that was sent by email must never stay in service.
A key replaces the password with a secret file, far safer. On your computer (not on the server):
ssh-keygen -t ed25519Press Enter at the questions (or set a passphrase). Two files are created in the
.ssh folder.Still from your computer, on Mac or Linux:
ssh-copy-id ubuntu@92.222.25.227On Windows (PowerShell), where that command does not exist:
type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh ubuntu@92.222.25.227 "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"Enter the password one last time. From now on,
ssh ubuntu@92.222.25.227 logs you in without asking anything.Open a second terminal and connect: if no password is requested, you are good. Do not close the first terminal before checking: it is your emergency door.
A brand-new server is visible to the whole world. Five settings close the useless doors and keep it updated on its own. All commands are typed on the server.
sudo apt update && sudo apt -y upgrade
sudo means “as administrator”. This can take two or three minutes.sudo apt -y install unattended-upgrades printf 'APT::Periodic::Update-Package-Lists "1";\nAPT::Periodic::Unattended-Upgrade "1";\n' | sudo tee /etc/apt/apt.conf.d/20auto-upgradesSecurity fixes will now install themselves every night.
sudo apt -y install ufw sudo ufw allow OpenSSH sudo ufw allow 80/tcp sudo ufw allow 443/tcp sudo ufw --force enablePort 22 to log in, 80 and 443 for the website. Everything else is closed.
sudo apt -y install fail2ban sudo systemctl enable --now fail2banA bot that tries passwords in a loop gets banned automatically.
Since your key works (part 3), switch off the old method:
echo "PasswordAuthentication no" | sudo tee /etc/ssh/sshd_config.d/60-security.conf sudo systemctl reload sshCheck in a second terminal that key login still works.
sudo apt -y install curl git tmux ca-certificates
curl downloads, git keeps versions of your files, tmux keeps a program alive when you close the terminal.sudo rebootWait thirty seconds and reconnect. If it works, your server is clean and secured.
A web server shows your files to visitors. Caddy is the simplest: it obtains and renews the HTTPS certificate (the padlock) by itself.
sudo apt -y install debian-keyring debian-archive-keyring apt-transport-https gnupg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list sudo apt update && sudo apt -y install caddy
mkdir -p ~/my-project chmod 755 ~ ~/my-projectThis is where your website files will live, and where Claude Code will work.
cat > ~/my-project/index.html <<'EOF' <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>My project</title></head> <body><h1>My server is online</h1></body></html> EOF
Replace the address with yours (your IP with dashes, followed by .sslip.io):
sudo tee /etc/caddy/Caddyfile > /dev/null <<'EOF'
92-222-25-227.sslip.io {
root * /home/ubuntu/my-project
encode zstd gzip
file_server
}
EOF
sudo systemctl enable caddy
sudo systemctl reload caddyOpen https://92-222-25-227.sslip.io (with your IP). You should see “My server is online” with the padlock. If the page takes a minute to answer the first time, Caddy is obtaining the certificate: that is normal.
Claude Code is Anthropic’s tool that reads and writes the files on your server when you talk to it. You need a Claude subscription (the Pro plan, about $20 per month, is enough to start).
On the server, as the ubuntu user (not with sudo):
curl -fsSL https://claude.ai/install.sh | bashThe installer puts the program in
~/.local/bin.echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc source ~/.bashrc claude --versionA version number shows up: Claude Code is installed.
In your project folder:
cd ~/my-project claude auth loginClaude prints a link: open it on your phone or computer, log in to your Claude account and click “Authorize”. A page then gives you a code.
Back in the terminal, it is waiting with “Paste code here”. Paste the code, press Enter. Check:
claude auth statusThe answer must contain
"loggedIn": true.On first launch, Claude asks whether you trust this folder. Launch it once:
claudeAnswer yes, then leave with
/exit. It is done once and for all.claude -p "Describe the files in this folder"Claude reads your folder and answers. You just had it work on your own server.
Claude Code’s “Remote Control” keeps a session running on the server; you drive it from the Claude app on your phone, like a conversation.
With tmux, a program keeps running after you leave:
tmux new -s claude cd ~/my-project claude remote-control --name "my-server"
The first time, Claude asks “Enable Remote Control? (y/n)”: type y then Enter. The screen shows “Connected · my-server”.
Press Ctrl + B, then D. The terminal comes back, but the Claude session keeps running in the background. (To return to it later: tmux attach -t claude.)
Code tab: your server “my-server” appears in the list of devices. Tap it, then “New session”.
For example: “Change the home page title to ‘Welcome to my place’”. Claude edits index.html; reload your page in the browser: the title changed. You are coding from your phone.
A systemd service relaunches Remote Control when the server boots:
sudo tee /etc/systemd/system/claude-remote.service > /dev/null <<'EOF' [Unit] Description=Claude Code Remote Control After=network-online.target [Service] User=ubuntu WorkingDirectory=/home/ubuntu/my-project Environment=PATH=/home/ubuntu/.local/bin:/usr/local/bin:/usr/bin:/bin ExecStart=/home/ubuntu/.local/bin/claude remote-control --name "my-server" --permission-mode acceptEdits Restart=always RestartSec=10 [Install] WantedBy=multi-user.target EOF sudo systemctl daemon-reload sudo systemctl enable --now claude-remotePitfall to know: a service cannot answer “y” to the question of the previous step. If the service stops in a loop, add
"remoteEnabled": true to the file ~/.claude.json, then sudo systemctl restart claude-remote.Both must not run at the same time: tmux kill-session -t claude.
So far your site has a technical address. For it to answer at mysite.com, you tell your domain where the server is, then tell the server which domain it carries.
At your registrar (OVHcloud: Domain names → your domain → DNS zone; otherwise wherever you bought the domain).
Find the line of type A whose subdomain is empty (the domain itself). Set its target to your server’s IP. If there is none, add it: type A, empty subdomain, target 92.222.25.227, TTL 300.
Type A, subdomain www, target: the same IP. Delete any CNAME “www” that pointed elsewhere.
The MX, SPF, DKIM and TXT lines are about your email: leave them alone. You only change the address of the website.
On the server, edit the Caddyfile so it also serves your domain (replace with yours):
sudo tee /etc/caddy/Caddyfile > /dev/null <<'EOF'
92-222-25-227.sslip.io, mysite.com, www.mysite.com {
root * /home/ubuntu/my-project
encode zstd gzip
file_server
}
EOF
sudo systemctl reload caddyBetween one minute and one hour, sometimes more if the old address had a long time-to-live. Check with a service like dnschecker.org: when your IP shows everywhere, it has propagated.
https://mysite.com must show your page with the padlock. Caddy requested the certificate by itself as soon as the domain pointed to it. If you still see the old site, clear your browser cache or try a private window.
Congratulations: you own a server, driven by Claude from your pocket. A few habits for the road.
They are automatic (part 4). Once a month, log in and type sudo apt update && sudo apt -y upgrade && sudo reboot for the updates that need a restart.
Your provider backs up the server every night (option from part 2). To restore: your VPS page → Backups. Also keep your files in a git repository (cd ~/my-project && git init); Claude knows how to use it.
The right reflex: describe what you see to Claude, or to the AI you usually use, in your own words. It will walk you through. If the server does not answer at all, reboot it from your provider’s control panel.
About €5.81 (roughly $7) per month for the server, about $20 for the Claude subscription, plus your domain (about $15 a year for a .com). No commitment: the server is cancelled from your provider’s control panel, the subscription from your Claude account.
If the steps above look doable, go for it: you will learn a lot about how a server works. If you mostly want the result, I automated exactly these 56 steps: you link your OVHcloud account in one click, pick your server, and everything installs itself in about fifteen minutes, for €1 (about $1). Nothing stops you from reading this guide to understand it, then letting me do it.
Once the installation is done, this is what you see on your phone.



I install it for you for €1 (about $1): you link your OVHcloud account in one click (your password never goes through me), pick your server, and the 56 steps above run on their own in about fifteen minutes. The service page is in French for now, but the installer works with any OVHcloud account and any data center.
See the $1 installation (page in French) →The Claude Code program installs for free, but you need a paid Claude account to use it: a Claude Pro subscription (about $20 per month) or Max, or API credits billed per use. Remote Control (driving it from your phone) requires a Pro or Max subscription. The server itself costs about €5.81 per month (roughly $7).
On Ubuntu 24.04 a single command does it, as a normal user: curl -fsSL https://claude.ai/install.sh | bash, then add ~/.local/bin to your PATH and connect your account with claude auth login. Steps 33 to 38 of this guide show the details.
It is the mode of Claude Code that keeps a session running on your server while you drive it from the Claude app on your phone or from claude.ai. You start it with claude remote-control; steps 39 to 45 explain how to keep it running permanently.
No, but you must be willing to copy and paste commands into a terminal and follow the steps in order. Once installed, you talk to Claude in plain language and it writes the code.
One to two hours the first time, a good part of it waiting (server delivery, domain propagation). Done on a computer with the commands at hand, the core (parts 3 to 7) takes about 20 minutes.
Yes: parts 3 to 9 work on any Ubuntu 24.04 VPS (Hetzner, DigitalOcean, Scaleway, Linode, Vultr…). Only parts 1 and 2 are specific to OVHcloud.
A fresh server can be reinstalled in two clicks from your provider’s control panel (“Reinstall”), and you start again from part 3. Nothing is irreversible until you put important data on it.