Documentation Quickstart
Get started
Give your team a shared organization, provision its first database, and find the HTTPS endpoint your application will call.
Create an organization
At signup, choose an organization name, a personal login, and a password. Sign in with that login to see your organizations. You’re an administrator of the organization you created.
Already signed in? Use New organization on the organizations page to create another under the same login.
Provision a database
- Open your organization in the console.
- Enter an available database name and select Create database.
- Save the generated password for the database user
rootin your password manager. The console shows it once. It remains valid until an administrator resets it. - Open the database and refresh its detail page until Provisioning status shows
provisioned. A new request can initially showpending.
Names are unique across organizations in this cluster. Use 1–63 lowercase ASCII letters, digits, or hyphens. The first and last characters must be letters or digits. appdb-system is reserved.
Connect to your database
The database name becomes the first label of its HTTPS endpoint. For a database named field-notes-lab, configure your client to use the following origin.
https://field-notes-lab.db.appdb.cloud- Console credentials
- Use your personal login and password at the console or in
appdbctl. Your membership determines what you can manage in each organization. - Database credentials
- The
rootlogin belongs to the database you just created. Use it with a database administration client. Give each application a named database user and grant it the roles it needs.
Database password credentials use the form db.<username>.<password>. For a user named notes-api, the login begins with db.notes-api. followed by its generated password. Supply the complete string when a native database client asks for your credential. Browser clients authenticate application users with signed app tokens.
API clients send requests to exported functions at the database origin. For browser sign-in, use the console URL.
Manage database users
As an administrator of the organization, open the database’s detail page. Add a username such as notes-api and save its generated credential. Choose 1–63 lowercase ASCII letters, digits, hyphens or underscores, starting with a letter. The same username in another database has an independent password and grants.
A credential change can show pending while it is being applied. Refresh the database detail page and look for active beside the username before connecting. To give a new application user access to protected functions, grant it the appropriate database role with an authorized database administration client.
Reset a password
Open the same database, choose the database username, and reset its password. Save the replacement and update clients that use it. Once the change is active, subsequent authentication requires the new password. A reset preserves the user’s role grants.
If you lose the initial root password, reset root here. Your personal console password and your memberships in other organizations stay separate from this database login.
Use the console CLI
appdbctl supports the same signup, organization and database flows from your terminal. The download is a Linux x86‑64 executable for systems with glibc.
Download appdbctl · SHA-256 checksum
curl -fsSLO https://docs.appdb.cloud/downloads/appdbctl-linux-amd64.tar.gz
curl -fsSLO https://docs.appdb.cloud/downloads/appdbctl-linux-amd64.tar.gz.sha256
sha256sum -c appdbctl-linux-amd64.tar.gz.sha256
mkdir -p "$HOME/.local/bin"
tar -xzf appdbctl-linux-amd64.tar.gz -C "$HOME/.local/bin" appdbctl
export PATH="$HOME/.local/bin:$PATH"Set the console URL, then replace the example names with your login and organization. The password prompt is interactive.
export APPDB_CONSOLE_URL=https://console.appdb.cloud
export APPDB_ORG=your-organization
appdbctl login your-login
appdbctl orgs
appdbctl databases "$APPDB_ORG"To create a database from the terminal, choose its unique name and check its provisioning status.
export APPDB_DB=your-database-name
appdbctl create-db "$APPDB_ORG" "$APPDB_DB"
appdbctl database "$APPDB_ORG" "$APPDB_DB"Save the root login printed by create-db when the database is created. The last command prints the database name, shard identifier, and provisioning status. Use appdbctl logout to remove the saved local session.
Write a DBL package
Open the DBL language guide for runnable packages, data types, indexed queries, permissions, and deployments.
A DBL package defines your tables and the operations clients can call. This example stores notes by ID. The constraint rejects empty bodies, and the primary key ensures each ID identifies one note.
namespace notes;
table Note {
id: UInt8,
body: Text,
primary key(id),
check body != "",
}
export write fn add(id: UInt8, body: Text) -> () {
Note.insert({
id: id,
body: body,
});
}
export fn exists(id: UInt8) -> Bool {
return Note.get(id) != null;
}add runs as a write transaction. exists reads the row by primary key and returns a boolean. A database administrator stages and activates a package version before an application binds to that version and calls its exports.
Invite a teammate
From your organizations page, choose the organization, enter your teammate’s login, and create an invitation. Share the invitation code privately with its recipient.
New users can claim their invitation by choosing a password. Existing users sign in and accept the code from the organizations page. One login can belong to several organizations.