CHECKING STATUS
I AM LISTENING TO
|

Self-Hosted QR Code Generators with Docker Support

4. April 2025
.SHARE

Table of Contents

QR codes have become an essential tool for businesses, organizations, and individuals. They provide a quick way to access websites, share contact information, connect to WiFi networks, and much more. While there are many online services for generating QR codes, self-hosting your own QR code generator offers greater privacy, customization, and control.

In this article, we’ll explore five excellent self-hosted QR code generators that support Docker deployment, making them easy to set up on your own infrastructure.

Comparison at a Glance

Solution
Type
Complexity
Best For
GitHub Stars
Web UI
Low
Personal use, simple needs
128
Full platform
High
Businesses, advanced tracking
317
URL shortener + QR
Medium
Organizations needing both
3.7k
API service
Low
Developers, integrations
22
CLI tool
Low
Automation, scripting
4

1. Quick and Simple: bizzycola/qrcode-generator

A lightweight, user-friendly QR code generator with a clean web interface. This is perfect for anyone who wants a simple solution with minimal setup.

Features

  • Basic web UI for generating QR codes from URLs
  • Support for WiFi QR codes
  • Simple setup with Docker
  • Tailwind CSS for modern interface
  • Export as downloadable images

Docker Deployment

Using docker run:

Or using docker-compose:

Access the UI at: http://localhost:8080

Best for: Personal use, small teams, simple QR code generation needs.

2. Full-Featured: PHP Dynamic QR Code

The most comprehensive self-hosted QR code solution with analytics, storage, and extensive customization options. This is ideal for businesses and organizations that need to track QR code usage.

Features

  • Dashboard with advanced statistics on QR codes created and scans
  • Dynamic QR codes with URL shortening and redirect
  • Multiple QR code types:
    • Text, Email, Phone, SMS, WhatsApp, Skype
    • Location, Vcard, Events/Calendar
    • Bookmark, WiFi, PayPal, Bitcoin
  • Extensive customization options:
    • 6 image formats
    • Foreground/background color selection
    • 4 precision levels
    • 10 size options
  • Multi-account with access control
  • Bulk download and management

Docker Deployment

Access the UI at: http://localhost:80

Default credentials:

  • Username: superadmin
  • Password: superadmin

Best for: Businesses, marketing teams, and organizations that need tracking, analytics, and advanced QR code features.

3. URL Shortener with QR Codes: Shlink

An enterprise-grade URL shortener with integrated QR code generation capability. This solution is perfect for organizations that need both URL shortening and QR code generation.

Features

  • URL shortening with QR code generation
  • Detailed analytics and visit tracking
  • API, CLI, and web interface options
  • Multi-domain support
  • Supports MySQL, MariaDB, PostgreSQL, or SQLite
  • Geolocation of visitors

Docker Deployment

Access API at: http://localhost:8080
Web client: Available separately at https://app.shlink.io or self-hosted

Best for: Organizations that need URL shortening capabilities along with QR code generation.

4. API-First: Go QR Generator

A lightweight API service written in Go for programmatic QR code generation. This is ideal for developers who need to integrate QR code generation into their applications.

Features

  • Simple REST API for QR code generation
  • Fast and lightweight (written in Go)
  • Customizable image size
  • Perfect for integration with other services

Docker Deployment

Simple deployment:

Or build from source:

Generate QR codes at: http://localhost:8080/?data=YOUR_TEXT_HERE&size=300

Best for: Developers, integration into other applications, programmatic QR code generation.

5. Command-line: docker-qr-generator

A CLI-based QR code generator for automation and scripting. Perfect for batch operations and integration into automation workflows.

Features

  • Command-line interface
  • No web UI (ideal for scripts)
  • Generates QR codes and saves to mounted volume
  • Uses Alpine Linux for a minimal container
  • Python-based QR code generation

Docker Deployment

Run with command line arguments:

Or interactive mode:

Best for: Automation scripts, CI/CD pipelines, and batch QR code generation.

