LibSQL has 4 types of connections to interact with the database: In-Memory Connection, Local Connection, Remote Connection, and Remote Replica Connection (Embedded Replica).
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:
Copy
turso db show --url <database-name>
Get the database authentication token:
Copy
turso db tokens create <database-name>
If you use .env file, assign credentials to the environment variables inside .env.