Skip to main content

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
The fastest way to install TrailBase is using the installation scripts:
This will:
  1. Detect your platform and architecture
  2. Download the latest TrailBase release
  3. Extract the trail binary
  4. 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.
1

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
2

Extract Archive

3

Make Executable (Linux/macOS)

4

Move to PATH

Move the trail binary to a directory in your PATH:
5

Verify Installation

You should see output like:

Docker

Run TrailBase in a Docker container for easy deployment and isolation.

Using Docker Run

This command:
  • 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 the trail command with Docker:
~/.bashrc or ~/.zshrc
Then use it like the native binary:

Docker Compose

For production deployments with reverse proxy:
docker-compose.yml
Example Caddyfile:
Caddyfile
Start the stack:

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

Install Dependencies

Build Process

1

Clone Repository

2

Initialize Submodules

TrailBase uses git submodules for some dependencies:
3

Install JavaScript Dependencies

This installs dependencies for the admin UI.
4

Build the Binary

The binary will be at: target/debug/trailDevelopment builds are faster to compile but slower at runtime.
5

Install Binary

Copy the binary to your PATH:
6

Verify Installation

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
Customize using command-line flags:
Or environment variables:

Upgrading

To upgrade TrailBase:

Quick Install Method

Re-run the installation script:

Manual/Docker Method

  1. Download new release or pull new Docker image
  2. Stop the server
  3. Replace the binary or update image
  4. Restart the server
Always backup your traildepot directory before upgrading:

Uninstalling

To remove TrailBase:

Quick Install

Remove Data

This will delete all your databases, uploads, and configuration!

Troubleshooting

Problem: Running trail shows “command not found”Solution:
  • Check if ~/.local/bin is in your PATH: echo $PATH
  • Add to PATH in ~/.bashrc or ~/.zshrc:
  • Reload shell: source ~/.bashrc
Problem: ./trail: Permission deniedSolution: Make the binary executable:
Problem: Error: Address already in use (os error 48)Solution: Use a different port:
Or find and stop the process using port 4000:
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) ...
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