Getting Started
Learning objectives
- You know what Deno Deploy is and know how to create a Deno Deploy project.
So far, we've just been playing around with the web applications on our local machines. Let's change that.
Deprecated instructions
Note that the instructions in this part are deprecated. For up-to-date instructions, head to https://docs.deno.com/deploy/manual/.
The instructions will be updated as a part of the upcoming course version release during the late fall of 2024.
Deno Deploy
Deno Deploy is a platform for deploying Deno applications. It is a serverless platform, meaning that you do not need to worry about the server where your application is running. Instead, you can focus on developing your application. They offer a free tier, for personal and non-commercial projects, which we use here.
Serverless web development is discussed more in the course Designing and Building Scalable Web Applications.
We note that there are also alternatives to Deno Deploy, including Vercel, Heroku, and Netlify. They do not, however, support some of the functionality that we'll explore soon. It is also possible to host an application locally, or on a server that you control.
Creating a project
To create a Deno Deploy project, we need to sign up to the system. This is done through https://dash.deno.com/, which is the dashboard for Deno Deploy. Signing up requires a GitHub account.
Once you've signed up, you are directed to the path https://dash.deno.com/projects, where you can create a new project. Click the "New Project" button.

When you click the "New Project" button, you are shown a page with templates for creating a new project. Select the "Create an empty project" template by clicking "Create blank project".

This creates a new project with a random name. In our case, as shown below, the name for the project is epic-moth-42
.

Installing deployctl
To deploy our application, we need to install the deployctl, which is a command line tool for deploying software.
To install the tool, run the command deno install -Arf https://deno.land/x/deploy/deployctl.ts
.
deno install -Arf https://deno.land/x/deploy/deployctl.ts
...
Successfully installed deployctl
/path-to-user/.deno/bin/deployctl
Now, once the deployctl
command has been installed, we can check that it works.
deployctl
deployctl 1.8.2
Command line tool for Deno Deploy.
To deploy a local script:
deployctl deploy --project=helloworld ./main.ts
To deploy a remote script:
deployctl deploy --project=helloworld https://deno.land/x/deploy/examples/hello.js
SUBCOMMANDS:
deploy Deploy a script with static files to Deno Deploy
upgrade Upgrade deployctl to the given version (defaults to latest)
logs View logs for the given project
Generating a deploy token
To deploy software, we need to have a personal deploy token. Go to the Deno Deploy account settings page at https://dash.deno.com/account#access-tokens and click the "New Access Token" button.

When you click on the "New Access Token" button, you are asked for a description of the token. Enter a description, such as "Personal token for WSD course". Then click the "Generate" button.
Once you've created the token, it is shown in the list of tokens. Copy the token to your clipboard, as you'll need it in the next part.

Note! When you click done, you no longer can see the token, so make sure to copy it to your clipboard. If you lose the token, you can always create a new one.