Back to Blog

RenewGrid Windows Server Setup

This setup enables the use of InfluxDB and Grafana services on a Windows Server. Since these services don't natively run on Windows, a workaround using Docker in WSL2 is implemented, with NGINX as a reverse proxy for external access.

Windows Server Setup Documentation

Challenges and Fixes

  1. Platform Compatibility

    • Neither InfluxDB nor Grafana run natively on Windows.
    • Windows Server Edition doesn’t support Docker Desktop.
      Solution: Installed Docker within WSL2 using Ubuntu 24.04.
  2. WSL Networking

    • Mirrored networking wasn’t supported; WSL defaulted to NAT, breaking localhost loopback.
      Solution: Used NAT IP assigned by WSL and hardcoded host entries in the Windows hosts file.
  3. Access from External Network

    • Reverse proxy needed for external access; port conflicts with Windows services.
      Solution: Configured NGINX on alternate ports (8086 for InfluxDB, 9000 for Grafana).
  4. Service Persistence

    • WSL idle timeout and services not running automatically.
      Solution: Used nssm to create a Windows service for NGINX and added a VB script in startup to keep WSL active.

Configurations

  1. NGINX and NSSM

    • NGINX directory: C:\nginx
    • Service: Nginx Web Server (managed via Services.msc)
    • Config file: C:\nginx\conf\nginx.conf
  2. WSL VB Script

    • Location: shell:startup folder
    • Script name: wsl.vbs
  3. Docker Compose

    • All compose files: D:\RENEWGRID\docker
    • Individual directories for InfluxDB and Grafana.
  4. InfluxDB

    • Compose file: D:\RENEWGRID\docker\influxdb\docker-compose.yml
    • Data directory: D:\RENEWGRID\docker\influxdb\data
  5. Grafana

    • Compose file: D:\RENEWGRID\docker\grafana\docker-compose.yml
    • Data directory: D:\RENEWGRID\docker\grafana\data
    • Config file: D:\RENEWGRID\docker\grafana\config\config.ini

Access Details

  1. InfluxDB

    • Local access:
      • Shortcut: Desktop
      • URL: http://influxdb:8086 or http://docker:9001
    • Network access:
      • URL: http://<server-ip>:8086
  2. Grafana

    • Local access:
      • Shortcut: Desktop
      • URL: http://grafana:9000 or http://docker:9002
    • Network access:
      • URL: http://<server-ip>:9000
    • Datasource configuration in Grafana: Use the Docker container name as the hostname for InfluxDB.

RenewGrid Windows Server Setup | Blog | Jayasurya Subramani