{"id":15110234,"url":"https://github.com/clockworklabs/spacetimedb","last_synced_at":"2026-02-26T21:23:26.591Z","repository":{"id":185873330,"uuid":"654870350","full_name":"clockworklabs/SpacetimeDB","owner":"clockworklabs","description":"Multiplayer at the speed of light","archived":false,"fork":false,"pushed_at":"2025-04-17T19:47:22.000Z","size":20096,"stargazers_count":14204,"open_issues_count":397,"forks_count":457,"subscribers_count":67,"default_branch":"master","last_synced_at":"2025-04-18T05:50:40.853Z","etag":null,"topics":["database","dataoriented","game-development","relational","relational-database","smart-contracts"],"latest_commit_sha":null,"homepage":"https://spacetimedb.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clockworklabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-17T07:28:29.000Z","updated_at":"2025-04-18T05:20:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb28a1da-d276-454d-8e7a-733bb58e396b","html_url":"https://github.com/clockworklabs/SpacetimeDB","commit_stats":null,"previous_names":["clockworklabs/spacetimedb"],"tags_count":86,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clockworklabs%2FSpacetimeDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clockworklabs%2FSpacetimeDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clockworklabs%2FSpacetimeDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clockworklabs%2FSpacetimeDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clockworklabs","download_url":"https://codeload.github.com/clockworklabs/SpacetimeDB/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250327470,"owners_count":21412436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","dataoriented","game-development","relational","relational-database","smart-contracts"],"created_at":"2024-09-25T23:42:27.575Z","updated_at":"2026-02-26T21:23:26.582Z","avatar_url":"https://github.com/clockworklabs.png","language":"Rust","readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://spacetimedb.com#gh-dark-mode-only\" target=\"_blank\"\u003e\n\t\u003cimg width=\"320\" src=\"./images/dark/logo.svg\" alt=\"SpacetimeDB Logo\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://spacetimedb.com#gh-light-mode-only\" target=\"_blank\"\u003e\n\t\u003cimg width=\"320\" src=\"./images/light/logo.svg\" alt=\"SpacetimeDB Logo\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://spacetimedb.com#gh-dark-mode-only\" target=\"_blank\"\u003e\n        \u003cimg width=\"250\" src=\"./images/dark/logo-text.svg\" alt=\"SpacetimeDB\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://spacetimedb.com#gh-light-mode-only\" target=\"_blank\"\u003e\n        \u003cimg width=\"250\" src=\"./images/light/logo-text.svg\" alt=\"SpacetimeDB\"\u003e\n    \u003c/a\u003e\n    \u003ch3 align=\"center\"\u003e\n        Development at the speed of light.\n    \u003c/h3\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/clockworklabs/spacetimedb\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/clockworklabs/spacetimedb?color=%23ff00a0\u0026include_prereleases\u0026label=version\u0026sort=semver\u0026style=flat-square\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://github.com/clockworklabs/spacetimedb\"\u003e\u003cimg src=\"https://img.shields.io/badge/built_with-Rust-dca282.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n\t\u003ca href=\"https://github.com/clockworklabs/spacetimedb/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/clockworklabs/spacetimedb/ci.yml?style=flat-square\u0026branch=master\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://status.spacetimedb.com\"\u003e\u003cimg src=\"https://img.shields.io/uptimerobot/ratio/7/m784409192-e472ca350bb615372ededed7?label=cloud%20uptime\u0026style=flat-square\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://hub.docker.com/r/clockworklabs/spacetimedb\"\u003e\u003cimg src=\"https://img.shields.io/docker/pulls/clockworklabs/spacetimedb?style=flat-square\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://github.com/clockworklabs/spacetimedb/blob/master/LICENSE.txt\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-BSL_1.1-00bfff.svg?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://crates.io/crates/spacetimedb\"\u003e\u003cimg src=\"https://img.shields.io/crates/d/spacetimedb?color=e45928\u0026label=Rust%20Crate\u0026style=flat-square\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://www.nuget.org/packages/SpacetimeDB.Runtime\"\u003e\u003cimg src=\"https://img.shields.io/nuget/dt/spacetimedb.runtime?color=0b6cff\u0026label=NuGet%20Package\u0026style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://discord.gg/spacetimedb\"\u003e\u003cimg src=\"https://img.shields.io/discord/1037340874172014652?label=discord\u0026style=flat-square\u0026color=5a66f6\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://twitter.com/spacetime_db\"\u003e\u003cimg src=\"https://img.shields.io/badge/twitter-Follow_us-1d9bf0.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://clockworklabs.io/join\"\u003e\u003cimg src=\"https://img.shields.io/badge/careers-Join_us-86f7b7.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://www.linkedin.com/company/clockworklabs/\"\u003e\u003cimg src=\"https://img.shields.io/badge/linkedin-Connect_with_us-0a66c2.svg?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://discord.gg/spacetimedb\"\u003e\u003cimg height=\"25\" src=\"./images/social/discord.svg\" alt=\"Discord\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://twitter.com/spacetime_db\"\u003e\u003cimg height=\"25\" src=\"./images/social/twitter.svg\" alt=\"Twitter\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://github.com/clockworklabs/spacetimedb\"\u003e\u003cimg height=\"25\" src=\"./images/social/github.svg\" alt=\"GitHub\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://twitch.tv/SpacetimeDB\"\u003e\u003cimg height=\"25\" src=\"./images/social/twitch.svg\" alt=\"Twitch\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://youtube.com/@SpacetimeDB\"\u003e\u003cimg height=\"25\" src=\"./images/social/youtube.svg\" alt=\"YouTube\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://www.linkedin.com/company/clockwork-labs/\"\u003e\u003cimg height=\"25\" src=\"./images/social/linkedin.svg\" alt=\"LinkedIn\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://stackoverflow.com/questions/tagged/spacetimedb\"\u003e\u003cimg height=\"25\" src=\"./images/social/stackoverflow.svg\" alt=\"StackOverflow\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n## What is [SpacetimeDB](https://spacetimedb.com)?\n\nYou can think of SpacetimeDB as both a database and server combined into one.\n\nIt is a relational database system that lets you upload your application logic directly into the database by way of fancy stored procedures called \"modules.\"\n\nInstead of deploying a web or game server that sits in between your clients and your database, your clients connect directly to the database and execute your application logic inside the database itself. You can write all of your permission and authorization logic right inside your module just as you would in a normal server.\n\nThis means that you can write your entire application in a single language, Rust, and deploy it as a single binary. No more microservices, no more containers, no more Kubernetes, no more Docker, no more VMs, no more DevOps, no more infrastructure, no more ops, no more servers.\n\n\u003cfigure\u003e\n    \u003cimg src=\"./images/basic-architecture-diagram.png\" alt=\"SpacetimeDB Architecture\" style=\"width:100%\"\u003e\n    \u003cfigcaption align=\"center\"\u003e\n        \u003cp align=\"center\"\u003e\u003cb\u003eSpacetimeDB application architecture\u003c/b\u003e\u003cbr /\u003e\u003csup\u003e\u003csub\u003e(elements in white are provided by SpacetimeDB)\u003c/sub\u003e\u003c/sup\u003e\u003c/p\u003e\n    \u003c/figcaption\u003e\n\u003c/figure\u003e\n\nIt's actually similar to the idea of smart contracts, except that SpacetimeDB is a database, has nothing to do with blockchain, and is orders of magnitude faster than any smart contract system.\n\nSo fast, in fact, that the entire backend of our MMORPG [BitCraft Online](https://bitcraftonline.com) is just a SpacetimeDB module. We don't have any other servers or services running, which means that everything in the game, all of the chat messages, items, resources, terrain, and even the locations of the players are stored and processed by the database before being synchronized out to all of the clients in real-time.\n\nSpacetimeDB is optimized for maximum speed and minimum latency rather than batch processing or OLAP workloads. It is designed to be used for real-time applications like games, chat, and collaboration tools.\n\nThis speed and latency is achieved by holding all of application state in memory, while persisting the data in a write-ahead-log (WAL) which is used to recover application state.\n\n## Installation\n\nYou can run SpacetimeDB as a standalone database server via the `spacetime` CLI tool.\nInstall instructions for supported platforms are outlined below.\nThe same install instructions can be found on our website at https://spacetimedb.com/install.\n\n#### Install on macOS\n\nInstalling on macOS is as simple as running our install script. After that you can use the spacetime command to manage versions.\n\n```bash\ncurl -sSf https://install.spacetimedb.com | sh\n```\n\n#### Install on Linux\n\nInstalling on Linux is as simple as running our install script. After that you can use the spacetime command to manage versions.\n\n```bash\ncurl -sSf https://install.spacetimedb.com | sh\n```\n\n#### Install on Windows\n\nInstalling on Windows is as simple as pasting the snippet below into PowerShell. If you would like to use WSL instead, please follow the Linux install instructions.\n\n```ps1\niwr https://windows.spacetimedb.com -useb | iex\n```\n\n#### Installing from Source\n\nA quick note on installing from source: we recommend that you don't install from source unless there is a feature that is available in `master` that hasn't been released yet, otherwise follow the official installation instructions.\n\n##### MacOS + Linux\n\nInstalling on macOS + Linux is pretty straightforward. First we are going to build all of the binaries that we need:\n\n```bash\n# Install rustup, you can skip this step if you have cargo and the wasm32-unknown-unknown target already installed.\ncurl https://sh.rustup.rs -sSf | sh\n# Clone SpacetimeDB\ngit clone https://github.com/clockworklabs/SpacetimeDB\n# Build and install the CLI\ncd SpacetimeDB\ncargo build --locked --release -p spacetimedb-standalone -p spacetimedb-update -p spacetimedb-cli\n\n# Create directories\nmkdir -p ~/.local/bin\nexport STDB_VERSION=\"$(./target/release/spacetimedb-cli --version | sed -n 's/.*spacetimedb tool version \\([0-9.]*\\);.*/\\1/p')\"\nmkdir -p ~/.local/share/spacetime/bin/$STDB_VERSION\n\n# Install the update binary\ncp target/release/spacetimedb-update ~/.local/bin/spacetime\ncp target/release/spacetimedb-cli ~/.local/share/spacetime/bin/$STDB_VERSION\ncp target/release/spacetimedb-standalone ~/.local/share/spacetime/bin/$STDB_VERSION\n```\n\nAt this stage you'll need to add ~/.local/bin to your path if you haven't already.\n\n```\n# Please add the following line to your shell configuration and open a new shell session:\nexport PATH=\"$HOME/.local/bin:$PATH\"\n\n```\n\nThen finally set your SpacetimeDB version:\n```\n\n# Then, in a new shell, set the current version:\nspacetime version use $STDB_VERSION\n\n# If STDB_VERSION is not set anymore then you can use the following command to list your versions:\nspacetime version list\n```\n\nYou can verify that the correct version has been installed via `spacetime --version`.\n\n##### Windows\n\nBuilding on windows is a bit more complicated. You'll need a slightly different version of perl compared to what comes pre-bundled in most Windows terminals. We recommend [Strawberry Perl](https://strawberryperl.com/). You may also need access to an `openssl` binary which actually comes pre-installed with [Git for Windows](https://git-scm.com/downloads/win). Also, you'll need to install [rustup](https://rustup.rs/) for Windows.\n\nIn a Git for Windows shell you should have something that looks like this:\n```\n$ which perl\n/c/Strawberry/perl/bin/perl\n$ which openssl\n/mingw64/bin/openssl\n$ which cargo \n/c/Users/\u003cuser\u003e/.cargo/bin/cargo\n```\n\nIf that looks correct then you're ready to proceed!\n\n```powershell\n# Clone SpacetimeDB\ngit clone https://github.com/clockworklabs/SpacetimeDB\n\n# Build and install the CLI\ncd SpacetimeDB\ncargo build --locked --release -p spacetimedb-standalone -p spacetimedb-update -p spacetimedb-cli\n\n# Create directories\n$stdbDir = \"$HOME\\AppData\\Local\\SpacetimeDB\"\n$stdbVersion = \u0026 \".\\target\\release\\spacetimedb-cli\" --version | Select-String -Pattern 'spacetimedb tool version ([0-9.]+);' | ForEach-Object { $_.Matches.Groups[1].Value }\nNew-Item -ItemType Directory -Path \"$stdbDir\\bin\\$stdbVersion\" -Force | Out-Null\n\n# Install the update binary\nCopy-Item \"target\\release\\spacetimedb-update.exe\" \"$stdbDir\\spacetime.exe\"\nCopy-Item \"target\\release\\spacetimedb-cli.exe\" \"$stdbDir\\bin\\$stdbVersion\\\"\nCopy-Item \"target\\release\\spacetimedb-standalone.exe\" \"$stdbDir\\bin\\$stdbVersion\\\"\n\n```\n\nNow add the directory we just created to your path. We recommend adding it to the system path because then it will be available to all of your applications (including Unity3D). After you do this, restart your shell!\n\n```\n%USERPROFILE%\\AppData\\Local\\SpacetimeDB\n```\n\nThen finally, open a new shell and use the installed SpacetimeDB version:\n```\nspacetime version use $stdbVersion\n\n# If stdbVersion is no longer set, list versions using the following command:\nspacetime version list\n```\n\nYou can verify that the correct version has been installed via `spacetime --version`.\n\nIf you're using Git for Windows you can follow these instructions instead:\n\n```bash\n# Clone SpacetimeDB\ngit clone https://github.com/clockworklabs/SpacetimeDB\n# Build and install the CLI\ncd SpacetimeDB\n# Build the CLI binaries - this takes a while on windows so go grab a coffee :)\ncargo build --locked --release -p spacetimedb-standalone -p spacetimedb-update -p spacetimedb-cli\n\n# Create directories\nexport STDB_VERSION=\"$(./target/release/spacetimedb-cli --version | sed -n 's/.*spacetimedb tool version \\([0-9.]*\\);.*/\\1/p')\"\nmkdir -p ~/AppData/Local/SpacetimeDB/bin/$STDB_VERSION\n\n# Install the update binary\ncp target/release/spacetimedb-update ~/AppData/Local/SpacetimeDB/spacetime\ncp target/release/spacetimedb-cli ~/AppData/Local/SpacetimeDB/bin/$STDB_VERSION\ncp target/release/spacetimedb-standalone ~/AppData/Local/SpacetimeDB/bin/$STDB_VERSION\n\n# Now add the directory we just created to your path. We recommend adding it to the system path because then it will be available to all of your applications (including Unity3D). After you do this, restart your shell!\n# %USERPROFILE%\\AppData\\Local\\SpacetimeDB\n\n# Set the current version\nspacetime version use $STDB_VERSION\n```\n\nYou can verify that the correct version has been installed via `spacetime --version`.\n\n#### Running with Docker\n\nIf you prefer to run Spacetime in a container, you can use the following command to start a new instance.\n\n```bash\ndocker run --rm --pull always -p 3000:3000 clockworklabs/spacetime start\n```\n\n## Documentation\n\nFor more information about SpacetimeDB, getting started guides, game development guides, and reference material please see our [documentation](https://spacetimedb.com/docs).\n\n## Getting Started\n\nWe've prepared several getting started guides in each of our supported languages to help you get up and running with SpacetimeDB as quickly as possible. You can find them on our [docs page](https://spacetimedb.com/docs).\n\nIn summary there are only 4 steps to getting started with SpacetimeDB.\n\n1. Install the `spacetime` CLI tool.\n2. Start a SpacetimeDB standalone node with `spacetime start`.\n3. Write and upload a module in one of our supported module languages.\n4. Connect to the database with one of our client libraries.\n\nYou can see a summary of the supported languages below with a link to the getting started guide for each.\n\n## Language Support\n\nYou can write SpacetimeDB modules in several popular languages, with more to come in the future!\n\n#### Serverside Libraries\n\n- [Rust](https://spacetimedb.com/docs/modules/rust/quickstart)\n- [C#](https://spacetimedb.com/docs/modules/c-sharp/quickstart)\n\n#### Client Libraries\n\n- [Rust](https://spacetimedb.com/docs/sdks/rust/quickstart)\n- [C#](https://spacetimedb.com/docs/sdks/c-sharp/quickstart)\n- [Typescript](https://spacetimedb.com/docs/sdks/typescript/quickstart)\n\n## License\n\nSpacetimeDB is licensed under the BSL 1.1 license. This is not an open source or free software license, however, it converts to the AGPL v3.0 license with a linking exception after a few years.\n\nNote that the AGPL v3.0 does not typically include a linking exception. We have added a custom linking exception to the AGPL license for SpacetimeDB. Our motivation for choosing a free software license is to ensure that contributions made to SpacetimeDB are propagated back to the community. We are expressly not interested in forcing users of SpacetimeDB to open source their own code if they link with SpacetimeDB, so we needed to include a linking exception.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclockworklabs%2Fspacetimedb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclockworklabs%2Fspacetimedb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclockworklabs%2Fspacetimedb/lists"}