---
title: Install Datadog CoTerm
description: >-
  Install CoTerm on macOS and Linux, configure authorization with Datadog, and
  set up your CoTerm configuration settings.
breadcrumbs: Docs > Datadog CoTerm > Install Datadog CoTerm
---

# Install Datadog CoTerm

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ().
{% /alert %}

{% /callout %}

CoTerm is supported on macOS and Linux.

1. Install Datadog CoTerm with Homebrew or curl:

**brew** (macOS only)

   ```shell
   brew install coterm
   ```

**curl**

   ```shell
   curl --tlsv1.2 --proto '=https' -sSf 'https://coterm.datadoghq.com/install-ddcoterm.sh' | bash
   ```

This command downloads the latest version of CoTerm to `.ddcoterm/bin/ddcoterm` and updates your PATH in `.bashrc` and `.zshrc`. Restart your terminal or source your profile. If you are using a shell other than Bash or Zsh, add `path/to/.ddcoterm/bin` to your PATH manually.

1. If your [Datadog site](https://docs.datadoghq.com/getting_started/site.md) is not `https://app.datadoghq.com`, set your site in `.ddcoterm/config.yaml` under `connection_config.host`:

   ```yaml
   ...
   connection_config:
     host: 
   ...
   ```

1. Initialize your configuration file by running:

   ```shell
   ddcoterm init
   ```

Select your settings. You can change these settings in the `~/.ddcoterm/config.yaml` file.

## Authorize CoTerm to connect to Datadog{% #authorize-coterm-to-connect-to-datadog %}

During initialization, you can choose one of the following ways to authorize CoTerm to access your Datadog Account:

- **OAuth**: Opens a browser for you to log in with OAuth.
- **API Key + App Key**: Prompts you to set your [Datadog API key](https://app.datadoghq.com/organization-settings/api-keys) and [application key](https://app.datadoghq.com/organization-settings/application-keys) in `~/.ddcoterm/config.yaml`.
- **API Key Only**: Prompts you to set your Datadog API key in `~/.ddcoterm/config.yaml`.

{% alert level="info" %}
If you select the **API Key Only** option, you cannot [require approvals with Case Management](https://docs.datadoghq.com/coterm/usage.md#require-approval-for-commands).
{% /alert %}

## Configure your CoTerm settings{% #configure-your-coterm-settings %}

The `~/.ddcoterm/config.yaml` file contains your CoTerm configurations:

{% dl %}

{% dt %}
`process_config`
{% /dt %}

{% dd %}
Configure CoTerm to act as a linter and take certain actions when it intercepts a command that matches a rule. See [CoTerm Configuration Rules](https://docs.datadoghq.com/coterm/rules.md).
{% /dd %}

{% dt %}
`enable_telemetry`
{% /dt %}

{% dd %}
Enable or disable sending telemetry to Datadog. Defaults to `false`.
{% /dd %}

{% dt %}
`enable_ptrace`
{% /dt %}

{% dd %}
Enable or disable experimental `ptrace`-based process monitoring on Linux. Defaults to `false`.
{% /dd %}

{% dt %}
`connection_config`
{% /dt %}

{% dd %}

{% dl %}

{% dt %}
`host`
{% /dt %}

{% dd %}
Host for connecting to Datadog. Defaults to `https://app.datadoghq.com`.
{% /dd %}

{% dt %}
`port`
{% /dt %}

{% dd %}
Port for connecting to Datadog. Defaults to `443`.
{% /dd %}

{% dt %}
`api_key`
{% /dt %}

{% dd %}
If you are not using OAuth, your [Datadog API key](https://app.datadoghq.com/organization-settings/api-keys). If you have enabled OAuth, CoTerm defaults to using OAuth and ignores `api_key`.
{% /dd %}

{% dt %}
`app_key`
{% /dt %}

{% dd %}
If you are not using OAuth, your [Datadog application key](https://app.datadoghq.com/organization-settings/application-keys).**Note**: To [require approvals with Case Management](https://docs.datadoghq.com/coterm/usage.md#require-approval-for-commands), you must use OAuth *or* specify both your API key and application key in this file.
{% /dd %}

{% /dl %}

{% /dd %}

{% /dl %}

## Next steps{% #next-steps %}

- Run `ddcoterm` to start a recorded terminal session.
- Learn more about [using CoTerm](https://docs.datadoghq.com/coterm/usage.md).

## Uninstall{% #uninstall %}

To uninstall CoTerm, delete the `.ddcoterm` folder.

## Further reading{% #further-reading %}

- [Datadog CoTerm](https://docs.datadoghq.com/coterm.md)
- [Using CoTerm](https://docs.datadoghq.com/coterm/usage.md)
- [CoTerm Configuration Rules](https://docs.datadoghq.com/coterm/rules.md)
