System Requirements
Minimum Requirements
- CPU: 1 core (x86_64/amd64 or aarch64/arm64)
- RAM: 256 MB minimum, 512 MB recommended
- Disk: 100 MB for the binary, plus storage for your data
- OS: Linux, macOS, or Windows
Supported Architectures
- x86_64/amd64: Linux, macOS, Windows
- aarch64/arm64: Linux, macOS
- ARMv7/ARMv6: Linux (via Docker)
TrailBase is built on Rust and SQLite, making it extremely efficient. The single executable includes everything needed to run, including the embedded database engine.
Installation Methods
TrailBase offers multiple installation methods to suit your deployment preferences.Quick Install Script
The fastest way to install TrailBase is using the official install script:- Download the latest release for your platform
- Extract the binary to
~/.local/bin(Linux/macOS) or~/instl/trailbase(Windows) - Add the binary location to your PATH
- Make the
trailcommand available system-wide
Manual Download
Alternatively, download pre-built binaries directly from GitHub Releases:Download the binary
Choose the appropriate archive for your system:
trailbase-linux-x86_64.tar.gz- Linux (Intel/AMD)trailbase-linux-aarch64.tar.gz- Linux (ARM)trailbase-macos-x86_64.tar.gz- macOS (Intel)trailbase-macos-aarch64.tar.gz- macOS (Apple Silicon)trailbase-windows-x86_64.zip- Windows
Docker Installation
For containerized deployments, use the official Docker image:See the Docker deployment guide for more detailed container configuration.
First Run
Once installed, start TrailBase with therun command:
- Create a
./traildepotdirectory in your current working directory - Initialize the SQLite databases
- Create an admin user with random credentials
- Print the admin credentials to the terminal
- Start the HTTP server on
localhost:4000
Data Directory Structure
TrailBase stores all runtime data in the data directory (default:./traildepot):
The data directory is the only folder you need to back up to preserve your entire TrailBase instance.
Deployment Strategies
Single Server Deployment
The simplest deployment runs TrailBase as a single process on a server:- Small to medium applications
- Internal tools
- Development and staging environments
- Applications with read-heavy workloads
Behind a Reverse Proxy
For production deployments, run TrailBase behind a reverse proxy like nginx or Caddy:- SSL/TLS termination
- Load balancing
- Static file serving
- Request buffering
- DDoS protection
Multi-Instance (Read Replicas)
For read-heavy applications, deploy multiple read-only instances:Create periodic backups
Use SQLite backup or file-system snapshots to create read-only copies of the database.
Deploy read replicas
Start additional TrailBase instances pointing to the read-only database copies.
Command Line Options
TrailBase accepts several command-line options for deployment:Global Options
--data-dir <PATH>- Directory for runtime files (default:./traildepot)--public-url <URL>- Public URL for auth emails and OAuth redirects--version- Print version information
Run Command Options
--address <HOST:PORT>- HTTP server bind address (default:localhost:4000)--admin-address <HOST:PORT>- Separate address for admin UI and APIs--public-dir <PATH>- Serve static assets from this directory--spa- Enable SPA fallback (serve index.html for routes)--runtime-root-fs <PATH>- Sandboxed filesystem root for WASM runtime--geoip-db-path <PATH>- Path to MaxMind GeoIP database--dev- Enable permissive CORS for development--cors-allowed-origins <ORIGINS>- Limit allowed CORS origins (default:*)--runtime-threads <N>- Number of JavaScript isolates (default: #cpus)
Environment Variables
All command-line options can be set via environment variables:DATA_DIRPUBLIC_URLADDRESSADMIN_ADDRESSPUBLIC_DIRSPARUNTIME_ROOT_FSGEOIP_DB_PATHRUNTIME_THREADS
Next Steps
Docker Deployment
Run TrailBase in containers with Docker and docker-compose
Production Setup
Production checklist, security, backups, and monitoring
Configuration
Detailed configuration options and environment variables