Tools - Dev server
The Liveblocks dev server is a local server that lets you develop and test
multiplayer features without connecting to Liveblocks production servers. It is
built on our open-source
@liveblocks/server
package internally.
Features
The dev server fully supports all Multiplayer features, and partially supports other APIs. Learn more.
| Feature | Support |
|---|---|
| Liveblocks Storage (LiveObject, Presence, Broadcast, etc.) | ✅ |
| Liveblocks Yjs | ✅ |
| Text editors (Tiptap, BlockNote, Lexical) | ✅ ¹ |
| Public key authentication | ✅ |
| Access token authentication | ✅ |
| ID token authentication | ❌ |
| Room Node.js methods | ⚠️ ² |
| Room REST APIs | ⚠️ ² |
| Comments | ❌ ³ |
| Notifications | ❌ ³ |
| AI Agents | ❌ |
| Other APIs | ❌ |
¹ Excluding features related to Comments and Notifications.
² Basic room APIs are partially supported, but room permissions and
metadata are not fully implemented yet.
³ Basic APIs will return dummy data, so you can still use the Liveblocks
dev server to test other features in your app.
Set up the dev server
The development server currently only supports connecting with public key or access token authentication. ID token authentication will be supported in future.
Install Bun
The Liveblocks dev server requires Bun to be installed.
TerminalRun the dev server
Start the dev server from your project directory—it runs on
http://localhost:1153.TerminalConnect to the dev server
Point your client and auth endpoint to the dev server. The easiest way to do this is run the dev server and press
p. It copies a prompt you can paste into your AI code editor, which will intelligently make the changes for you.If you don’t use the prompt, you can manually add
baseUrland change yoursecretkey:Complete
You're all set up, open your app and start building collaborative features using the local dev server, or set up CI testing with your application.
Partially supported features
A number of unsupported features are partially implemented so you can run your
app without seeing errors. For example, useThreads is not supported yet, but
it will always return an empty array so you can still view your application.
In future, we plan to support more features in the dev server.
REST API
The REST API supports the same set of features as the Node.js package. To use
it, point your requests to the dev server URL and use sk_localdev as the
secret key.
Continuous Integration (CI) testing
You can use the dev server in CI environments by setting up a test environment file and running the dev server as a service container. Learn more in our guide on how to set up Continuous Integration (CI) testing.
Docker
You can run the dev server as a Docker container, which is useful for CI environments where you may not have Bun installed.
To persist data between container restarts, mount a volume:
Source code
The source code is available in our GitHub repository.
Examples
The following examples fully support the dev server.