Convex Setup

Convex automatically creates a database in the cloud for the project when you run npx run dev the first time.

If your friend changes the database structure (schema), and then you sync your code, it downloads the updated schema file, but doesn’t update your database until you run npx run dev again. It will give you a choice of attempting to automatically update the database instance to match the new schema, or start over:

? Transfer data from existing deployment?
> transfer data
  start fresh

If the .env.local file is configured to use the same database as the other collaborators, any changes you make will conflict with their database schemas until they update their schema file.

Before attempting to update the database, look at the contents of .env.local Here’s what each line means in the context of your Convex setup:

CONVEX_DEPLOYMENT=anonymous:anonymous-ftn-site-vercel: This variable tells your npx convex dev command which specific Convex cloud deployment it should sync your local backend code (functions, schema) to. As discussed, the anonymous: prefix suggests this is a shared or default cloud development deployment, not one tied directly to your personal Convex account.

NEXT_PUBLIC_CONVEX_URL=http://127.0.0.1:3210: This variable tells your frontend application (e.g., your Next.js app) where to connect to the Convex backend. When you run npx convex dev, it starts a local proxy server on http://127.0.0.1:3210. Your frontend talks to this local proxy, and the proxy, in turn, communicates with the anonymous:anonymous-ftn-site-vercel deployment in the Convex cloud.

In essence:

Your local frontend talks to a local Convex server, which then syncs and interacts with a cloud-hosted Convex backend named anonymous:anonymous-ftn-site-vercel.

The "update backend" prompt you’re seeing from npx convex dev is asking about pushing your local Convex function/schema changes to that anonymous:anonymous-ftn-site-vercel cloud deployment and then asking how to handle the data on that specific cloud deployment.

The core problem of potential conflicts with collaborators persists because you are both likely pushing your local code changes to, and operating on the data within, the same single cloud deployment (anonymous:anonymous-ftn-site-vercel).

Our recommendation: To avoid conflicts and ensure isolated development, it’s best for each of us to create and use our own personal Convex development deployments in the cloud.