> ## Documentation Index
> Fetch the complete documentation index at: https://taskdaemon.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

# Installation

Multiple ways to install and run TaskDaemon.

## Docker Hub (Recommended)

```bash theme={null}
docker pull mshelia/taskdaemon
docker run -d \
  -p 8080:8080 -p 50051:50051 \
  -v ./handlers.toml:/app/handlers.toml \
  -v /var/run/docker.sock:/var/run/docker.sock \
  mshelia/taskdaemon
```

## Build from Source

### Prerequisites

* Rust 1.80+
* protoc (Protocol Buffers compiler)

### Build

```bash theme={null}
git clone https://github.com/jona62/TaskDaemon.git
cd TaskDaemon
cargo build --release
```

### Run

```bash theme={null}
./target/release/task-daemon --config handlers.toml
```

## Build Docker Image Locally

```bash theme={null}
git clone https://github.com/jona62/TaskDaemon.git
cd TaskDaemon
docker build -t taskdaemon .
docker run -d \
  -p 8080:8080 -p 50051:50051 \
  -v ./handlers.toml:/app/handlers.toml \
  -v /var/run/docker.sock:/var/run/docker.sock \
  taskdaemon
```

## As a Library

Add to your `Cargo.toml`:

```toml theme={null}
[dependencies]
task-daemon = { git = "https://github.com/jona62/TaskDaemon" }
```

Usage:

```rust theme={null}
use task_daemon::core::{Config, TaskDaemon};
use task_daemon::storage::SqliteQueue;
use task_daemon::handler::{ContainerRegistry, HandlerConfig};
use task_daemon::protocol::{http, grpc};
```

## CLI Options

```
Options:
  -w, --workers <WORKERS>      Number of worker threads
      --http-port <HTTP_PORT>  HTTP server port
      --grpc-port <GRPC_PORT>  gRPC server port
      --db-path <DB_PATH>      Database path
      --log-level <LOG_LEVEL>  Log level (trace, debug, info, warn, error)
      --config <CONFIG>        Handler config file path
  -h, --help                   Print help
  -V, --version                Print version
```

## Verify Installation

```bash theme={null}
# Docker
docker run --rm mshelia/taskdaemon --version

# Local binary
./target/release/task-daemon --version
```
