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.
Docker Compose (Recommended)
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 | bashManual Compose Setup
If you prefer to manage the file locally:
-
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 -
Configure your environment: Create a
.env.localfile in the same directory:touch .env.localAdd your specific settings (see Configuration).
You can generate strong secrets for
JWT_SECRETandENCRYPTION_KEYusingopenssl rand -base64 32 -
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:
-
Clone the repository:
git clone https://github.com/drivebase/drivebase.git cd drivebase -
Configure your environment:
cp .env.example .env.local # Edit .env.local with your specific settings -
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:
-
Install Bun: Follow instructions at bun.sh.
-
Install dependencies:
bun install -
Run database migrations: Make sure your PostgreSQL instance is running and configured in
.env.local, then:bun run db:migrate -
Start the development server:
bun run devThis 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) and4000(API, if running separately) are not in use. - Verify that PostgreSQL and Redis are accessible using the credentials provided in your
.env.localfile. - Check the container logs:
docker compose logs -f.