Deploying Family Accounting Tool
Introduction
Family Accounting Tool (FAT) is a powerful, self-hosted web application designed to help families and individuals track their finances, manage budgets, and gain insights into spending habits. Built with modern web technologies, it provides an intuitive interface for personal financial management without relying on third-party cloud services.
Family Accounting Tool offers comprehensive financial management features:
- Multi-Account Support - Track checking, savings, credit cards, and investment accounts
- Transaction Management - Easy entry and categorization of income and expenses
- Budget Planning - Set monthly budgets by category and track spending
- Reporting & Analytics - Visualize spending patterns with charts and graphs
- Recurring Transactions - Automate entry of regular bills and income
- Multi-Currency Support - Handle accounts in different currencies
- Data Import/Export - Import transactions from CSV files and bank statements
- Search & Filter - Quickly find transactions with powerful search tools
- Multi-User Access - Share accounts with family members with role-based permissions
- Privacy-Focused - Your data stays on your own server
Why Deploy Family Accounting Tool on Klutch.sh?
Deploying Family Accounting Tool on Klutch.sh provides several advantages:
- Complete Privacy - Your financial data never leaves your control
- Fast Deployment - Get up and running in minutes with automatic Dockerfile detection
- Persistent Storage - Reliable database and file storage for all your financial records
- HTTPS by Default - Bank-grade encryption for all your financial data
- Custom Domains - Access your finances at your own domain
- Automated Backups - Integrated volume backup capabilities
- Scalable - Handles years of transaction history without slowdown
- Cost-Effective - Predictable monthly pricing for complete financial privacy
Prerequisites
Before starting, ensure you have:
- A Klutch.sh account
- A GitHub account (GitHub is the only supported git source)
- Docker installed locally for testing (optional)
- Basic familiarity with Docker and environment variables
- A PostgreSQL database (see our PostgreSQL deployment guide)
Preparing Your Family Accounting Tool Repository
1. Create a Project Directory
Start by creating a new directory for your Family Accounting Tool deployment:
mkdir family-accounting-tool-klutchcd family-accounting-tool-klutchgit init2. Create the Dockerfile
Create a Dockerfile in your project root with the following configuration:
# Multi-stage build for Family Accounting ToolFROM node:18-alpine AS builder
# Install build dependenciesRUN apk add --no-cache python3 make g++ git
# Set working directoryWORKDIR /app
# Clone Family Accounting Tool repositoryARG FAT_VERSION=mainRUN git clone https://github.com/range-of-motion/family-accounting-tool.git . && \ git checkout ${FAT_VERSION}
# Install dependenciesRUN npm ci --only=production
# Build the applicationRUN npm run build
# Production stageFROM node:18-alpine
# Install runtime dependenciesRUN apk add --no-cache \ postgresql-client \ curl
# Create app userRUN addgroup -g 1001 -S nodejs && \ adduser -S nodejs -u 1001
# Set working directoryWORKDIR /app
# Copy built application from builderCOPY --from=builder --chown=nodejs:nodejs /app/package*.json ./COPY --from=builder --chown=nodejs:nodejs /app/node_modules ./node_modulesCOPY --from=builder --chown=nodejs:nodejs /app/build ./buildCOPY --from=builder --chown=nodejs:nodejs /app/public ./publicCOPY --from=builder --chown=nodejs:nodejs /app/prisma ./prisma
# Copy startup scriptCOPY --chown=nodejs:nodejs docker-entrypoint.sh /usr/local/bin/RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Create data directoryRUN mkdir -p /app/data && chown -R nodejs:nodejs /app/data
# Switch to non-root userUSER nodejs
# Expose port 3000EXPOSE 3000
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ CMD node -e "require('http').get('http://localhost:3000/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
# Start applicationENTRYPOINT ["docker-entrypoint.sh"]CMD ["node", "build"]3. Create the Docker Entrypoint Script
Create a docker-entrypoint.sh file to handle database migrations and startup:
#!/bin/shset -e
echo "🚀 Starting Family Accounting Tool..."
# Wait for database to be readyecho "⏳ Waiting for PostgreSQL to be ready..."until pg_isready -h $DATABASE_HOST -p ${DATABASE_PORT:-5432} -U $DATABASE_USER; do echo "Waiting for database..." sleep 2done
echo "✅ PostgreSQL is ready!"
# Run database migrationsecho "🔄 Running database migrations..."npx prisma migrate deploy
# Generate Prisma clientecho "🔧 Generating Prisma client..."npx prisma generate
echo "✨ Starting application..."exec "$@"4. Create Environment Template
Create a .env.example file for reference:
# Database ConfigurationDATABASE_URL=postgresql://username:password@database-host:5432/family_accounting_tool
# Application ConfigurationNODE_ENV=productionPORT=3000BASE_URL=https://example-app.klutch.sh
# Session Configuration (generate a random string for production)SESSION_SECRET=your-super-secret-session-key-change-this
# Optional: Email Configuration (for password resets)SMTP_HOST=smtp.gmail.comSMTP_PORT=587SMTP_SECURE=falseSMTP_USER=your-email@gmail.comSMTP_PASS=your-app-password
# Optional: Currency API (for exchange rates)CURRENCY_API_KEY=your-api-key5. Create a .dockerignore File
Create a .dockerignore file to exclude unnecessary files:
.git.gitignore.env.env.*node_modulesnpm-debug.logREADME.md.DS_Store.vscode.idea*.mddistbuild.nextcoverage6. Create a .gitignore File
Create a .gitignore to protect sensitive files:
# Environment files.env.env.*
# Dependenciesnode_modules/
# Build outputsbuild/dist/.next/
# Database*.db*.sqlitedata/
# OS files.DS_StoreThumbs.db
# IDE.vscode/.idea/*.swp*.swo
# Logslogs/*.lognpm-debug.log*7. Initialize Git and Push to GitHub
Initialize your repository and push to GitHub:
git add .git commit -m "Initial Family Accounting Tool deployment setup"git branch -M maingit remote add origin https://github.com/yourusername/family-accounting-tool-klutch.gitgit push -u origin mainDeploying on Klutch.sh
Now that your repository is ready, deploy Family Accounting Tool on Klutch.sh:
-
Navigate to the Klutch.sh Dashboard
Go to klutch.sh/app and log into your account.
-
Create a New Project
Click “New Project” and give it a descriptive name like
family-finances. -
Create a New App
Within your project, click “New App” and select your GitHub repository containing the Family Accounting Tool Dockerfile.
-
Configure Deployment Settings
- Branch: Select
main(or your preferred deployment branch) - Traffic Type: Select HTTP (Family Accounting Tool is a web application)
- Port: Set to
3000(the internal port the application listens on)
- Branch: Select
-
Configure Environment Variables
Family Accounting Tool requires several environment variables. Add the following in the Klutch.sh dashboard:
DATABASE_URL=postgresql://fatuser:your_secure_password@your-postgres-app.klutch.sh:8000/family_accounting_toolNODE_ENV=productionPORT=3000BASE_URL=https://example-app.klutch.shSESSION_SECRET=generate-a-long-random-string-hereDATABASE_HOST=your-postgres-app.klutch.shDATABASE_PORT=8000DATABASE_USER=fatuserDATABASE_NAME=family_accounting_toolImportant: Replace the database connection details with your actual PostgreSQL deployment. See our PostgreSQL deployment guide for setting up a database.
To generate a secure session secret, you can run:
Terminal window node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" -
Attach Persistent Volumes
Family Accounting Tool requires persistent storage for uploaded files and cached data:
- Uploaded Documents:
/app/data(10GB recommended)
Click “Add Volume”:
- Mount Path:
/app/data, Size:10GB
- Uploaded Documents:
-
Deploy the Application
Click “Deploy” to start the deployment. Klutch.sh will automatically detect your Dockerfile, build the image, and deploy your container.
-
Monitor the Deployment
Watch the build logs in real-time to ensure everything deploys correctly. The initial build may take 5-10 minutes as dependencies are installed.
Initial Family Accounting Tool Setup
Once deployed, complete the initial setup:
1. Access the Application
Navigate to your deployed app URL (e.g., https://example-app.klutch.sh) in your browser.
2. Create Your First User
On the first visit, you’ll be prompted to create an administrator account:
- Email: Your email address
- Password: Choose a strong password (min 12 characters)
- Name: Your full name
3. Configure Basic Settings
After logging in, navigate to Settings to configure:
General Settings:
Application Name: Family FinancesCurrency: USD (or your preferred currency)Date Format: MM/DD/YYYY (or your preferred format)First Day of Week: Sunday/MondayLocalization:
Language: EnglishTimezone: America/New_York (or your timezone)Number Format: 1,234.564. Set Up Your First Account
Create your first financial account:
- Navigate to **Accounts** → **Add Account**
- Configure account details:
Account Name: Checking AccountAccount Type: CheckingCurrency: USDOpening Balance: 1000.00Bank Name: Your BankAccount Number: ****1234 (last 4 digits)
- Click **"Create Account"**
Configuration
Database Configuration
Family Accounting Tool uses PostgreSQL for data storage. The connection is configured via environment variables:
DATABASE_URL=postgresql://username:password@host:port/databaseFor Klutch.sh PostgreSQL deployments, use port 8000:
DATABASE_URL=postgresql://fatuser:password@postgres-app.klutch.sh:8000/family_accounting_toolEnvironment Variables Reference
| Variable | Description | Example | Required |
|---|---|---|---|
DATABASE_URL | Full PostgreSQL connection string | postgresql://user:pass@host:5432/db | Yes |
DATABASE_HOST | PostgreSQL host | postgres-app.klutch.sh | Yes |
DATABASE_PORT | PostgreSQL port | 8000 | Yes |
DATABASE_USER | Database username | fatuser | Yes |
DATABASE_NAME | Database name | family_accounting_tool | Yes |
NODE_ENV | Application environment | production | Yes |
PORT | Application port | 3000 | Yes |
BASE_URL | Public application URL | https://example-app.klutch.sh | Yes |
SESSION_SECRET | Session encryption key | random-64-char-string | Yes |
SMTP_HOST | Email server host | smtp.gmail.com | No |
SMTP_PORT | Email server port | 587 | No |
SMTP_USER | Email username | user@gmail.com | No |
SMTP_PASS | Email password | app-password | No |
Custom Domain Setup
To use your own domain with Family Accounting Tool:
- Go to your app settings in the Klutch.sh dashboard
- Navigate to the “Domains” section
- Add your custom domain (e.g.,
finances.yourdomain.com) - Update your DNS records as shown
- Update the
BASE_URLenvironment variable to your custom domain
Learn more in our Custom Domains documentation.
Using Family Accounting Tool
Managing Accounts
Add a New Account:
- Navigate to **Accounts** → **Add Account**
- Fill in account details: - Account name - Account type (Checking, Savings, Credit Card, etc.) - Currency - Opening balance - Optional: Bank information
- Click **"Create"**
Transfer Between Accounts:
1. Go to Transactions → New Transaction2. Select Type: Transfer3. From Account: Checking Account4. To Account: Savings Account5. Amount: $500.006. Date: Today7. Click "Create Transaction"Recording Transactions
Add Income:
Type: IncomeAccount: Checking AccountCategory: SalaryAmount: $3,000.00Date: 12/15/2025Description: December paycheckAdd Expense:
Type: ExpenseAccount: Credit CardCategory: GroceriesAmount: $125.50Date: 12/18/2025Description: Weekly grocery shoppingMerchant: Whole FoodsCreating Budgets
Set up monthly budgets to track spending:
- Navigate to **Budgets** → **Create Budget**
- Configure budget:
Budget Name: December 2025Period: MonthlyStart Date: 12/01/2025Categories:- Groceries: $600/month- Dining Out: $200/month- Entertainment: $150/month- Utilities: $300/month- Transportation: $250/month
- Click **"Create Budget"**
Importing Transactions
Family Accounting Tool supports importing transactions from CSV files:
- Export transactions from your bank as CSV
- Navigate to **Transactions** → **Import**
- Upload your CSV file
- Map CSV columns to transaction fields:
Date Column → DateDescription Column → DescriptionAmount Column → AmountCategory Column → Category (optional)
- Review and confirm the import
- Click **"Import Transactions"**
Generating Reports
Monthly Spending Report:
- Navigate to **Reports** → **Spending by Category**
- Select date range: Current month
- View pie chart and detailed breakdown
- Export to PDF or CSV if needed
Income vs. Expenses:
1. Go to Reports → Income vs. Expenses2. Select time period: Last 6 months3. View trend line graph4. Analyze savings rateNet Worth Tracking:
1. Go to Reports → Net Worth2. View total assets vs. liabilities3. Track net worth over time4. Export report for financial planningProduction Best Practices
Security Hardening
1. Use Strong Passwords
Enforce strong password requirements:
- Minimum 12 characters
- Mix of uppercase, lowercase, numbers, and symbols
- No common words or patterns
- Use a password manager
2. Enable Two-Factor Authentication
If available in your version, enable 2FA for all users:
Settings → Security → Two-Factor Authentication → Enable3. Regular Security Updates
Keep Family Accounting Tool updated to the latest version. Update your Dockerfile:
ARG FAT_VERSION=v1.2.3 # Update to latest stable versionThen redeploy through Klutch.sh.
4. Secure Session Secret
Use a cryptographically secure session secret:
# Generate a new secretopenssl rand -hex 32Never commit your session secret to version control.
5. HTTPS Only
Ensure all traffic uses HTTPS. Klutch.sh provides this by default, but verify in your environment variables:
BASE_URL=https://example-app.klutch.sh # Not http://6. Restrict Database Access
Configure your PostgreSQL database to only accept connections from your application:
- Use strong database passwords
- Don’t expose the database publicly
- Regular database password rotation
Database Optimization
1. Regular Backups
Set up automated database backups. For Klutch.sh PostgreSQL deployments, enable automatic backups in the dashboard.
2. Database Maintenance
Periodically optimize your database:
-- Connect to your databasepsql $DATABASE_URL
-- Vacuum and analyzeVACUUM ANALYZE;
-- Check table sizesSELECT schemaname, tablename, pg_size_pretty(pg_total_relation_size(schemaname||'.'||tablename)) AS sizeFROM pg_tablesWHERE schemaname = 'public'ORDER BY pg_total_relation_size(schemaname||'.'||tablename) DESC;3. Index Optimization
Ensure critical queries have proper indexes. Check slow queries:
-- Enable slow query loggingALTER DATABASE family_accounting_tool SET log_min_duration_statement = 1000;
-- Review slow queriesSELECT query, calls, total_time, mean_timeFROM pg_stat_statementsORDER BY mean_time DESCLIMIT 10;4. Archive Old Data
For better performance with years of data:
- Archive transactions older than 5 years
- Keep archived data in separate tables
- Maintain access for reporting when needed
Performance Optimization
1. Enable Caching
Family Accounting Tool may support caching. Configure if available:
REDIS_URL=redis://redis-app.klutch.sh:8000CACHE_ENABLED=trueCACHE_TTL=36002. Optimize Assets
The Dockerfile already includes production optimizations:
- Minified JavaScript and CSS
- Compressed images
- Gzip compression
3. Database Connection Pooling
Configure connection pooling in production:
DATABASE_POOL_MIN=2DATABASE_POOL_MAX=10DATABASE_CONNECTION_TIMEOUT=300004. Monitor Performance
Track application performance:
- Response times
- Database query performance
- Memory usage
- CPU utilization
Backup Strategy
1. Database Backups
Implement automated daily backups:
# Example backup script (run on PostgreSQL server)#!/bin/bashDATE=$(date +%Y%m%d_%H%M%S)pg_dump $DATABASE_URL > backup_$DATE.sqlgzip backup_$DATE.sql
# Keep last 30 days of backupsfind . -name "backup_*.sql.gz" -mtime +30 -delete2. Application Data Backups
Backup the /app/data volume containing uploaded files:
- Daily incremental backups
- Weekly full backups
- Store backups in a separate location
3. Configuration Backups
Keep backups of:
- Environment variables
- Database schema
- Application settings
4. Backup Testing
Regularly test backup restoration:
# Test database restorepsql $DATABASE_URL < backup_20251220.sql
# Verify data integrity# Check transaction counts# Verify account balances5. Backup Retention Policy
- Daily backups: Keep for 7 days
- Weekly backups: Keep for 4 weeks
- Monthly backups: Keep for 12 months
- Yearly backups: Keep for 7 years (for tax purposes)
Monitoring and Logging
1. Application Logs
Monitor application logs for errors:
# View logs in Klutch.sh dashboard# Or if you have terminal access:tail -f /var/log/family-accounting-tool.log2. Error Tracking
Set up error tracking with services like:
3. Uptime Monitoring
Monitor application availability:
4. Performance Monitoring
Track application performance metrics:
- Average response time
- Database query performance
- Memory and CPU usage
- Transaction processing speed
Scaling Considerations
1. Vertical Scaling
For increased performance, upgrade your Klutch.sh plan:
- More CPU cores for faster transaction processing
- Additional RAM for caching and better performance
- Faster storage I/O for database operations
2. Database Optimization
- Add indexes to frequently queried columns
- Implement database connection pooling
- Consider read replicas for reporting
3. Caching Strategy
Implement caching for frequently accessed data:
- User session data
- Account balances
- Category lists
- Recent transactions
Troubleshooting
Installation Issues
Problem: “Cannot connect to database”
Solution:
- Verify database credentials in environment variables
- Ensure PostgreSQL deployment is running
- Check that the database exists and user has proper permissions
- For Klutch.sh PostgreSQL deployments, ensure you’re using port
8000
# Test database connectionpsql postgresql://fatuser:password@postgres-app.klutch.sh:8000/family_accounting_toolProblem: “Database migration failed”
Solution:
- Check database logs for errors
- Ensure database user has CREATE TABLE permissions
- Verify DATABASE_URL is correctly formatted
- Try running migrations manually:
# Exec into containernpx prisma migrate deployProblem: “Session secret not set”
Solution:
- Generate a secure session secret:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"- Add it to your environment variables as
SESSION_SECRET
Performance Issues
Problem: Slow transaction loading
Solution:
- Check database query performance
- Add indexes to frequently queried columns
- Implement pagination for large transaction lists
- Archive old transactions
-- Add index for date queriesCREATE INDEX idx_transactions_date ON transactions(date DESC);
-- Add index for account queriesCREATE INDEX idx_transactions_account ON transactions(account_id);Problem: High memory usage
Solution:
- Reduce database connection pool size
- Implement caching for frequently accessed data
- Optimize database queries
- Consider upgrading your Klutch.sh plan
Data Issues
Problem: Incorrect account balances
Solution:
- Recalculate balances from transactions
- Check for duplicate transactions
- Verify all transactions are properly recorded
- Run database integrity checks
Problem: Missing transactions after import
Solution:
- Verify CSV format matches expected structure
- Check date format in CSV file
- Ensure amount column uses proper decimal format
- Review import logs for errors
Login Issues
Problem: Cannot log in after password change
Solution:
- Clear browser cookies and cache
- Try password reset via email
- Check if email service is configured correctly
- Verify SMTP settings in environment variables
Problem: “Session expired” errors
Solution:
- Check SESSION_SECRET is set correctly
- Increase session timeout if needed
- Clear browser cookies
- Restart the application
Additional Resources
Official Documentation
Related Klutch.sh Guides
Financial Management Resources
Alternative Tools
Community and Support
Ready to take control of your family finances? Deploy Family Accounting Tool on Klutch.sh today and start tracking your financial journey with complete privacy and control. Need help with database setup? Check out our PostgreSQL deployment guide to get your database running first.