# Instalación de Grafana con Docker Compose

1. **Instalar Docker Desktop (si no está instalado)**
2. **Prepara una carpeta de trabajo**
   * Crea una carpeta sencilla en cualquier espacio que consideres oportuno, por ejemplo:\
     `C:\Users\TU_USUARIO\Desktop\docker\grafana`
3. Crea el archivo **`docker-compose.yml`**
   * Copia este contenido en un archivo llamado `docker-compose.yml` dentro de esa carpeta:

{% code title="text" overflow="wrap" %}

```
version: '3.8'

services:
  grafana:
    image: grafana/grafana-enterprise
    container_name: grafana
    restart: unless-stopped
    ports:
      - "3000:3000"
    volumes:
      - grafana_data:/var/lib/grafana

volumes:
  grafana_data:

```

{% endcode %}

4. Levanta el servicio

   Abre una terminal (PowerShell o CMD) en la carpeta y ejecuta:

{% code title="Shell" overflow="wrap" %}

```sh
docker compose up -d
```

{% endcode %}

5. Accede a la interfaz web

Abre tu navegador y entra en: [`http://localhost:3000`](http://localhost:3000)\
Aquí tendrás la interfaz web de Grafana lista para usar.

Usuario y contraseña por defecto: `admin` / `admin`

<figure><img src="/files/WdiqS5FOAfiraboxhrAR" alt=""><figcaption><p>Inicio de sesiòn Grafana</p></figcaption></figure>


---

# 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://darioaplicano.gitbook.io/influxdb2.x/instalacion-y-configuracion-inicial/4.-grafana/instalacion-de-grafana-con-docker-compose.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.
