---
title: "Run npm and Deno anywhere"
description: "Deno apps, including those using npm specifiers, can be containerized with the official denoland/deno Docker image and deployed to any VPS or container platform, not just Deno Deploy."
url: "https://swe.quest/articles/run-npm-and-deno-anywhere-02ce4590033c3918"
canonical: "https://deno.com/blog/npm-and-deno-anywhere"
source: "Deno"
published: "2022-11-18"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["deployment","containers","cloud","javascript"]
---

# Run npm and Deno anywhere

A post on [Deno](https://swe.quest/sources/deno.md), published 2022-11-18, 7 min read, How-to. Original: [https://deno.com/blog/npm-and-deno-anywhere](https://deno.com/blog/npm-and-deno-anywhere)

## Summary

Deno apps, including those using npm specifiers, can be containerized with the official denoland/deno Docker image and deployed to any VPS or container platform, not just Deno Deploy. A shared Oak-based main.ts, Dockerfile and docker-compose.yml are built locally, then pushed and run on AWS Lightsail via Docker Hub, on a Digital Ocean Droplet via its container registry and docker run, and on Google Cloud Run via Artifact Registry and gcloud run deploy. npm specifiers were not yet supported on Deno Deploy at the time.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)

## Prerequisites

- Docker basics ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- Deno basics

## Keywords

Deno, Docker, AWS Lightsail, DigitalOcean, Google Cloud Run, Artifact Registry, Oak, npm

## Related posts

- [Manage your Deno Deploy and Deno Subhosting projects with Terraform](https://swe.quest/articles/manage-your-deno-deploy-and-deno-subhosting-projects-with-terraform-699764d70221ef58.md): Deno · 2023-12-05 · Medium · 6 min read · Infrastructure as code, Serverless, Deployment, TypeScript
  Deno now ships an official Terraform provider (denoland/deno) for managing Deno Deploy and Deno Subhosting projects, custom domains and deployments as infrastructure-as-code.
- [Build a dinosaur runner game with Deno, pt. 1](https://swe.quest/articles/build-a-dinosaur-runner-game-with-deno-pt-1-e4d3faa91fec67fd.md): Deno · 2025-12-08 · Medium · 5 min read · JavaScript, TypeScript, Deployment, Serverless
  Part one of a series building a browser dinosaur runner game sets up a Deno project that serves static files and deploys it.
- [Introducing deployctl, the command line interface for Deno Deploy](https://swe.quest/articles/introducing-deployctl-the-command-line-interface-for-deno-deploy-f471a4c6be1d0b1b.md): Deno · 2024-03-15 · Medium · 9 min read · Deployment, Serverless, Developer tools, TypeScript
  deployctl is a CLI for managing the full lifecycle of Deno Deploy projects from the terminal: deploying, renaming projects, inspecting deployments, streaming logs, monitoring resource usage with \`deployctl top\`, promoting preview deployments to production, and deleting deployments or projects.
- [Deno 1.34: deno compile supports npm packages](https://swe.quest/articles/deno-1-34-deno-compile-supports-npm-packages-6066648b7bf9ee04.md): Deno · 2023-05-25 · Medium · 6 min read · JavaScript, Runtimes & VMs, Developer tools, TypeScript
  Deno 1.34 lets \`deno compile\` bundle npm packages and their dependencies into a single self-contained executable.
- [Build and Ship Astro Sites with Deno and Deno Deploy](https://swe.quest/articles/build-and-ship-astro-sites-with-deno-and-deno-deploy-3be8936cebaf2b24.md): Deno · 2023-07-21 · Medium · 12 min read · Frontend, Serverless, Deployment, TypeScript
  Astro sites can be built with the Deno runtime and hosted on Deno Deploy in two modes.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
