Skip to main content
Turso Quickstart In this quickstart you will learn how to:
  • Install the Turso CLI
  • Signup to Turso
  • Create your first Turso Database
  • Connect to Database Shell
  • Replicate Database to another region
1

Install the Turso CLI

We’ll be using the Turso CLI throughout this quickstart to manage databases, create replicas in other regions, and connect to the database shell.
brew install tursodatabase/tap/turso
2

Signup to Turso

The next command will open your browser to sign in with GitHub:
turso auth signup
3

Create a Database

Now create your first database in a location closest to you with the name my-db:
turso db create my-db
The Turso CLI automatically detected your closest region to create a database. It used this location to create a default “group” for your database, which you can inspect using the following command:
turso db show my-db
4

Connect to Database Shell

Congratulations, you created a database! Now connect to it with the shell command:
turso db shell my-db
Replace my-db with the name of your database if you named it differently.
Now create a table for users using SQL:
CREATE TABLE users (
  ID INTEGER PRIMARY KEY AUTOINCREMENT,
  name TEXT
);
Then insert a row into the users table:
INSERT INTO users (name) VALUES ("Iku");
Finally, query for all users:
SELECT * FROM users;
When you’re ready to move onto the next step, you’ll want to to quit the shell:
.quit
5

Replicate Database to another region

Adding a database replica is an easy as adding another location to the “group” your database belongs to.First, you can fetch a list of supported locations using the Turso CLI:
turso db locations
Pick a location for your database to replicate it to and pass the three-digit code to the groups locations add command:
turso group locations add default nrt
Congratulations! Your data is now replicated and closer to users in two regions.
6

Connect your application your database

You’re now ready to connect your application to your database. Pick from one of the SDKs below to continue:

TypeScript / JS

Get started with Turso and Node.js, Deno, Cloudflare Workers, and more.

Rust

Get started with Turso, libSQL, Rust and WASM.

Go

Get started with Turso, libSQL and Go.

Python

Get started with Turso, libSQL and Python.

HTTP

Using something else? Learn how to use Turso over HTTP.