# PageMotor on Hostinger with Claude Code — LLM Prompt

> **How to use this file:** Paste the entire contents into Claude, ChatGPT, Gemini, or any LLM as your opening message. It gives the model the whole guide, so it can walk you through it, ask where you have got to, and help when something does not behave.
>
> *Source: [https://documentation.elmspark.com/guides/pagemotor-hostinger-api/](https://documentation.elmspark.com/guides/pagemotor-hostinger-api/)*

---

You are helping me with the following. Use this guide as your reference. Work through it with me, ask what I have already done, and help me troubleshoot. Where a step changes something on a live site, a domain, or a server, tell me what it will do and wait for me to confirm before we go on. If something here contradicts what I am actually seeing, say so rather than guessing.

**What this covers:** Hostinger has a native MCP server for Claude Code. Connect it once, then ask Claude Code to provision a PageMotor VPS — it handles the API calls, DNS, and on-box setup without you leaving your editor.

# PageMotor on Hostinger with Claude Code

Hostinger has a native MCP server for Claude Code. Give it access to your account once, then tell it what you want. It provisions the VPS, sets the DNS record, and deploys PageMotor — without you leaving your editor.

▶ The whole route in 4 minutes 23 seconds, narrated, with captions — including the template whose name makes it look right and which quietly breaks everything afterwards.

**Read the narration instead**

**The shape of it.** Hostinger has a native MCP server. Give it access once, then tell it what you want: it provisions the VPS, sets the DNS record and deploys PageMotor, without you leaving your editor.

**First time on a VPS?** Three things do three different jobs. Claude Desktop, the chat app, cannot reach your server at all. CloudPanel is your control panel — a web page for sites, databases and SSL, point and click, not where you type commands. And a terminal is a text window connected to the server itself, which is where any command actually runs. Claude *Code* can reach the server once connected.

**hPanel › API.** In the left sidebar under Dev tools — a page Hostinger built for AI coding tools. Click the Claude Code tab and tick the categories you need: **VPS hosting** creates and manages servers, **Domains and DNS** sets the A record. The rest are optional, and fewer tools means a leaner config.

**The token appears once.** Generate it, name it something recognisable, and copy it before the page refreshes — Hostinger will not show it again. Missed it? Delete the old one and generate another. Tokens are cheap; security is not.

**Paste the config.** The page shows a ready-made JSON block for the tools you picked. Replace every placeholder with your token, then put the `mcpServers` block into `~/.claude/config.json`, creating the file if it does not exist.

**Then you just ask.** One brief covers the whole job: the plan, the CloudPanel template, the region, a hostname and your SSH public key. Then read the IP back from the API and create the DNS A record pointing your domain at it. Regions work by name or by ID.

**The trap on this page.** Hostinger ships a separate image named for Claude Code, and it sounds like exactly what you want. It has *no control panel on it*, so site creation, the database and the certificate all break afterwards. Take the CloudPanel template and add the CLI later if you want it. And do not trust the ID number — template IDs change, so have it list the templates and pick by *name* first.

**What it actually sends.** Your brief becomes one API call carrying a template id, a data centre id, the hostname and your public key. The `item_id` in it is a billing price ID rather than just the plan name, and its suffix picks the billing period — monthly, annual or two-year, the longer ones cheaper per month.

**Let it finish on the box.** Provisioning gets you a running server; the on-box setup — site, database, certificate and PageMotor itself — is the second half, and the guide has the script.

**Then prove it.** Install EP Host Check and read its report. It inspects the finished box and tells you what it can and cannot do, each with a plain fix, rather than you assuming the provisioning worked.

A VPS is a real computer that you control, and a few steps below ask you to run a command "on the server". Here is what that means, because it trips up nearly everyone the first time.

**Three things, three different jobs:**

- **Claude Desktop (the chat app)** is for asking questions. On its own it cannot reach your server. Claude *Code* can, once it is connected, which is exactly what this guide sets up.
- **CloudPanel** is your control panel: a web page for managing sites, databases and SSL. Point and click. It is not where you type server commands.
- **A terminal** is a plain text window connected to the server itself. This is where any command in this guide actually runs.

So when you see a line like `chown -R ...`, it runs in a **terminal on the VPS**. Not in Claude, not in CloudPanel.

**Two ways to open a terminal on your VPS:**

1. **Browser terminal (easiest).** In hPanel, open your VPS and click the **Terminal** button in the overview. A terminal opens in your browser, already logged in to your server. Paste your command and press Enter. Hostinger has a step-by-step with screenshots: [How to use the Hostinger VPS Browser terminal](https://www.hostinger.com/support/7978544-how-to-use-the-browser-terminal-in-hostinger/).
2. **SSH from your own computer.** Open Terminal on a Mac, or PowerShell on Windows, and type `ssh root@YOUR-VPS-IP`. Your IP is on the Hostinger VPS page. Enter the root password when prompted. **Note:** as you type the password nothing appears on screen, no dots or stars. That is normal, just type it and press Enter.

**The details you swap into commands:**

- **VPS IP** and **root password**: on your Hostinger VPS dashboard.
- **Site User** and **site path**: in CloudPanel. The path is usually `/home/SITEUSER/htdocs/yourdomain.com`.

When you are finished, type `exit` to leave. That is the whole mystery solved. The rest of this guide is the easy part.

## 1 Go to the Hostinger API page

Log into hPanel and click **API** in the left sidebar (under Dev tools). You land on the page Hostinger have built specifically for AI coding tools.

## 2 Choose Claude Code and the tools you need

Click the **Claude Code** tab. Then tick the tool categories you want to use. For provisioning a PageMotor VPS you need at minimum:

- **VPS hosting** — creates and manages your servers
- **Domains and DNS** — sets the A record that points your domain at the new server

The others (Websites, Billing, Email Marketing) are useful but optional for this task. You can untick them for a leaner MCP config.

## 3 Generate your API token

Scroll down on the same page and click **Generate API token**. It creates a token instantly. Give it a name you will recognise, for example `hostinger-cc-api`.

## 4 Copy the token before the page refreshes

The token appears once. Hostinger will not show it again if you refresh or leave the page. Copy it now.

## 5 Copy the MCP JSON config

Scroll back up. The page shows a ready-made JSON block you copy straight into your Claude Code config. It looks like this:

Replace every `your-token-here` with the token you just copied. The full block, with your token in place, is what goes into Claude Code next.

```
"mcpServers": {
  "hostinger-hosting": {
    "command": "npx",
    "args": ["--package=hostinger-api-mcp@latest", "hostinger-hosting-mcp"],
    "env": { "HOSTINGER_API_TOKEN": "YOUR-TOKEN-HERE" }
  },
  "hostinger-domains": {
    "command": "npx",
    "args": ["--package=hostinger-api-mcp@latest", "hostinger-domains-mcp"],
    "env": { "HOSTINGER_API_TOKEN": "YOUR-TOKEN-HERE" }
  },
  "hostinger-dns": {
    "command": "npx",
    "args": ["--package=hostinger-api-mcp@latest", "hostinger-dns-mcp"],
    "env": { "HOSTINGER_API_TOKEN": "YOUR-TOKEN-HERE" }
  },
  "hostinger-vps": {
    "command": "npx",
    "args": ["--package=hostinger-api-mcp@latest", "hostinger-vps-mcp"],
    "env": { "HOSTINGER_API_TOKEN": "YOUR-TOKEN-HERE" }
  }
}
```

## 6 Add it to Claude Code

Open your Claude Code config file at `~/.claude/config.json` (create it if it does not exist). Paste the `mcpServers` block inside the top-level JSON object.

```
{
  "mcpServers": {
    /* paste the hostinger-hosting, hostinger-domains,  */
    /* hostinger-dns, and hostinger-vps blocks here     */
  }
}
```

If you already have other MCP servers in the file, just add the Hostinger entries inside the existing `mcpServers` object — do not create a second one.

After saving, restart Claude Code so it picks up the new servers. You can confirm they loaded by typing `/mcp` in a CC session — the Hostinger servers should appear in the list.

## 7 Ask Claude Code to provision the VPS

Open Claude Code and give it a clear brief. This is the whole prompt — the MCP handles the API calls behind it:

**Which region should I pick? (datacenter IDs)**

Specify by name or ID — the MCP understands both. IDs confirmed from the live API:

| ID | Location | Good for |
|---|---|---|
| `18` | Manchester, UK | Ireland, UK, Northern Europe |
| `15` | Paris, France | Western Europe |
| `19` | Frankfurt, Germany | Central Europe |
| `11` | Vilnius, Lithuania | Eastern Europe / Baltic |
| `24` | Boston 2, USA | US East Coast |

**What does Claude Code actually send to the Hostinger API?**

For the technically curious. The MCP translates your plain-English request into a call like this:

```
POST /api/vps/v1/virtual-machines
{
  "item_id": "hostingercom-vps-kvm2-usd-1m",   // KVM 2, billed monthly
  "setup": {
    "template_id": 1096,               // Ubuntu 24.04 with CloudPanel
    "data_center_id": 18,             // Manchester, UK
    "hostname": "pagemotor-mysite",
    "public_key": "ssh-ed25519 ..."   // from ~/.ssh/id_ed25519.pub
  }
}
```

The `item_id` is the billing price ID, not just the plan name. Monthly and annual differ by suffix:

| Plan | RAM | Monthly price ID | Intro price |
|---|---|---|---|
| KVM 1 | 4 GB | `hostingercom-vps-kvm1-usd-1m` | $9.99/mo |
| KVM 2 | 8 GB | `hostingercom-vps-kvm2-usd-1m` | $13.99/mo |
| KVM 4 | 16 GB | `hostingercom-vps-kvm4-usd-1m` | $25.99/mo |
| KVM 8 | 32 GB | `hostingercom-vps-kvm8-usd-1m` | $50.99/mo |

Swap `-1m` for `-1y` or `-2y` for annual billing, which is cheaper per month.

Claude Code will use the `hostinger-vps` MCP to create the server and `hostinger-dns` to set the DNS record. Provisioning takes three to six minutes. CC polls the API and tells you when the VPS is running.

## 8 Let Claude Code finish the on-box setup

Once you have the IP and DNS is set, give CC the second brief. It will SSH in and use CloudPanel’s CLI to create the site, database, and SSL certificate, then deploy PageMotor.

Download the ready-made on-box script and drop it in your project folder so Claude Code can reference it:

You do not need to run the script yourself. Give Claude Code the file and the prompt above — it reads the script, adapts the commands to your site, and runs them over SSH.

- Database names and users use **hyphens, not underscores** (CloudPanel rejects underscores).
- PHP version must be set to **8.3** — do not let it default to 8.5.
- PageMotor files go directly into the **site root**, not a subfolder, so no web root change is needed.
- SSL cert is requested *after* DNS resolves, not before — the script handles the wait loop.
- CloudPanel's stock vhost serves `/.well-known/` from disk, which swallows PageMotor's OAuth discovery routes and breaks MCP sign-in. The script rewrites the site's own vhost *after* the certificate step (installing a certificate re-renders it), keeping `acme-challenge` served from disk so renewal still works. Already built a site without this? Run `bash provision-pagemotor.sh --fix-wellknown mysite.com`. Background: [troubleshooting section 6d](https://documentation.elmspark.com/guides/pagemotor-mcp-troubleshooting/#hosting).
- nginx ignores PageMotor's `.htaccess` directory protection, so the deny rules in the prompt's step 8 are load-bearing, not optional. PageMotor probes for them itself and raises an admin warning if they are missing. Details, and why this bites hardest on migrations: Migrating an existing site onto this VPS? below.

## 9 Verify with EP Host Check

Visit `https://mysite.com/admin/` and register your PageMotor admin account. Then install the **EP Host Check** plugin (available on the EP Suite updates channel) and run it.

You are looking for all 17 checks green (v1.2.0 added a five-check *MCP / Claude connection* group, which is exactly what this guide cares about), especially *PHP can save PageMotor’s files*. That one goes red on a locked-down shared host — it should be green here because you are on a proper VPS with correct file ownership.

## Migrating an existing site onto this VPS?

A fresh install can skip this section. If you are moving an existing PageMotor site here from another host, two things break silently on the way in. Both come from a real migration reported on the PageMotor developers forum, so this is field experience, not theory.

**1. Apache protection does not follow you to nginx.** PageMotor guards its sensitive directories (error logs, Skill state, and protected uploads including Brain files) with per-directory `.htaccess` files, which is automatic on Apache and LiteSpeed. CloudPanel serves your site with nginx, and nginx ignores `.htaccess` entirely. So the moment nginx starts serving a migrated site those directories are publicly readable over the web, and nothing looks broken. Current PageMotor releases probe for this themselves and raise an admin warning with the exact paths for your install. The fix is three rules. In CloudPanel open **Sites → your site → Vhost**, add these inside the `server { }` block, and save:

```
location ^~ /user-content/logs/              { deny all; }
location ^~ /user-content/skills/            { deny all; }
location ^~ /user-content/uploads/protected/ { deny all; }
```

Always edit the vhost through the CloudPanel page, not the file on disk: the panel regenerates that file, and panel edits are what survive. To confirm the rules are live, request `https://yourdomain.com/user-content/logs/` in a browser. You want a 403, not a log file.

**2. Zip extraction can strip the write bits.** If you carry the site over as a zip and extract it on the server, directories can come out as `555` (read and execute, no write) depending on what built the zip. Ownership then looks perfect, every file belongs to the site user, but PHP cannot write anywhere, and the first symptom is usually a plugin install failing with “staging directory could not be created”. The scripted provision on this page sets the permission bits explicitly, so a from-scratch build never hits this; a hand-carried zip is the case it cannot see. The fix is one pass in a server terminal:

```
cd /home/SITEUSER/htdocs/yourdomain.com
chown -R SITEUSER:www-data .
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
```

## No Claude Code? There is still an AI path

This guide assumes Claude Code or Cursor, but the same job has been done end to end from plain browser chat at claude.ai, reported working on the forum. The recipe: connect your PageMotor site’s own MCP connector to the chat (the [manual guide](https://documentation.elmspark.com/guides/pagemotor-hostinger/#claude) shows how), and when a step needs a real shell, open the browser terminal from your hPanel VPS overview, which is a root shell with no SSH keys to set up. You type the commands the AI gives you and paste the output back for it to read. Slower than the MCP setup on this page, where the two tools talk directly, but it reaches the same finish line: run EP Host Check at the end and look for green.

## Who looks after this server?

**You do.** Hostinger sell a self-managed VPS, and say so plainly on their own VPS page: *“As our VPS solutions are self-managed, you will get full freedom to configure and manage the virtual server.”*

Hostinger looks after the hardware, the network, DDoS filtering at the edge, and whatever backups your plan includes. Everything from Ubuntu upwards is yours: security patches, your control panel, PHP, the database, your TLS certificate, and PageMotor itself.

That is not a catch. It is the same freedom that makes a VPS fix the problems shared hosting gives PageMotor. But nobody emails you when a patch is published, and a server left alone for a year is running a year of known, catalogued, publicly indexed vulnerabilities. Budget about fifteen minutes a month.

---

*Generated from the guide above. If something here looks wrong, the guide is the source of truth: https://documentation.elmspark.com/guides/pagemotor-hostinger-api/*
