---
title: "Configure Grafana Alloy to use the Linux server integration | Grafana Labs"
description: "Learn to configure the Linux server integration in Grafana Cloud"
---

# Configure Grafana Alloy to use the Linux server integration

After you’ve installed Grafana Alloy, the next step is to configure it for the Linux Server integration. This configuration process requires you to copy a code snippet from Grafana Cloud and add it to the Alloy configuration file.

**Did you know?** By default, the integration only collects the metrics and logs necessary to populate the Linux server dashboards and alerts. Although you have the option to configure Alloy to collect all available metrics and logs, we recommend starting with the default configuration.

To configure Alloy to use the Linux server integration:

Watch video -&gt;

1. In the **Set up Grafana Alloy to use the Linux server integration** section, click **Copy to clipboard**.
2. On your Linux machine, run the following command to open the Alloy configuration file:
   
   ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```none
   sudo nano /etc/alloy/config.alloy
   ```
3. Scroll to the end of the configuration file and paste the code snippet you copied from Grafana Cloud.
4. Press `Ctrl+O` to write the changes to the file, then press **Enter** to save. Press `Ctrl+X` to exit the editor.
   
   In the next step of your journey, you’ll restart Alloy and test the configuration.

* * *

### More to explore (optional)

- [Configure Grafana Alloy to collect all metrics and logs (advanced)](/docs/grafana-cloud/monitor-infrastructure/integrations/integration-reference/integration-linux-node/#advanced-mode)
- [Configure Grafana Alloy](/docs/alloy/latest/configure/)
- [Logs and relabeling basics in Grafana Alloy (tutorial)](/docs/alloy/latest/tutorials/logs-and-relabeling-basics/)

* * *

### Troubleshooting

Explore the following troubleshooting topics if you need help:

- [The Alloy configuration file is empty](/docs/grafana-cloud/monitor-infrastructure/integrations/troubleshoot/install-troubleshoot-linux-alloy/#the-alloy-configuration-file-is-empty)
- [Data appears in Grafana Cloud, but hostname is incorrect or it appears as “localhost”](/docs/grafana-cloud/monitor-infrastructure/integrations/troubleshoot/install-troubleshoot-linux-alloy/#data-appears-in-grafana-cloud-but-hostname-is-incorrect-or-it-appears-as-localhost)
