Your own computer in the cloud. An AI agent that knows your files, runs while you sleep, and fits in your pocket. No engineering experience required.
By Liam Darmody
I use AI every day. Claude, ChatGPT, various tools. But I kept hitting the same walls.
The laptop problem. My AI agent only worked when my laptop was open. Close the lid, everything stops. No background tasks, no scheduled work, no picking up a conversation from my phone while I'm out.
The context problem. Every new chat starts from zero. The AI doesn't know my notes, my preferences, my projects. I'd spend the first five minutes of every session re-explaining who I am and what I'm working on.
The autonomy problem. Tools like OpenClaw promise a fully autonomous AI agent. And they're impressive. But autonomy without control is a liability. Tasks loop. Reasoning wanders. Outcomes need manual review. I wanted an agent that could act on my behalf but still asked before doing anything irreversible.
The "just use the app" problem. Yes, you can talk to Claude or ChatGPT from your phone already. But those conversations start from zero every time. The app can't see your files. It doesn't remember your preferences between sessions. And it can't run anything in the background while you're away. It's a chat window, not a working environment.
The "just use Projects" problem. Claude's Projects feature lets you upload files and set custom instructions. It's useful, but it's still a chat interface with uploaded snapshots. Your files aren't live. Edit a note on your laptop and the Project doesn't know. It can't run commands, install tools, or execute code on your behalf. And it can't do anything while you're away. This setup gives the AI a live filesystem, the ability to act, and a 24/7 runtime. Projects gives it a reading list.
So I set up my own environment. A VPS (a virtual private server, basically a computer running in a data centre) with Claude Code and Obsidian installed. My files live on it. My AI agent can read them directly. I can talk to it from my phone, even when my Mac is off. And nothing leaves my server unless I explicitly connect it to an external service.
It took me a morning to set up. It changed how I work with AI.
Fair question. OpenClaw is the fastest-growing open-source project in history, and for good reason. It's a capable self-hosted AI agent with dozens of integrations.
But after evaluating both approaches, I chose this one. Here's why:
You don't need a Mac Mini. The OpenClaw trend has people buying $600+ Mac Minis to run a 24/7 agent. That makes sense if you're running local AI models to avoid API costs. But if you're using Claude, the model runs on Anthropic's servers regardless. A $10/month VPS does the same job. No hardware investment, no home network dependency, no worrying about power cuts.
Controlled autonomy. Claude Code asks before it acts. It shows you what it's about to do and waits for permission. OpenClaw defaults to high autonomy, which is powerful, but its over-autonomy is a documented problem. Tasks get stuck in loops, reasoning wanders, and outcomes can be unpredictable. I'd rather approve an action in 2 seconds than spend 20 minutes undoing one.
Your knowledge compounds. This setup uses Obsidian as your file system. Your notes, your CLAUDE.md (a file that tells the AI who you are and how you work), your project files. All in one place, synced across your devices. Every file you add makes the AI more useful. OpenClaw stores memory too, but it doesn't give you a structured, searchable knowledge system that you own and can browse independently.
Security is worth considering. OpenClaw has had 40+ vulnerabilities patched in a single month, a major exploit that allowed websites to silently hijack instances, and malicious plugins in its community store. This setup has a smaller attack surface: no plugin ecosystem, no messaging platform bridges, no exposed ports beyond SSH and RDP.
OpenClaw is a good tool. This is a different approach. One that prioritises control, simplicity, and a knowledge system that grows with you.
An AI agent that:
- Runs 24/7, even when your laptop is closed
- Has direct access to your notes, documents, and files
- Remembers your preferences and context across sessions
- You can talk to from your phone, anywhere
- Asks before it acts. You stay in control
How it works:
- You rent a small cloud server (~£10/month) running Linux
- You install Claude Code (an AI tool from Anthropic that can read your files, run commands, and do work on your behalf) and Obsidian (a note-taking app that syncs your files)
- You connect your phone to the server so you can start conversations from anywhere
- Your files stay on your server. The AI reads them locally. Nothing gets uploaded to a third-party platform unless you choose to connect one.
This guide uses Claude Code, but the architecture works with any AI coding tool that runs in a terminal. If a comparable tool emerges for other models, the server setup, file structure, and mobile access layer all carry over.
Three things this gives you that chat-based AI can't:
It runs 24/7. You can set up scheduled tasks, background research, file monitoring. The server runs whether you're asleep, on your commute, or on holiday. Your laptop doesn't need to be open. - It knows your stuff. Your notes, documents, and context files live on the server. The AI reads them directly. No copy-pasting into chat windows, no re-explaining your situation every session. You write a short file describing who you are and how you work, and the AI references it automatically. - Your data stays yours. Your files sit on a server you control. The AI processes them locally. External connections (calendar, task manager, etc.) are optional and explicit. Compare this to cloud platforms where your files pass through multiple third-party systems by default.
- A Mac(this guide uses macOS, though Windows steps are similar) - An Anthropic account with a Pro or Max plan (for Claude Code).Sign up hereif you don't have one - A phone(iPhone or Android) with the** Happy Coder app**installed:iOS/Android - About 90 minutes of uninterrupted time
- A notepad or password manager (1Password, Bitwarden, etc.) for storing a password and IP address
What it costs:
| Service | Cost |
|---|---|
| VPS (Hostinger KVM 2) | ~$13/month (~£10) |
| Anthropic Pro plan | $20/month (~£16) |
| Obsidian Sync (optional) | $4/month (~£3, billed yearly) |
| Total | |
| ~$33-37/month (~£26-29) |
To put that in context: last week I asked Claude to draft a presentation outline using notes from my last three client meetings. Because it could read my files directly, it took 2 minutes instead of 30. One task like that a week and the setup pays for itself in time.
Why a VPS, not a Mac Mini?The current trend is buying a Mac Mini ($600+) to run a 24/7 AI agent. That makes sense if you're running local AI models to avoid API costs. But Claude Code uses Anthropic's models in the cloud. The AI processing happens on their servers regardless of where your agent lives. A $10/month VPS gives you the same 24/7 environment without the upfront cost, home network dependency, or hardware maintenance. You can always move to dedicated hardware later if you outgrow it.
You can use any VPS provider that offers Ubuntu 24.04. This guide uses Hostinger because it's beginner-friendly and includes a desktop environment option, but the steps work on any Ubuntu server.
If you get stuck at any pointduring this guide, paste the error message into Claude at[claude.ai]from your Mac and ask what it means. You don't need to troubleshoot alone.
Using this guide with Claude Code:Once Claude Code is installed on your server (Step 4), you can download this file into your workspace. When you need help with any step, ask Claude:"Read SETUP-GUIDE.md and help me with [step or problem]."Claude will check your system's current state and help you through it.
This part gets you a working server with a desktop environment. It's the most manual part of the guide, about 15 minutes of copying and pasting commands. After this, Claude Code takes over and does the rest.
- Go to Hostinger VPS Hostingand choose a plan - Select KVM 2 (8 GB RAM) as the minimum. The 8 GB is needed because we'll be running a desktop environment alongside Claude Code. The default disk size is fine - Choose Ubuntu 24.04 as the operating system - If you see a "with Desktop Environment" option, select it. It saves a step later - Pick a server location closest to you (this affects connection speed)
- Set a root password. Make it strong and** write it down**. You'll need this throughout the setup - Complete the purchase and wait for the server to provision (usually under 2 minutes)
- Find your server's
IP address on the dashboard andwrite it down. It looks like
123.456.78.90
You're going to use Terminal, an app built into every Mac. It's a text-based way to talk to computers. You type a command, press Enter, and the computer does something. Every command in this guide is a line of text you'll copy, paste into Terminal, and press Enter. That's it.
Open Terminal on your Mac (search for "Terminal" in Spotlight) and type:
ssh root@YOUR_SERVER_IP
Replace YOUR_SERVER_IP
with the IP you wrote down. If it asks "Are you sure you want to continue connecting?", type yes
. Enter your root password when prompted (you won't see the characters as you type).
You should see a welcome message and a blinking cursor. You're now connected to your server. Everything you type runs on the remote machine, not your Mac.
If you chose "with Desktop Environment" in Step 1, check if it's already installed:
dpkg -l | grep -E "xfce4|ubuntu-desktop|gnome-shell"
This checks whether a desktop is already installed. If you see lines of text with package names, it's installed. Skip to Step 3b below. (You should still update the system first: run apt update && apt upgrade -y
and wait for it to finish.) If you see nothing at all (just a blinking cursor), it's not installed. Continue with the commands below.
Otherwise, run these one at a time. Copy each line, paste it into Terminal, and press Enter. Wait for each command to finish before running the next.
Update all the software on your server to the latest versions:
apt update && apt upgrade -y
This may take a few minutes. You'll see a lot of scrolling text. That's normal. If it asks you any questions, press Enter to accept the defaults.
Install the desktop environment (XFCE) and remote access software (XRDP):
apt install -y xfce4 xfce4-goodies xrdp
This will take several minutes. When it finishes, tell the remote access software which desktop to use, and turn it on:
echo "xfce4-session" > /root/.xsession
systemctl enable xrdp
systemctl restart xrdp
Everyone must do this step, even if the desktop was pre-installed. These three commands tell the firewall to allow SSH connections, allow remote desktop connections, and then activate:
ufw allow 22/tcp
ufw allow 3389/tcp
ufw --force enable
By default, closing your Remote Desktop window kills everything running on the server's desktop, including Obsidian. One line fixes this:
sudo sed -i 's/KillDisconnected=true/KillDisconnected=false/' /etc/xrdp/sesman.ini
Now when you disconnect, your desktop session stays alive in the background. Reconnect later and everything is exactly where you left it. Like putting a laptop to sleep instead of shutting it down.
By default, the desktop locks itself after a few minutes of inactivity. When you reconnect via Remote Desktop, you'll hit a password prompt even though your laptop already has its own lock screen. That's double-locking for no reason.
xfconf-query -c xfce4-screensaver -p /saver/enabled -s false --create -t bool
xfconf-query -c xfce4-screensaver -p /lock/enabled -s false --create -t bool
Now when you reconnect, you land straight back in your session. No password prompt, no blank screen.
Security note:This is fine when RDP access is only from your personal laptop with its own lock screen. If you ever share RDP access or connect from untrusted devices, re-enable locking by changingfalse
totrue
in both commands above.
You now have a server running in a data centre. It's on 24/7, and it has a desktop environment ready for you to connect to. Now let's install Claude Code and let it handle the rest of the setup.
Checkpoint: verify Part 1:
- You can connect via SSH:
ssh root@YOUR_SERVER_IP
returns a command prompt - The firewall is active:
sudo ufw status
shows "Status: active" with ports 22 and 3389 allowed - The desktop environment is installed:
dpkg -l | grep xfce4
returns results
This is where it gets interesting. Instead of typing more cryptic commands, you'll install Claude Code and ask it to configure everything else for you. This is also your first taste of what it's like to have an AI agent that can actually do things on your computer.
Still connected via SSH as root, run:
curl -fsSL https://claude.ai/install.sh | bash
After it finishes, you may need to add it to your PATH (so your computer knows where to find it):
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Now start it:
claude
Follow the prompts to log in with your Anthropic account. Once authenticated, you'll see the Claude Code prompt.
Now ask Claude Code to do everything that would normally take you 30 minutes of manual commands. Copy and paste this entire prompt:
I need you to set up this server for daily use. Please do the following:
1. Create a new user account called [yourname] with sudo (admin) privileges
2. Create an .xsession file for that user so the remote desktop works (use xfce4-session)
3. Install Claude Code for the new user (so they can use it from their own account without needing root)
4. Add ~/.local/bin to the new user's PATH in their .bashrc
5. Create a 4 GB swap file so the server doesn't crash when memory runs low
6. Install fail2ban to block repeated failed login attempts
7. Set up unattended-upgrades so security patches install automatically
8. Show me a summary of everything you did when you're done
Replace [yourname]
with the username you want (your name works well, but avoid admin
because Ubuntu already has a group with that name).
Claude will work through each step, explain what it's doing, and ask for your permission before making changes. It will ask you to set a password for the new user. Use a strong password and save it in your password manager.
When it's done, exit Claude Code and the SSH session:
- Type
/exit
to leave Claude Code - Type
exit
to disconnect from the server
What just happened?You used an AI agent to configure a Linux server. No manual typing of system commands. No Googling syntax. This is exactly the kind of thing you'll use it for going forward, with your own files and workflows instead of server setup.
Now you'll switch from the text terminal to a visual desktop, like screen-sharing with your server.
- On your Mac, install Windows App(formerly Microsoft Remote Desktop) from theMac App Store - Open the app, click +, then** Add PC** - Enter your server's IP address as the PC name - Give it a friendly name (e.g. "AI Server")
- Double-click to connect
- Log in with the username and password Claude created for you in Step 5 (not root)
- Accept the certificate warning if it appears
You should see a desktop. From here, you can work inside it like you would on your Mac.
Tips:
- Adjust the display resolution in Windows App settings to match your screen
- Turn on clipboard redirection to copy/paste between your Mac and the server
Can't connect? The most common causes: typo in the IP address, or the .xsession
file wasn't created properly. SSH back in as root (ssh root@YOUR_SERVER_IP
) and ask Claude Code to check.
Checkpoint: verify Part 2:
- You can see a desktop when connecting via Windows App as your non-root user
- Running
claude
in a terminal on the remote desktop shows the Claude Code prompt - Running
sudo systemctl status fail2ban
shows "active (running)" - Running
swapon --show
shows a swap file
This is where the setup goes from "a server with some tools" to "an AI agent that knows me." Everything from here on happens inside your Remote Desktop session. Open a terminal on the desktop (right-click the desktop and choose "Terminal Emulator" or "Terminal" from the menu).
Claude Code was installed for your user account as part of Step 5 (Claude handled that for you). Open a terminal and start it:
claude
Log in with your Anthropic account when prompted. You should see the Claude Code prompt.
Why a separate account from root?Root is like the building's master key. You used it to set up the server, but you don't want to use it daily because one wrong command could break everything. Your personal account is safer for everyday work.
This is the step that changes everything.
Claude Code reads a file called CLAUDE.md
from whatever directory you start it in. Think of it as a briefing document. Everything in it shapes how Claude behaves in your sessions. Without it, Claude is a general-purpose AI. With it, Claude is your AI.
First, create a folder that will become your workspace:
mkdir -p ~/Documents/Workspace
cd ~/Documents/Workspace
claude
Now ask Claude:
Create a CLAUDE.md file in this directory. It should include:
- My name and role
- What I'm working on right now
- How I prefer to communicate (be direct, use UK/US spelling, etc.)
- Any rules or preferences (e.g. always check before deleting files)
- Here's some context about me: [tell Claude about yourself, your work, your priorities]
Here's what a simple CLAUDE.md might look like:
I'm Sarah, a product design manager at a fintech company. I lead a team of 6 designers.
## What I'm Working On
- Preparing for our Q3 planning cycle
- Writing a talk for a design conference in September
- Building a personal knowledge base of design leadership resources
## How I Work
- Be direct. I'd rather have a clear recommendation than a list of options.
- UK spelling throughout.
- Don't delete or move files without asking me first.
- When I ask you to draft something, match my tone: clear, practical, no jargon.
## My Workspace
- /Projects - active work
- /Resources - reference material, articles, frameworks
- /Notes - daily notes and meeting notes
Start simple. Add to it whenever you notice Claude doing something you'd want it to do differently. Over time, it becomes an operating manual for your AI agent.
You now have a personal AI agent that knows who you are and what you're working on. Every session you start from this folder will load your CLAUDE.md automatically. No more re-explaining yourself.
From this point on, always start Claude Code from inside this folder. It reads CLAUDE.md from the working directory. If you start it from somewhere else, it won't have your context.
If you have this guide as a file (.md
format), copy it into your workspace:
cp ~/SETUP-GUIDE.md ~/Documents/Workspace/
If you don't have it as a file yet, download it:
curl -o ~/Documents/Workspace/SETUP-GUIDE.md "https://gist.githubusercontent.com/liamdarmody/4aba083c26ccb1b3b0f1068ec185ef66/raw/SETUP-GUIDE.md"
This isn't just for reference. With the guide in your workspace, Claude Code can read it. If you get stuck on any step from here on, you can ask:
"Read SETUP-GUIDE.md and help me with Step 11"
or
"I'm trying to set up the daemon but it's not starting. Check the setup guide for what I should do."
Claude will read the relevant section, check your system, and help you through it. You're still driving. Claude is your co-pilot.
Obsidian is a note-taking app that stores everything as plain text files (Markdown). This matters because Markdown is the best file format for AI to read and work with. No special formats, no conversion needed. Claude Code can read, search, and edit your notes directly.
Even if you've never used Obsidian, it's worth installing. It gives you a visual way to browse and edit the files in your workspace, without needing to use the terminal. You can see exactly what Claude has created, edited, or organised.
Open Claude Code from your workspace and say:
"Install the latest version of Obsidian as an AppImage, move it to /opt, create a desktop shortcut, and make sure it launches for my current user."
Once installed, launch Obsidian. You have two options:
Option A: Use your workspace as a vault (simplest). When Obsidian asks you to open or create a vault, point it at the folder you created in Step 7 (~/Documents/Workspace
). A "vault" is just Obsidian's word for a folder of files. Your CLAUDE.md and any files you've added are already there.
Option B: Sync an existing vault from your Mac. If you already have an Obsidian vault you want to use:
-
Create a new empty vault in Obsidian (any name is fine)
-
Go to Settings(gear icon, bottom-left) - Under Core plugins, find** Syncand turn it on - Click Manage next to Sync, thenLog in** with your Obsidian account - Choose your existing vault from the list
-
In the Sync settings, make sure these are turned on:- Active community plugin list
-
Installed community plugins
-
Sync all other content types
-
Click Start syncing and wait for it to finish completely (check the circular arrows indicator in the bottom-left)
Once the sync is done, copy your CLAUDE.md and this setup guide from ~/Documents/Workspace
into the synced vault folder:
cp ~/Documents/Workspace/CLAUDE.md "/path/to/your/synced/vault/"
cp ~/Documents/Workspace/SETUP-GUIDE.md "/path/to/your/synced/vault/"
From now on, use the synced vault folder as your workspace (start Claude Code from there instead of ~/Documents/Workspace
).
Skip this step if you created a fresh workspace in Step 9 (Option A).
Your vault notes sync via Obsidian, but some files can't. They're either hidden (starting with .
) or contain secrets that shouldn't be synced. You need to copy them from your Mac manually.
| File | Syncs via Obsidian? | Action |
|---|---|---|
| All vault notes and folders | Yes | Nothing to do |
CLAUDE.md |
||
| Yes | Nothing to do (it's a regular vault file) | |
.mcp.json (in vault root) |
||
| No (hidden file) | Copy and fix paths | |
.claude/ folder (in vault root) |
||
| No (hidden folder) | Copy (Claude Code project settings) | |
.env (in vault root) |
||
| No (hidden file) | Copy (contains API keys) |
Not every vault will have all of these files. If you haven't set up MCP servers or a .env
on your Mac, you can skip the ones that don't exist.
Run these commands on your Mac Terminal (not the VPS). Replace the paths with your actual vault name and server details:
scp "/Users/yourname/Documents/Obsidian Vaults/My Vault/.mcp.json" yourname@YOUR_SERVER_IP:"/home/yourname/Documents/Obsidian Vaults/My Vault/"
scp -r "/Users/yourname/Documents/Obsidian Vaults/My Vault/.claude" yourname@YOUR_SERVER_IP:"/home/yourname/Documents/Obsidian Vaults/My Vault/"
scp "/Users/yourname/Documents/Obsidian Vaults/My Vault/.env" yourname@YOUR_SERVER_IP:"/home/yourname/Documents/Obsidian Vaults/My Vault/"
Quote paths that contain spaceswith double quotes. Many vault paths include spaces (e.g.Obsidian Vaults/My Vault
), and without quotes the command will fail.
A note on .env security:Copying your.env
is the simplest approach and fine for personal use. If you want tighter security, generate fresh API keys for the VPS instead. That way you can revoke VPS keys independently if the server is ever compromised.
Your Mac .mcp.json
contains Mac-specific paths (e.g. /Users/yourname/...
). On the VPS, these need to be /home/yourname/...
.
Open Claude Code from your vault folder on the VPS and say:
"Check my .mcp.json for any paths that start with /Users/ and update them to use /home/ instead. Show me what you changed."
Still in Claude Code, ask:
"What tools do you have available? List all connected MCP servers."
If any servers fail to connect, it's usually a path issue in .mcp.json
or a missing dependency. Ask Claude Code to help troubleshoot.
The following three sections are optional. You can skip straight to Part 4: Control It from Your Phone if you want to get mobile access set up first and come back to these later.
Build your knowledge base. This is where the setup starts compounding. The more files you give Claude access to, the more useful it becomes.
Create a few folders in your workspace for different areas of your work:
Projects- briefs, plans, status updates for what you're actively working on** Notes**- meeting notes, daily notes, thoughts** Resources**- articles, frameworks, reference material you want Claude to draw on
You don't need to migrate everything at once. Start with whatever you're working on this week. Drop files in as Markdown. Claude can read them instantly.
The value builds over time. A month from now, you can say "find every meeting note where we discussed the onboarding redesign" or "draft a project update based on my notes from this week" and Claude will have the context to actually do it.
Why Markdown?It's plain text with simple formatting. Claude can read and search it instantly, unlike PDFs or Word documents which need conversion. Obsidian makes Markdown files easy to create and browse, even if you've never used it before.
Bring files from your Mac. If you have files on your Mac you want on the server, the easiest way is to ask Claude Code. Open Claude Code on your Mac and say:
"I need to copy [describe the files] from my Mac to my VPS at [YOUR_SERVER_IP]. My username on the VPS is [yourname]. Give me the exact scp commands to run."
Claude will generate the right commands for your specific paths. Copy them, paste into your Mac's Terminal, and enter your VPS password when prompted.
What is scp?It copies files securely between computers over the internet. Think of it as drag-and-drop through the terminal.
Connect external tools. Claude Code can connect to external services through MCP (Model Context Protocol) servers. These are optional add-ons that let Claude interact with tools like:
Notion(read and write to your databases)** Todoist**(manage tasks)** Google Calendar**(check your schedule)** Readwise**(search your reading highlights)
Each connection is explicit. You choose what to connect, and the data flows directly between your server and the service. Nothing passes through a middleman.
Setting up MCP servers is beyond the scope of this guide, but once your environment is running, you can ask Claude Code to help you configure them. Start with one service you use daily and build from there.
Checkpoint: verify Part 3:
- Running
claude
from your workspace shows the Claude Code prompt and loads your CLAUDE.md - Running
ls SETUP-GUIDE.md
in your workspace shows the file exists - Obsidian is installed and shows your vault (fresh or synced)
- (Option B only) Running
cat .mcp.json
in your vault shows VPS paths (/home/...
), not Mac paths (/Users/...
)
This is the part that makes it all worthwhile. Your AI agent, with all your context, accessible from your pocket.
Happy Coder is a free, open-source tool that lets you start and manage Claude Code sessions from your phone.
Happy Coder is built with Node.js (a programming runtime), so you'll install that first:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm install --lts
Install Happy Coder:
npm i -g happy-coder
Log in:
happy auth login
Choose Mobile App and scan the QR code with the Happy Coder app on your phone.
The daemon is the background service that lets your phone create new sessions. Start it from inside your workspace:
cd ~/Documents/Workspace
happy daemon start
The directory matters. The daemon starts Claude Code sessions in whatever folder it was launched from. If you start it from the wrong place, Claude won't see your CLAUDE.md or files.
Test it from your phone:
- Open the Happy Coder app
- Tap to start a new session. You'll see a text interface, like a messaging app, where you type to Claude and it responds
- Ask Claude: "What directory are you in, and what does my CLAUDE.md say about me?" - It should respond with your workspace path and your details from the CLAUDE.md file
If it shows your home directory instead, or doesn't find your CLAUDE.md, stop the daemon (happy daemon stop
), navigate to your workspace folder, and start it again.
Your VPS will occasionally restart (maintenance, updates, or manual reboots). Without auto-start, the daemon dies and you'd need a laptop to restart it. If you only have your phone, you're stuck.
Open Claude Code from your workspace and paste this prompt:
I need the Happy Coder daemon to start automatically whenever the server reboots, so I can access it from my phone without needing a laptop. Please:
1. Set up a systemd user service that starts the daemon on boot
2. Use Type=simple with ExecStart pointing to happy daemon start-sync (this is the actual long-running process, NOT happy daemon start, which spawns a child and exits)
3. Use Restart=always with RestartSec=10 (not Restart=on-failure, because the daemon exits cleanly on shutdown signals and on-failure won't restart it)
4. Use KillMode=process so restarting the daemon doesn't kill active phone sessions
5. Set Environment= with only PATH and HOME. Do NOT include CLAUDECODE or CLAUDE_CODE_ENTRYPOINT (these cause phone sessions to fail instantly)
6. Make sure it runs from my current workspace directory (so sessions have the right context)
7. Enable lingering so it starts at boot even before I log in
8. Show me the service file before enabling it
Claude Code will create the service for you. Review what it shows you. The key things to check are that the workspace path is correct and the Environment=
line does not contain CLAUDECODE
.
Why these specific settings matter:Without them, the daemon willappearto work but fail silently. The most common issues: systemd won't restart a crashed daemon (wrong service type), or phone sessions fail instantly because of inherited environment variables. These settings prevent both problems.
Verify it works (three tests):
Basic check:systemctl --user status happy-coder.service
should show "active (running)"Crash recovery: Ask Claude Code to find and kill the daemon process, then check if it restarts within ~10 secondsReboot survival: Reboot your VPS from the Hostinger dashboard. Wait 2 minutes. Check the Happy Coder app on your phone. It should show the machine as online
If it's not working, check the logs:
systemctl --user status happy-coder.service
journalctl --user -u happy-coder.service --no-pager
Troubleshooting: sessions appear but fail instantly.If you can see sessions in the phone app but they die the moment you send a message, the daemon likely has aCLAUDECODE
variable in its environment. Ask Claude Code to check and fix it.
If you're using Obsidian Sync to keep files in sync across devices, Obsidian needs to be running on the server. But it's a desktop app. If you're not connected via Remote Desktop, it normally can't run.
The fix: run Obsidian on a virtual display. This is an invisible screen that Obsidian thinks is real. It runs and syncs in the background, whether or not anyone is connected.
Open Claude Code from your workspace and paste this prompt:
I need Obsidian to run in the background and sync my vault even when I'm not connected via Remote Desktop. Please:
1. Install Xvfb (a virtual display server)
2. Create a systemd user service for Xvfb that runs on display :99
3. Create a systemd user service for Obsidian that depends on the Xvfb service
4. Use Restart=always for both (not on-failure, because Obsidian exits cleanly on shutdown signals)
5. Launch Obsidian with --no-sandbox --disable-gpu and the URI obsidian://open?vault=MYVAULTNAME (replace with my actual vault name)
6. Show me both service files before enabling them
Why the vault URI?Without it, Obsidian starts but sits at the vault picker screen. It doesn't know which vault to open. The URI tells it to skip the picker and open your vault directly, so Sync activates automatically.
Verify it works:
Check status:systemctl --user status obsidian.service
should show "active (running)"Test sync: Edit a note on your Mac or phone. Within a couple of minutes, check the file on the server. It should be updatedTest recovery: Ask Claude Code to kill the Obsidian process and confirm it restarts automatically
You can now talk to your AI agent from anywhere. Laptop closed. Files there. Context loaded. Vault synced. That's it.
Here's what your day looks like now:
Pick up your phone. Open the Happy Coder app.Start a session. Claude loads your CLAUDE.md, sees your files, knows your context.Ask it to do things."Draft my weekly status update from this week's meeting notes." "Find that competitive analysis I saved last month and summarise the key points." "Create a project brief for the onboarding redesign using the research in my Resources folder." These are things a chat app can't do. They depend on Claude being able to read your files and remember your context.Close the app whenever you want. The session keeps running on the server.Come back later. From your phone, your Mac, or any browser. Pick up where you left off.
Your AI agent runs around the clock, has your full context, and your data never left your server.
And because everything lives in Obsidian, you can open the app on your Mac or phone and see exactly what your AI has been working on. Notes it created, files it edited, context it referenced. Full visibility, no black box.
Once you're comfortable with the basics, here are things worth exploring:
Build out your CLAUDE.md. The more context you give Claude, the more useful it becomes. Add your current projects, your communication preferences, your decision-making principles. Some people write a few lines. I've built mine into a full operating manual. Start small and add to it as you notice gaps.
Connect your tools. MCP servers let Claude interact with services you already use. Start with one (Notion or Todoist are good first picks). Each connection makes the system more useful without adding complexity to your daily workflow.
Explore scheduled tasks. Your server runs 24/7. That means you can set up tasks that run on a schedule: morning briefings, research that runs overnight, automated file organisation. Ask Claude Code to help you set up a cron job once you have a workflow worth automating.
Store memories in your vault. Claude Code has a memory system that lets it remember things across sessions. By default, these memories are stored in a hidden folder that doesn't sync. Move them into your vault so they sync across devices and survive server rebuilds. Ask Claude Code to help you set this up.
If you followed Steps 3c, 13, and 14, your setup handles failures automatically:
| What happens | Result | Action needed |
|---|---|---|
| You close the Remote Desktop window | Desktop stays alive, everything keeps running | None |
| Your internet drops | Same as closing RDP. Reconnect and pick up where you left off | None |
| Happy Coder daemon crashes | Restarts automatically within ~10 seconds | None |
| Obsidian crashes | Restarts automatically within ~10 seconds, Sync resumes | None |
| VPS reboots (maintenance or manual) | Everything starts automatically | Wait ~2 minutes, then check from phone |
To check everything is running:
systemctl --user status happy-coder.service obsidian.service xvfb.service
| Task | How |
|---|---|
| Connect to desktop | Windows App on Mac, enter your server IP |
| SSH into server | ssh yourname@YOUR_SERVER_IP in Mac Terminal |
| Start Claude Code | cd ~/Documents/Workspace && claude |
| Launch Obsidian | Application menu on the remote desktop |
| Start Happy Coder daemon | cd ~/Documents/Workspace && happy daemon start |
| Check daemon status | happy daemon status |
| Check all services | systemctl --user status happy-coder.service obsidian.service xvfb.service |
| Restart Happy Coder | systemctl --user restart happy-coder.service |
| Restart Obsidian (headless) | systemctl --user restart obsidian.service |
| Check service logs | journalctl --user -u <service-name> --no-pager -n 50 |
| What | Safe? | How |
|---|---|---|
| Your notes and files | Yes (with Obsidian Sync) | Synced to Obsidian's cloud and your Mac |
| CLAUDE.md | Yes (with Obsidian Sync) | It's a file in your vault |
| Server setup (firewall, swap, security) | No | Re-run the setup, or ask Claude Code to redo it |
| Claude Code and Happy Coder installs | No | Re-install (~10 minutes) |
If your server dies and you're using Obsidian Sync, your notes are safe (copies live on your Mac and in the cloud). Everything else can be rebuilt in about 90 minutes by following this guide again.
Not using Obsidian Sync?Your files only exist on the VPS. Consider setting up a regular backup (ask Claude Code to help) or using Sync for peace of mind.
You shouldn't need to do much. The unattended-upgrades from Step 5 handle security patches automatically. Claude Code updates itself. Every few weeks, you can ask Claude:
"Check for pending system updates, clean up old packages, and check disk space."
If the Happy Coder daemon stops working after a Claude Code update, restart it:
systemctl --user restart happy-coder.service
Open Claude Code (or SSH in from your Mac) and describe the problem:
"I can't connect to the remote desktop. Help me diagnose why."
"Obsidian won't launch. Fix it."
"The server feels slow. Check what's using memory and CPU."
Claude Code can read logs, check processes, and fix most issues. That's the whole point of having it on the server.
Run this to verify everything is working, or ask Claude Code to run it and explain the results:
echo "=== Services ==="
systemctl --user status happy-coder.service --no-pager -l 2>&1 | head -3
systemctl --user status obsidian.service --no-pager -l 2>&1 | head -3
systemctl --user status xvfb.service --no-pager -l 2>&1 | head -3
echo ""
echo "=== Obsidian Sync ==="
pgrep -f Obsidian > /dev/null && echo "Obsidian: running" || echo "Obsidian: NOT running"
echo ""
echo "=== Happy Coder ==="
happy daemon status 2>&1
echo ""
echo "=== Firewall ==="
sudo ufw status 2>&1 | head -5 || echo "(requires sudo password, run manually: sudo ufw status)"
echo ""
echo "=== Security ==="
systemctl status fail2ban --no-pager 2>&1 | head -3 || echo "(fail2ban status requires sudo on some systems)"
echo ""
echo "=== Swap ==="
swapon --show 2>&1
echo ""
echo "=== Disk ==="
df -h / 2>&1 | tail -1
echo ""
echo "=== Memory ==="
free -h 2>&1 | head -2
Everything should show "active (running)" or return sensible values. If anything shows "inactive", "failed", or is missing, ask Claude Code to diagnose it. With this guide in your workspace, it has all the context it needs to help.
Built by Liam Darmody. I write about AI-enabled productivity and product leadership on LinkedIn. If this guide was useful, that's where to find more.