Conclusion and Recommendations

For Personal Use

If you need a simple way to create QR codes through a web interface, bizzycola/qrcode-generator is your best option. It’s lightweight, easy to deploy, and has a clean, modern interface.

For Business Use

For marketing teams or businesses tracking QR code usage, PHP Dynamic QR Code offers the most comprehensive solution with its analytics, multiple QR code types, and customization options.

For Developers

Developers looking to integrate QR code generation into other applications should consider Go QR Generator for its simple API or docker-qr-generator for CLI automation.

For Organizations Managing Many Links

If you’re primarily looking for URL shortening with QR code capabilities, Shlink is the most mature and feature-rich option with extensive API support.

Resource Considerations

When choosing a self-hosted QR code generator, consider the following resource requirements:

  • The simpler options (bizzycola/qrcode-generator and Go QR Generator) have minimal resource requirements and can run on very modest hardware
  • PHP Dynamic QR Code requires a database and more resources but offers the most features for businesses and tracking
  • Shlink falls in the middle with moderate resource requirements but provides enterprise-grade URL shortening

All solutions support Docker for easy deployment and containerization, making them suitable for various hosting environments from small Raspberry Pi setups to large cloud deployments.

Implementation Tips

Here are some tips for implementing these QR code generators in your environment:

  • Use SSL/TLS encryption for public-facing instances to protect your data
  • Consider using a reverse proxy like Nginx or Traefik to manage access to your QR code service
  • For PHP Dynamic QR Code, use strong passwords and consider restricting access to authorized users
  • Back up your QR code data regularly, especially if using the solution for important business functions
  • When using Shlink or PHP Dynamic QR Code with a database, consider setting up proper database maintenance

Use Cases in Action

QR codes can be leveraged in various creative ways:

  • Inventory Management: Create QR codes that link to detailed information about items in storage
  • Equipment Documentation: Attach QR codes to hardware that link to manuals, specifications, or maintenance logs
  • Event Check-ins: Generate unique QR codes for event attendees to streamline registration
  • Restaurant Menus: Replace physical menus with QR codes linking to digital ones
  • WiFi Access: Create QR codes that automatically connect devices to your network
  • Business Cards: Include a QR code on business cards that adds your contact information to the scanner’s phone

By self-hosting your QR code generator, you maintain control over your data and can customize the solution to your specific needs.

Final Thoughts

QR codes continue to be a valuable tool for bridging the physical and digital worlds. With these self-hosted Docker solutions, you can implement QR code generation in your organization with full control over the service and data.

Whether you need a simple generator for occasional use or a comprehensive tracking system for marketing campaigns, there’s a self-hosted option that fits your requirements.

FAQ

Basics of QR Codes

What is a QR code?

A QR code (Quick Response code) is a two-dimensional barcode that contains a matrix of dots. It was invented by Masahiro Hara in 1994 for the Japanese automotive company Denso Wave. QR codes can store various types of information such as URLs, text, contact information, and more, which can be quickly read by a digital device.

How do QR codes work?

QR codes work by encoding data in a pattern of black and white squares that can be read by a scanner or smartphone camera. When scanned, the QR code reader interprets the pattern and extracts the encoded information. The device then performs the associated action, such as opening a website, displaying text, or saving contact information.

What’s the difference between QR codes and barcodes?

The main differences are:

  • Barcodes are one-dimensional and can only be scanned horizontally, while QR codes are two-dimensional and can be scanned from any angle
  • QR codes can store much more data (up to 7,089 numeric characters) compared to standard barcodes
  • QR codes have built-in error correction, allowing them to be partially damaged and still function
  • QR codes can contain various data types (URLs, text, contact information), while traditional barcodes typically only store numeric product identifiers

What types of information can a QR code store?

QR codes can store various types of information, including:

  • Website URLs
  • Plain text
  • Contact information (vCard)
  • Email addresses
  • Phone numbers
  • SMS messages
  • Wi-Fi network credentials
  • Geographic locations
  • Calendar events
  • Payment information
  • App store links

