Skip to content

rig0/wireguard-qr

Repository files navigation

WireGuard-QR

WireGuard-QR

NodeJS EJS ESLint Prettier WireGuard

Release Stability Maintained GitHub last commit

A secure, self-hosted QR code generator for WireGuard configurations.

Built with security in mind. Your keys never leave your infrastructure.

🌐 Live DemoFeaturesSecuritySetup

Wireguard-QR Demo Status Wireguard-QR Demo Uptime

WireGuard-QR Demo WireGuard-QR Demo

Generate QR codes from forms with validation and download support

Features

  • 🔐 Form-based QR Generation - Enter config details and generate QR codes instantly
  • 📁 File Upload Support - Upload .conf files to generate QR codes
  • Config Validation - Real-time validation ensures configs are correct before generating
  • 💾 Download Configs - Export your configurations as .conf files
  • 🔑 Key Generator - Built-in WireGuard keypair generation
  • 🎨 Modern UI - Clean Catppuccin Macchiato inspired theme
  • 📱 Mobile Friendly - Responsive design works on all devices

Security

Zero-Storage Architecture - Your configurations are never stored, logged, or persisted anywhere.

  • No server-side storage - Configs exist only during request/response
  • No browser storage - No localStorage, sessionStorage, or cookies
  • No logging - Config contents are never written to logs
  • Client-side processing - Downloads happen entirely in your browser
  • Memory-only validation - All operations are ephemeral
  • Self-hosted - Full control over your infrastructure

Why self-host? Public QR generators might expose your private keys to third parties. This app ensures your WireGuard secrets stay yours.

Setup

Option 1: Docker Compose (Recommended)

services:
  wireguard-qr:
    container_name: wireguard-qr
    image: rig05/wireguard-qr:latest
    restart: always
    user: 1000:1000
    ports:
      - 127.0.0.1:5182:5182
docker-compose up -d

Note

Only exposes port internally. Intended for use locally or behind reverse proxy with SSL. Remove 127.0.0.1: to expose port externally.

Option 2: Node.js (From Source)

# Clone repository
git clone https://github.com/rig0/wireguard-qr
cd wireguard-qr

# Install dependencies
npm install

# Start application
node app.js

The application will be available at http://localhost:5182

Usage

  1. Manual Entry: Fill out the WireGuard config form and click "Create QR"
  2. File Upload: Upload an existing .conf file to generate a QR code
  3. Generate Keys: Use the built-in key generator for new configurations
  4. Download: After generating a QR code, download the config for safekeeping

Configuration

  • Port: Default 5182 (configurable via PORT environment variable)
  • Reverse Proxy: Recommended for production deployments

Security Features in Detail

Form Behavior

  • Private keys and preshared keys are masked (password fields)
  • All forms clear after QR generation
  • Forms reset on page reload
  • No browser autocomplete for sensitive fields

Validation

  • Validates Base64 key format (44 characters)
  • Checks CIDR notation for IPs
  • Validates endpoint format (host:port)
  • Ensures all required fields are present
  • Provides clear error messages for invalid configs

Download Process

  • Downloads are generated client-side using Blob API
  • No server request made for downloads
  • Config cleared from memory when popup closes
  • No network transmission of complete configs

Contributing

This is a personal project, but suggestions are welcome! Open an issue to discuss improvements.

About

A self hosted QR code generator for wireguard configs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •