Skip to main content
Deploy your Restate services on Deno Deploy. This guide covers project configuration, service registration, and security setup.
Follow the quickstart to try Deno and Restate locally.

Set up your project

  • New project
  • Existing Deno project
Start with the deno-template and follow its README.Deploy on Deno

Register the service to Restate

Once deployed on Deno Deploy EA, register the service with Restate using the CLI or UI. Use Preview URLs so that Restate can target specific Deno deployments:
npx @restatedev/restate deployments register \
  https://your-project-name-<deployment_id>.deno.dev
You’re set up. Head over to the Overview page > Greeter > Playground and start sending requests to your service.

Restate identity keys (for Restate Cloud)

In order to make sure only a specific Restate Cloud environment can push requests to your Deno Deploy deployment, head over to your Restate Cloud Dashboard to set up Restate identity keys.

Restate Cloud > Developers > Security

Set up Restate identity keys

CI/CD Automation

You can set up automation to register new Restate service versions every time you deploy to Deno Deploy:
name: Register to Restate

on:
  repository_dispatch:
    types: [deno_deploy.build.routed] # Listen for successful builds

jobs:
  notify:
    runs-on: ubuntu-latest
    steps:
      - name: Register Restate deployment
        env:
          RESTATE_ADMIN_URL: ${{ secrets.RESTATE_ADMIN_URL }}
          RESTATE_AUTH_TOKEN: ${{ secrets.RESTATE_AUTH_TOKEN }}
        run: npx -y @restatedev/restate deployment register -y ${{ github.event.client_payload.revision.preview_url }}
For this workflow to execute, you need to add the following GitHub Actions repository secrets: Token setup
For Deno Deploy Classic, we suggest the following CI/CD setup that deploys to Deno and then registers the deployment with Restate:
name: Deploy Deno

on:
  push:
    branches:
      - main

env:
  # Create the Deno project going to https://dash.deno.com/new_project linking this repository.
  # When creating the project, check **Just link the repo, I’ll set up GitHub Actions myself**.
  # Make sure this project name matches the deno project.
  DENO_PROJECT_NAME: ${{ vars.DENO_PROJECT_NAME }}

jobs:
  deploy:
    permissions:
      id-token: write # required
      contents: read
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - uses: actions/checkout@v4
      - uses: denoland/setup-deno@v2
        with:
          deno-version: v2.x

      # Deploy using deployctl
      - name: Deploy to Deno Deploy
        uses: denoland/deployctl@v1
        id: deploy
        with:
          project: ${{ env.DENO_PROJECT_NAME }}
          entrypoint: main.ts

      - name: Register Restate deployment
        env:
          RESTATE_ADMIN_URL: ${{ secrets.RESTATE_ADMIN_URL }}
          RESTATE_AUTH_TOKEN: ${{ secrets.RESTATE_AUTH_TOKEN }}
        # Revision URL https://docs.deno.com/deploy/classic/deployments/#production-vs.-preview-deployments
        run: npx -y @restatedev/restate deployment register -y https://${{ env.DENO_PROJECT_NAME }}-${{ steps.deploy.outputs.deployment-id }}.deno.dev
You can use this workflow with Self-hosted Restate as well, just make sure to correctly set up RESTATE_AUTH_TOKEN and RESTATE_ADMIN_URL to reach your Restate cluster.
I