Deploying from a repository goes smoothly when the application follows a few simple rules: a clear start, listening on the provided port, secrets in environment variables and clean dependencies. This guide goes through them, tailored to Montavio Node.js hosting.
The steps range from what to do after ordering to rolling back a faulty release. You set each option in the customer portal; if anything differs, the plan page and help are authoritative.
1. Prepare the application
- package.json should contain a clear start script, and runtime packages should be under dependencies, not only devDependencies.
- State the supported Node.js major version (26, 24 or 22) in the engines field and test locally with the same one.
- Keep the lock file (package-lock.json or similar) in the repository so the build installs what you tested.
- Keep node_modules and secret files (.env) out of the repository.
{
"scripts": { "start": "node server.js" },
"engines": { "node": ">=22" }
}2. Hallgass a megadott porton
The platform passes the port in an environment variable, so do not hard-code a number. If it is not set (for example in local development), use a fallback.
const port = process.env.PORT || 3000;
app.listen(port, () => console.log(`Listening on ${port}`));3. Keep secrets in environment variables
- List the settings the app reads: database connection, API keys, session secret.
- Enter them in the customer portal under environment variables and restart the application if needed.
- The portal shows the database connection details only once, so store them somewhere safe.
- Never leave a password or key in code, and rotate it if one slipped out.
4. Repository and access
| Helyzet | Action |
|---|---|
| Public repository | Enter the repository address and branch, then publish. |
| Private repository | Add the public key issued for the application to the repository as a deploy key with read-only access. |
| You need a new key | Request a new one; the old key then becomes invalid, so replace it in the repository too. |
5. Your own domain and HTTPS
- Add the domain to the application in the customer portal and set the DNS record as instructed.
- Check from the command line that the name points to the given address (see the DNS checking guide).
- The system issues and renews the certificate; open the site over HTTPS and check redirects.
6. If the deployment or start fails
| Problem | Likely cause | What should you check? |
|---|---|---|
| The build stops | A missing dependency or unsupported Node.js version | Build log, engines field, lock file |
| The app starts but is unreachable | Fix porton vagy csak localhoston hallgat | Use of process.env.PORT, the listen address |
| The app exits immediately | A missing environment variable or unhandled error | Runtime log in the customer portal |
| Database error | Wrong connection details or a missing table | Environment variables, phpMyAdmin |
| Out of memory | The plan memory allowance is too small | Memory usage, a larger plan |
7. Rolling back after a bad release
If a new version is faulty, do not patch production: go back to the previous release in the customer portal. We keep the last few versions, so rolling back does not need a new build from your repository.



