# SOLVED: OpenVAS Web UI on Ubuntu 22/24 — PHP+Docker workaround for broken gsad

**URL:** <https://forum.greenbone.net/t/solved-openvas-web-ui-on-ubuntu-22-24-php-docker-workaround-for-broken-gsad/22147>\
**Category:** Getting Started\
**Created:** [March 13, 2026, 5:33am UTC](https://forum.greenbone.net/t/solved-openvas-web-ui-on-ubuntu-22-24-php-docker-workaround-for-broken-gsad/22147 "2026-03-13T05:33:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oba](https://forum.greenbone.net/letter_avatar/oba/32/6_449c533f586939b6e5f246632a46421f.png) [@Oba](https://forum.greenbone.net/u/Oba)\
**Post date:** [March 13, 2026, 5:33am UTC](https://forum.greenbone.net/t/solved-openvas-web-ui-on-ubuntu-22-24-php-docker-workaround-for-broken-gsad/22147/1 "2026-03-13T05:33:30Z")

</div>

# SOLVED: OpenVAS Web UI on Ubuntu 22/24 — PHP+Docker Workaround

**Environment:** Ubuntu 24.04 LTS · GVM/gvmd 22.4 (apt) · single server behind NAT

* * *

## The problem

The `gsad` React frontend in the Ubuntu apt packages is broken. gvmd runs fine, scan data is intact, but the web UI is unreachable. This is confirmed by Greenbone: _“the packets on Ubuntu are still broken.”_

The scanner, manager, and PostgreSQL database all work. Only the UI is missing.

* * *

## The solution

Run a lightweight PHP dashboard in Docker, connected directly to the host `gvmd` socket via GMP XML protocol. No data migration. No duplicate scanner stack. All existing scan history preserved.

```auto
[Browser] → [Docker: PHP+Apache :9393] → [/run/gvmd/gvmd.sock] → [gvmd (apt)]

```

* * *

## Step 1 — Fix socket permissions

The gvmd socket is `_gvm:_gvm 660`. The container needs group access.

**Important:** Do NOT use `chown` in a systemd `ExecStartPost` override — it runs as the `_gvm` user (not root) and will crash-loop gvmd. Use `chmod` only, and handle group access via `usermod`.

```bash
# Add _gvm to docker group
sudo usermod -aG docker _gvm

# Install systemd override
sudo mkdir -p /etc/systemd/system/gvmd.service.d/
sudo tee /etc/systemd/system/gvmd.service.d/socket-perms.conf << 'EOF'
[Service]
ExecStartPost=/bin/sleep 2
ExecStartPost=/bin/chmod 660 /run/gvmd/gvmd.sock
EOF

sudo systemctl daemon-reload
sudo systemctl restart gvmd
sleep 5
ls -la /run/gvmd/gvmd.sock
# Expected: srw-rw---- 1 _gvm _gvm

```

* * *

## Step 2 — Verify/reset gvmd admin password

```bash
# Test
sudo -u _gvm gvm-cli --gmp-username admin --gmp-password YOUR_PASSWORD \
  socket --socketpath /run/gvmd/gvmd.sock -X '<get_version/>'

# Reset if needed
sudo -u _gvm gvmd --user=admin --new-password=YOUR_NEW_PASSWORD

```

Note: `--gmp-username` and `--gmp-password` go _before_ the `socket` subcommand, not after.

* * *

## Step 3 — Project files

```bash
mkdir -p ~/openvas-ui && cd ~/openvas-ui
echo "GVM_PASS=YOUR_PASSWORD" > .env
chmod 600 .env

```

**Dockerfile:**

```dockerfile
FROM php:8.2-apache
RUN docker-php-ext-install sockets
RUN a2enmod rewrite headers
COPY index.php /var/www/html/index.php
# Give www-data access to gvmd socket
# Check your _gvm GID: getent group _gvm
RUN groupmod -g 140 www-data && usermod -aG 140 www-data
EXPOSE 80

```

**docker-compose.yml:**

```yaml
services:
  openvas-dashboard:
    build: .
    container_name: openvas-dashboard
    restart: unless-stopped
    ports:
      - "127.0.0.1:9393:80"
    volumes:
      - /run/gvmd/gvmd.sock:/run/gvmd/gvmd.sock
    environment:
      - GVM_USER=admin
      - GVM_PASS=${GVM_PASS}

```

* * *

## Step 4 — Build and run

```bash
docker compose build
docker compose up -d

```

Access via SSH tunnel from your workstation:

```bash
ssh -L 9393:127.0.0.1:9393 user@your-server -N
# Browser: http://localhost:9393

```

* * *

## What you get

- Severity counts by CVSS range (Critical / High / Medium / Low / Log)
- Top affected hosts
- All scan tasks with status badges and last-run timestamps
- Overall risk level indicator
- 120-second cache with manual flush (`?flush=1`)

* * *

## Full source code and HTML guide

Full `index.php`, Dockerfile, and docker-compose.yml:  
**GitHub:** [GitHub - ObaOzai/openvas-dashboard: OpenVAS / GVM web dashboard for Ubuntu 22/24 — PHP+Docker workaround for broken gsad apt packages. Connects directly to gvmd socket via GMP XML protocol. · GitHub](https://github.com/ObaOzai/openvas-dashboard)  
**Guide:** [https://astropema.ai/openvas-config.html](https://astropema.ai/openvas-config.html)

Tested on Ubuntu 24.04 LTS · gvmd 22.4 · Docker 24 · php:8.2-apache

— AstroPema AI LLC · astropema.ai

---

<div class="post-metadata">

**Author:** ![system](https://forum.greenbone.net/uploads/default/original/2X/4/4660e797edfaea797a8c9965246072ea26732804.png) [@system](https://forum.greenbone.net/u/system)\
**Post date:** [June 11, 2026, 5:33am UTC](https://forum.greenbone.net/t/solved-openvas-web-ui-on-ubuntu-22-24-php-docker-workaround-for-broken-gsad/22147/2 "2026-06-11T05:33:59Z")

</div>

Closed on June 11, 2026, 5:33am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