How much data can a QR code hold?

QR code data capacity depends on the version (size) and the type of data being encoded:

  • Numeric only: Up to 7,089 characters
  • Alphanumeric: Up to 4,296 characters
  • Binary (8-bit bytes): Up to 2,953 bytes
  • Kanji/Kana symbols: Up to 1,817 characters

The higher the data volume, the more complex and larger the QR code becomes, which may affect scannability.

QR Code Generation

How do I create a QR code?

Creating a QR code is simple using online QR code generators. Here’s the basic process:

  1. Choose a reliable QR code generator website or app
  2. Select the type of content you want to encode (URL, text, contact, etc.)
  3. Enter the information you want to encode
  4. Customize your QR code if desired (colors, logo, etc.)
  5. Generate and download your QR code
  6. Test it to ensure it scans properly before distributing

Many websites offer free QR code generation for basic needs, while premium services provide additional features like design customization and analytics.

Are there free QR code generators available?

Yes, there are many free QR code generators available online. These free options typically allow you to create basic QR codes for URLs, text, contact information, and other common data types. However, free generators often have limitations such as:

  • Limited customization options
  • No analytics or tracking features
  • Static codes only (cannot be edited after creation)
  • Lower resolution downloads
  • Potential watermarks

For business or professional use, paid QR code services offer more features, such as dynamic codes, detailed analytics, bulk generation, and advanced customization options.

What’s the difference between static and dynamic QR codes?

Static QR codes:

  • The encoded information is fixed and cannot be changed after creation
  • Information is directly embedded in the code pattern
  • Usually free to create
  • No scan tracking or analytics available
  • Best for permanent, unchanging information

Dynamic QR codes:

  • Contain a short URL that redirects to the actual content
  • Content can be edited anytime without changing the QR code itself
  • Provide scan analytics (location, time, device used)
  • Usually require a paid subscription
  • Ideal for marketing campaigns, menus, and content that may need updates

How do I generate a QR code programmatically?

You can generate QR codes programmatically using various programming languages and libraries. Here’s an example using JavaScript and the qrcode.js library:

For Python users, the qrcode library is commonly used:

QR Code Design and Customization

Can QR codes be customized with colors and logos?

Yes, QR codes can be customized with colors and logos while remaining functional. You can:

  • Change the color of the QR code (both foreground and background)
  • Add a logo or image in the center
  • Modify the shape of the data points
  • Add a frame or custom border

However, customization should be done carefully to maintain scannability. For best results:

  • Maintain high contrast between foreground and background colors
  • Keep logos small (covering less than 30% of the code)
  • Use higher error correction levels when adding logos
  • Always test your customized QR code on multiple devices before distribution

Do custom designs affect QR code scanability?

Yes, custom designs can affect QR code scanability. While QR codes have built-in error correction that allows for some customization, excessive modifications can make them difficult or impossible to scan. Here are key factors that impact scanability:

  • Contrast: Low contrast between the QR code’s dark and light elements reduces scanability
  • Logo size: Logos that cover more than 30% of the code can interfere with scanning
  • Color combinations: Some color combinations work poorly, even with sufficient contrast
  • Module shape: Extreme modifications to the shape of the QR modules can cause problems
  • Error correction level: Using low error correction levels while adding customizations increases failure risk

Always use high error correction (level H) when customizing QR codes and test thoroughly on multiple devices before finalizing your design.

QR Code Sizes and Specifications

What is the minimum size for a QR code?

The minimum recommended size for a QR code is 2 × 2 centimeters (0.8 × 0.8 inches). However, the optimal size depends on several factors:

  • Scanning distance: The general rule is a 10:1 ratio between scanning distance and QR code size. For example, if users will scan from 30 cm away, the code should be at least 3 cm wide
  • Data density: QR codes with more data have smaller modules, requiring larger overall sizes for reliable scanning
  • Print quality: Lower quality printing requires larger QR codes
  • Scanner quality: Better cameras can scan smaller codes

