# Configuration

After installing the LinuxGuard agent, you need to configure it to connect to your tenant and start sending telemetry data to the LinuxGuard console.

> **Note**: For container deployments, see the [Container Installation Guide](/how-to-guides/how-to/installation/container-installation.md) which includes container-specific enrollment instructions.

## Enrollment

The agent is enrolled using the `enroll` command, which connects the agent to your tenant account. You'll need two pieces of information:

* **API Key**: A secure key for authenticating the agent
* **Tenant ID**: Your unique tenant identifier

### Enrollment Command

Run the following command on your system:

```bash
sudo linuxguard-agent enroll --api-key=<API_KEY> --tenant-id=<TENANT_ID>
```

Replace:

* `<API_KEY>` with your actual API key
* `<TENANT_ID>` with your tenant ID

### Example

```bash
sudo linuxguard-agent enroll --api-key=ak_1234567890abcdef --tenant-id=tenant_abc123xyz
```

### Optional Enrollment Flags

You can specify additional options during enrollment:

### Server Group Assignment

Assign the server to a group during enrollment:

```bash
sudo linuxguard-agent enroll \
  --api-key=ak_1234567890abcdef \
  --tenant-id=tenant_abc123xyz \
  --group=production-servers
```

> **Note**: Each server can only belong to one group. Groups can be managed in the LinuxGuard console.

### Server Tags

Apply tags to the server during enrollment. Tags can be used for filtering and organizing servers. You can specify multiple tags by repeating the `--tag` flag:

```bash
sudo linuxguard-agent enroll \
  --api-key=ak_1234567890abcdef \
  --tenant-id=tenant_abc123xyz \
  --tag=web-server \
  --tag=us-east-1 \
  --tag=critical
```

## Finding Your Credentials

### Tenant ID

You can find your Tenant ID in two places:

1. **Initial Email**: The Tenant ID was included in the email you received when your tenant was created
2. **Console Settings**: Navigate to the **Settings** page in the LinuxGuard console to view your Tenant ID

### API Key

To generate an API key:

1. Log in to the LinuxGuard console
2. Navigate to the **Settings** page
3. Find the **API Keys** section
4. Click **Generate New API Key**
5. Copy the generated key (you won't be able to see it again after closing the dialog)

> **Security Note**: Keep your API keys secure and never share them publicly. Each API key can be revoked and regenerated from the Settings page if needed.

## Successful Enrollment

If the enrollment is successful, you will see a confirmation message:

```
Successfully enrolled to LinuxGuard Endpoint: https://api.linuxguard.io/v1/
```

After successful enrollment, the agent will:

* Start collecting telemetry data from your system
* Send data to the LinuxGuard console
* Appear in your console's agent list

## Troubleshooting Enrollment

If you encounter any errors during enrollment:

1. Verify your API key and Tenant ID are correct
2. Check your network connectivity to `https://api.linuxguard.io`
3. Review the agent logs (see [Troubleshooting](/troubleshooting.md))

***

**Next Step**: [Quick Start →](/tutorials/tutorials/quick-start.md)

**Related**: [Agent Commands](/reference/reference/agent-commands.md) | [Uninstallation](/how-to-guides/how-to/uninstallation.md) | [Troubleshooting](/troubleshooting.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.linuxguard.io/how-to-guides/how-to/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
