SurrealDB is designed to be simple to install and simple to run - using just one command from your terminal. In addition to traditional installation, SurrealDB can be installed and run with HomeBrew, Docker, or using any other container orchestration tool such as Docker Compose, Docker Swarm, Rancher, or in Kubernetes. Visit the SurrealDB install page for more information.
This repository houses the Docker Compose configuration file located at docker.surrealdb.com, and also houses more advanced configuration files for Docker Compose and Docker Swarm. It enables developers to quickly spin up a multi-node persistent database cluster on a single development machine.
To get started with SurrealDB using Docker Compose, follow the instructions below.
Follow the Docker installation instructions to install Docker on your development machine.
curl -sSf https://docker.surrealdb.com -o docker-compose.yml
docker compose up --pull=always -d
# Download the mini dataset
curl -L "https://datasets.surrealdb.com/surreal-deal-store-mini.surql" -o surreal-deal-store-mini.surql
# Import the dataset
curl -v -X POST -u "root:root" -H "surreal-ns: test" -H "surreal-db: test" -H "Accept: application/json" --data-binary @surreal-deal-store-mini.surql http://localhost:8000/import
# Open the SurrealQL shell and interact with the dataset
docker exec -ti surrealdb /surreal sql --user=root --pass=root --ns=test --db=test
Note: The configurations in this repository are intended for development and testing only.
For production deployment of TiKV, refer to the official TiKV Deployment Documentation.
Before deploying SurrealDB in production, review its Architecture and Deployment strategies to ensure your setup is aligned with your use-case.
For guidance on enabling observability and monitoring, see the SurrealDB Observability Documentation.