beekeeper-studio/beekeeper-studio · error
Creating database on remote server is not supported
Error message
Creating database on remote server is not supported
What it means
_createDatabase in the libsql client throws 'Creating database on remote server is not supported' when isRemote is true. Creating a database means creating a new local SQLite/libsql file via new Database(path); remote servers (http/https/ws endpoints) cannot have files created this way, so the operation is rejected.
Source
Thrown at apps/studio/src-commercial/backend/lib/db/clients/libsql.ts:131
: undefined,
});
}
protected createCursor(
...args: ConstructorParameters<typeof SqliteCursor>
): LibSQLCursor {
const options: LibSQLCursorOptions = {
isRemote: this.isRemote,
authToken: this.useAuthToken ? this.libsqlOptions.authToken : undefined,
};
args[4] = options;
// @ts-expect-error not fully typed
return new LibSQLCursor(...args);
}
protected _createDatabase(path: string) {
if (this.isRemote) {
throw new Error("Creating database on remote server is not supported");
}
const conn = new Database(path);
conn.close();
}
private get useAuthToken(): boolean {
return this.libsqlOptions.mode === "url" && !!this.libsqlOptions.authToken;
}
private get libsqlOptions() {
return this.server.config.libsqlOptions;
}
}
View on GitHub (pinned to 4e3e03e322)
Solutions
- Create the remote database via the provider's CLI/API (e.g. turso db create), then connect to it
- Check client.isRemote before attempting createDatabase and surface a clear message
- For local-only flows, supply a file path instead of a remote URL
Example fix
// before
await client.createDatabase('https://my.turso.io/db');
// after
if (client.isRemote) {
// run: turso db create mydb, then connect
} else {
await client.createDatabase('/path/new.db');
} Defensive patterns
Strategy: validation
Validate before calling
if (client.isRemote) {
// route to provider CLI/API instead: turso db create <name>
} else {
await client.createDatabase(localFilePath);
} Type guard
function isLocalLibsqlTarget(path: string): boolean {
return !/^:memory:$|libsql:|^http:|^https:|^ws:|^wss:/.test(path);
} Try / catch
try {
await client.createDatabase(path);
} catch (e) {
if (e.message.includes('Creating database on remote server')) {
notifyUser('Create the database via your provider CLI (e.g. turso db create), then connect');
} else throw e;
} Prevention
- Check isRemote before any create-database flow
- Provision remote libsql/Turso databases with the provider's CLI or API, not the SQL client
- Only offer the create-database action for local file targets in the UI
When it happens
Trigger: Calling _createDatabase (or the create-database flow that routes through it) while the client is connected to a remote libsql endpoint (isRemote true, e.g. https://xxx.turso.io).
Common situations: User tries 'create database' against a Turso/libsql server URL; app-level code creates a database as part of a setup flow without checking whether the target is remote.
Related errors
- Schemas are not supported
- Query Streaming is not currently supported for clickhouse
- Dropping ${typeOfElement} is not supported.
- Copy to SQL is not supported for DynamoDB connections.
- DynamoDB does not support dropping ${typeOfElement}
AI-assisted analysis of beekeeper-studio/beekeeper-studio@4e3e03e322 (2026-08-31).
Data as JSON: /api/errors/a3878b57498d4458.
Report an issue: GitHub.