Overview
TrailBase is distributed as a single executable with no external dependencies. Choose the installation method that works best for your platform and workflow.Quick Install
Use installation scripts for fastest setup
GitHub Releases
Download pre-built binaries manually
Docker
Run in containers for easy deployment
Build from Source
Compile yourself for customization
Quick Install (Recommended)
The fastest way to install TrailBase is using the installation scripts:- Linux & macOS
- Windows
- Detect your platform and architecture
- Download the latest TrailBase release
- Extract the
trailbinary - Make it executable and add to your PATH
The script installs to
~/.local/bin/trail. Make sure this directory is in your PATH.Verify Installation
GitHub Releases
For more control over the installation, download pre-built binaries directly from GitHub.Download Binary
Visit the TrailBase Releases page and download the appropriate archive for your platform:
- Linux (x86_64):
trailbase-x86_64-unknown-linux-gnu.tar.gz - Linux (ARM64):
trailbase-aarch64-unknown-linux-gnu.tar.gz - macOS (Intel):
trailbase-x86_64-apple-darwin.tar.gz - macOS (Apple Silicon):
trailbase-aarch64-apple-darwin.tar.gz - Windows (x86_64):
trailbase-x86_64-pc-windows-msvc.zip
Docker
Run TrailBase in a Docker container for easy deployment and isolation.Using Docker Run
- Basic Usage
- With Custom Config
- Development Mode
- Maps port 4000 to your host
- Mounts a volume for persistent data
- Runs the TrailBase server
The
traildepot directory will be created on your host and contain all database files and configuration.Docker Alias for Convenience
Create an alias to use thetrail command with Docker:
~/.bashrc or ~/.zshrc
Docker Compose
For production deployments with reverse proxy:docker-compose.yml
Caddyfile
Build from Source
For the latest features or to customize TrailBase, build from source.Prerequisites
You’ll need the following tools installed:- Rust (1.88+): Install from rustup.rs
- Node.js (18+) and pnpm: For admin UI
- Git: For cloning the repository
- Build tools:
- Linux:
build-essential,libgeos-dev,protobuf-compiler - macOS: Xcode Command Line Tools,
geos,protobuf(via Homebrew) - Windows: Visual Studio Build Tools
- Linux:
Install Dependencies
- Linux (Ubuntu/Debian)
- macOS
- Windows
Build Process
Build the Binary
- Development Build
- Release Build
target/debug/trailDevelopment builds are faster to compile but slower at runtime.Alternative: Build with Docker
Build a Docker image without installing dependencies:Platform-Specific Notes
Linux
- Static linking: Binaries are statically linked for maximum portability
- Systemd service: See Deployment Guide for systemd setup
- Permissions: TrailBase doesn’t require root, but needs write access to data directory
macOS
- Gatekeeper: First run may show security warning. Go to System Preferences → Security & Privacy to allow
- Apple Silicon: Native ARM64 builds available for M1/M2/M3 Macs
- Homebrew: A Homebrew formula is planned for future releases
Windows
- Symlinks: Enable symlinks for development (git config)
- Windows Defender: May flag the binary on first run (submit for analysis if needed)
- WSL: Can run Linux binaries in WSL2 for better performance
Configuration
After installation, TrailBase uses these defaults:- Data directory:
./traildepot - Server address:
localhost:4000 - Admin dashboard:
http://localhost:4000/_/admin - API base:
http://localhost:4000/api
Upgrading
To upgrade TrailBase:Quick Install Method
Re-run the installation script:Manual/Docker Method
- Download new release or pull new Docker image
- Stop the server
- Replace the binary or update image
- Restart the server
Uninstalling
To remove TrailBase:Quick Install
Remove Data
Troubleshooting
Binary not found in PATH
Binary not found in PATH
Problem: Running
trail shows “command not found”Solution:- Check if
~/.local/binis in your PATH:echo $PATH - Add to PATH in
~/.bashrcor~/.zshrc: - Reload shell:
source ~/.bashrc
Permission denied on Linux/macOS
Permission denied on Linux/macOS
Problem:
./trail: Permission deniedSolution: Make the binary executable:Port already in use
Port already in use
Problem: Or find and stop the process using port 4000:
Error: Address already in use (os error 48)Solution: Use a different port:Docker permission errors
Docker permission errors
Problem: Docker can’t access mounted volumesSolution:
- Ensure the directory exists:
mkdir -p traildepot - Check permissions:
chmod 755 traildepot - On Linux, may need to adjust user:
docker run --user $(id -u):$(id -g) ...
Build fails with missing dependencies
Build fails with missing dependencies
Problem: Build errors about missing librariesSolution:
- Ensure all dependencies are installed (see Prerequisites)
- Update Rust:
rustup update - Clean build:
cargo clean && cargo build - Check for platform-specific requirements in GitHub issues
Next Steps
Quickstart Guide
Get started with your first TrailBase application
Configuration
Learn about advanced configuration options
Deployment
Deploy TrailBase to production
Examples
Explore example projects