@hostinger/mcp 3.1.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/README.md +47 -301
- package/gemini-extension.json +1 -1
- package/package.json +2 -1
- package/server.json +2 -2
- package/skills/audit-hosting/SKILL.md +1 -1
- package/skills/deploy-to-hosting/SKILL.md +32 -15
- package/skills/headless/references/DATABASE.md +3 -3
- package/skills/headless/references/DEPLOYMENT.md +10 -12
- package/skills/migrate-to-hosting/SKILL.md +3 -3
- package/skills/troubleshoot-website/SKILL.md +2 -2
- package/src/core/catalog.js +4 -0
- package/src/core/catalog.ts +6 -1
- package/src/core/instructions.agency-hosting.js +2 -0
- package/src/core/instructions.agency-hosting.ts +3 -0
- package/src/core/instructions.js +1 -1
- package/src/core/instructions.ts +1 -1
- package/src/core/runtime.js +1925 -1228
- package/src/core/runtime.ts +1891 -1193
- package/src/core/skills.js +18 -18
- package/src/core/skills.ts +18 -18
- package/src/core/tools/agency-hosting.ts +2 -0
- package/src/core/tools/agent-readiness.ts +2 -0
- package/src/core/tools/all.js +223 -30
- package/src/core/tools/all.ts +225 -30
- package/src/core/tools/billing.ts +2 -0
- package/src/core/tools/dns.ts +2 -0
- package/src/core/tools/domains.ts +2 -0
- package/src/core/tools/ecommerce.ts +2 -0
- package/src/core/tools/horizons.ts +2 -0
- package/src/core/tools/hosting.js +207 -25
- package/src/core/tools/hosting.ts +209 -25
- package/src/core/tools/mail.ts +2 -0
- package/src/core/tools/reach.ts +2 -0
- package/src/core/tools/vps.ts +2 -0
- package/src/core/tools/wordpress.js +10 -2
- package/src/core/tools/wordpress.ts +12 -2
- package/src/servers/agency-hosting.js +2 -2
- package/src/servers/agency-hosting.ts +2 -2
- package/src/servers/agent-readiness.js +1 -1
- package/src/servers/agent-readiness.ts +1 -1
- package/src/servers/all.js +1 -1
- package/src/servers/all.ts +1 -1
- package/src/servers/billing.js +1 -1
- package/src/servers/billing.ts +1 -1
- package/src/servers/dns.js +1 -1
- package/src/servers/dns.ts +1 -1
- package/src/servers/domains.js +1 -1
- package/src/servers/domains.ts +1 -1
- package/src/servers/ecommerce.js +1 -1
- package/src/servers/ecommerce.ts +1 -1
- package/src/servers/horizons.js +1 -1
- package/src/servers/horizons.ts +1 -1
- package/src/servers/hosting.js +1 -1
- package/src/servers/hosting.ts +1 -1
- package/src/servers/mail.js +1 -1
- package/src/servers/mail.ts +1 -1
- package/src/servers/reach.js +1 -1
- package/src/servers/reach.ts +1 -1
- package/src/servers/vps.js +1 -1
- package/src/servers/vps.ts +1 -1
- package/src/servers/wordpress.js +1 -1
- package/src/servers/wordpress.ts +1 -1
- package/types.d.ts +131 -22
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,39 @@ Generated at release time from the diff between the previous and current
|
|
|
4
4
|
build. Tool changes are listed individually; everything else is summarised
|
|
5
5
|
by area.
|
|
6
6
|
|
|
7
|
+
## v3.2.1 — 2026-10-19
|
|
8
|
+
|
|
9
|
+
### Operations
|
|
10
|
+
|
|
11
|
+
- Changed the description of `hosting_websites_list-setups`
|
|
12
|
+
- Changed the description and input schema of `hosting_websites_start-setup`
|
|
13
|
+
- Changed the description and input schema of `wordpress_installations_install`
|
|
14
|
+
|
|
15
|
+
### Also in this release
|
|
16
|
+
|
|
17
|
+
- Documentation: `README.md`
|
|
18
|
+
- Request handling and authentication: `src/core/runtime.js`, `src/core/runtime.ts`
|
|
19
|
+
- Build and packaging: `types.d.ts`
|
|
20
|
+
|
|
21
|
+
## v3.2.0 — 2026-10-19
|
|
22
|
+
|
|
23
|
+
### Operations
|
|
24
|
+
|
|
25
|
+
- Added `hosting_deploy` — Deploy website, nodejs app, WordPress plugin or theme
|
|
26
|
+
- Added `hosting_get-deployment` — Get deployment status, build status, build logs and failure analysis
|
|
27
|
+
- Hid 24 operations from search (they still run through `execute`): `hosting_import-wordpress-website`, `hosting_deploy-wordpress-plugin`, `hosting_deploy-wordpress-theme`, `hosting_deploy-js-application`, `hosting_deploy-static-website`, `hosting_list-js-deployments`, `hosting_show-js-deployment-logs`, `hosting_files_generate-upload-url`, `hosting_git_auto-deployment-settings`, `hosting_git_update-auto-deployment-settings`, `hosting_git_list-installations`, `hosting_git_list-installation-repositories`, `hosting_nodejs_list-builds`, `hosting_nodejs_start-build`, `hosting_nodejs_build-settings`, `hosting_nodejs_update-build-settings`, `hosting_nodejs_build-settings-from-archive`, `hosting_nodejs_analyse-failed-build`, `hosting_nodejs_build`, `hosting_nodejs_build-logs`, `hosting_websites_deploy-static-site-archive`, `wordpress_installations_import-website`, `wordpress_plugins_deploy`, `wordpress_themes_deploy`
|
|
28
|
+
|
|
29
|
+
### Also in this release
|
|
30
|
+
|
|
31
|
+
- Documentation: `README.md`
|
|
32
|
+
- Dependencies: `package-lock.json`, `package.json`
|
|
33
|
+
- Bundled agent skills: 6 files
|
|
34
|
+
- Request handling and authentication: 4 files
|
|
35
|
+
- Server instructions: 4 files
|
|
36
|
+
- Other files: `src/core/skills.js`, `src/core/skills.ts`
|
|
37
|
+
- Server entry points: `src/servers/agency-hosting.js`, `src/servers/agency-hosting.ts`
|
|
38
|
+
- Build and packaging: `types.d.ts`
|
|
39
|
+
|
|
7
40
|
## v3.1.0 — 2026-10-16
|
|
8
41
|
|
|
9
42
|
### Operations
|
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ pnpm update -g @hostinger/mcp
|
|
|
69
69
|
|
|
70
70
|
This package installs the following MCP server commands:
|
|
71
71
|
|
|
72
|
-
- `hostinger-api-mcp` — unified server over every operation (
|
|
72
|
+
- `hostinger-api-mcp` — unified server over every operation (399 total)
|
|
73
73
|
- `hostinger-agency-hosting-mcp` — 42 operations for agency-hosting
|
|
74
74
|
- `hostinger-agent-readiness-mcp` — 3 operations for agent-readiness
|
|
75
75
|
- `hostinger-billing-mcp` — 9 operations for billing
|
|
@@ -77,7 +77,7 @@ This package installs the following MCP server commands:
|
|
|
77
77
|
- `hostinger-domains-mcp` — 42 operations for domains
|
|
78
78
|
- `hostinger-ecommerce-mcp` — 29 operations for ecommerce
|
|
79
79
|
- `hostinger-horizons-mcp` — 6 operations for horizons
|
|
80
|
-
- `hostinger-hosting-mcp` —
|
|
80
|
+
- `hostinger-hosting-mcp` — 62 operations for hosting
|
|
81
81
|
- `hostinger-mail-mcp` — 38 operations for mail
|
|
82
82
|
- `hostinger-reach-mcp` — 56 operations for reach
|
|
83
83
|
- `hostinger-vps-mcp` — 67 operations for vps
|
|
@@ -229,7 +229,9 @@ Every server exposes three tools:
|
|
|
229
229
|
|
|
230
230
|
## Operations
|
|
231
231
|
|
|
232
|
-
The operations
|
|
232
|
+
The operations `search` offers, by binary:
|
|
233
|
+
|
|
234
|
+
Operations that newer tools replace are hidden from `search`, and not documented, in every binary that also offers the replacing tool. They keep working through `execute` until they are removed.
|
|
233
235
|
|
|
234
236
|
### `hostinger-agency-hosting-mcp`
|
|
235
237
|
|
|
@@ -1812,51 +1814,16 @@ interface in the provided website URL.
|
|
|
1812
1814
|
|
|
1813
1815
|
### `hostinger-hosting-mcp`
|
|
1814
1816
|
|
|
1815
|
-
####
|
|
1816
|
-
|
|
1817
|
-
Import a WordPress website from an archive file to a hosting server. This tool uploads a website archive (zip, tar, tar.gz, etc.) and a database dump (.sql file) to deploy a complete WordPress website. The archive will be extracted on the server automatically. Note: This process may take a while for larger sites. After upload completion, files are being extracted and the site will be available in a few minutes. Upload credentials are generated and used internally — do not call a separate upload-url endpoint or upload the files yourself, this tool does it end-to-end. The username will be automatically resolved from the domain.
|
|
1818
|
-
|
|
1819
|
-
- **Method**: `custom`
|
|
1820
|
-
- **Path**: `custom`
|
|
1821
|
-
|
|
1822
|
-
#### hosting_deploy-wordpress-plugin
|
|
1823
|
-
|
|
1824
|
-
Deploy a WordPress plugin from a directory to a hosting server. This tool uploads all plugin files and triggers plugin deployment. Upload credentials are generated and used internally — do not call a separate upload-url endpoint or upload the files yourself, this tool does it end-to-end.
|
|
1825
|
-
|
|
1826
|
-
- **Method**: `custom`
|
|
1827
|
-
- **Path**: `custom`
|
|
1828
|
-
|
|
1829
|
-
#### hosting_deploy-wordpress-theme
|
|
1830
|
-
|
|
1831
|
-
Deploy a WordPress theme from a directory to a hosting server. This tool uploads all theme files and triggers theme deployment. The uploaded theme can optionally be activated after deployment. Upload credentials are generated and used internally — do not call a separate upload-url endpoint or upload the files yourself, this tool does it end-to-end.
|
|
1832
|
-
|
|
1833
|
-
- **Method**: `custom`
|
|
1834
|
-
- **Path**: `custom`
|
|
1835
|
-
|
|
1836
|
-
#### hosting_deploy-js-application
|
|
1837
|
-
|
|
1838
|
-
Deploy a JavaScript application from an archive file to a hosting server. IMPORTANT: the archive must ONLY contain application source files, not the build output, skip node_modules directory; also exclude all files matched by .gitignore if the ignore file exists. The build process will be triggered automatically on the server after the archive is uploaded. Upload credentials are generated and used internally — do not call a separate upload-url endpoint or upload the archive yourself, this tool does it end-to-end. After deployment, use the hosting_list-js-deployments tool to check deployment status and track build progress.
|
|
1839
|
-
|
|
1840
|
-
- **Method**: `custom`
|
|
1841
|
-
- **Path**: `custom`
|
|
1842
|
-
|
|
1843
|
-
#### hosting_deploy-static-website
|
|
1817
|
+
#### hosting_deploy
|
|
1844
1818
|
|
|
1845
|
-
Deploy a static
|
|
1819
|
+
Deploy, publish or upload a website to Hostinger web hosting (Shared, Cloud): static HTML, PHP, a nodejs (Node.js) app, a whole WordPress site, or a WordPress plugin or theme, from a local directory, an archive or a GitHub or GitLab repository. It detects what the project is and does the upload, build and Git setup itself: do not call upload or build operations, and do not archive the directory yourself. WARNING: it overwrites the website's contents and cannot be undone; confirm the domain with the user before deploying to a site that already has content. A Node.js build runs on the server: this returns a buildUuid at once, then call hosting_get-deployment until the build state is completed or failed. Static, PHP, plugin and theme deploys are done when this returns; a WordPress site import only starts, and its files are extracted a few minutes later. From Git, pass type (static or nodejs) unless the site already runs a Node.js app or you pass Node.js settings; a static or PHP site deploys the branch now and again on every push; a Node.js site builds the branch now and on every later push, with the settings stored for the site (when none are stored, pass appType and nodeVersion from the project's engines, plus outputDirectory and buildScript if the app has a build step). Git needs GitHub or GitLab connected once in hPanel.
|
|
1846
1820
|
|
|
1847
1821
|
- **Method**: `custom`
|
|
1848
1822
|
- **Path**: `custom`
|
|
1849
1823
|
|
|
1850
|
-
####
|
|
1824
|
+
#### hosting_get-deployment
|
|
1851
1825
|
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
- **Method**: `custom`
|
|
1855
|
-
- **Path**: `custom`
|
|
1856
|
-
|
|
1857
|
-
#### hosting_show-js-deployment-logs
|
|
1858
|
-
|
|
1859
|
-
Retrieve logs for a specified JavaScript application deployment for debugging purposes in case of failure.
|
|
1826
|
+
Check deployment status, build status, build logs and why a build failed (failure analysis) for a website's nodejs (Node.js) deployment: the state of its latest build (or of buildUuid), the end of the build log, the failure analysis when the build failed, and the build settings and Git auto-deployment settings stored for the site. Use it after hosting_deploy starts a Node.js build, and to find out why a deployment failed. Poll until the build state is completed or failed, with growing pauses. The log comes back in full; pass fromLine (the lines count from the previous call) to read only new output. A website without Node.js builds returns build: null with an explanation, because static, PHP, plugin and theme deploys are complete when hosting_deploy returns, and a WordPress site import is ready a few minutes after it starts.
|
|
1860
1827
|
|
|
1861
1828
|
- **Method**: `custom`
|
|
1862
1829
|
- **Path**: `custom`
|
|
@@ -2135,53 +2102,6 @@ Skip this verification when using Hostinger's free subdomains (*.hostingersite.c
|
|
|
2135
2102
|
- **Method**: `POST`
|
|
2136
2103
|
- **Path**: `/api/hosting/v1/domains/verify-ownership`
|
|
2137
2104
|
|
|
2138
|
-
#### hosting_files_generate-upload-url
|
|
2139
|
-
|
|
2140
|
-
Generate a file browser upload URL with authentication credentials
|
|
2141
|
-
for uploading files directly to a website's file storage.
|
|
2142
|
-
|
|
2143
|
-
While the website is still being set up (`status: running` on the list website setups
|
|
2144
|
-
endpoint) this endpoint returns 409 with a `Retry-After` header: wait that many
|
|
2145
|
-
seconds and retry, or poll the website setups until the status is `completed`.
|
|
2146
|
-
|
|
2147
|
-
Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the
|
|
2148
|
-
website's `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0).
|
|
2149
|
-
Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request
|
|
2150
|
-
below.
|
|
2151
|
-
|
|
2152
|
-
1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers
|
|
2153
|
-
`upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`.
|
|
2154
|
-
2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or
|
|
2155
|
-
`PATCH` requests with an `upload-offset` header tracking progress) until complete.
|
|
2156
|
-
|
|
2157
|
-
`relative_file_path` is the destination path inside `public_html`, e.g. `app.zip`.
|
|
2158
|
-
|
|
2159
|
-
Instead of a TUS client, plain `curl` also works:
|
|
2160
|
-
```
|
|
2161
|
-
FILE=app.zip
|
|
2162
|
-
SIZE=$(stat -f%z "$FILE") # stat -c%s on Linux
|
|
2163
|
-
|
|
2164
|
-
curl -i -X POST "{url}/${FILE}?override=true" \
|
|
2165
|
-
-H "X-Auth: {auth_key}" \
|
|
2166
|
-
-H "X-Auth-Rest: {rest_auth_key}" \
|
|
2167
|
-
-H "Tus-Resumable: 1.0.0" \
|
|
2168
|
-
-H "Upload-Length: ${SIZE}" \
|
|
2169
|
-
-H "Upload-Offset: 0"
|
|
2170
|
-
# -> 201 Created
|
|
2171
|
-
|
|
2172
|
-
curl -i -X PATCH "{url}/${FILE}?override=true" \
|
|
2173
|
-
-H "X-Auth: {auth_key}" \
|
|
2174
|
-
-H "X-Auth-Rest: {rest_auth_key}" \
|
|
2175
|
-
-H "Tus-Resumable: 1.0.0" \
|
|
2176
|
-
-H "Content-Type: application/offset+octet-stream" \
|
|
2177
|
-
-H "Upload-Offset: 0" \
|
|
2178
|
-
--data-binary "@${FILE}"
|
|
2179
|
-
# -> 204 No Content, Upload-Offset response header equals SIZE when done
|
|
2180
|
-
```
|
|
2181
|
-
|
|
2182
|
-
- **Method**: `POST`
|
|
2183
|
-
- **Path**: `/api/hosting/v1/files/upload-urls`
|
|
2184
|
-
|
|
2185
2105
|
#### hosting_files_list-website-and-directories
|
|
2186
2106
|
|
|
2187
2107
|
List files and directories under a website's document root.
|
|
@@ -2202,35 +2122,6 @@ containing secrets (e.g. credential files) — none of these are returned by thi
|
|
|
2202
2122
|
- **Method**: `GET`
|
|
2203
2123
|
- **Path**: `/api/hosting/v1/accounts/{username}/domains/{domain}/files/content`
|
|
2204
2124
|
|
|
2205
|
-
#### hosting_git_auto-deployment-settings
|
|
2206
|
-
|
|
2207
|
-
Returns the Git auto-deployment settings of the website: which repository and branch deploy
|
|
2208
|
-
into which directory, and whether pushes trigger a deployment. `is_enabled` false keeps the
|
|
2209
|
-
repository link but ignores pushes.
|
|
2210
|
-
|
|
2211
|
-
When the website has no auto-deployment configured every field is null. Save settings with
|
|
2212
|
-
`Update Git auto-deployment settings`.
|
|
2213
|
-
|
|
2214
|
-
- **Method**: `GET`
|
|
2215
|
-
- **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings`
|
|
2216
|
-
|
|
2217
|
-
#### hosting_git_update-auto-deployment-settings
|
|
2218
|
-
|
|
2219
|
-
Creates or replaces the Git auto-deployment settings of the website: repository, branch, the
|
|
2220
|
-
directory under the document root to deploy into, and `is_enabled`. Send the full set;
|
|
2221
|
-
`is_enabled` defaults to true and `directory` to the document root. `installation_uuid` must
|
|
2222
|
-
be an installation from `List Git installations` that belongs to the same customer as the
|
|
2223
|
-
website.
|
|
2224
|
-
|
|
2225
|
-
For PHP and static websites, saving with `is_enabled` true deploys the branch right away and
|
|
2226
|
-
every later push to that branch deploys again. For Node.js and Website Builder websites saving
|
|
2227
|
-
does not clone anything. On a Node.js website start the first deploy with
|
|
2228
|
-
`Start Node.js build` using `source_type` `git`; pushes then trigger new builds with the build
|
|
2229
|
-
settings stored for the website.
|
|
2230
|
-
|
|
2231
|
-
- **Method**: `PUT`
|
|
2232
|
-
- **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings`
|
|
2233
|
-
|
|
2234
2125
|
#### hosting_git_delete-auto-deployment-settings
|
|
2235
2126
|
|
|
2236
2127
|
Removes the Git auto-deployment settings of the website. Files already deployed stay on the
|
|
@@ -2240,39 +2131,6 @@ configured.
|
|
|
2240
2131
|
- **Method**: `DELETE`
|
|
2241
2132
|
- **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings`
|
|
2242
2133
|
|
|
2243
|
-
#### hosting_git_list-installations
|
|
2244
|
-
|
|
2245
|
-
Lists the Git provider accounts the customer has connected. Only installations with status
|
|
2246
|
-
`active` are returned unless the `status` filter says otherwise.
|
|
2247
|
-
|
|
2248
|
-
An empty list means the customer has no active installation. Check `status=suspended` and
|
|
2249
|
-
`status=pending` as well. If there is none at all, a Git provider (GitHub or GitLab) has to be
|
|
2250
|
-
connected once in hPanel (Websites, Manage, Advanced, Git; or Add Website, Node.js Web App,
|
|
2251
|
-
Import Git Repository); this endpoint then lists the new installation.
|
|
2252
|
-
|
|
2253
|
-
Use `uuid` as the path parameter of `List Git installation repositories`, and as
|
|
2254
|
-
`installation_uuid` in `Start Node.js build` with `source_type` `git` and in
|
|
2255
|
-
`Update Git auto-deployment settings`.
|
|
2256
|
-
|
|
2257
|
-
- **Method**: `GET`
|
|
2258
|
-
- **Path**: `/api/hosting/v1/git/installations`
|
|
2259
|
-
|
|
2260
|
-
#### hosting_git_list-installation-repositories
|
|
2261
|
-
|
|
2262
|
-
Lists the repositories the Git installation can access, read live from the provider. Works
|
|
2263
|
-
for github and gitlab installations. Use an active installation: a suspended or pending one
|
|
2264
|
-
is still queried and the call fails with whatever the provider answers. The list is cut at
|
|
2265
|
-
the first 500 repositories in the order the provider returns them; when the account has
|
|
2266
|
-
more, name the repository directly instead of searching this list.
|
|
2267
|
-
|
|
2268
|
-
`owner`, `name` and a branch (`default_branch` or another one) go into `source_options` of
|
|
2269
|
-
`Start Node.js build` or into `Update Git auto-deployment settings`. Returns 404 when the
|
|
2270
|
-
installation does not belong to the customer. Limited to 10 calls per minute per API client
|
|
2271
|
-
(429 above that).
|
|
2272
|
-
|
|
2273
|
-
- **Method**: `GET`
|
|
2274
|
-
- **Path**: `/api/hosting/v1/git/installations/{uuid}/repositories`
|
|
2275
|
-
|
|
2276
2134
|
#### hosting_git_deploy-website-repository
|
|
2277
2135
|
|
|
2278
2136
|
Clones a Git repository into a directory of the website, or pulls it again. An empty or missing
|
|
@@ -2334,84 +2192,6 @@ to it.
|
|
|
2334
2192
|
- **Method**: `POST`
|
|
2335
2193
|
- **Path**: `/api/hosting/v1/headless/agent-reports`
|
|
2336
2194
|
|
|
2337
|
-
#### hosting_nodejs_list-builds
|
|
2338
|
-
|
|
2339
|
-
Retrieve a paginated list of Node.js build processes for a specific website.
|
|
2340
|
-
|
|
2341
|
-
Each build represents a single run of the Node.js build pipeline. Use the `states`
|
|
2342
|
-
query parameter to filter results by build state (pending, running, completed, failed).
|
|
2343
|
-
Use the `uuid` from a build to poll its output via the `Get Node.js Build Logs` endpoint.
|
|
2344
|
-
|
|
2345
|
-
- **Method**: `GET`
|
|
2346
|
-
- **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds`
|
|
2347
|
-
|
|
2348
|
-
#### hosting_nodejs_start-build
|
|
2349
|
-
|
|
2350
|
-
Start a Node.js build process using files already present on the website's file storage.
|
|
2351
|
-
|
|
2352
|
-
WARNING: on success this overwrites the website's existing contents and cannot be
|
|
2353
|
-
undone — verify this is intended before calling this endpoint.
|
|
2354
|
-
|
|
2355
|
-
With `source_type` `archive`, `source_options.archive_path` must point to an existing
|
|
2356
|
-
archive file on the server (relative to the website document root). Use the
|
|
2357
|
-
`Generate Upload URL` endpoint to obtain credentials and upload the archive first. To
|
|
2358
|
-
auto-detect build settings from an archive before starting, first call the
|
|
2359
|
-
`Get Node.js Build Settings from Archive` endpoint.
|
|
2360
|
-
|
|
2361
|
-
With `source_type` `git`, `source_options` carries `owner`, `repository`, `branch` and
|
|
2362
|
-
`installation_uuid`. Take the installation from `List Git installations` and the owner and
|
|
2363
|
-
repository from `List Git installation repositories`; the branch is cloned at its current
|
|
2364
|
-
head. The installation must belong to the same customer as the website.
|
|
2365
|
-
|
|
2366
|
-
The returned build `uuid` can be used to poll progress and retrieve logs via
|
|
2367
|
-
the `Get Node.js Build Logs` endpoint.
|
|
2368
|
-
|
|
2369
|
-
- **Method**: `POST`
|
|
2370
|
-
- **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds`
|
|
2371
|
-
|
|
2372
|
-
#### hosting_nodejs_build-settings
|
|
2373
|
-
|
|
2374
|
-
Returns the build settings stored for the website: framework (`app_type`), Node.js version,
|
|
2375
|
-
root and output directory, build script, entry file and package manager. Stored settings
|
|
2376
|
-
drive Git auto-deployment builds. A build started through the API uses the values sent in
|
|
2377
|
-
that request and saves them here only when no settings exist yet.
|
|
2378
|
-
|
|
2379
|
-
Returns 404 until the first build or the first settings update stores them. Use this after
|
|
2380
|
-
a failed build to check whether the framework or the entry file were detected wrong, then
|
|
2381
|
-
fix them with the `Update Node.js build settings` endpoint.
|
|
2382
|
-
|
|
2383
|
-
- **Method**: `GET`
|
|
2384
|
-
- **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings`
|
|
2385
|
-
|
|
2386
|
-
#### hosting_nodejs_update-build-settings
|
|
2387
|
-
|
|
2388
|
-
Replaces the build settings stored for the website. Send the full set: `node_version` is
|
|
2389
|
-
required and every nullable field you omit is stored as null. Creates the settings when
|
|
2390
|
-
none exist yet.
|
|
2391
|
-
|
|
2392
|
-
This does not start a build. Stored settings drive Git auto-deployment builds; a build
|
|
2393
|
-
started through the API uses the values sent in that request, so to rebuild with corrected
|
|
2394
|
-
settings call `Start Node.js build` with the same values. Typical fixes: a wrong `app_type`
|
|
2395
|
-
after auto-detection, or a missing `entry_file` for express, fastify, nest, nuxt and hono
|
|
2396
|
-
apps.
|
|
2397
|
-
|
|
2398
|
-
- **Method**: `PUT`
|
|
2399
|
-
- **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings`
|
|
2400
|
-
|
|
2401
|
-
#### hosting_nodejs_build-settings-from-archive
|
|
2402
|
-
|
|
2403
|
-
Auto-detect Node.js build settings from a package.json inside an archive already on the server.
|
|
2404
|
-
|
|
2405
|
-
Use this before calling `Start Node.js Build` to preview what settings will be used,
|
|
2406
|
-
or to let the user review and override values (framework, node version, root directory,
|
|
2407
|
-
output directory, build script) before committing to a build.
|
|
2408
|
-
|
|
2409
|
-
The archive must already be present on the website's file storage. Use the
|
|
2410
|
-
`Generate Upload URL` endpoint to obtain credentials and upload the archive first.
|
|
2411
|
-
|
|
2412
|
-
- **Method**: `GET`
|
|
2413
|
-
- **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/from-archive`
|
|
2414
|
-
|
|
2415
2195
|
#### hosting_nodejs_list-environment-variables
|
|
2416
2196
|
|
|
2417
2197
|
Lists the Node.js environment variables currently set for the website. Values are always
|
|
@@ -2446,41 +2226,6 @@ values taken from the project `.env` file or the user prompt.
|
|
|
2446
2226
|
- **Method**: `PUT`
|
|
2447
2227
|
- **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/env`
|
|
2448
2228
|
|
|
2449
|
-
#### hosting_nodejs_analyse-failed-build
|
|
2450
|
-
|
|
2451
|
-
Returns an AI analysis of why a build failed and how to fix it, based on the build logs,
|
|
2452
|
-
the project file list and package.json. Only builds in the `failed` state can be analysed;
|
|
2453
|
-
any other state returns 422. When no analysis could be produced both `analysis` and
|
|
2454
|
-
`solution` are null, in which case read `Get NodeJS build logs` instead.
|
|
2455
|
-
|
|
2456
|
-
Each call runs the analysis again, so call it once per failed build and keep the result.
|
|
2457
|
-
Limited to 5 calls per minute per API client (429 above that).
|
|
2458
|
-
|
|
2459
|
-
- **Method**: `GET`
|
|
2460
|
-
- **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/analysis`
|
|
2461
|
-
|
|
2462
|
-
#### hosting_nodejs_build
|
|
2463
|
-
|
|
2464
|
-
Returns one build by UUID: its state (`pending`, `running`, `completed`, `failed`), the
|
|
2465
|
-
options it ran with and timestamps. Poll this while a build is pending or running. When it
|
|
2466
|
-
is failed, read `Get NodeJS build logs` and `Analyse failed Node.js build` for the cause.
|
|
2467
|
-
Returns 404 when the UUID does not belong to a build of this website.
|
|
2468
|
-
|
|
2469
|
-
- **Method**: `GET`
|
|
2470
|
-
- **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}`
|
|
2471
|
-
|
|
2472
|
-
#### hosting_nodejs_build-logs
|
|
2473
|
-
|
|
2474
|
-
Retrieve logs from a specific Node.js build process.
|
|
2475
|
-
|
|
2476
|
-
To stream live output while a build is running, poll this endpoint repeatedly
|
|
2477
|
-
while the build state is `running`, passing the previously returned `lines` count
|
|
2478
|
-
as `from_line` to fetch only new output since the last call.
|
|
2479
|
-
Log content may contain ANSI escape sequences (color codes).
|
|
2480
|
-
|
|
2481
|
-
- **Method**: `GET`
|
|
2482
|
-
- **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/logs`
|
|
2483
|
-
|
|
2484
2229
|
#### hosting_nodejs_runtime-logs
|
|
2485
2230
|
|
|
2486
2231
|
Returns the Node.js application's runtime console log entries, oldest first, each with
|
|
@@ -2580,8 +2325,9 @@ wait for `status: completed` before uploading files, deploying or creating datab
|
|
|
2580
2325
|
`failed` means the setup stopped before finishing or has not reported progress for
|
|
2581
2326
|
over an hour. Setups older than 24 hours are not listed.
|
|
2582
2327
|
|
|
2583
|
-
`type` is the website type the setup was started with (`wordpress`, `
|
|
2584
|
-
`headless_ecommerce`, `headless_pocketbase`), or `null` for an empty
|
|
2328
|
+
`type` is the website type the setup was started with (`wordpress`, `headless_empty`,
|
|
2329
|
+
`headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`), or `null` for an empty
|
|
2330
|
+
website.
|
|
2585
2331
|
|
|
2586
2332
|
- **Method**: `GET`
|
|
2587
2333
|
- **Path**: `/api/hosting/v1/onboardings`
|
|
@@ -2590,17 +2336,25 @@ over an hour. Setups older than 24 hours are not listed.
|
|
|
2590
2336
|
|
|
2591
2337
|
Starts a website setup on a Web or Cloud hosting order and returns the created setup
|
|
2592
2338
|
right away; the website itself is provisioned asynchronously. Poll the list website
|
|
2593
|
-
setups endpoint with the `domain` filter every 10 to 15
|
|
2594
|
-
`status: completed` before uploading files, deploying or creating
|
|
2339
|
+
setups endpoint (`hosting_websites_list-setups`) with the `domain` filter every 10 to 15
|
|
2340
|
+
seconds and wait for `status: completed` before uploading files, deploying or creating
|
|
2341
|
+
databases.
|
|
2595
2342
|
|
|
2596
2343
|
Omit `type` for an empty website. `type: wordpress` installs WordPress in the website
|
|
2597
2344
|
root with the admin user, email and password from `wordpress`, the domain as the site
|
|
2598
2345
|
title, and `en_US` when `wordpress.language` is omitted. The headless types
|
|
2599
|
-
(`headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`)
|
|
2600
|
-
website; `headless_wordpress` additionally installs WordPress into the
|
|
2601
|
-
of the website root with generated credentials.
|
|
2602
|
-
|
|
2603
|
-
|
|
2346
|
+
(`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`)
|
|
2347
|
+
create a headless website; `headless_wordpress` additionally installs WordPress into the
|
|
2348
|
+
`cms` directory of the website root with generated credentials. `headless_empty` installs
|
|
2349
|
+
nothing: WordPress can be added later through
|
|
2350
|
+
`POST /api/hosting/v1/accounts/{username}/wordpress/installations`
|
|
2351
|
+
(`wordpress_installations_install`) with `type: headless`.
|
|
2352
|
+
|
|
2353
|
+
Omit `domain` to set the website up on a generated temporary free subdomain. To know the
|
|
2354
|
+
free subdomain before the call, so a timed-out call can be looked up and retried on the
|
|
2355
|
+
same domain, generate one through `POST /api/hosting/v1/domains/free-subdomains`
|
|
2356
|
+
(`hosting_domains_generate-free-subdomain`) and send it as `domain`. It is accepted for
|
|
2357
|
+
24 hours, only from the client that generated it.
|
|
2604
2358
|
|
|
2605
2359
|
When the order has no hosting account yet, the setup creates one first, in the datacenter
|
|
2606
2360
|
given by `datacenter_code` or the order's default datacenter when it is omitted.
|
|
@@ -2819,24 +2573,6 @@ completed` before uploading files, deploying or creating databases. While the se
|
|
|
2819
2573
|
- **Method**: `POST`
|
|
2820
2574
|
- **Path**: `/api/hosting/v1/websites`
|
|
2821
2575
|
|
|
2822
|
-
#### hosting_websites_deploy-static-site-archive
|
|
2823
|
-
|
|
2824
|
-
Deploy a static application from an archive file.
|
|
2825
|
-
|
|
2826
|
-
WARNING: this overwrites the website's existing contents and cannot be undone —
|
|
2827
|
-
verify this is intended before calling this endpoint.
|
|
2828
|
-
|
|
2829
|
-
This endpoint allows you to deploy a static application from an archive
|
|
2830
|
-
file that has been uploaded to the website's directory.
|
|
2831
|
-
|
|
2832
|
-
This only works for static sites (pre-built HTML/CSS/JS with no build step). For
|
|
2833
|
-
Node.js applications, use `Create NodeJS build from archive` instead, or
|
|
2834
|
-
`Start Node.js build` if the archive is already uploaded. For WordPress sites,
|
|
2835
|
-
use `Import WordPress website`.
|
|
2836
|
-
|
|
2837
|
-
- **Method**: `POST`
|
|
2838
|
-
- **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/deploy`
|
|
2839
|
-
|
|
2840
2576
|
#### hosting_websites_delete
|
|
2841
2577
|
|
|
2842
2578
|
This endpoint permanently removes a website and all of its data. This action
|
|
@@ -4759,19 +4495,29 @@ database files that have been uploaded to the website's directory.
|
|
|
4759
4495
|
Install WordPress on an existing website.
|
|
4760
4496
|
|
|
4761
4497
|
The website must already exist before calling this endpoint. To create a new
|
|
4762
|
-
website first, use POST /api/hosting/v1/
|
|
4763
|
-
GET /api/hosting/v1/
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4498
|
+
website first, use POST /api/hosting/v1/orders/{order_id}/onboardings
|
|
4499
|
+
(`hosting_websites_start-setup`) and poll GET /api/hosting/v1/onboardings
|
|
4500
|
+
(`hosting_websites_list-setups`) with the `domain` filter until its `status` is
|
|
4501
|
+
`completed`.
|
|
4502
|
+
|
|
4503
|
+
Send `type: headless` to turn a headless website (for example one created by
|
|
4504
|
+
`hosting_websites_start-setup` with `type: headless_empty`) into a headless WordPress
|
|
4505
|
+
website: WordPress is installed into the `cms` directory with the Hostinger headless
|
|
4506
|
+
MU plugin and the website is marked as a headless WordPress website. `directory` is
|
|
4507
|
+
not allowed with it. The target website must already be headless: the headless
|
|
4508
|
+
install rewrites the root `.htaccess`, so on any other website the request is
|
|
4509
|
+
rejected with 422.
|
|
4510
|
+
|
|
4511
|
+
Call GET /api/hosting/v1/wordpress/installations (`wordpress_installations_list`)
|
|
4512
|
+
filtered by username and domain before proceeding to check whether WordPress is
|
|
4513
|
+
already installed on the target domain/path. If WordPress already exists and
|
|
4514
|
+
`overwrite` is false (the default), the async job will fail.
|
|
4769
4515
|
|
|
4770
4516
|
This operation is asynchronous: a successful response only means the install
|
|
4771
4517
|
job has been queued, not that WordPress is ready. Installation typically
|
|
4772
|
-
takes 1-2 minutes. Poll GET /api/hosting/v1/wordpress/installations
|
|
4773
|
-
by username and domain to track
|
|
4774
|
-
that list, WordPress is ready.
|
|
4518
|
+
takes 1-2 minutes. Poll GET /api/hosting/v1/wordpress/installations
|
|
4519
|
+
(`wordpress_installations_list`) filtered by username and domain to track
|
|
4520
|
+
progress. When the installation appears in that list, WordPress is ready.
|
|
4775
4521
|
|
|
4776
4522
|
Returns 422 when the account already uses all the databases its plan allows,
|
|
4777
4523
|
unless `database.name` is an existing database on the account.
|
package/gemini-extension.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hostinger/mcp",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"mcpName": "io.github.hostinger/hostinger-api-mcp",
|
|
5
5
|
"description": "MCP server for Hostinger API",
|
|
6
6
|
"repository": {
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"cors": "^2.8.5",
|
|
45
45
|
"dotenv": "^18.0.1",
|
|
46
46
|
"express": "^5.2.1",
|
|
47
|
+
"fflate": "^0.8.3",
|
|
47
48
|
"minimist": "^1.2.8",
|
|
48
49
|
"tus-js-client": "^4.1.0",
|
|
49
50
|
"zod": "^4.1.0"
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/hostinger/api-mcp-server",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "3.1
|
|
9
|
+
"version": "3.2.1",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "@hostinger/mcp",
|
|
14
|
-
"version": "3.1
|
|
14
|
+
"version": "3.2.1",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|
|
@@ -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`
|
|
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`.
|
|
36
36
|
|
|
@@ -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
|
-
|
|
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 |
|
|
29
|
+
| Project | `hosting_deploy` treats it as |
|
|
30
30
|
| --- | --- |
|
|
31
|
-
| Plain HTML/CSS/JS, or a framework's static build output | `
|
|
32
|
-
| `package.json` with a build or a server (Next.js, Nuxt, Express, Vite…) | `
|
|
33
|
-
| PHP code, no build step | `
|
|
34
|
-
| WordPress plugin or theme folder | `
|
|
35
|
-
| 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
|
-
|
|
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.
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
**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
|
-
|
|
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:
|
|
@@ -69,15 +72,29 @@ curl -sS -X PATCH "$URL/$DEST?override=true" -H "X-Auth: $AUTH_KEY" -H "X-Auth-R
|
|
|
69
72
|
|
|
70
73
|
## 3. Node.js builds
|
|
71
74
|
|
|
72
|
-
`hosting_deploy
|
|
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
|
|
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
|
-
|
|
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.
|