For business cards, 2 × 2 cm works well. For posters viewed from a distance, aim for at least 3 × 3 cm. When printing on products or packaging, ensure the code is large enough to be scanned easily by typical smartphone cameras.

What’s the optimal QR code size for print?

The optimal QR code size for print depends on the viewing distance and application:

  • Business cards: 2-3 cm (0.8-1.2 inches)
  • Flyers/brochures: 3-5 cm (1.2-2 inches)
  • Posters (close viewing): 5-10 cm (2-4 inches)
  • Billboards/distant viewing: 10+ cm (4+ inches) depending on viewing distance

Remember the 10:1 rule: the scanning distance should be about 10 times the width of the QR code. Always use vector formats (SVG, EPS, AI) when possible to maintain quality at any size, and test your printed QR codes before mass production.

For print production, ensure the QR code has a minimum resolution of 300 DPI to maintain clear edges and avoid scanning issues.

What resolution should I use for QR codes?

For optimal scanning reliability in various printing applications:

  • Print materials: Use a minimum of 300 DPI (dots per inch)
  • Digital displays: Export at 72-96 PPI (pixels per inch)
  • Vector format: Whenever possible, use vector formats (SVG, EPS, AI) which scale without quality loss

For digital formats (PNG, JPG), the actual pixel dimensions are more important than DPI. A small QR code should be at least 100×100 pixels, while 200×200 pixels or larger is recommended for reliable scanning across devices.

When exporting raster images of QR codes, ensure that the module edges remain sharp and there’s no blurring or anti-aliasing, as this can significantly impact scanability.

QR Code Security and Safety

Are QR codes safe to scan?

QR codes themselves are technologically safe, but they can lead to potentially unsafe content. The safety concerns relate to what the QR code links to, not the code itself. Potential risks include:

  • QR codes linking to malicious websites
  • Phishing attempts through fake login pages
  • Automatic downloads of malware
  • Links to payment scams

To scan QR codes safely:

  • Use a QR scanner that shows the URL before opening it
  • Be cautious of codes from unknown sources
  • Verify that the URL matches the expected website
  • Keep your device’s operating system and security software updated
  • Be skeptical of codes asking for personal or financial information

Most modern smartphone cameras and QR readers have built-in security features that preview URLs before opening them.

How can I create secure QR codes?

To create secure QR codes for your audience:

  1. Use reputable QR code generators with security features
  2. Implement SSL/HTTPS for any websites linked in your QR codes
  3. Keep URLs short and recognizable so users can easily verify them
  4. Use dynamic QR codes that can be monitored and disabled if compromised
  5. Add visual trust indicators like your logo and branding
  6. Consider encryption for sensitive data QR codes
  7. Test thoroughly across multiple devices before distribution
  8. Add explanatory text near your QR code telling users what to expect when scanning

For extra security in business applications, you can use QR codes with built-in authentication or implement rotating/expiring codes for time-sensitive access.

QR Code Usage and Applications

What are common uses for QR codes?

QR codes have diverse applications across many industries:

  • Retail and Marketing: Product information, discounts, loyalty programs
  • Restaurants: Digital menus, online ordering, contactless payments
  • Business: Business cards, contactless information exchange, event registration
  • Education: Interactive learning materials, campus maps, access to resources
  • Healthcare: Patient information, medication instructions, appointment scheduling
  • Tourism: Audio guides, map directions, historical information
  • Events: Ticketing, attendee registration, event schedules
  • Payments: Mobile payment systems, direct transfers
  • Transportation: Ticketing, schedules, route information
  • Manufacturing: Inventory management, product tracking, quality control
  • Publishing: Links to digital content, subscription offers, multimedia content

Can QR codes be used for payments?

