Sarah Shader's avatar
Sarah Shader
6 days ago

Trying out Convex with a single command

Anonymous Login

Imagine finding a really cool app someone made, and downloading it from Github to tinker with it yourself. The first thing you want to do is make an account for every tool used by this app just so you can run it, right? …right? No, you probably just want to run the app yourself and be able to make some changes as fast as possible.

You can now use Convex with a single command without needing to set up a Convex account. This means it’s even easier to persuade your friends to check out Convex and to share an app that others can download and run for themselves.

How does this work?

Convex has an open source version of the backend and an open source version of the Convex dashboard. We can use this to develop a Convex app with everything running locally on your machine. With local development, you can develop with lower latency and faster push times. Since this is all running locally, you don’t need a Convex account to handle creating projects and running backend deployments in the cloud.

The npx convex dev command does the following:

  • It downloads the open source backend and runs it (by default on port 3210)
  • It creates a directory to contain your project’s data (in ~/.convex/anonymous-backend-state)
  • It updates the CONVEX_URL variable in your .env.local file with the URL of the locally running backend
  • It downloads the open source dashboard and runs it (by default on port 6790)
  • It runs a little server (by default on port 6791) that returns a list of all your local projects, which the locally running dashboard accesses

Putting this all together means that npx convex dev is all you need to start developing with a Convex app locally — no accounts or extra set up.

What about production?

Running a Convex app locally is great for fast development, but when you’re ready to launch an app to production, you’ll either want to use the Convex cloud product, or self-host the Convex backend.

When creating a Convex account for the first time, you can easily transfer over any projects you started locally by running npx convex login.

Build in minutes, scale forever.

Convex is the backend platform with everything you need to build your full-stack AI project. Cloud functions, a database, file storage, scheduling, workflow, vector search, and realtime updates fit together seamlessly.

Get started