You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ae91e63
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: skills/audit-hosting/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Tell the user the size (plans, websites, WordPress installs) before the checks.
30
30
Per Shared and Cloud website (skip `builder` and `horizons`):
31
31
32
32
-`hosting_ssl_status` — flag `failed` (with `last_error`), `expired`, `not_installed` on a custom domain, `is_https_redirect_enabled: false`, and `expires_at` within 30 days when `is_lifetime` is false. Lifetime certificates renew on their own.
33
-
- Node.js sites: `hosting_nodejs_list-builds` with `per_page: 1` (latest build failed?) and `hosting_nodejs_list-vulnerabilities` with `severities: ["critical", "high"]`.
33
+
- Node.js sites: `hosting_get-deployment` (latest build failed? `build.state`; on the hosted server use `hosting_nodejs_list-builds` with `per_page: 1`) and `hosting_nodejs_list-vulnerabilities` with `severities: ["critical", "high"]`.
34
34
35
35
Per hosting account (`username`): `hosting_databases_list` — flag `disk_usage_mb` above 80% of `max_size_mb`.
Copy file name to clipboardExpand all lines: skills/deploy-to-hosting/SKILL.md
+32-15Lines changed: 32 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,27 +24,30 @@ Ship a project that already exists — on disk or in a Git repository — to a H
24
24
25
25
## 2. Choose the deploy
26
26
27
-
Wrong method is the most common failure. Decide from the project on disk:
27
+
**Shared and Cloud, on the local `hostinger-api-mcp` server:** one operation does every deploy — `hosting_deploy` with `domain` and either `path` (a directory on this machine) or `git: { repository: "owner/name", branch }`. Given a directory it detects what the project is, packs it itself (it skips `node_modules`, `.git` and `.env` files, listing the `.env` ones as `skippedFiles` so you can set their values with `hosting_nodejs_replace-environment-variables`; it does not read `.gitignore`, so keep build output out of the directory) and does the upload, build and Git setup. Do not archive the directory or call upload and build operations by hand.
28
28
29
-
| Project |Shared / Cloud|
29
+
| Project |`hosting_deploy` treats it as|
30
30
| --- | --- |
31
-
| Plain HTML/CSS/JS, or a framework's static build output |`hosting_deploy-static-website`|
32
-
|`package.json` with a build or a server (Next.js, Nuxt, Express, Vite…) |`hosting_deploy-js-application`|
33
-
| PHP code, no build step |`hosting_deploy-static-website` (extracts the archive as-is)|
| A whole WordPress site from elsewhere | the `migrate-to-hosting` skill |
31
+
| Plain HTML/CSS/JS, or a framework's static build output |`static` — extracts as-is|
32
+
|`package.json` with a build script, a start script or a server dependency (Next.js, Nuxt, Express, Vite…) |`nodejs` — starts a build, returns `buildUuid`|
33
+
| PHP code, no build step |`static`|
34
+
| WordPress plugin folder (a `Plugin Name:` header) or theme folder (`Theme Name:` in `style.css`) |`wordpress-plugin` / `wordpress-theme`; `activate: true` activates a theme|
35
+
| A whole WordPress site from elsewhere |`wordpress-site`, with `databaseDump` — see the `migrate-to-hosting` skill |
36
36
37
-
On Agency the website's type decides (`agency-hosting_websites_get`): sites created as `node-static` take `agency-hosting_deploy-node-static-website`, which runs the build when the project has one; every other site takes `agency-hosting_deploy-php-application`, which extracts the archive as-is. WordPress plugins and themes on Agency sites are installed from wp-admin.
37
+
- Pass `type` to override detection. It is required for an archive (an archive cannot be inspected) and when a directory matches more than one WordPress type, which `hosting_deploy` rejects as ambiguous.
38
+
- Node.js build settings come from the project; detection covers the framework and the build script. Set `appType`, `outputDirectory`, `buildScript`, `entryFile`, `nodeVersion` (default 22), `rootDirectory` or `packageManager` when it is wrong. A TypeScript or other compiled server app always needs `entryFile` set to the built file (for example `dist/server.js`): detection only guesses a root-level file, and the build fails with "Entry file not found". The entry file is relative to the root directory for express, fastify, hono, react-router and other, and to the output directory for nest, nuxt, nitro, astro and svelte-kit (`main.js`, not `dist/main.js`); Next.js ignores it. Per-framework values are in the Hostinger docs under Node.js (Supported Frameworks, Build Settings).
39
+
- Static, PHP, plugin and theme deploys are live when the call returns. A WordPress site import only starts (`status: import_started`) and finishes extracting a few minutes later; do not report it complete or verify it before then. Node.js builds run on the server: see step 3.
**Agency:** the website's type decides (`agency-hosting_websites_get`): sites created as `node-static` take `agency-hosting_deploy-node-static-website`, which runs the build when the project has one; every other site takes `agency-hosting_deploy-php-application`, which extracts the archive as-is. They deploy archives, synchronously: the site is live when the call returns. WordPress plugins and themes on Agency sites are installed from wp-admin.
42
+
43
+
Archive rules for Agency (name archives `name_YYYYMMDD_HHMMSS.zip`) and for archives you build yourself:
40
44
41
45
-**Static:** build locally first. `index.html` must be at the archive root, not inside a folder: `cd dist && zip -r ../site_20260101_120000.zip .`
42
46
-**Node.js source:** no `node_modules/`, no build output (`dist/`, `.next/`, `build/`), no `.env*`, nothing matched by `.gitignore`; 50 MB at most. `git archive --format=zip -o app_20260101_120000.zip HEAD` produces exactly the committed files — mention that uncommitted changes are left out.
43
-
- Agency deploys are synchronous: the site is live when the call returns.
44
47
45
-
The operations in the table read the archive from this machine, so only the local`hostinger-api-mcp` server has them. On the hosted server (`mcp.hostinger.com`) `search` does not find them — upload the files yourself as below.
48
+
`hosting_deploy` and the `agency-hosting_deploy-*` operations read files from this machine, so only the local server has them. On the hosted server (`mcp.hostinger.com`) `search` does not find them — upload the files yourself as below.
46
49
47
-
### Without the local deploy operations
50
+
### Without the local deploy operations (hosted server; on the local server only for Agency)
48
51
49
52
1. Get upload credentials: `hosting_files_generate-upload-url` (`username`, `domain`); Agency: `agency-hosting_files_generate-upload-url` (`website_uid`). Both return `url`, `auth_key` and `rest_auth_key`, which authenticate the upload instead of the API token.
50
53
2. Upload each file with TUS, where `DEST` is its path in the website's storage:
`hosting_deploy-js-application` uploads the archive to the document root, detects settings from `package.json` and starts a build. Track it with `hosting_nodejs_list-builds` and `hosting_nodejs_build` (by `uuid`), polling every 10–20 s — builds take minutes.
75
+
`hosting_deploy` returns a `buildUuid` at once; the build runs on the server and takes minutes. Track it with `hosting_get-deployment` (`domain`, optionally `buildUuid`; the latest build by default), polling every 10–20 s until `build.state` is `completed` or `failed`. It returns the build, its log and the stored build settings; pass the previous `logs.lines` as `fromLine` to read only new output.
76
+
77
+
- Failed build: the response already carries `analysis` (fetched once per build; the API allows 5 a minute).
78
+
- Wrong detection (framework, `output_directory`, or an entry file inside the build output, such as `dist/server.js` for a compiled app): deploy again with `appType`, `outputDirectory`, `buildScript` or `entryFile` set. An archive deploy sends its settings with the request and leaves the stored ones alone; a Git deploy also stores these values, so later pushes build with them.
79
+
80
+
On the hosted server, which has no `hosting_deploy` or `hosting_get-deployment`:
73
81
82
+
- After the upload steps below, start the build and track it with `hosting_nodejs_list-builds` and `hosting_nodejs_build` (by `uuid`), polling every 10–20 s.
74
83
- Failed build: `hosting_nodejs_analyse-failed-build` once per build (5 calls a minute), then `hosting_nodejs_build-logs` if the analysis is empty.
75
-
- Wrong detection (framework, `output_directory`, or a missing `entry_file` for express, fastify, nest, nuxt and hono): run `hosting_nodejs_start-build` with explicit values, `source_type: "archive"` and `source_options.archive_path` set to the archive's file name in the document root (check it is there with `hosting_files_list-website-and-directories`). Store the same values with `hosting_nodejs_update-build-settings`.
84
+
- Wrong detection: run `hosting_nodejs_start-build` with explicit values, `source_type: "archive"` and `source_options.archive_path` set to the archive's file name in the document root (check it is there with `hosting_files_list-website-and-directories`). Store the same values with `hosting_nodejs_update-build-settings`.
76
85
- To review detected settings before any build: upload the archive with `hosting_files_generate-upload-url` (the TUS steps are in its description), then `hosting_nodejs_build-settings-from-archive`.
77
86
78
87
## 4. Auto-deploy from Git
79
88
80
-
1.`hosting_git_list-installations`. With no `active` installation (check `status: "pending"` and `"suspended"` too), the user connects GitHub or GitLab once in hPanel under Websites → Manage → Advanced → Git; there is no API for that step.
89
+
On the local server, `hosting_deploy` with `git: { repository: "owner/name", branch }` does all of it: it finds the Git installation that can reach the repository and deploys it as the `type` you give. Always pass `type: "static"` or `"nodejs"` unless the site already runs a Node.js app (or you pass Node.js settings such as `appType`): a new site is not detected as Node.js, and a Node.js repository deployed as static would publish its source. Then:
90
+
-**PHP and static sites:** saves the auto-deployment settings, which deploys the branch immediately and again on every push;
91
+
-**Node.js sites:** starts a build of the branch with the stored build settings; later pushes build the same way. A Git deploy has nothing to detect from, so when none are stored pass `appType` and `nodeVersion` (from `engines` in `package.json`), plus `outputDirectory` and `buildScript` if the app has a build step; they are stored for those pushes.
92
+
93
+
With no active installation it stops and says so: the user connects GitHub or GitLab once in hPanel under Websites → Manage → Advanced → Git; there is no API for that step. Confirm with `hosting_get-deployment`, which returns the stored `gitAutoDeployment`.
94
+
95
+
On the hosted server, by hand:
96
+
97
+
1.`hosting_git_list-installations`. With no `active` installation (check `status: "pending"` and `"suspended"` too), the user connects GitHub or GitLab once in hPanel, as above.
81
98
2.`hosting_git_list-installation-repositories` with the installation `uuid` gives `owner`, `name` and `default_branch` (10 calls a minute).
82
99
3.`hosting_git_update-auto-deployment-settings` with `installation_uuid`, `owner`, `repository`, `branch` and optional `directory`.
83
100
- PHP and static sites deploy the branch immediately and again on every push.
Copy file name to clipboardExpand all lines: skills/hostinger-headless/references/DATABASE.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,8 +29,8 @@ Do not put the remote `host` into the deployed app — it has no grant for conne
29
29
| You called | Poll this until | Typical wait |
30
30
| --- | --- | --- |
31
31
|`hosting_websites_create`|`hosting_websites_list-setups` with the domain reports `status: completed`| up to a few minutes |
32
-
|`hosting_deploy-js-application`|`hosting_list-js-deployments` shows the build finished| minutes |
33
-
|`hosting_nodejs_start-build`|`hosting_nodejs_build` state is `completed` or `failed`| minutes |
32
+
|`hosting_deploy` of a Node.js app |`hosting_get-deployment` reports a `completed` or `failed` build| minutes |
33
+
|`hosting_nodejs_start-build`(hosted server, which has no `hosting_deploy`) |`hosting_nodejs_build` state is `completed` or `failed`| minutes |
34
34
|`wordpress_installations_install`, plugin/theme/core jobs |`wordpress_installations_list` lists the install | 1–2 minutes |
35
35
|`hosting_databases_repair`, `hosting_websites_delete`| nothing to poll — runs in the background | minutes |
36
36
|`agency-hosting_website-setups_create`|`agency-hosting_website-setups_status` with `setup_uuid` is `completed`| minutes |
@@ -39,7 +39,7 @@ Poll with backoff (a few seconds, then tens of seconds). A queued response is no
39
39
40
40
## 5. When the app is up but broken
41
41
42
-
- Build failed: `hosting_nodejs_build-logs` for the raw log, `hosting_nodejs_analyse-failed-build` for a diagnosis.
42
+
- Build failed: `hosting_get-deployment` returns the logs and a diagnosis together (hosted server: `hosting_nodejs_build-logs` for the raw log, `hosting_nodejs_analyse-failed-build` for a diagnosis).
43
43
- Build passed, app errors: `hosting_nodejs_runtime-logs` with a `period` such as `1h`; entries before `last_deployed_at` belong to the previous deploy.
44
44
-`Access denied for user 'x'@'::1'`: the app used `localhost` from Node.js — set `DB_HOST` to `127.0.0.1`.
45
45
- PHP limits (memory, upload size): `hosting_php_get`, then `hosting_php_update-options`.
0 commit comments