Drivebase Logo

Installation

Detailed guide for installing Drivebase in different environments

Drivebase can be installed in several ways depending on your needs. For most users, we recommend using Docker Compose with our pre-built image.

Prerequisites

Regardless of the installation method, you will need:

  • PostgreSQL: Version 14 or higher.
  • Redis: For caching and session management.

Using Docker Compose is the easiest way to manage Drivebase. You can start it instantly with our automated installer:

wget -qO- https://drivebase.one/install | bash

Manual Compose Setup

If you prefer to manage the file locally:

  1. Download the Production Compose file:

    # Using wget
    wget -O compose.yaml https://drivebase.one/compose
    
    # OR using curl
    curl -o compose.yaml https://drivebase.one/compose
  2. Configure your environment: Create a .env.local file in the same directory:

    touch .env.local

    Add your specific settings (see Configuration).

    You can generate strong secrets for JWT_SECRET and ENCRYPTION_KEY using

    openssl rand -base64 32

  3. Start the stack:

    docker compose --env-file .env.local up -d

From Source Code

If you want to run the latest code from the repository using Docker:

  1. Clone the repository:

    git clone https://github.com/drivebase/drivebase.git
    cd drivebase
  2. Configure your environment:

    cp .env.example .env.local
    # Edit .env.local with your specific settings
  3. Build and start:

    # This will build the image locally using the default compose.yaml
    docker compose --env-file .env.local up -d --build

Local Development (with Bun)

If you want to contribute to Drivebase or run it manually for development:

  1. Install Bun: Follow instructions at bun.sh.

  2. Install dependencies:

    bun install
  3. Run database migrations: Make sure your PostgreSQL instance is running and configured in .env.local, then:

    bun run db:migrate
  4. Start the development server:

    bun run dev

    This will start the API server and the frontend in development mode with hot-reloading.

Troubleshooting Installation

If you encounter issues during installation:

  • Ensure ports 3000 (App) and 4000 (API, if running separately) are not in use.
  • Verify that PostgreSQL and Redis are accessible using the credentials provided in your .env.local file.
  • Check the container logs: docker compose logs -f.

On this page