Deploy your Restate services on Vercel. This guide covers project configuration, service registration, and security setup.
Follow the quickstart to try Next.js and Restate locally.

Set up your project

Configure Vercel project

With the GitHub repository set up, go over to the Vercel dashboard to create the project. For Restate to push requests to the Vercel project, you need Vercel Generated URLs to be accessible by Restate. You have two alternatives:

Register the service to Restate

In order for Restate to push requests to your services, you need to register the service to Restate using the CLI or UI. Make sure to register the Commit URL so that Restate can address specific Vercel deployments:
npx @restatedev/restate deployments register \
  --use-http1.1 \
  https://<project-name>-<unique-hash>-<scope-slug>.vercel.app/restate
--use-http1.1 is required to interact with Next.js projects.
If you set up Protection Bypass for Automation as described above, pass the additional header as an argument:
npx @restatedev/restate deployments register \
    --use-http1.1 \
    --extra-header x-vercel-protection-bypass=<token> \
    https://<project-name>-<unique-hash>-<scope-slug>.vercel.app/restate
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 Vercel 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 automatically register new Restate service versions every time a Vercel deployment gets promoted:
name: Register to Restate

# React to vercel.deployment.promoted event
on:
  repository_dispatch:
    types:
      - 'vercel.deployment.promoted'
jobs:
  deploy-to-restate:
    if: github.event_name == 'repository_dispatch'
    runs-on: ubuntu-latest
    steps:
      - name: Register Restate deployment
        env:
          # In your Restate Cloud dashboard, go to Developers > API Keys > Create API Key, and make sure to select **Admin** for the role
          RESTATE_ADMIN_URL: ${{ secrets.RESTATE_ADMIN_URL }}
          # You can find this out in Developers > Admin URL.
          RESTATE_AUTH_TOKEN: ${{ secrets.RESTATE_AUTH_TOKEN }}

        # Run service registration
        run: |
          npx -y @restatedev/restate deployment register -y \
            --use-http1.1 \
            ${{ secrets.VERCEL_PROTECTION_BYPASS_TOKEN && format('--extra-header x-vercel-protection-bypass={0}', secrets.VERCEL_PROTECTION_BYPASS_TOKEN) }} \
            ${{ github.event.client_payload.url }}/restate
For this workflow to execute, you need to add the following GitHub Actions repository secrets: Token setup
  • If you set up the Protection Bypass for Automation as described above, add the secret VERCEL_PROTECTION_BYPASS_TOKEN with the token value
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.