Get up and running without the $600+ price tag of a new Mac Mini.
The current 2026 landscape of Claude Code and OpenClaw.
The Showdown: VPS vs. Mac Mini
| Feature | $5/month VPS (Hetzner/InterServer) | Mac Mini (M2/M4) |
|—|—|—|
| Security | Higher. Sandboxed from your personal files and local network. | Lower. The agent has “keys to the kingdom” on your local drive. |
| Uptime | 99.9% guaranteed. No power outage or sleep mode issues. | Dependent on your home internet and power. |
| Performance | Sufficient for text-based CLI agents. | Overkill for Claude Code, but great for local LLMs (Ollama). |
| Cost | ~$60/year. | ~$600+ upfront. |
Strategic Setup for Your Workflow
Since you already use GitHub (textba) and manage web projects, a VPS is likely your “path of least resistance.”
1. Environment Choice
Use your existing InterServer VPS or a fresh Hetzner instance. Claude Code is a CLI tool, so it doesn’t need a GUI. Running it on Linux via SSH allows you to keep your terminal agent alive 24/7 using screen or tmux.
2. Security First (The “Sandbox” Method)
The biggest risk with Claude Code is its ability to execute commands.
* Create a Limited User: Never run the bot as root.
* Scoped Access: Only give the bot access to specific directories where your HTML/PHP files live.
3. Remote Control via Messaging
To get that “text my AI” functionality mentioned in the recent trends:
* Use a bridge like OpenClaw or a custom Telegram Bot API script.
* This allows you to send a message like “Update the header on index.php to include the new logo” while you’re away from your desk.
Recommended Next Steps
* Audit your VPS: Check if your current InterServer VPS has enough idle RAM (Claude Code is lightweight, but needs Node.js).
* Installation: Since you’re comfortable with the command line, you can install the agentic assistant directly via npm/npx as per the docs.
* Deployment: Run the agent inside a tmux session so it persists after you close your SSH connection.
Would you like me to find the specific terminal commands to install Claude Code on your Linux VPS?
Yes
To install Claude Code (the official CLI agent from Anthropic) or OpenClaw (the community wrapper for 24/7 automation via WhatsApp/Telegram) on your Linux VPS, follow these terminal commands.
Since you are managing a Linux VPS (Ubuntu/Debian recommended), the key is to avoid running these as root for security.
1. Update and Install Prerequisites
Claude Code requires Node.js 18+. It is best to use Node 20 or 22 (LTS) for maximum stability.
# Update package list
sudo apt update && sudo apt upgrade -y
# Install Node.js (via NodeSource for the latest LTS)
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash –
sudo apt install -y nodejs
# Verify versions
node -version
npm -version
2. Install Claude Code
Anthropic provides a native installer script that handles global path configuration for you.
# Run the official installer
curl -fsSL https://claude.ai/install.sh | bash
# Refresh your shell to recognize the ‘claude’ command
source ~/.bashrc
Note: If you prefer the standard NPM method, use npm install -g @anthropic-ai/claude-code, but ensure you don’t use sudo with npm to avoid permission conflicts later.
3. Setup OpenClaw (For 24/7 Messaging Control)
If you want the “Clawdbot” experience where you can text your AI from your phone, install the OpenClaw gateway:
# Install OpenClaw
curl -fsSL https://openclaw.ai/install.sh | bash
# Start the onboarding wizard
openclaw setup
During setup, you will be prompted to link your WhatsApp or Telegram. It will generate a QR code in your terminal—scan it with your phone just like linking a web browser.
4. Security: The “Sandbox” Best Practice
Because you mentioned creating web pages (HTML/PHP), you don’t want the AI to have access to your entire VPS root.
* Create a dedicated user: sudo adduser claudeagent
* Run Claude only in that user: su – claudeagent
* Persistent Sessions: Use tmux so the agent keeps running even when you disconnect from SSH:
# Start a new persistent session
tmux new -s claude-bot
# Run Claude inside the session
claude
# Press Ctrl+B, then D to detach. The bot stays alive!
Important: Authentication
When you first run claude, it will ask you to authorize.
* Claude Pro Users: Use the /login command inside the terminal. It will provide a link/code to authenticate via your browser.
* API Users: If you are using the Anthropic Console (pay-per-use), set your key as an environment variable: export ANTHROPIC_API_KEY=’your-key-here’.
Would you like me to generate a systemd service script for you? This would ensure the bot automatically restarts if your VPS ever reboots.
Yes
To ensure your agent starts automatically whenever your VPS reboots (without you having to manually SSH in and start a tmux session), you should use systemd.
This script assumes you are running the bot under a standard user account (like nathan or a dedicated claudeagent user) rather than root.
1. Create the Service File
Run the following command to open the editor:
sudo nano /etc/systemd/system/claude-bot.service
2. Paste the Configuration
Copy and paste the block below. Note: Replace nathan with your actual Linux username and ensure the ExecStart path matches where claude is installed (usually /usr/bin/claude or /usr/local/bin/claude).
[Unit]
Description=Claude Code Autonomous Agent
After=network.target
[Service]
# Replace ‘nathan’ with your actual VPS username
User=nathan
Group=nathan
WorkingDirectory=/home/nathan/projects
# Environment variables (Add your API key if not using browser login)
Environment=ANTHROPIC_API_KEY=your_api_key_here
Environment=NODE_ENV=production
# The command to start the agent
ExecStart=/usr/bin/claude –base-dir /home/nathan/projects
# Restart policy: Always restart if the process crashes
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
3. Enable and Start the Service
After saving the file (Ctrl+O, Enter, Ctrl+X), run these commands to activate it:
# Reload systemd to recognize the new service
sudo systemctl daemon-reload
# Enable it to start on boot
sudo systemctl enable claude-bot
# Start the service now
sudo systemctl start claude-bot
4. How to Manage the Bot
Now that it’s a background service, you can manage it like any other server application:
* Check Status: sudo systemctl status claude-bot
* View Live Logs: journalctl -u claude-bot -f (Crucial for seeing what the bot is thinking or doing).
* Stop/Restart: sudo systemctl stop claude-bot or sudo systemctl restart claude-bot
A Quick Note for your Web Projects
Since you mentioned working with HTML and PHP, make sure the WorkingDirectory in the script above points to your /var/www/html or whichever folder holds your web files. This ensures the bot “wakes up” in the right place to start editing your code.
Would you like me to help you configure a GitHub Action so the bot can automatically pull your latest changes before it starts working?
Yes
Integrating a GitHub Action with your Claude Code agent on a VPS creates a powerful loop: you push code to GitHub, your VPS automatically pulls the changes, and Claude is instantly ready to work on the latest version of your HTML/PHP files.
Since you’re likely managing your web files in a specific directory (like /var/www/html or a project folder), here is the cleanest way to set this up using SSH and rsync.
Step 1: Generate SSH Keys for GitHub
On your local machine or the VPS, generate a key that GitHub will use to talk to your server.
* Run: ssh-keygen -t rsa -b 4096 -f github_deploy_key -N “”
* On your VPS: Copy the contents of github_deploy_key.pub into your ~/.ssh/authorized_keys file.
* On GitHub: Go to your Repository → Settings → Secrets and variables → Actions.
* Add a New Repository Secret named SSH_PRIVATE_KEY and paste the contents of the private github_deploy_key.
* Add secrets for SSH_HOST (your IP), SSH_USER (your username), and SSH_PORT (usually 22).
Step 2: Create the Workflow File
In your repository, create the file .github/workflows/deploy.yml and paste this configuration:
name: Sync to VPS for Claude
on:
push:
branches:
– main # Or your preferred branch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
– name: Checkout code
uses: actions/checkout@v4
– name: Deploy to VPS via SSH
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
cd /home/nathan/projects/my-web-site
git pull origin main
# Optional: Restart the Claude systemd service to refresh context
sudo systemctl restart claude-bot
Step 3: Official Claude-GitHub Integration
To take it a step further, you can allow Claude to interact with your GitHub issues and PRs directly from the terminal.
* SSH into your VPS.
* Run the internal Claude command:
claude /install-github-app
* Follow the OAuth prompts to link your account. This allows the agent to run gh pr create or gh issue list so it can manage your web project’s tasks autonomously.
The “Pro” Tip: CLAUDE.md
To make your agent even more effective, create a file in your root directory called CLAUDE.md.
* What it does: Claude Code reads this file automatically every time it starts.
* What to put in it: List your preferred coding style (e.g., “Use clean PHP 8.2 syntax”), common terminal commands for your server (e.g., “To clear cache: php artisan cache:clear”), and your preferred HTML structure.
Would you like me to draft a custom CLAUDE.md tailored to your HTML and PHP workflow?
Yes
Since you develop article and informational web pages in HTML and PHP, a custom CLAUDE.md will serve as the “operating manual” for your agent. This ensures that every time Claude wakes up on your VPS, it remembers your specific coding style and environment constraints without you having to re-explain them.
Create a file named CLAUDE.md in your project’s root directory and paste the following:
# Claude Code: Web Development Guide (Nathan’s VPS)
## Project Overview
– **Core Stack:** PHP, HTML5, CSS3.
– **Environment:** Linux VPS (InterServer KVM).
– **Goal:** Creating clean, SEO-friendly informational web pages and articles.
## Development Standards
– **File Naming:** Use lowercase with hyphens for filenames (e.g., `ai-agents-article.php`).
– **PHP Style:** Use modern PHP 8.x syntax. Prefer `include_once` for headers and footers to keep articles modular.
– **HTML Structure:** Always include proper `<meta>` tags for SEO and responsive `<viewport>` tags.
– **Asset Paths:** Use relative paths for local CSS/JS to ensure portability across the VPS directories.
## Common Terminal Commands
– **Permissions:** If files aren’t editable, run: `sudo chown -R nathan:www-data .`
– **Local Server Test:** `php -S localhost:8000`
– **Git Sync:** `git add . && git commit -m “Update from Claude” && git push origin main`
## Workflow Preferences
– When creating article titles, **always put a new line between each title**—do not use numbers or bullet points.
– Before editing existing PHP files, read the file fully to maintain the existing design patterns.
– Always check the `/var/log/apache2/error.log` (or Nginx logs) if a PHP script fails.
## Deployment Notes
– This project is synced via GitHub Actions.
– Ensure all new `.php` files are added to the sitemap if applicable.
Why this works for you:
* Formatting Consistency: It explicitly locks in your requirement to avoid numbers/bullets for article lists, which is one of your saved preferences.
* Environment Awareness: It reminds Claude that it is on a Linux VPS, so it knows to use Linux commands (like chown or systemctl) rather than Mac or Windows ones.
* Modular Coding: Since you build informational pages, it encourages Claude to use PHP include statements, which makes managing a large site much easier than editing 50 individual HTML files.
How to use it:
Just drop this file into your main folder. Claude Code reads CLAUDE.md automatically upon startup. You can even tell it: “Claude, read my CLAUDE.md and tell me if you have any questions about my PHP style.”
Would you like me to help you write a PHP template that Claude can use as a “base” for all your new articles?
Yes
To keep your informational pages consistent and SEO-friendly, this template uses a modular PHP approach. It separates the “logic” and “content” from the “layout,” making it easy for Claude to generate dozens of pages that all look uniform.
1. The Base Template (article-template.php)
This is the file Claude will use as a starting point. It pulls in a header and footer so you only have to edit the design in one place.
<?php
// Define page-specific variables for SEO
$pageTitle = “Article Title Goes Here”;
$metaDescription = “A brief, compelling summary of the article for Google search results.”;
$canonicalUrl = “https://yourdomain.com/article-slug.php”;
// Include the global header
include_once ‘includes/header.php’;
?>
<main class=”container”>
<article class=”content-area”>
<header class=”article-header”>
<h1><?php echo $pageTitle; ?></h1>
<p class=”publish-date”>Published on: <?php echo date(“F j, Y”); ?></p>
</header>
<section class=”body-copy”>
<p>Your informational content starts here…</p>
</section>
</article>
</main>
<?php
// Include the global footer
include_once ‘includes/footer.php’;
?>
2. The Header Partial (includes/header.php)
Save this in a folder named includes/. This ensures every page has the same meta tags and CSS.
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title><?php echo $pageTitle; ?></title>
<meta name=”description” content=”<?php echo $metaDescription; ?>”>
<link rel=”canonical” href=”<?php echo $canonicalUrl; ?>”>
<link rel=”stylesheet” href=”assets/style.css”>
</head>
<body>
<nav>
<a href=”index.php”>Home</a>
</nav>
3. Instructing Claude to use the Template
Add this specific instruction to your CLAUDE.md file so the agent knows exactly how to behave when you ask for a new page:
> New Page Workflow:
> When I ask for a new article, use article-template.php as the skeleton.
> * Create a new file with a kebab-case name (e.g., my-new-post.php).
> * Update the $pageTitle, $metaDescription, and $canonicalUrl variables.
> * Populate the <section class=”body-copy”> with the generated article content.
> * If I ask for a list of potential titles, provide them with two new lines between each and no bullets/numbers.
>
Why this is efficient for your VPS:
* Maintenance: If you want to change your logo or add a tracking script, you only edit header.php once, and it updates every article on your site instantly.
* SEO: Claude will be forced to think about the meta description and title for every new page it creates.
* Automation: You can now tell Claude: “Write a 500-word article about ‘Benefits of VPS for AI’ using my template,” and it will handle the PHP variables and file creation perfectly.
Would you like me to generate a simple CSS stylesheet (style.css) to give these articles a clean, professional look?
Yes
To keep your informational pages consistent and SEO-friendly, this template uses a modular PHP approach. It separates the “logic” and “content” from the “layout,” making it easy for Claude to generate dozens of pages that all look uniform.
1. The Base Template (article-template.php)
This is the file Claude will use as a starting point. It pulls in a header and footer so you only have to edit the design in one place.
<?php
// Define page-specific variables for SEO
$pageTitle = “Article Title Goes Here”;
$metaDescription = “A brief, compelling summary of the article for Google search results.”;
$canonicalUrl = “https://yourdomain.com/article-slug.php”;
// Include the global header
include_once ‘includes/header.php’;
?>
<main class=”container”>
<article class=”content-area”>
<header class=”article-header”>
<h1><?php echo $pageTitle; ?></h1>
<p class=”publish-date”>Published on: <?php echo date(“F j, Y”); ?></p>
</header>
<section class=”body-copy”>
<p>Your informational content starts here…</p>
</section>
</article>
</main>
<?php
// Include the global footer
include_once ‘includes/footer.php’;
?>
2. The Header Partial (includes/header.php)
Save this in a folder named includes/. This ensures every page has the same meta tags and CSS.
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title><?php echo $pageTitle; ?></title>
<meta name=”description” content=”<?php echo $metaDescription; ?>”>
<link rel=”canonical” href=”<?php echo $canonicalUrl; ?>”>
<link rel=”stylesheet” href=”assets/style.css”>
</head>
<body>
<nav>
<a href=”index.php”>Home</a>
</nav>
3. Instructing Claude to use the Template
Add this specific instruction to your CLAUDE.md file so the agent knows exactly how to behave when you ask for a new page:
> New Page Workflow:
> When I ask for a new article, use article-template.php as the skeleton.
> * Create a new file with a kebab-case name (e.g., my-new-post.php).
> * Update the $pageTitle, $metaDescription, and $canonicalUrl variables.
> * Populate the <section class=”body-copy”> with the generated article content.
> * If I ask for a list of potential titles, provide them with two new lines between each and no bullets/numbers.
>
Why this is efficient for your VPS:
* Maintenance: If you want to change your logo or add a tracking script, you only edit header.php once, and it updates every article on your site instantly.
* SEO: Claude will be forced to think about the meta description and title for every new page it creates.
* Automation: You can now tell Claude: “Write a 500-word article about ‘Benefits of VPS for AI’ using my template,” and it will handle the PHP variables and file creation perfectly.
Would you like me to generate a simple CSS stylesheet (style.css) to give these articles a clean, professional look?
To complement your PHP template, this CSS focus is on readability and SEO. It’s designed to look professional for informational articles while being lightweight enough for a fast-loading VPS-hosted site.
Save this file as assets/style.css:
/* Minimalist Professional Article Styles */
:root {
–primary-color: #2d3436;
–accent-color: #0984e3;
–text-color: #2d3436;
–bg-color: #ffffff;
–font-main: ‘Segoe UI’, Roboto, Helvetica, Arial, sans-serif;
–line-height: 1.75;
}
* {
box-sizing: border-box;
}
body {
font-family: var(–font-main);
color: var(–text-color);
background-color: var(–bg-color);
line-height: var(–line-height);
margin: 0;
padding: 0;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 2rem 1.5rem;
}
/* Navigation */
nav {
border-bottom: 1px solid #eee;
padding: 1rem 0;
margin-bottom: 2rem;
}
nav a {
text-decoration: none;
color: var(–accent-color);
font-weight: 600;
}
/* Article Styling */
.article-header {
margin-bottom: 3rem;
}
h1 {
font-size: 2.5rem;
line-height: 1.2;
margin-bottom: 0.5rem;
}
.publish-date {
color: #636e72;
font-style: italic;
font-size: 0.9rem;
}
.body-copy p {
margin-bottom: 1.5rem;
font-size: 1.15rem;
}
.body-copy h2 {
margin-top: 2.5rem;
border-left: 4px solid var(–accent-color);
padding-left: 1rem;
}
/* Responsive Images */
img {
max-width: 100%;
height: auto;
border-radius: 8px;
}
/* Footer */
footer {
margin-top: 5rem;
padding: 2rem 0;
border-top: 1px solid #eee;
text-align: center;
color: #636e72;
font-size: 0.9rem;
}
Design Philosophy for Your AI Agent
* Typography: The font stack prioritizes system fonts so the page loads instantly (important for SEO) but stays clean and readable for long-form articles.
* Mobile Ready: The .container uses a max-width and padding to ensure it looks great on iPhones or desktops without extra media queries.
* The “Claude” Factor: By having specific styles for h2 (the blue border), Claude can now “visualize” how to structure the articles it writes for you by breaking them into clear sections.
Final Pro-Tip for your VPS
Since you are on a VPS, you can install tidy (a command-line tool) and tell Claude in your CLAUDE.md:
> “After generating HTML, run tidy -m -i file.php to clean up the indentation.”
>
This keeps your source code as clean as the front-end design.
Would you like me to help you set up an automated Sitemap generator script so Google finds every new article Claude writes?
Yes
Since you’re already using a VPS and your workflow involves creating individual PHP/HTML files, the best way to manage your sitemap is a “Scan-and-Generate” script.
This script will scan your directory, find all your .php files, and build a fresh sitemap.xml automatically.
1. The Sitemap Generator (generate-sitemap.php)
Place this file in your website’s root directory. It is designed to be run from the command line by your cron job.
<?php
// Configuration
$baseUrl = “https://yourdomain.com/”; // Change this to your actual domain
$baseDir = __DIR__; // Scans the current directory
$outputFile = $baseDir . “/sitemap.xml”;
$excludedFiles = [‘generate-sitemap.php’, ‘config.php’]; // Files to ignore
$files = scandir($baseDir);
$xml = new SimpleXMLElement(‘<?xml version=”1.0″ encoding=”UTF-8″?><urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″></urlset>’);
foreach ($files as $file) {
// Only process .php and .html files, excluding hidden files and your list
if (preg_match(‘/\.(php|html)$/’, $file) && !in_array($file, $excludedFiles) && $file[0] !== ‘.’) {
$url = $xml->addChild(‘url’);
$url->addChild(‘loc’, $baseUrl . $file);
$url->addChild(‘lastmod’, date(“Y-m-d”, filemtime($baseDir . ‘/’ . $file)));
$url->addChild(‘changefreq’, ‘daily’);
$url->addChild(‘priority’, ‘0.8’);
}
}
// Save the XML file
$xml->asXML($outputFile);
echo “Sitemap generated successfully at $outputFile\n”;
// NOTE: Google deprecated the ‘ping’ endpoint in late 2023.
// The most reliable way to notify them now is ensuring sitemap.xml
// is listed in your robots.txt.
?>
2. Automate it with Cron
You don’t want to run this manually every time Claude writes an article. Set your VPS to run it every night at midnight.
* Open your crontab: crontab -e
* Add this line at the bottom:
0 0 * * * /usr/bin/php /home/nathan/projects/generate-sitemap.php > /dev/null 2>&1
3. Update your robots.txt
Since Google no longer supports “pinging” the sitemap via a URL, they now rely heavily on finding the sitemap link in your robots.txt file. Make sure your robots.txt (in the root folder) contains this line:
Sitemap: https://yourdomain.com/sitemap.xml
4. Update your CLAUDE.md
Add this to your “Workflow” section so the agent can trigger an update if you’re in a hurry:
> Sitemap Update:
> If I ask to update the sitemap, run php generate-sitemap.php.
>
Why this is perfect for your setup:
* Zero Manual Effort: Every new article Claude creates today will be in your Google index by tomorrow morning.
* Accurate Data: It uses filemtime(), so Google sees exactly when you last edited an article.
* Scalable: Whether you have 10 pages or 1,000, the script stays fast and lightweight.
Since you are creating original informational content and articles, you’ll want to ensure that while your own AI agent (Claude) can work on your site, other companies aren’t “leeching” your content to train their future models without your permission.
Create a file named robots.txt in your web root directory and paste this configuration:
User-agent: * means these rules apply to all bots (Google, Bing, etc.)
User-agent: *
Allow: /
Disallow: /includes/
Disallow: /config.php
Disallow: /generate-sitemap.php
Block AI scrapers from using your articles for training data
User-agent: GPTBot
Disallow: /
User-agent: ChatGPT-User
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: Anthropic-ai
Disallow: /
User-agent: Claude-Web
Disallow: /
User-agent: Google-Extended
Disallow: /
Point all bots to your sitemap
Sitemap: https://yourdomain.com/sitemap.xml
Key Highlights of this Configuration
- Security: It explicitly hides your /includes/ folder (where your PHP partials live) and your sitemap generator script from search results.
- AI Protection: It blocks the major crawlers used for LLM training data, including OpenAI’s GPTBot, Common Crawl’s CCBot, and Google’s Google-Extended.
- Clarification on Claude: Note that Anthropic-ai and Claude-Web are blocked here. This will not stop your local “Claude Code” agent from working on your VPS, as your local agent uses the API and direct file access. This only blocks Anthropic’s public web crawler from scraping your site for its general knowledge base.
- SEO: By keeping User-agent: * at the top with Allow: /, you ensure Google and Bing continue to index your articles and show them in search results.
Pro-Tip for Your Workflow
If you ever want to allow a specific AI to see your site (for example, if you want ChatGPT to be able to browse your site to answer questions about it), just remove the GPTBot and ChatGPT-User lines.
Your AI Content Engine is Ready
You now have a complete, professional ecosystem on your VPS: - The Engine: Claude Code/OpenClaw running 24/7.
- The Framework: Modular PHP templates and clean CSS.
- The Management: Automated sitemaps and GitHub sync.
- The Governance: CLAUDE.md for instructions and robots.txt for crawler control.
Leave a Reply