# Glances can't start --export prometheus with the -w

Your current Glances systemd service is trying to start both the **Web UI** (`-w`) and the **Prometheus exporter** (`--export prometheus`) at the same time, but Glances doesn’t natively support running both in a single process.

### **Solution: Run Two Separate Instances of Glances**

You'll need to create **two systemd service files**, one for the Web UI and another for the Prometheus Exporter.

#### Create a Service for Glances Web UI  


Run

```bash
sudo nano /etc/systemd/system/glances.service
```

Paste

```bash
[Unit]
Description=Glances Web UI
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/glances -w
Restart=on-failure

[Install]
WantedBy=multi-user.target

```

Save and exit.

#### Create a Service for Glances Prometheus Exporter

run

```bash
sudo nano /etc/systemd/system/glances-prometheus.service
```

paste

```bash
[Unit]
Description=Glances Prometheus Exporter
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/glances --export prometheus
Restart=on-failure

[Install]
WantedBy=multi-user.target
```

Save and exit.

#### Reload Systemd and Start Services

```bash
sudo systemctl daemon-reload
sudo systemctl enable glances-prometheus
sudo systemctl start glances-prometheus

```

Verify That Both Are Running

```shell
systemctl status glances-web glances-prometheus
```

Now, you can access:

<div class="flex max-w-full flex-col flex-grow" id="bkmrk-web-ui-at-http%3A%2F%2F%3Cyo"><div class="min-h-8 text-message flex w-full flex-col items-end gap-2 whitespace-normal break-words text-start [.text-message+&]:mt-5" data-message-author-role="assistant" data-message-id="4f9e9441-1280-4f9a-9798-821fd53c34b9" data-message-model-slug="gpt-4o" dir="auto"><div class="flex w-full flex-col gap-1 empty:hidden first:pt-[3px]"><div class="markdown prose w-full break-words dark:prose-invert dark">- **Web UI** at `http://<your-ip>:61208`
- **Prometheus metrics** at `http://<your-ip>:9091/metrics`

</div></div></div></div>This should work smoothly.

Useful commands:

Show log path and version

```
glances -V
```

<div class="mb-2 flex gap-3 empty:hidden -ml-2" id="bkmrk-"><div class="items-center justify-start rounded-xl p-1 flex"><div class="flex items-center"><button aria-label="Read aloud" class="rounded-lg text-token-text-secondary hover:bg-token-main-surface-secondary" data-testid="voice-play-turn-action-button"><svg class="icon-md-heavy" fill="none" height="24" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"></svg></button><button aria-label="Edit in canvas" class="rounded-lg text-token-text-secondary hover:bg-token-main-surface-secondary"><svg class="icon-md-heavy" fill="none" height="24" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"></svg></button><div class="flex items-center pb-0"><svg class="icon-md" fill="none" height="24" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"></svg>  
</div><button aria-expanded="false" aria-haspopup="menu" class="cursor-pointer h-[30px] rounded-md px-1 text-token-text-secondary hover:bg-token-main-surface-secondary" data-state="closed" id="bkmrk--1" type="button"></button></div></div></div>