Convex is now self-hostable. We’ve open sourced the dashboard, added support for storing data in Postgres in addition to SQLite (plus MySQL very soon!), and packaged it all up in a docker container you can run locally or on a cloud hosting provider. We’re also joining the Open Source Pledge to underscore our commitment and funding to the open source community.
The Convex cloud service remains as always and is still the recommended configuration for most users.
Not just open, useful
Less than a year ago we announced that Convex was open source. In hindsight we kinda got the initiative wrong. This was the real source code, but it didn’t include the dashboard, only stored data in SQLite, needed to be built and managed from source, and it wasn’t integrated with the CLI and dev process. As a result the open source release was real, but it wasn’t particularly useful.
The issue started with the naming. We called the previous project “Convex open source” and considered it a success once we’d opened up the source. This time around the focus is on being usable for real applications, so we’re calling it “self-hosted Convex.” Sometimes a small change in naming makes a big difference in outcome.
What makes an open source project useful?
The stated goal of open source software is usually to… open the source. This is only a small part of the bigger picture though. In practice very few people are reading and modifying source code for their favorite open source projects.
So what makes an open source project useful in practice?
Unrestricted access to source
This is the obvious one. Folks need to know they have source access for debugging, modifications, or business continuity, and that it won’t get taken away from them. Licensing is an important factor here. Convex is FSL licensed, which allows relatively unrestricted use of the code apart from reselling Convex to compete directly with the company. After two years the code converts to Apache 2.0.
We think a two-year conversion period is pretty generous, especially compared to the four-year conversion that is more standard, but also gives us some business protections while encouraging us to keep innovating.
Something for free
Let’s be honest, for many developers the appeal of an open source product is that it’s free, both philosophically and financially. That’s totally fine! A lot of folks aren’t in a position to pay for a hosted service. Of course Convex already provides a generous free tier and many Convex users run popular applications that fit entirely within these free limits. That said, there will always be a group who’d rather not be subjected to free plan limits or would rather roll their own infra, and we’d rather they were still getting value from Convex.
If you’re looking to get started developing on Convex you probably just want the free hosted cloud plan, but the flexibility is now there if you want to run it yourself.
An active developer community
The primary market for Convex is app developers who want to focus on building apps rather than building and managing infrastructure. For many of these folks the appeal of open source isn’t that they could theoretically build and run the software themselves if they had to, it’s that there’s an active community of people who already run it, who are vetting it in production, providing community support, etc.
A big motivation of the self-hosted release is fostering a developer community. We’d love for you to try it out, or Convex in general, and would certainly appreciate a GitHub star. There’s an amazing community of developers in the Convex Discord plus dedicated self-hosting discussions in the #self-hosted
Discord channel.
Ease of use
It’s gotta be practical to use! This also applies to folks who already love the cloud product but want something standalone they can run in test clusters etc. We’ve packaged up the backend and dashboard in ready-made Docker containers and updated cli and deployment commands so it should all run seamlessly. You should be able to get started very quickly following our self-hosting instructions.
The self-hosted backend can be hosted on a cloud provider of your choice and we’ve included configs to streamline setup on Fly.io. By default it will store data in a local SQLite database but you can also point it to any Postgres database; we’ve included setup instructions for Neon that should take less than a minute to get going.
Explicit non-goals
- There’s no shift in strategy for the cloud hosted product and Convex customers should continue using that. The primary goal of the company is to innovate and develop Convex as a platform that streamlines app development while making infrastructure hassles disappear.
- We’re not outsourcing software quality and we’re not looking to the community to improve Convex on our behalf. You’re welcome to submit PRs against the Convex codebase but we still consider it our #1 responsibility to build a platform that meets your needs and that you can trust with your most important data.
- We don’t consider the self-hosted product to be an acceptable escape hatch for any major product gaps. e.g., we know that we still need to offer regional data residency in Europe and other locations and this release doesn’t change those plans.
While we’re at it: Local dev!
It turns out a lot of the demand for self-hosted Convex is actually so developers can build on Convex while offline, without requiring a connection to the cloud service. We’ve also decided to solve that more directly: you now have the ability to develop locally in the cloud product via npx convex dev
. We’re continuing to roll this out as the primary means of development on Convex but everyone should currently be able to opt in to a local dev deployment for their second Convex project. Remote dev will continue to be available for times when you want to collaborate on a project with teammates.
Get building
An initiative like self-hosting is a long term project, not just a one-time release. We’ll be continuing to add additional features in the near future, including MySQL support. We’d also love your feedback on anything that needs improving. Plus of course we always love hearing your experiences about Convex in general, either on our community discord or just by hitting me up on X/Bluesky!
If you want to get started building on self-hosted Convex head on over to our GitHub README or check out Ian’s walk-through on Stack.