---
title: "Autostart (MacOS) | WebhookRelay"
meta:
  "og:description": "Learn how to configure background service so that Webhook Relay agent connects on MacOS startup"
  "og:title": "Autostart (MacOS)"
  description: "Learn how to configure background service so that Webhook Relay agent connects on MacOS startup"
---

![Stripes](https://webhookrelay.com/docs/installation/autostart-macos/images/stripes.svg)

Documentation

**Fundamentals**

# **Autostart (MacOS)**

Learn how to configure background service so that Webhook Relay agent connects on MacOS startup

For MacOS we recommend using [Docker](https://webhookrelay.com/docs/installation/autostart-macos/docs/installation/docker) installation method as you can start a container with `-d` flag to run the agent in the background.

## [Prerequisites](#prerequisites)

- MacOS machine
- [Webhook Relay account](https://my.webhookrelay.com)

## [Install relay client](#install-relay-client)

Download and install the relay client:

```
curl https://my.webhookrelay.com/webhookrelay/downloads/install-cli.sh | bash
```

Create a config file in `/etc/webhookrelay/config.yaml`:

```
sudo mkdir -p /etc/webhookrelay
```

With contents (get your key and secret from [here](https://my.webhookrelay.com/tokens)):

```
vim /etc/webhookrelay/config.yaml
```

```
version: "v1"
key: your-secret-key # will be encrypted on startup
secret: your-secret  # will be encrypted on startup
buckets:
- my-bin
```

To install the service provide a full path to relay configuration file:

```
relay service install -c /etc/webhookrelay/config.yaml -u your-user
```

Did this page help you?