Pasar al contenido principal
Microsoft
separator
https://catalogartifact.azureedge.net/publicartifacts/lynxroute.vllm-d77a50b4-cb1c-400b-8523-ec1df8381f14/image2_Azureready.png

vLLM with WebUI - Hardened Self-Hosted LLM Server

por Lynxroute

vLLM 0.34.0 with Open WebUI - CIS Level 1 hardened on Ubuntu 24.04 LTS with SBOM and CIS Report

What is vLLM

vLLM is an open-source, high-throughput inference engine for large language models, built in Python on top of PyTorch. It implements PagedAttention, continuous batching, and tensor parallelism to serve any HuggingFace-compatible transformer model (Llama, Mistral, Qwen, Phi, Gemma and 100+ more) through a fully OpenAI-compatible REST API. OpenAI clients (openai-python, LangChain, LlamaIndex) connect unchanged with this VM base URL and the local Bearer token. This image runs on CPU or NVIDIA GPU, bundled with Open WebUI as a browser chat front end pre-wired to the local vLLM. The default model Qwen/Qwen2.5-0.5B-Instruct (~1 GB) downloads at first boot, no HuggingFace token required; swap in any HuggingFace model via /etc/vllm/server.env.

Why self-host vLLM

Self-hosting keeps every prompt, document, embedding, and API key inside your own tenant. No third-party SaaS sees your customer data, internal knowledge bases, or model traffic. Suits teams with data residency or regulatory requirements (HIPAA, GDPR, ISO 27001). Fully auditable, no vendor lock-in.

Licensing note

vLLM is Apache-2.0. Open WebUI uses the source-available Open WebUI License (not OSI-approved): self-hosted use is unrestricted, but above 50 end users in any 30-day window, altering its branding needs a commercial licence from Open WebUI Inc. This image keeps the original branding.

What this VM image adds

Security hardening:

  • Random 32-byte API key generated at first boot - written to /root/vllm-credentials.txt, never baked into the image; the same key is injected into Open WebUI so the chat UI authenticates to vLLM transparently
  • vLLM bound to 127.0.0.1:8000 - reachable only through Nginx with TLS, with Bearer auth enforced on every /v1/* request
  • Open WebUI bound to 127.0.0.1:8080 - reachable only through Nginx with TLS
  • First registered user in Open WebUI becomes the workspace administrator - no admin baked in
  • Nginx reverse proxy - self-signed TLS, HTTP-to-HTTPS redirect, WebSocket upgrade for streaming chat, security headers
  • Loading splash page - served while the model warms up on first request
  • Telemetry disabled - vLLM and Open WebUI
  • UFW firewall - only TCP 22, 80, 443 exposed; 8000 and 8080 explicitly denied
  • fail2ban - SSH brute-force protection
  • AppArmor - mandatory access control
  • Trivy CVE scan - every image is scanned for vulnerabilities before release
  • Trivy secret scan - blocks any image that ships with leaked credentials

OS hardening (CIS Level 1):

  • CIS Level 1 hardened - CIS Ubuntu 24.04 LTS Level 1 Benchmark via ansible-lockdown
  • auditd - system call auditing for critical paths
  • SSH hardening - PasswordAuthentication disabled, key-only access
  • Kernel hardening - SYN cookies, ASLR, rp_filter, TCP BBR
  • /tmp as tmpfs - nosuid, nodev, noexec
  • Azure IMDS endpoints - egress rules pre-configured (169.254.169.254, 168.63.129.16)

Compliance artifacts (inside the VM):

  • SBOM - CycloneDX 1.6 at /etc/lynxroute/sbom.json
  • CIS Conformance Report - OpenSCAP HTML at /etc/lynxroute/cis-report.html
  • Tailored CIS profile - /usr/share/doc/lynxroute/CIS_TAILORED_PROFILE.md
  • Credentials file - /root/vllm-credentials.txt with the API key and connection details

Quick Start

  1. Deploy VM (CPU: Standard_D4s_v5 recommended, minimum Standard_D2s_v5 with 8 GB RAM; GPU: Standard_NC4as_T4_v3)
  2. Open NSG: TCP 443 from YOUR IP until you have registered; SSH 22 from your management IPs
  3. SSH: ssh -i key.pem <username>@<PUBLIC_IP> (default user: azureuser)
  4. Read connection details: sudo cat /root/vllm-credentials.txt
  5. Open https://<PUBLIC_IP>/, accept the self-signed certificate, click "Sign up" - the first registered user becomes the workspace administrator

Runs on CPU or GPU. The NVIDIA driver is preinstalled: on NC-series T4 VMs vLLM uses the GPU automatically and runs noticeably faster (check with nvidia-smi).

OpenAI API direct: read -rs KEY (paste the API key), then curl https://<PUBLIC_IP>/v1/models -H @<(printf 'Authorization: Bearer %s\n' "$KEY") -k. Replace the self-signed TLS certificate with a CA-signed certificate for production.

Español (Argentina)
Icono de exclusión de opciones de privacidad Tus opciones de privacidad en California
Privacidad de la salud del consumidor Sitemap Contact Us Privacy & Cookies Terms of Use About our ads Manage cookies