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
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.
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.
- Mirrored networking wasn’t supported; WSL defaulted to NAT, breaking localhost loopback.
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).
- Reverse proxy needed for external access; port conflicts with Windows services.
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.
- WSL idle timeout and services not running automatically.
Configurations
NGINX and NSSM
- NGINX directory:
C:\nginx - Service:
Nginx Web Server(managed viaServices.msc) - Config file:
C:\nginx\conf\nginx.conf
- NGINX directory:
WSL VB Script
- Location:
shell:startupfolder - Script name:
wsl.vbs
- Location:
Docker Compose
- All compose files:
D:\RENEWGRID\docker - Individual directories for InfluxDB and Grafana.
- All compose files:
InfluxDB
- Compose file:
D:\RENEWGRID\docker\influxdb\docker-compose.yml - Data directory:
D:\RENEWGRID\docker\influxdb\data
- Compose file:
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
- Compose file:
Access Details
InfluxDB
- Local access:
- Shortcut: Desktop
- URL:
http://influxdb:8086orhttp://docker:9001
- Network access:
- URL:
http://<server-ip>:8086
- URL:
- Local access:
Grafana
- Local access:
- Shortcut: Desktop
- URL:
http://grafana:9000orhttp://docker:9002
- Network access:
- URL:
http://<server-ip>:9000
- URL:
- Datasource configuration in Grafana: Use the Docker container name as the hostname for InfluxDB.
- Local access: