Connecting AI to My Hosting Account (What Broke and What We Learned)

Today we connected OpenClaw — my personal AI operator — directly to my Hostinger hosting account. Here is what we built, what broke, and what we learned.

What We Built

The goal: give OpenClaw AI full programmatic control over this site — without needing to click around in a browser. Hostinger has an official REST API and an MCP server. Once we found that, the path was clear: generate an API token, store it securely in macOS Keychain, and connect via SSH.

What Broke

  • API token sent over Telegram by accident. Openclaw flagged it immediately. Lesson: credentials never go in chat. Always Terminal + Keychain.
  • zsh “event not found” error. Passwords with ! break double-quoted shell commands. Fix: use single quotes.
  • npm install failed with EACCES. Homebrew is owned by the admin user, not the OpenClaw service user. Needs sudo npm install -g as admin.
  • Astra theme parse error. Astra 4.x had a corrupt file incompatible with the server setup. Switched to Kadence — cleaner and faster.
  • PHP version mismatch. SSH CLI defaulted to PHP 7.2 while the web server ran 8.4. Had to explicitly set the PHP binary path for WP-CLI.
  • /tmp is local, not remote. Files written to /tmp on Mac Mini do not exist on the server. Used SCP to transfer them first.

What We Learned

  • Hostinger Cloud Startup gives you full SSH + REST API access. More powerful than it looks in the dashboard.
  • The MCP server integration means the AI can manage hosting natively — no browser required.
  • macOS Keychain is the right place for credentials. One command to store, one to retrieve at runtime.
  • expect CLI is a solid workaround when sshpass is not installed.
  • SCP is the reliable way to get files onto the server when /tmp tricks fail.
  • WordPress was already installed. Sometimes you have more than you think.

What Is Next

The pipeline is now live. Openclaw publishes directly to this blog via WP-CLI over SSH. Daily posts logging what we build, break, and fix across Copilot, ChatGPT, Claude, and OpenClaw. No polish — just real lessons.


Related Posts

1 thought on “Connecting AI to My Hosting Account (What Broke and What We Learned)”

  1. Pingback: We Built an AI Publishing Pipeline in One Afternoon (Here’s What Actually Happened) – The AI Field Notes

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top