Skip to main content

Hosting

In our examples so far we've used npm run dev to run a local web server. This is great for testing but what good is our chat app if users can't access it?

It only takes a couple of minutes to deploy a Convex app to a hosting provider. We're going to walk through the process of deployment to Vercel and Netlify but a similar process should work for other providers.

Project Source Management

Serverless hosting providers typically integrate with version control systems to automatically deploy code whenever a new revision is pushed. We'll discuss release process in more detail later but for now let's create a repository to hold our project code.

Create a new git repository and copy your project source into the repository root, e.g., from convex-demos/2-filters-and-references into my-chat-app. Commit all files and push to your favorite git hosting provider such as GitHub, GitLab or Bitbucket.

Note that your repository needs to include the convex.json file. You can copy that from your previous project or create a new project using npx convex init.

Now would be a good time to test that your project still works locally via npm run dev.

Choose a Provider

Depending on your choice of hosting provider, the next two sections contain details for deploying to Vercel and Netlify. Either section should contain enough information to point you in the right direction if you're deploying to a different provider.