ElmsPark Guides
PageMotor · Hosting · AI Tools

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.

🤖 Runs in Claude Code 🔗 Official Hostinger MCP ⏱ One-time setup, then just ask
What this is: the Hostinger API is behind an official MCP (Model Context Protocol) server that Claude Code can talk to directly. You connect it once by pasting a JSON block into your CC config. After that, Claude Code can call the Hostinger API, read your server list, create VPSs, manage DNS records — without a browser, without copy-pasting credentials. The picture-by-picture manual guide shows every click if you prefer to do it yourself. This guide hands the whole thing to Claude Code.

▶ 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.

Use this guide with any AI assistant

Download it as a prompt file, paste it into Claude, ChatGPT, Gemini or any LLM, and it will walk you through every step interactively.

Download as LLM prompt
First time on a VPS? Start here.

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:

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.
  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:

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

1Go 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.

Hostinger hPanel showing the 'Connect your IDEs to Hostinger MCP' page with VS Code, Cursor, and Claude Code tabs
The MCP connection page in hPanel. There are tabs for each AI coding tool at the top.

2Choose 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:

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

Tip: if you use Hostinger for domains too, tick Domains as well. Claude Code will then be able to register new domains and point them at your VPS in one conversation.

3Generate 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.

The 'Generate an API token' button on the Hostinger MCP page
One button, one token. Give it a name that tells you what it is for.

4Copy 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.

The generated API token displayed with a copy button. The token is shown once only.
Copy the token immediately. The page is showing it for the last time. If you miss it, just regenerate a new one.
Missed it? If you accidentally refreshed, delete the old token and click Generate again. Tokens are cheap, security is not.

5Copy 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:

The MCP JSON config block shown by Hostinger, with a red callout pointing at the your-token-here placeholder and the instruction to replace every one with your real API token
The exact JSON config Hostinger generates for you. Copy the whole block or click the Copy button on the page.

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" }
  }
}

6Add 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.

Shortcut: if you prefer, open a CC session and type /mcp add hostinger-vps npx --package=hostinger-api-mcp@latest hostinger-vps-mcp (repeat for each server). CC adds it to the config for you.

7Ask 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:

Paste this into Claude Code (edit the domain and details)
Using the Hostinger MCP, provision a new VPS for me: - Plan: KVM 2 - Template: CloudPanel on Ubuntu 24.04 - Region: Manchester, UK (data_center_id 18) - Hostname: pagemotor-mysite - Inject my SSH key from ~/.ssh/id_ed25519.pub Once the VPS is running: 1. Read the IP address from the Hostinger API 2. Create a DNS A record pointing mysite.com at that IP (if my domain is at Hostinger, use the Hostinger DNS MCP; if it is at Cloudflare, I will add it manually) Then tell me the IP and confirm when DNS is set.
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
18Manchester, UKIreland, UK, Northern Europe
15Paris, FranceWestern Europe
19Frankfurt, GermanyCentral Europe
11Vilnius, LithuaniaEastern Europe / Baltic
24Boston 2, USAUS 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 14 GBhostingercom-vps-kvm1-usd-1m$9.99/mo
KVM 28 GBhostingercom-vps-kvm2-usd-1m$13.99/mo
KVM 416 GBhostingercom-vps-kvm4-usd-1m$25.99/mo
KVM 832 GBhostingercom-vps-kvm8-usd-1m$50.99/mo

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

Do not swap this template. Hostinger ships 1189, "Ubuntu 24.04 with Claude Code", as a separate image with no control panel on it. Every clpctl step below needs CloudPanel, so 1189 would break site creation, the database and the certificate. If you want Claude Code on the server itself, take 1096 and install the CLI afterwards. And do not trust the number: template IDs change, so ask Claude Code to list the available templates through the Hostinger MCP and pick "Ubuntu 24.04 with CloudPanel" by name before it creates anything.

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.

A word on billing: the VPS creation call charges your Hostinger account. Make sure you have a payment method on file. KVM 2 (8 GB, the recommended starting point for PageMotor) is $13.99/month at introductory pricing. Annual billing reduces that significantly.

8Let 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.

Second prompt — run after step 7 is confirmed
Good. Now SSH into [IP] as root using ~/.ssh/id_ed25519 and: 1. Create a PHP 8.3 site in CloudPanel for mysite.com (site user: mysite, generate a password) 2. Add a database: mysite-db / user mysite-user / strong random password 3. Upload the current PageMotor release zip from ~/Downloads to /tmp/pagemotor.zip on the server, then extract it into /home/mysite/htdocs/mysite.com/ 4. Write config.php with the database credentials (DB_HOST is 127.0.0.1, prefix pm_, error logs on) 5. Fix file ownership: chown -R mysite:www-data 6. Once DNS resolves, run: clpctl lets-encrypt:install:certificate --domainName=mysite.com 7. AFTER the certificate is installed, fix /.well-known/ in the site's vhost so PageMotor's OAuth discovery routes are reachable, or MCP sign-in will fail: bash provision-pagemotor.sh --fix-wellknown mysite.com 8. Add PageMotor's three nginx deny rules inside the server block of the site's vhost via CloudPanel (Sites > mysite.com > Vhost), then save: location ^~ /user-content/logs/ { deny all; } location ^~ /user-content/skills/ { deny all; } location ^~ /user-content/uploads/protected/ { deny all; } 9. Open https://mysite.com/admin/ FIRST (a brand-new install expects the admin to be its first visitor), then confirm the front page at https://mysite.com/ Use provision-pagemotor.sh if you need a reference for the exact commands.

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

⇓ Download provision-pagemotor.sh

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.

CloudPanel clpctl gotchas baked into the script:
  • 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.
  • 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.

9Verify 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.

You are done when: the EP Host Check plugin reports green on a Hostinger VPS, which means PageMotor can write its compiled CSS to disk. That is the thing that breaks on cheap shared hosting, and the whole reason this setup exists.

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 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.

Keeping your PageMotor VPS healthy covers the routine in full, and includes a ready-made Claude Code prompt that turns on automatic security patching, runs the monthly checks, and proves your site still loads afterwards. Read the maintenance guide.
Related guides: Picture-by-picture manual guide (34 screenshots, for people who prefer to click) · CloudPanel concept guide (why the panel approach fixes the hosting problem) · Same setup with Cursor