Skip to content

Deploying VoucherVault

Introduction

VoucherVault is a self-hosted application for managing your vouchers, gift cards, and loyalty cards in one centralized location. Never let a voucher expire unused or forget about a gift card balance again. VoucherVault helps you track expiration dates, remaining balances, and organize your vouchers by category.

Key highlights of VoucherVault:

  • Voucher Management: Store and organize all your vouchers in one place
  • Expiration Tracking: Get notifications before vouchers expire
  • Balance Tracking: Keep track of remaining balances on gift cards
  • Category Organization: Group vouchers by store, type, or custom categories
  • Barcode Support: Store and display barcodes for easy scanning
  • Image Uploads: Attach photos of physical vouchers
  • Multi-User: Support for multiple users with their own voucher collections
  • Mobile Friendly: Responsive design for access on any device
  • Self-Hosted: Your voucher data stays private on your own server

This guide walks through deploying VoucherVault on Klutch.sh using Docker, configuring the application, and managing your voucher collection.

Why Deploy VoucherVault on Klutch.sh

Deploying VoucherVault on Klutch.sh provides several advantages:

Simplified Deployment: Klutch.sh automatically detects your Dockerfile and builds VoucherVault without complex orchestration. Push to GitHub, and your voucher manager deploys automatically.

Persistent Storage: Attach persistent volumes for your database and voucher images. Your collection survives container restarts.

HTTPS by Default: Klutch.sh provides automatic SSL certificates for secure access from anywhere.

GitHub Integration: Connect your configuration repository directly from GitHub. Updates trigger automatic redeployments.

Always Accessible: Access your vouchers 24/7 from any device when shopping.

Prerequisites

Before deploying VoucherVault on Klutch.sh, ensure you have:

Preparing Your Repository

Create a GitHub repository containing your Dockerfile for VoucherVault deployment.

Repository Structure

vouchervault-deploy/
├── Dockerfile
└── .dockerignore

Creating the Dockerfile

FROM l4rm4nd/vouchervault:latest
# Set environment variables
ENV DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}
ENV DJANGO_DEBUG=${DJANGO_DEBUG:-False}
ENV DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS:-*}
ENV DATABASE_URL=${DATABASE_URL:-sqlite:///data/db.sqlite3}
ENV TZ=${TZ:-UTC}
# Create data directories
RUN mkdir -p /data /data/media
# Expose the web interface port
EXPOSE 8000
# Volumes for persistent data
VOLUME ["/data"]
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:8000/health/ || exit 1

Environment Variables Reference

VariableRequiredDefaultDescription
DJANGO_SECRET_KEYYes-Django secret key for security
DJANGO_DEBUGNoFalseEnable debug mode (set to False in production)
DJANGO_ALLOWED_HOSTSNo*Allowed hostnames
DATABASE_URLNosqlite:///data/db.sqlite3Database connection string
TZNoUTCTimezone for expiration tracking

Deploying VoucherVault on Klutch.sh

    Generate a Secret Key

    Generate a secure Django secret key:

    Terminal window
    openssl rand -hex 32

    Push Your Repository to GitHub

    Initialize your repository and push to GitHub with your Dockerfile and configuration files.

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project. Give it a descriptive name like “vouchervault” or “voucher-manager”.

    Create a New App

    Within your project, create a new app. Connect your GitHub account if you haven’t already, then select the repository containing your VoucherVault Dockerfile.

    Configure HTTP Traffic

    In the deployment settings:

    • Select HTTP as the traffic type
    • Set the internal port to 8000

    Set Environment Variables

    Add the following environment variables:

    VariableValue
    DJANGO_SECRET_KEYYour generated secret key
    DJANGO_ALLOWED_HOSTSyour-app-name.klutch.sh
    TZYour timezone (e.g., America/New_York)

    Attach Persistent Volumes

    Add the following volume:

    Mount PathRecommended SizePurpose
    /data5 GBSQLite database and voucher images

    Deploy Your Application

    Click Deploy to start the build process. Klutch.sh will build the container, attach volumes, and provision an HTTPS certificate.

    Access VoucherVault

    Once deployment completes, access your VoucherVault instance at https://your-app-name.klutch.sh. Create an admin account on first access.

Managing Vouchers

Adding a Voucher

  1. Click Add Voucher from the dashboard
  2. Enter voucher details:
    • Name/Description
    • Store or brand
    • Voucher code or number
    • Initial balance (for gift cards)
    • Expiration date
  3. Optionally upload a barcode or image
  4. Select or create a category
  5. Save the voucher

Tracking Balances

For gift cards with remaining balances:

  1. Open the voucher details
  2. Click Update Balance
  3. Enter the new balance after use
  4. Save to track spending history

Categories

Organize vouchers with categories:

  • Stores: Amazon, Target, Walmart
  • Type: Gift Card, Discount Code, Loyalty Points
  • Status: Active, Used, Expired

Expiration Alerts

Configure notifications for expiring vouchers:

  1. Set your preferred notification timing
  2. Enable email or browser notifications
  3. Review upcoming expirations on the dashboard

Barcode Features

Adding Barcodes

  1. When creating a voucher, click Add Barcode
  2. Enter the barcode number manually, or
  3. Upload an image of the barcode
  4. Select the barcode format (Code128, QR, etc.)

Using Barcodes

At checkout:

  1. Open VoucherVault on your phone
  2. Find the voucher you want to use
  3. Display the barcode for scanning
  4. Update the balance after use

Multi-User Setup

Creating Users

  1. Navigate to Settings > Users
  2. Click Add User
  3. Set username, email, and password
  4. Assign permissions

Sharing Vouchers

  • Each user maintains their own voucher collection
  • Shared family vouchers can be visible to all users
  • Set voucher visibility per entry

Troubleshooting

Images Not Displaying

  • Verify the media volume is mounted correctly
  • Check file permissions on the data directory
  • Clear browser cache

Expiration Notifications Not Working

  • Verify timezone is set correctly
  • Check notification settings
  • Ensure background tasks are running

Login Issues

  • Reset password via email if configured
  • Check ALLOWED_HOSTS includes your domain
  • Verify SECRET_KEY hasn’t changed

Additional Resources

Conclusion

Deploying VoucherVault on Klutch.sh gives you a convenient, always-accessible voucher management system. The combination of VoucherVault’s tracking features and Klutch.sh’s deployment simplicity means you can stop losing value to expired vouchers and forgotten gift cards, accessing your collection from anywhere when you need it.