Yes, QR codes are increasingly used for payment systems worldwide. They offer a convenient, contactless way to transfer money and make purchases. QR code payment methods include:

  • Merchant-presented codes: Where customers scan a merchant’s QR code to pay (common in PayPal, Venmo, WeChat Pay)
  • Customer-presented codes: Where merchants scan a code from the customer’s device (common in Apple Pay, Google Pay)
  • Dynamic payment codes: Single-use QR codes that change for each transaction, enhancing security
  • P2P transfers: Person-to-person money transfers using QR codes

QR code payments are particularly popular in Asia (especially China and India) and are gaining traction globally due to their convenience, speed, and contactless nature. Most payment QR codes use encryption and additional security measures to protect financial transactions.

Can QR codes work offline?

Yes, some types of QR codes can work offline, depending on the encoded content and the device’s capabilities:

  • Offline-compatible QR code content:
    • Plain text information
    • Contact details (vCard)
    • WiFi network credentials
    • SMS messages (just creates the message, sending still requires connectivity)
    • Phone numbers (just prepares the call, making it still requires connectivity)
  • Online-requiring QR code content:
    • Website URLs
    • Dynamic QR codes (which redirect through a server)
    • App store links

The scanning device itself doesn’t require an internet connection to read the QR code, but accessing web content encoded in the QR code will require connectivity. For offline use cases, encode complete information directly in the QR code rather than linking to online resources.

QR Code Scanning and Compatibility

How do I scan a QR code?

Scanning a QR code is a simple process with most modern smartphones:

  1. Using the built-in camera app (most modern phones):
    • Open your phone’s camera app
    • Point the camera at the QR code
    • Hold steady until the code is recognized
    • Tap on the notification or banner that appears
  2. Using a dedicated QR code scanner app:
    • Download a QR code scanner app if your camera doesn’t support native scanning
    • Open the app
    • Point your camera at the QR code
    • The app will automatically scan and process the code

Tips for successful scanning:

  • Ensure adequate lighting
  • Hold the phone steady
  • Position the entire QR code within the camera view
  • For curved surfaces, adjust your angle to minimize distortion

Why is my QR code not scanning?

If your QR code isn’t scanning, check these common issues:

  1. Size issues: QR code is too small or too far away from the scanner
  2. Lighting problems: Insufficient lighting, glare, or shadows on the code
  3. Contrast issues: Low contrast between the dark and light modules
  4. Damage or distortion: Torn, crumpled, or curved surface affecting the code
  5. Quiet zone problems: Insufficient white space around the QR code
  6. Customization errors: Excessive customization affecting scanability
  7. Print quality issues: Blurry printing or low resolution
  8. Error correction level: Insufficient error correction for the customization
  9. Scanner compatibility: Outdated scanning app or device
  10. Code generation issues: Errors in the QR code generation process

To troubleshoot, try scanning with different devices, ensure adequate lighting, check the print quality, and verify that your QR code was generated correctly. If creating a new code, use a higher error correction level (L, M, Q, or H, with H being the highest) especially if you’ve added customizations.

QR Code Analytics and Tracking

Can QR code scans be tracked?

Yes, but only dynamic QR codes can be tracked. Static QR codes cannot provide analytics as they directly encode the final destination without any intermediary service. Dynamic QR codes enable tracking by:

  • Embedding a short URL that redirects to the final destination
  • Logging scan data when users access this redirection link
  • Processing and presenting this data in analytics dashboards

Trackable metrics typically include:

  • Total scans: Overall number of times the code was scanned
  • Unique scans: Number of different devices that scanned the code
  • Location data: Geographic distribution of scans
  • Time metrics: When scans occurred (time of day, day of week, trends over time)
  • Device information: Types of devices and operating systems used
  • Conversion data: Actions taken after scanning (when integrated with other analytics)

For tracking capabilities, you’ll need to use a QR code service that offers dynamic codes and analytics, which typically requires a subscription.

What analytics are available for QR codes?

