Installation and Setup
Relevant source files
The following files were used as context for generating this wiki page:
dbt Core v2.0 is distributed as a single self-contained binary, eliminating the need for a Python runtime or complex dependency management. The project supports major operating systems including macOS, Linux, and Windows across x86-64 and ARM architectures.
Sources: README.md:27-30, README.md:37-45
General Installation Methods
Users can choose between several distribution methods depending on their environment and requirements. The baseline distribution is dbt Core, which is Apache 2.0 licensed. An extended version, Fusion, is also available for enhanced SQL comprehension and advanced features.
Sources: README.md:21-25, README.md:65-71
Shell Script Installation
The primary method for Unix-like systems (Linux/macOS) is a shell-based installer that automates binary retrieval and environment configuration.
The installation script automatically detects the target platform (e.g., aarch64-apple-darwin for Apple Silicon or x86_64-unknown-linux-gnu for Intel Linux) and installs the binary to a specified destination, defaulting to $HOME/.local/bin.
Sources: crates/dbt-common/assets/install.sh:248-270, crates/dbt-common/assets/install.sh:585-610
Homebrew (macOS/Linux)
dbt Core provides Homebrew formulae rendered from release tarballs. The installation process via Homebrew handles architecture-specific logic using on_macos/on_linux and on_arm/on_intel blocks.
Sources: crates/dbt-ci/src/homebrew/render.rs:10-18, crates/dbt-ci/README.md:46-56
| Platform Target | Brew Architecture Mapping |
|---|---|
aarch64-apple-darwin | macOS Arm |
x86_64-apple-darwin | macOS Intel |
aarch64-unknown-linux-gnu | Linux Arm |
x86_64-unknown-linux-gnu | Linux Intel |
Sources: crates/dbt-ci/src/homebrew/render.rs:188-198
Development Environment Setup
For contributors, dbt Core requires the Rust toolchain and specific testing utilities. Unlike v1, no virtual environments are required for development.
Tooling Requirements
- Rust Toolchain: Required for compiling the project from source.
- Nextest: The preferred testing framework for all tests and testbench configurations.
Sources: CONTRIBUTING.md:18-22
Building from Source
- Clone the repository: `git clone https://github.com/dbt-labs/dbt-core.git%60
- Build for debug:
cargo build - Build for release:
cargo build --release
Sources: CONTRIBUTING.md:23-27
Documentation Server Setup
The documentation server (dbt-docs-server) is built into the Fusion binary and can be served locally or via containers. It is a read-only, stateless server that loads Parquet artifacts from a dbt project.
Local Documentation Server
To serve documentation locally, users must first generate artifacts using the --write-index flag:
dbt --write-index compile # Generates parquet artifacts in target/index/
dbt docs serve # Binds to 127.0.0.1:8580
Sources: crates/dbt-docs-server/README.md:46-56
Docker Deployment
The documentation server can be deployed using a Dockerfile or Docker Compose. It requires outbound HTTPS access on the first boot to download the ADBC DuckDB driver from public.cdn.getdbt.com.
Environment Configuration
The installation script attempts to update user shell configuration files (.bashrc, .zshrc, or config.fish) to include the binary path and aliases.
- PATH Update: Adds the installation directory to the system
$PATH. - Alias: Creates the
dbtfalias pointing to the installed binary (e.g.,alias dbtf=$dest/dbt).