﻿---
title: Example: A shared configuration file
description: Below is an example YAML configuration file $HOME/.ecctl/config.yaml that will effectively point and configure the binary for Elastic Cloud: 
url: https://www.elastic.co/elastic/docs-builder/docs/3028/reference/ecctl/ecctl-example-shared-configuration-file
products:
  - Elastic Cloud Control
---

# Example: A shared configuration file
Below is an example `YAML` configuration file `$HOME/.ecctl/config.yaml` that will effectively point and configure the binary for Elastic Cloud:
```yaml
host: https://api.elastic-cloud.com

# Credentials
## api_key is the preferred authentication mechanism.
api_key: bWFyYzo4ZTJmNmZkNjY5ZmQ0MDBkOTQ3ZjI3MTg3ZWI5MWZhYjpOQktHY05jclE0cTBzcUlnTXg3QTd3

## username and password can be used when no API key is available.
user: username
pass: password
```