Skip to main content
LibSQL has 4 types of connections to interact with the database: In-Memory Connection, Local Connection, Remote Connection, and Remote Replica Connection (Embedded Replica).

In-Memory Connection

Local Connection

If you want to create Remote Connection or Remote Replica (Embedded Replica) Connection, you will need an existing database to continue. If you donโ€™t have one, create one. Get the database URL:
Get the database authentication token:
If you use .env file, assign credentials to the environment variables inside .env.

Remote Connection

Remote Replica (Embedded Replica) Connection