> For the complete documentation index, see [llms.txt](https://docs.linuxguard.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.linuxguard.io/configure/configure.md).

# Configure

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](/install/install/container.md) which includes container-specific enrollment instructions.

## What's in this section

Configure content is authored across upcoming phases of the v4.0 milestone. The forthcoming child pages are:

* **Agent configuration reference** — config keys, `config set`/`get`/`unset` subcommands, toggleable keys (Phase 17).
* **Log level and rotation** — `log_level` management, lumberjack defaults, runtime SIGHUP reload (Phase 19).
* **Enrollment flag handling** — `--api-key`, `--tenant-id`, `--environment`, `--group` backward-compat alias, `--tag` (Phase 17).

The enrollment procedure below covers the day-1 setup until those references land.

## 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 →](/get-started/get-started/quick-start.md)

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.linuxguard.io/configure/configure.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
