import { Tabs } from 'nextra/components'
import { Steps } from 'nextra/components'

# Installing Root CA

To ensure your browser trusts certificates issued by TrustLab, you must install our Root CA.

## Quick Installation (Bundle)

Instantly install **ALL** TrustLab Root & Intermediate certificates using our automated bundle scripts.

### Linux / Server (CLI)

Select your distribution to get the optimized installation command:

<Tabs items={['Debian/Ubuntu', 'RHEL/CentOS', 'Arch Linux', 'Universal']}>
  <Tabs.Tab>
    ```bash
    sudo apt update && sudo apt install -y curl && curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
    ```
  </Tabs.Tab>
  <Tabs.Tab>
    ```bash
    (sudo yum install -y curl || sudo dnf install -y curl) && curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
    ```
  </Tabs.Tab>
  <Tabs.Tab>
    ```bash
    sudo pacman -Sy --noconfirm curl && curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
    ```
  </Tabs.Tab>
  <Tabs.Tab>
    ```bash
    curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
    ```
  </Tabs.Tab>
</Tabs>

### Windows / macOS
*   **Windows**: [Download Bundle Installer (.bat)](https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.bat) (Right-click > Run as Admin)
*   **macOS/iOS**: [Download Configuration Profile (.mobileconfig)](https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.mobileconfig)

---

## Individual Certificate Installation

If you need to install specific certificates individually (e.g. only Root, or specific Intermediate), use the options below.

<Tabs items={['Windows', 'macOS', 'Android', 'Linux']}>
  <Tabs.Tab>
    <Steps>
      ### Download Certificate
      Choose the format that works best for you:

      | Certificate | Raw File | Auto-Installer Script |
      | :--- | :--- | :--- |
      | **Root CA** | **[dydev-its-true.crt](https://cdn.trustlab.dyzulk.com/ca/dydev-its-true.crt)** | **[Installer (.bat)](https://cdn.trustlab.dyzulk.com/ca/installers/trustlab-dydev-its-true.bat)** |
      | **Intermediate (4096)** | [trustlab-intermediate-ca-4096.crt](https://cdn.trustlab.dyzulk.com/ca/trustlab-intermediate-ca-4096.crt) | [Installer (.bat)](https://cdn.trustlab.dyzulk.com/ca/installers/trustlab-trustlab-intermediate-ca-4096.bat) |
      | **Intermediate (2048)** | [trustlab-intermediate-ca-2048.crt](https://cdn.trustlab.dyzulk.com/ca/trustlab-intermediate-ca-2048.crt) | [Installer (.bat)](https://cdn.trustlab.dyzulk.com/ca/installers/trustlab-trustlab-intermediate-ca-2048.bat) |

      *For Scripts: Right-click the `.bat` file and select "Run as Administrator".*

      ### Manual Install (Raw File)
      1. Double-click the `.crt` file -> **Install Certificate**.
      2. Select **Local Machine**.
      3. For Root: Place in **Trusted Root Certification Authorities**.
      4. For Intermediate: Place in **Intermediate Certification Authorities**.
    </Steps>
  </Tabs.Tab>
  <Tabs.Tab>
    <Steps>
      ### Download
      
      | Certificate | Raw File | Profile |
      | :--- | :--- | :--- |
      | **Root CA** | **[dydev-its-true.crt](https://cdn.trustlab.dyzulk.com/ca/dydev-its-true.crt)** | **[Profile (.mobileconfig)](https://cdn.trustlab.dyzulk.com/ca/installers/trustlab-dydev-its-true.mobileconfig)** |
      | **Intermediate (4096)** | [4096.crt](https://cdn.trustlab.dyzulk.com/ca/trustlab-intermediate-ca-4096.crt) | [Profile (.mobileconfig)](https://cdn.trustlab.dyzulk.com/ca/installers/trustlab-trustlab-intermediate-ca-4096.mobileconfig) |
      | **Intermediate (2048)** | [2048.crt](https://cdn.trustlab.dyzulk.com/ca/trustlab-intermediate-ca-2048.crt) | [Profile (.mobileconfig)](https://cdn.trustlab.dyzulk.com/ca/installers/trustlab-trustlab-intermediate-ca-2048.mobileconfig) |

      ### Install
      *   **Profile**: Double-click `.mobileconfig` -> Go to System Settings -> Privacy & Security -> Profiles -> Install.
      *   **Raw**: Double-click `.crt` -> Keychain Access -> System -> **Always Trust**.
    </Steps>
  </Tabs.Tab>
  <Tabs.Tab>
    <Steps>
      ### Download
      
      | Certificate | Raw File | DER Format |
      | :--- | :--- | :--- |
      | **Root CA** | **[dydev-its-true.crt](https://cdn.trustlab.dyzulk.com/ca/dydev-its-true.crt)** | **[dydev-its-true.der](https://cdn.trustlab.dyzulk.com/ca/dydev-its-true.der)** |
      | **Intermediate (4096)** | [4096.crt](https://cdn.trustlab.dyzulk.com/ca/trustlab-intermediate-ca-4096.crt) | [4096.der](https://cdn.trustlab.dyzulk.com/ca/trustlab-intermediate-ca-4096.der) |
      | **Intermediate (2048)** | [2048.crt](https://cdn.trustlab.dyzulk.com/ca/trustlab-intermediate-ca-2048.crt) | [2048.der](https://cdn.trustlab.dyzulk.com/ca/trustlab-intermediate-ca-2048.der) |

      ### Install
      Settings -> Security -> Encryption & Credentials -> Install a certificate -> CA Certificate.
    </Steps>
  </Tabs.Tab>
  <Tabs.Tab>
    <Steps>
      ### Download & Install (CLI)
      You can download the raw file or run the installer script directly:

      | Certificate | Raw File | One-Liner Installer |
      | :--- | :--- | :--- |
      | **Root CA** | [dydev-its-true.crt](https://cdn.trustlab.dyzulk.com/ca/dydev-its-true.crt) | `curl -sL https://cdn.trustlab.dyzulk.com/ca/installers/trustlab-dydev-its-true.sh | sudo bash` |
      | **Intermediate (4096)** | [4096.crt](https://cdn.trustlab.dyzulk.com/ca/trustlab-intermediate-ca-4096.crt) | `curl -sL https://cdn.trustlab.dyzulk.com/ca/installers/trustlab-trustlab-intermediate-ca-4096.sh | sudo bash` |
      | **Intermediate (2048)** | [2048.crt](https://cdn.trustlab.dyzulk.com/ca/trustlab-intermediate-ca-2048.crt) | `curl -sL https://cdn.trustlab.dyzulk.com/ca/installers/trustlab-trustlab-intermediate-ca-2048.sh | sudo bash` |

      ### Manual Place
      If using raw file:
      ```bash
      sudo cp *.crt /usr/local/share/ca-certificates/
      sudo update-ca-certificates
      ```
    </Steps>
  </Tabs.Tab>
</Tabs>
