Command line
Stacks and perkhost.json
How PerkHost picks a stack from your project files, which stacks are supported and what perkhost.json can set.
App hosting is not available yet
This page describes how the CLI and the stack presets are built. Nothing can be deployed until app hosting is available.
How the stack is detected
The CLI looks at the files in the root of the project you deploy. The first marker found, in the order of the table, decides the stack. A backend marker wins over package.json because Laravel and Django projects often carry one for their assets.
| Project file | Stack | Runtime version |
|---|---|---|
| go.mod | Go | 1.27 |
| composer.json | PHP | 8.3 |
| requirements.txt | Python | 3.12 |
| package.json | Node.js | 22 |
| index.html | Static site | Not applicable |
- File names are case-sensitive.
Package.jsonis refused with a message to rename it. - Python needs a
requirements.txtin the root. A project with onlypyproject.toml,Pipfile,poetry.lockorsetup.pyis refused with that explanation. - A project file below the root, because you deployed from the wrong folder, is refused with the folder to deploy from.
package.jsonandcomposer.jsonmust be a JSON object,go.modneeds amoduleline, andpackage.json,composer.json,go.modandrequirements.txtmay each be at most 262,144 bytes.- A project with a Dockerfile and none of these files is refused. Docker deploys are not available yet.
perkhost.json
An optional perkhost.json in the project root can override detection. Unknown keys are an error, and so is invalid JSON; the CLI names the field.
| Key | Meaning |
|---|---|
| stack | One of static, php, node, python, go. It wins over detection. |
| start | A shell command, on one line, that starts the app from its release folder. At most 1,024 characters. |
perkhost.json
{
"stack": "node",
"start": "node server.js"
}The port your app listens on
An app listens on one HTTP port, 8080. PerkHost also passes that number to the app in the PORT environment variable.
Not supported
Docker images and Dockerfiles, WordPress and catalog templates have no stack image today.