---
title: macOS
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > Agent > Supported Platforms > macOS
---

# macOS

## Overview{% #overview %}

This page outlines the basic features of the Datadog Agent for macOS. See the [Supported Platforms](https://docs.datadoghq.com/agent/supported_platforms.md?tab=macos) documentation for the complete list of supported macOS distributions and versions.

## Install the Agent{% #install-the-agent %}

To install the Agent on macOS, follow the [in-app instructions in Fleet Automation](https://app.datadoghq.com/fleet/install-agent/latest?platform=macos), and run the generated script on your hosts.

{% image
   source="https://docs.dd-static.net/images/agent/basic_agent_usage/macos_img_installation.64dbfa0e404712b75d1ea27d8cf6d559.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/agent/basic_agent_usage/macos_img_installation.64dbfa0e404712b75d1ea27d8cf6d559.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="In-app installation steps for the Datadog Agent on a MacOS host." /%}

{% alert level="info" %}
The Agent is installed in a sandbox located at `/opt/datadog-agent`. For any additional monitoring, make sure to give the Agent user `_dd-agent` access to the files or directories.
{% /alert %}

## Commands{% #commands %}

The `launchctl` service manager controls the Agent lifecycle, while other commands can be executed through the Agent binary, systray app, or web GUI.

| Description                        | Command                                                  |
| ---------------------------------- | -------------------------------------------------------- |
| Start Agent as a service           | `sudo launchctl kickstart system/com.datadoghq.agent`    |
| Stop Agent running as a service    | `sudo launchctl kill SIGTERM system/com.datadoghq.agent` |
| Restart Agent running as a service | `sudo launchctl kickstart -k system/com.datadoghq.agent` |
| Status of Agent service            | `sudo launchctl print system/com.datadoghq.agent`        |
| Status page of running Agent       | `sudo datadog-agent status` or web GUI                   |
| Send flare                         | `sudo datadog-agent flare` or web GUI                    |
| Display command usage              | `datadog-agent --help`                                   |
| Run a check                        | `sudo datadog-agent check <CHECK_NAME>`                  |

## Configuration{% #configuration %}

The [Datadog Agent configuration file](https://docs.datadoghq.com/agent/configuration/agent-configuration-files.md#agent-main-configuration-file) is located in `/opt/datadog-agent`. This YAML file holds the host-wide connection details used to send data to Datadog including:

- `api_key`: your organization's [Datadog API key](https://app.datadoghq.com/organization-settings/api-keys)
- `site`: target Datadog region (for example `datadoghq.com`, `datadoghq.eu`, `ddog-gov.com`, `us2.ddog-gov.com`)
- `proxy`: HTTP/HTTPS proxy endpoints for outbound traffic (see [Datadog Agent Proxy Configuration](https://docs.datadoghq.com/agent/configuration/proxy.md))
- Default tags, log levels, and Datadog configurations.

A fully commented reference file, located in `/opt/datadog-agent/etc/datadog.yaml.example`, lists every available option for comparison or copy-paste. Alternatively, see the [sample config_template.yaml file](https://github.com/DataDog/datadog-agent/blob/master/pkg/config/config_template.yaml) for all available configuration options.

### Integration files{% #integration-files %}

Configuration files for integrations are found in `/opt/datadog-agent/etc/conf.d/`. Each integration has its own sub-directory, `<INTEGRATION>.d/`, which contains:

- `conf.yaml`: the active configuration controlling how the integration gathers metrics and logs
- `conf.yaml.example`: a sample illustrating supported keys and defaults

## Uninstall the Agent{% #uninstall-the-agent %}

To uninstall the Agent, run the following script:

```shell
curl -L https://install.datadoghq.com/scripts/uninstall_mac_os.sh | bash
```

## Troubleshooting{% #troubleshooting %}

See the [Agent Troubleshooting documentation](https://docs.datadoghq.com/agent/troubleshooting.md) for troubleshooting steps.

## Working with the embedded Agent{% #working-with-the-embedded-agent %}

The Agent contains an embedded Python environment at `/opt/datadog-agent/embedded/`. Common binaries such as `python` and `pip` are contained within `/opt/datadog-agent/embedded/bin/`.

See the instructions on how to [add packages to the embedded Agent](https://docs.datadoghq.com/extend/guide/custom-python-package.md) for more information.

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

- [Collect your logs](https://docs.datadoghq.com/logs.md)
- [Collect your processes](https://docs.datadoghq.com/infrastructure/process.md)
- [Collect your traces](https://docs.datadoghq.com/tracing.md)
- [Find out more about the Agent's architecture](https://docs.datadoghq.com/agent/architecture.md#agent-architecture)
- [Configure inbound ports](https://docs.datadoghq.com/agent/configuration/network.md#configure-ports)