Dynamic QR codes can provide various analytics that help measure campaign effectiveness and user engagement:

  • Scan metrics:
    • Total scan count
    • Unique vs. repeat scans
    • Scan frequency and patterns
  • Temporal data:
    • Scan times (hourly, daily, weekly, monthly)
    • Peak usage periods
    • Campaign timeline performance
  • Geographic insights:
    • Country, region, and city-level data
    • Heat maps of scan activity
    • Location-based conversion rates
  • Technical information:
    • Device types (iOS, Android, etc.)
    • Operating system versions
    • Browser information
  • Advanced analytics (with integrations):
    • Conversion tracking
    • User journey mapping
    • A/B testing results
    • Integration with Google Analytics or other platforms

These analytics help businesses optimize their QR code campaigns, understand user behavior, and calculate ROI. Most premium QR code platforms provide customizable dashboards to visualize this data.

QR Code Implementation

How do I add a QR code to my website?

There are several ways to add a QR code to your website:

  1. Using a static image:
    1. Generate your QR code using an online generator
    2. Download it as an image file (PNG recommended for web)
    3. Upload it to your website
    4. Add it to your webpage using an image tag

Example HTML for adding a static QR code:

  1. Using a QR code library:
    1. Include a JavaScript QR code library in your webpage
    2. Create a container element
    3. Generate the QR code dynamically

Example using qrcode.js library:

  1. Using a QR code API:
    1. Generate QR code via an API service
    2. Embed the API URL directly in an image tag

Example using Google Charts API (though note this is deprecated):

How do I create a QR code for WiFi access?

Creating a QR code for WiFi access allows guests to connect to your network without typing the password. Here’s how to do it:

  1. Use a QR code generator that supports WiFi network credentials
  2. Select the “WiFi” option in the generator
  3. Enter your network details:
    • Network name (SSID)
    • Password
    • Security type (WEP, WPA/WPA2, or None)
    • Hidden network (Yes/No)
  4. Generate and download your WiFi QR code
  5. Print and display it in your home or business

The QR code uses this format behind the scenes:

For example:

When users scan this QR code with their smartphones, they’ll see a prompt to connect to the WiFi network with all details pre-filled.

Let’s Talk!

Looking for a reliable partner to bring your project to the next level? Whether it’s development, design, security, or ongoing support—I’d love to chat and see how I can help.

Get in touch,
and let’s create something amazing together!

RELATED POSTS

Hey there, fellow developer! Remember PhantomJS? That trusty headless browser that helped us scrape websites, run automated tests, and generate screenshots back in the day? Well, if you’re still using it or just discovered some legacy code that relies on it, I’ve got some news for you. PhantomJS officially threw in the towel back in […]

What is Matomo? Matomo (formerly known as Piwik) is a leading open-source web analytics platform that provides a privacy-focused alternative to Google Analytics. It gives you complete control over your data while offering comprehensive website analytics capabilities. Key Features: Docker Installation Options There are two main Docker approaches for installing Matomo: Prerequisites Before starting, ensure […]

Hey C64 enthusiasts and retro computing fans! – So your beloved Commodore 64 is showing its age? Maybe the SID chip has gone silent, the VIC-II is displaying funky colors, or that notorious PLA has finally given up the ghost? Don’t panic – and definitely don’t pay those crazy eBay prices for 40-year-old chips that […]

Alexander

I am a full-stack developer. My expertise include:

  • Server, Network and Hosting Environments
  • Data Modeling / Import / Export
  • Business Logic
  • API Layer / Action layer / MVC
  • User Interfaces
  • User Experience
  • Understand what the customer and the business needs


I have a deep passion for programming, design, and server architecture—each of these fuels my creativity, and I wouldn’t feel complete without them.

With a broad range of interests, I’m always exploring new technologies and expanding my knowledge wherever needed. The tech world evolves rapidly, and I love staying ahead by embracing the latest innovations.

Beyond technology, I value peace and surround myself with like-minded individuals.

I firmly believe in the principle: Help others, and help will find its way back to you when you need it.