Deno hosting in 2026: how to deploy a Deno app
A Deno project is recognised from deno.json, built only when it has a build task, and started from its preview or start task, or from its entry file. Livops runs it on the port it assigns.
By Livops team, the people who build and run LivopsUpdated
Livops recognises a Deno project from a deno.json or deno.jsonc file, when the folder has no package.json and no Dockerfile. It installs the dependencies, runs a build only if deno.json has a build task, and starts the app.
What runs
- install:
deno install. A failure at this step does not stop the deploy. - build:
deno task build, only whendeno.jsonhas abuildtask. Fresh uses this for its ahead-of-time build. - start: the first of these that exists:
- the
previewtask - the
starttask main.ts,main.js,server.tsorsrc/main.ts, run withdeno run -A
- the
Livops passes the PORT variable to the process. Your code must read it, for example with Deno.env.get("PORT"), and listen on that port.
Which start task to use
Some templates set start to a development server that watches files and writes generated code into the project. That is wrong in production, because the watcher is meant for development and stops when it cannot write. If your project has a preview task that runs the production build, Livops uses that instead. If you do not, make start run the production server and not the watcher.
Permissions
The entry file runs with deno run -A, which gives it every permission. That is convenient, but it means the app can read and write anything the process can reach. Keep secrets in the Variables section of the cabinet, not in the code.
Environment variables
Put secrets and settings in the Variables section. Read them with Deno.env.get. A change takes effect after a restart, and a variable that the build reads needs a new deploy.
Common mistakes
- A
starttask that runs a dev server. It watches files and stops on the first write it cannot make. Use apreviewtask or makestartrun the production entry. - A hard-coded port. Read
PORTfrom the environment. - No entry file the preset can find. If your server is in another file, add a
starttask that runs it. - Running
deno task devin production. The dev task is for your laptop.
Questions
Is a Deno app free on Livops?
A Deno app is a server process, so it is a web app and is paid by the memory it uses. Only a site built to plain files is free, and a Deno server is not one.
Which file does Livops start?
In order: the preview task in deno.json, then the start task, then main.ts, main.js, server.ts or src/main.ts, whichever exists first. The start is run with deno run -A for the entry file, which gives the app its permissions.
Why does Livops prefer the preview task?
Some Deno templates set start to a development server that watches files. A preview task, when there is one, is the production run of what the build made, so Livops uses it first.
Sources
- Deno — Runtime documentation (docs.deno.com). Checked .
- Deno — Tasks (docs.deno.com). Checked .
Put your project online today
Connect GitHub or drop a folder. No card is asked for.
Deploy your Deno appRelated
- Node.js hosting in 2026: how to deploy an Express appA Node.js server in production needs one long-running process that listens on the port it is given, restarts when it crashes and exits cleanly on SIGTERM. On Livops you push a repository with package.json and it runs as a web app for 39 credits a month (39,000 so'm). Here is what Node needs, and how a VPS, Render, Railway, Fly.io, DigitalOcean and Heroku compare.
- Express.js hosting in 2026: the options comparedAn Express app in production needs one long-running Node process that listens on process.env.PORT on every interface, trusts exactly the proxy in front of it, exits cleanly on SIGTERM, and keeps sessions and data in a database rather than in memory. On Livops an Express repository deploys from a push for 39 credits a month (39,000 so'm). Here is how Render, Railway, Fly.io, Vercel and a VPS with pm2 compare.
- App not listening on $PORT: why the health check failed after deployThe platform started your app, tried the port it gave it, and nothing answered in time. Almost always the app listens on its own fixed port instead of the PORT variable, listens on localhost (127.0.0.1) instead of 0.0.0.0, or crashed or was still starting when the check gave up. Listen on 0.0.0.0 and the port in PORT, and it passes.
- npm failed with return code 1 (npm ERR! code 1): how to fix the buildnpm failed with return code 1, or npm install exited with 1, is npm ERR! code 1 in newer npm: it only says that a script npm ran exited with code 1. The real error is printed above it: usually a compile or type error, a lockfile out of sync with package.json, or a dependency whose install script failed. Find the first error line above code 1, fix that, and the build passes.