Deploying WYGIWYH
Introduction
WYGIWYH (What You Get Is What You Have) is a self-hosted personal finance application designed around a simple philosophy: track what you actually have and spend, not what you think you should have. Built for simplicity and privacy, WYGIWYH helps you manage your finances without the complexity of traditional budgeting apps.
Key highlights of WYGIWYH:
- Simple Philosophy: Focus on actual money in, money out tracking
- Transaction Tracking: Log income and expenses easily
- Category Management: Organize spending by custom categories
- Balance Tracking: Monitor account balances over time
- Visual Reports: Charts and graphs for spending analysis
- Multi-Account: Track multiple bank accounts and cash
- Self-Hosted: Your financial data stays private on your server
- Mobile Friendly: Responsive design for on-the-go logging
- No Cloud Sync: Complete control over your data
This guide walks through deploying WYGIWYH on Klutch.sh using Docker, configuring the application, and setting up your personal finance tracking.
Why Deploy WYGIWYH on Klutch.sh
Deploying WYGIWYH on Klutch.sh provides several advantages for personal finance:
Simplified Deployment: Klutch.sh automatically detects your Dockerfile and builds WYGIWYH without complex orchestration. Push to GitHub, and your finance tracker deploys automatically.
Persistent Storage: Attach persistent volumes for your financial data. Your transaction history survives container restarts.
HTTPS by Default: Klutch.sh provides automatic SSL certificates for secure access to your financial data.
GitHub Integration: Connect your configuration repository directly from GitHub. Updates trigger automatic redeployments.
Privacy: Your sensitive financial data stays on infrastructure you control.
Prerequisites
Before deploying WYGIWYH on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your configuration
- Basic familiarity with Docker and containerization concepts
Preparing Your Repository
Create a GitHub repository containing your Dockerfile for WYGIWYH deployment.
Repository Structure
wygiwyh-deploy/├── Dockerfile└── .dockerignoreCreating the Dockerfile
FROM angad/wygiwyh:latest
# Set environment variablesENV DATABASE_URL=${DATABASE_URL:-sqlite:///data/wygiwyh.db}ENV SECRET_KEY=${SECRET_KEY}ENV FLASK_ENV=${FLASK_ENV:-production}
# Create data directoryRUN mkdir -p /data
# Expose the web interface portEXPOSE 5000
# Volume for persistent dataVOLUME ["/data"]
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \ CMD wget --no-verbose --tries=1 --spider http://localhost:5000/health || exit 1Environment Variables Reference
| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL | No | sqlite:///data/wygiwyh.db | Database connection string |
SECRET_KEY | Yes | - | Secret key for session encryption |
FLASK_ENV | No | production | Flask environment mode |
Deploying WYGIWYH on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 5000
Generate a Secret Key
Generate a secure secret key:
openssl rand -hex 32Push Your Repository to GitHub
Initialize your repository and push to GitHub with your Dockerfile.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project. Give it a descriptive name like “wygiwyh” or “finances”.
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 WYGIWYH Dockerfile.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Add the following environment variables:
| Variable | Value |
|---|---|
SECRET_KEY | Your generated secret key |
Attach Persistent Volumes
Add the following volume:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/data | 1 GB | SQLite database with financial data |
Deploy Your Application
Click Deploy to start the build process. Klutch.sh will build the container, attach volumes, and provision an HTTPS certificate.
Access WYGIWYH
Once deployment completes, access your WYGIWYH instance at https://your-app-name.klutch.sh. Create an account to start tracking.
Setting Up Your Finances
Creating Accounts
- Navigate to Accounts after logging in
- Click Add Account
- Enter account details:
- Name (e.g., “Checking”, “Savings”, “Cash”)
- Starting balance
- Account type
- Save the account
Adding Transactions
- Click Add Transaction
- Select the account
- Enter transaction details:
- Amount (positive for income, negative for expenses)
- Description
- Category
- Date
- Save the transaction
Managing Categories
Create categories that match your spending:
- Housing: Rent, utilities, insurance
- Food: Groceries, dining out
- Transportation: Gas, parking, public transit
- Entertainment: Subscriptions, hobbies
- Health: Medical, gym, prescriptions
Analyzing Your Spending
Dashboard Overview
The main dashboard shows:
- Total balance across all accounts
- Recent transactions
- Spending by category (current month)
- Balance trends over time
Reports
Generate detailed reports:
- Monthly spending breakdown
- Category comparison over time
- Income vs. expenses analysis
- Account balance history
Filtering Data
- Select specific date ranges
- Filter by category or account
- Search for specific transactions
Best Practices
Daily Tracking
- Log transactions as they happen
- Use mobile access for immediate entry
- Keep receipts for reference
Monthly Review
- Review spending by category
- Identify areas for improvement
- Adjust budget goals as needed
- Reconcile with bank statements
Data Backup
- Regularly export your data
- Keep secure backups of the database
- Consider automated backup solutions
Troubleshooting
Transactions Not Saving
- Verify volume is mounted correctly
- Check database file permissions
- Review application logs for errors
Balance Discrepancies
- Review recent transactions for errors
- Check for duplicate entries
- Verify starting balances are correct
Login Issues
- Check SECRET_KEY is set correctly
- Clear browser cookies
- Verify database is accessible
Additional Resources
Conclusion
Deploying WYGIWYH on Klutch.sh gives you a simple, privacy-focused personal finance tracker. The combination of WYGIWYH’s straightforward approach and Klutch.sh’s deployment simplicity means you can quickly start tracking your finances without sharing your data with third-party services.