# Debian / Ubuntu

> Install Trident on Debian, Ubuntu, and derivatives using APT with automatic or manual repository setup.

Install Trident on Debian, Ubuntu, and derivatives (Linux Mint, Pop!_OS, Kali, Raspberry Pi OS) using APT.

<Admonition type="info" title="Tested Distributions">
This installation method is tested end-to-end on **Debian 12 (Bookworm)** and **Ubuntu 24.04 (Noble Numbat)** using automated integration tests that verify binaries, configuration, systemd service, caching behavior, and graceful shutdown.
</Admonition>

## Automatic Setup

The repository setup script handles everything:

```bash
curl -sSL https://pkg.trident-cache.com/setup | sudo sh
```

Then install:

```bash
sudo apt-get install trident
```

## Manual Setup

If you prefer to configure the repository manually:

### 1. Install prerequisites

```bash
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
```

### 2. Import the GPG signing key

```bash
sudo mkdir -p /usr/share/keyrings
curl -fsSL https://pkg.trident-cache.com/gpg.key \
  | sudo gpg --dearmor -o /usr/share/keyrings/trident-archive-keyring.gpg
```

### 3. Add the repository

```bash
echo "deb [signed-by=/usr/share/keyrings/trident-archive-keyring.gpg] https://pkg.trident-cache.com/apt stable main" \
  | sudo tee /etc/apt/sources.list.d/trident.list
```

### 4. Install

```bash
sudo apt-get update
sudo apt-get install trident
```

## What Gets Installed

The package installs and configures the following:

| Component | Path |
|-----------|------|
| Main binary | `/usr/bin/trident` |
| CLI tool | `/usr/bin/trident-cli` |
| Default config | `/etc/trident/config.toml` |
| Systemd service | `/lib/systemd/system/trident.service` |
| Cache directory | `/var/lib/trident/` (owned by `trident:trident`) |
| Log directory | `/var/log/trident/` (owned by `trident:trident`) |

A `trident` system user and group are created automatically by the package's preinstall script.

## Verify Installation

```bash
trident --version
trident-cli --version
```

Check that the systemd service file is in place:

```bash
systemctl cat trident
```

## Next Steps

- [Configuration](https://docs.qoliber.com/docs/trident/configuration) -- edit `/etc/trident/config.toml`
- [Service Management](https://docs.qoliber.com/docs/trident/service) -- start and enable the systemd service
