Skip to content

SurrealDB

Frona AI uses SurrealDB 3.0 as its database, running embedded inside the engine process with RocksDB as the storage backend. There’s no separate database server to manage.

SurrealDB runs in-process. It starts when the engine starts and stops when the engine stops. Data is stored on disk at the path configured by FRONA_DATABASE_PATH (default: data/db).

This approach keeps the deployment simple. You don’t need to set up, connect to, or manage a separate database service.

VariableDefaultDescription
FRONA_DATABASE_PATHdata/dbPath to the database files

The database uses RocksDB under the hood, which stores data as a set of files in the configured directory. These files include:

  • Data files (SST files)
  • Write-ahead logs (WAL)
  • Manifest files

To persist data across container restarts, mount the database directory as a Docker volume:

volumes:
- ./data:/app/data

Without this, data is lost when the container is removed.

RocksDB is optimized for fast writes and efficient storage. For most deployments, the default settings work well.

If you’re running on an SSD (recommended), you’ll get the best performance. HDD storage works but may be noticeably slower under load.

See Backups for how to back up the database.