Skip to main content

Runtime APIs

Most APIs available in Deno CLI are also available in Deno Deploy Subhosting, but some differ in functionality or are unavailable in certain runtime configurations.

File system

Refer to the virtual filesystem chapter.


The network stack in Deno Deploy Subhosting supports outbound networking using TCP (and by extension HTTP). No raw inbound networking is available, but a single TCP listener can be opened to accept inbound HTTP requests / connections.

By default the entire public internet is accessible, but this can be restricted using the permissions settings in the isolate configuration.

For outbound networking, the following APIs are available:

To accept incoming HTTP requests, the standard procedure used in Deno CLI is applicable. A TCP listener is opened with Deno.listen(), then individual connections are accepted with listener.accept(), and then the connection is upgraded to HTTP with Deno.serveHttp(). Deno.listen() may be called at most once, with any valid port number.

It is recommended that you do not implement the HTTP stack yourself, instead relying on std/http’s serve function.

To upgrade incoming HTTP requests to WebSockets, the standard procedure used in Deno CLI is applicable. More information can be found in the Deno manual.