Deploying a Crater App
Introduction
Crater is a powerful open-source invoicing and expense tracking application designed for freelancers and small businesses. Built with Laravel (PHP) and Vue.js, Crater provides a comprehensive suite of financial management tools including invoice generation, expense tracking, payment management, and detailed financial reporting. With its modern, intuitive interface and robust feature set, Crater simplifies the complexities of financial management while maintaining professional standards.
Crater stands out for its:
- Complete Invoicing Solution: Create, send, and track professional invoices with customizable templates
- Expense Management: Track and categorize business expenses with receipt uploads
- Client Portal: Dedicated portal for clients to view invoices, make payments, and download documents
- Multi-Currency Support: Handle transactions in multiple currencies with automatic exchange rate updates
- Tax Management: Built-in support for multiple tax types and calculations
- Payment Integration: Accept online payments through various payment gateways
- Estimates & Proposals: Create and send estimates that can be converted to invoices
- Custom Fields: Add custom fields to invoices, estimates, and expenses
- PDF Generation: Automatically generate professional PDF invoices and reports
- Reporting: Comprehensive financial reports and analytics dashboards
This comprehensive guide walks you through deploying Crater on Klutch.sh using Docker, including detailed installation steps, database configuration, persistent storage setup, and production-ready best practices for managing your invoicing platform.
Prerequisites
Before you begin, ensure you have the following:
- A Klutch.sh account
- A GitHub account with a repository for your Crater project
- Docker installed locally for testing (optional but recommended)
- Basic understanding of Docker, PHP/Laravel applications, and database management
- A MySQL or PostgreSQL database (can be deployed on Klutch.sh or use a managed service)
Installation and Setup
Step 1: Create Your Project Directory
First, create a new directory for your Crater deployment project:
mkdir crater-klutchcd crater-klutchgit initStep 2: Create the Dockerfile
Create a Dockerfile in your project root directory. This will define your Crater container configuration:
FROM php:8.2-apache
# Set working directoryWORKDIR /var/www/html
# Install system dependenciesRUN apt-get update && apt-get install -y \ git \ curl \ libpng-dev \ libonig-dev \ libxml2-dev \ libzip-dev \ zip \ unzip \ && docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip
# Install ComposerCOPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Clone Crater repositoryRUN git clone https://github.com/crater-invoice/crater.git /var/www/html/crater \ && cd /var/www/html/crater \ && git checkout master
# Set working directory to CraterWORKDIR /var/www/html/crater
# Install PHP dependenciesRUN composer install --no-dev --optimize-autoloader --no-interaction
# Set permissionsRUN chown -R www-data:www-data /var/www/html/crater \ && chmod -R 755 /var/www/html/crater/storage \ && chmod -R 755 /var/www/html/crater/bootstrap/cache
# Configure ApacheRUN a2enmod rewriteCOPY apache-config.conf /etc/apache2/sites-available/000-default.conf
# Expose HTTP portEXPOSE 80
# Copy entrypoint scriptCOPY docker-entrypoint.sh /usr/local/bin/RUN chmod +x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]CMD ["apache2-foreground"]Step 3: Create Apache Configuration
Create an apache-config.conf file for Apache virtual host configuration:
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html/crater/public
<Directory /var/www/html/crater/public> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>Step 4: Create Entrypoint Script
Create a docker-entrypoint.sh script to handle initialization:
#!/bin/bashset -e
cd /var/www/html/crater
# Wait for database to be readyecho "Waiting for database..."until php artisan migrate:status 2>/dev/null; do echo "Database not ready, waiting..." sleep 3done
# Run migrations if neededif [ ! -f /var/www/html/crater/storage/app/.installed ]; then echo "Running initial setup..." php artisan migrate --force php artisan db:seed --force touch /var/www/html/crater/storage/app/.installedfi
# Optimize applicationphp artisan config:cachephp artisan route:cachephp artisan view:cache
# Execute the main commandexec "$@"Step 5: Create Environment Configuration
Create a .env.example file to document the required environment variables:
# Application ConfigurationAPP_NAME=CraterAPP_ENV=productionAPP_KEY=APP_DEBUG=falseAPP_URL=https://example-app.klutch.sh
# Database ConfigurationDB_CONNECTION=mysqlDB_HOST=mysql-hostDB_PORT=3306DB_DATABASE=craterDB_USERNAME=crater_userDB_PASSWORD=secure_password_here
# Mail ConfigurationMAIL_MAILER=smtpMAIL_HOST=smtp.mailtrap.ioMAIL_PORT=2525MAIL_USERNAME=nullMAIL_PASSWORD=nullMAIL_ENCRYPTION=tlsMAIL_FROM_ADDRESS=hello@example.comMAIL_FROM_NAME="${APP_NAME}"
# Session ConfigurationSESSION_DRIVER=fileSESSION_LIFETIME=120
# Cache ConfigurationCACHE_DRIVER=fileQUEUE_CONNECTION=sync
# Crater Specific ConfigurationSANCTUM_STATEFUL_DOMAINS=example-app.klutch.shSESSION_DOMAIN=.example-app.klutch.sh
# File StorageFILESYSTEM_DRIVER=local
# PDF GenerationPDF_DRIVER=snappySecurity Note: Never commit actual passwords or sensitive data to your repository. Use environment variables in Klutch.sh dashboard.
Step 6: Generate Application Key
Before deploying, you need to generate an application key. You can do this locally:
# Using Docker locallydocker run --rm php:8.2-cli php -r "echo 'base64:'.base64_encode(random_bytes(32)).PHP_EOL;"Save this generated key to use as the APP_KEY environment variable.
Step 7: Test Locally with Docker Compose (Optional)
Create a docker-compose.yml file for local testing:
version: '3.8'
services: crater: build: . ports: - "8080:80" environment: - APP_KEY=base64:your-generated-key-here - APP_URL=http://localhost:8080 - DB_HOST=mysql - DB_DATABASE=crater - DB_USERNAME=crater - DB_PASSWORD=secret volumes: - crater-storage:/var/www/html/crater/storage depends_on: - mysql
mysql: image: mysql:8.0 environment: - MYSQL_DATABASE=crater - MYSQL_USER=crater - MYSQL_PASSWORD=secret - MYSQL_ROOT_PASSWORD=rootsecret volumes: - mysql-data:/var/lib/mysql
volumes: crater-storage: mysql-data:Note: This Docker Compose file is for local development and testing only. Klutch.sh does not support Docker Compose for deployment.
Test locally:
# Build and start servicesdocker-compose up -d
# View logsdocker-compose logs -f crater
# Access Crater at http://localhost:8080
# Stop services when donedocker-compose downStep 8: Create Documentation
Create a README.md file with deployment instructions:
# Crater Invoicing Platform
## Deployment on Klutch.sh
This repository contains the Docker configuration for deploying Crater on Klutch.sh.
## Configuration
1. Set up a MySQL database (version 8.0 or higher recommended)2. Configure environment variables in Klutch.sh dashboard3. Attach persistent volume for storage4. Deploy the application
## Environment Variables
Required environment variables:- `APP_KEY`: Laravel application key (generate with: php artisan key:generate)- `APP_URL`: Your application URL (e.g., https://example-app.klutch.sh)- `DB_HOST`: Database hostname- `DB_DATABASE`: Database name- `DB_USERNAME`: Database username- `DB_PASSWORD`: Database password
## Storage
Mount persistent volume at:- `/var/www/html/crater/storage` - Application storage (uploads, logs, cache)
## First-Time Setup
After deployment, access your Crater installation at your app URL and complete the setup wizard.Step 9: Push to GitHub
Commit your configuration files to your GitHub repository:
git add Dockerfile apache-config.conf docker-entrypoint.sh .env.example README.mdgit commit -m "Add Crater Docker configuration for Klutch.sh deployment"git remote add origin https://github.com/yourusername/crater-klutch.gitgit push -u origin mainImportant: Do not commit docker-compose.yml to your production repository as it contains test credentials and is only for local development.
Deploying to Klutch.sh
Now that your Crater project is ready and pushed to GitHub, follow these steps to deploy it on Klutch.sh with persistent storage and database configuration.
Deployment Steps
-
Log in to Klutch.sh
Navigate to klutch.sh/app and sign in to your account.
-
Create a New Project
Click on “Create Project” and give your project a meaningful name (e.g., “Crater Invoicing”).
-
Set Up Database
Before deploying Crater, you need a MySQL database:
- Option A: Deploy MySQL on Klutch.sh by following the MySQL deployment guide
- Option B: Use an external managed MySQL service (e.g., DigitalOcean Managed Databases)
Note: If deploying MySQL on Klutch.sh, configure it with TCP traffic type on port 8000, and set the internal port to
3306(MySQL’s default port). -
Create a New App
Click on “Create App” within your project and configure the following settings:
-
Select Your Repository
- Choose GitHub as your Git source
- Select the repository containing your Crater Dockerfile
- Choose the branch you want to deploy (usually
mainormaster)
-
Configure Traffic Type
- Traffic Type: Select HTTP (Crater serves a web application via HTTP)
- Internal Port: Set to
80(the port Apache listens on inside the container)
-
Set Environment Variables
Add the following environment variables for your Crater configuration:
Application Settings:
APP_NAME: Your application name (e.g.,Crater)APP_ENV: Set toproductionAPP_KEY: Your generated Laravel application key (e.g.,base64:your-key-here)APP_DEBUG: Set tofalsefor productionAPP_URL: Your full application URL (e.g.,https://example-app.klutch.sh)
Database Settings:
DB_CONNECTION: Set tomysqlDB_HOST: Your database hostname (e.g.,mysql-app.klutch.shif deployed on Klutch.sh, or external hostname)DB_PORT: Set to8000if using Klutch.sh MySQL, or3306for external databasesDB_DATABASE: Database name (e.g.,crater)DB_USERNAME: Database usernameDB_PASSWORD: Database password (mark as secret)
Mail Settings (Optional but recommended):
MAIL_MAILER: SMTP service (e.g.,smtp)MAIL_HOST: SMTP server hostnameMAIL_PORT: SMTP port (usually587or2525)MAIL_USERNAME: SMTP usernameMAIL_PASSWORD: SMTP password (mark as secret)MAIL_ENCRYPTION: Set totlsMAIL_FROM_ADDRESS: Sender email addressMAIL_FROM_NAME: Sender name
Session Configuration:
SESSION_DRIVER: Set tofileSANCTUM_STATEFUL_DOMAINS: Your app domain (e.g.,example-app.klutch.sh)SESSION_DOMAIN: Your app domain with leading dot (e.g.,.example-app.klutch.sh)
Security Note: Always mark sensitive variables like passwords and API keys as secrets in Klutch.sh dashboard.
-
Attach a Persistent Volume
This is critical for ensuring your Crater data persists across deployments and restarts:
- In the Volumes section, click “Add Volume”
- Mount Path: Enter
/var/www/html/crater/storage(this is where Crater stores uploads, invoices, and application data) - Size: Choose an appropriate size based on your expected usage (e.g., 10GB for small businesses, 50GB+ for larger operations with many documents)
Important: Crater requires persistent storage to maintain uploaded files, generated invoices, receipts, and application cache between container restarts.
-
Configure Additional Settings
- Region: Select the region closest to your users for optimal performance
- Compute Resources: Choose CPU and memory based on your needs (minimum 1GB RAM recommended for Crater)
- Instances: Start with 1 instance (you can scale up later as your business grows)
-
Deploy Your Application
Click “Create” to start the deployment. Klutch.sh will:
- Automatically detect your Dockerfile in the repository root
- Build the Docker image
- Attach the persistent volume
- Start your Crater container
- Assign a URL for external access
This process may take several minutes as it builds the image and installs all dependencies.
-
Complete Initial Setup
Once deployment is complete, you’ll receive a URL like
https://example-app.klutch.sh. Navigate to this URL in your browser to access the Crater setup wizard:https://example-app.klutch.sh/admin/onboardingThe setup wizard will guide you through:
- Creating your admin account
- Configuring company information
- Setting up your first invoice template
- Configuring basic application settings
Important: Complete the setup wizard as soon as possible after deployment to secure your Crater installation.
Database Configuration
Using MySQL on Klutch.sh
If you’re deploying MySQL on Klutch.sh alongside Crater:
- Create a separate MySQL app in the same project
- Configure MySQL with:
- Traffic Type: TCP
- Internal Port:
3306 - Public Port:
8000(Klutch.sh default for TCP traffic)
- Attach persistent storage to MySQL at
/var/lib/mysql - Create the database and user:
CREATE DATABASE crater CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;CREATE USER 'crater_user'@'%' IDENTIFIED BY 'secure_password';GRANT ALL PRIVILEGES ON crater.* TO 'crater_user'@'%';FLUSH PRIVILEGES;- In your Crater app, set the environment variables:
DB_HOST:mysql-app.klutch.sh(your MySQL app URL)DB_PORT:8000DB_DATABASE:craterDB_USERNAME:crater_userDB_PASSWORD:secure_password
Using External MySQL Service
For production deployments with higher reliability requirements, consider using a managed MySQL service:
Option 1: DigitalOcean Managed Database
- Create a MySQL database cluster on DigitalOcean
- Create a database named
crater - Get your connection details from the DigitalOcean dashboard
- Set environment variables in Klutch.sh:
DB_HOST=your-db-cluster.db.ondigitalocean.comDB_PORT=25060DB_DATABASE=craterDB_USERNAME=doadminDB_PASSWORD=your-db-password
Option 2: AWS RDS MySQL
- Create an RDS MySQL instance on AWS
- Configure security groups to allow connections from Klutch.sh
- Create the
craterdatabase - Set environment variables with your RDS connection details
Option 3: PlanetScale
- Create a database on PlanetScale
- Get your connection string
- Set environment variables in Klutch.sh
Persistent Storage Configuration
Crater requires persistent storage for several critical functions:
Storage Structure
Mount a persistent volume to /var/www/html/crater/storage which contains:
storage/app/public- Uploaded files (invoices, receipts, company logos)storage/framework- Application cache, sessions, and compiled viewsstorage/logs- Application logs for debugging and monitoring
Recommended Volume Sizes
- Small Business (5-50 invoices/month): 5-10 GB
- Medium Business (50-200 invoices/month): 20-50 GB
- Large Business (200+ invoices/month): 50-100 GB+
Backup Strategy
Regularly backup your persistent volume to prevent data loss:
- Use Klutch.sh volume snapshots (if available)
- Export important files periodically to external storage
- Maintain database backups separately
- Test your restore process regularly
Email Configuration
Crater requires email configuration to send invoices, payment reminders, and notifications to clients.
SMTP Configuration Options
Option 1: Mailgun
MAIL_MAILER=smtpMAIL_HOST=smtp.mailgun.orgMAIL_PORT=587MAIL_USERNAME=your-mailgun-usernameMAIL_PASSWORD=your-mailgun-passwordMAIL_ENCRYPTION=tlsMAIL_FROM_ADDRESS=noreply@yourdomain.comMAIL_FROM_NAME="Your Company Name"Option 2: SendGrid
MAIL_MAILER=smtpMAIL_HOST=smtp.sendgrid.netMAIL_PORT=587MAIL_USERNAME=apikeyMAIL_PASSWORD=your-sendgrid-api-keyMAIL_ENCRYPTION=tlsMAIL_FROM_ADDRESS=noreply@yourdomain.comMAIL_FROM_NAME="Your Company Name"Option 3: AWS SES
MAIL_MAILER=smtpMAIL_HOST=email-smtp.us-east-1.amazonaws.comMAIL_PORT=587MAIL_USERNAME=your-ses-usernameMAIL_PASSWORD=your-ses-passwordMAIL_ENCRYPTION=tlsMAIL_FROM_ADDRESS=noreply@yourdomain.comMAIL_FROM_NAME="Your Company Name"Testing Email Configuration
After configuring email, test it by:
- Creating a test invoice
- Sending it to your own email address
- Verifying receipt and format
Environment Variables Reference
Complete list of Crater environment variables you can configure in Klutch.sh:
| Variable | Description | Required | Default |
|---|---|---|---|
APP_NAME | Application name | No | Crater |
APP_ENV | Environment (production/local) | Yes | production |
APP_KEY | Laravel encryption key | Yes | None |
APP_DEBUG | Enable debug mode | No | false |
APP_URL | Full application URL | Yes | None |
DB_CONNECTION | Database type | Yes | mysql |
DB_HOST | Database hostname | Yes | None |
DB_PORT | Database port | Yes | 3306 |
DB_DATABASE | Database name | Yes | None |
DB_USERNAME | Database user | Yes | None |
DB_PASSWORD | Database password | Yes | None |
MAIL_MAILER | Mail driver (smtp, sendmail) | No | smtp |
MAIL_HOST | SMTP host | No | None |
MAIL_PORT | SMTP port | No | 587 |
MAIL_USERNAME | SMTP username | No | None |
MAIL_PASSWORD | SMTP password | No | None |
MAIL_ENCRYPTION | Encryption type (tls, ssl) | No | tls |
MAIL_FROM_ADDRESS | Sender email | No | None |
MAIL_FROM_NAME | Sender name | No | ${APP_NAME} |
SESSION_DRIVER | Session storage driver | No | file |
CACHE_DRIVER | Cache storage driver | No | file |
QUEUE_CONNECTION | Queue driver | No | sync |
SANCTUM_STATEFUL_DOMAINS | API authentication domains | No | None |
SESSION_DOMAIN | Cookie domain | No | None |
Production Best Practices
Security Recommendations
- Strong Passwords: Use a password manager to generate strong, random passwords for database and admin accounts
- Environment Variables: Store all sensitive credentials as environment variables in Klutch.sh, never in your Dockerfile or repository
- HTTPS Only: Klutch.sh provides HTTPS by default; ensure you access Crater only via HTTPS
- Regular Updates: Keep Crater updated to the latest version for security patches and new features
- Database Backups: Implement a backup strategy for your MySQL database using automated backups
- File Backups: Regularly backup your persistent volume containing uploaded files and invoices
- Access Control: Limit admin access and use strong passwords for all user accounts
- Email Security: Use SMTP authentication and encryption (TLS) for email sending
- Session Security: Configure secure session settings with appropriate timeouts
- API Security: If using Crater’s API, implement proper authentication and rate limiting
Performance Optimization
- Database Optimization: Ensure your MySQL database has proper indexing and is configured for your workload
- Caching: Laravel’s caching system is configured by default; monitor cache hit rates
- File Storage: Consider using S3-compatible object storage for uploaded files in high-volume environments
- Image Optimization: Optimize uploaded images to reduce storage and bandwidth usage
- Database Connection Pooling: Use persistent database connections for better performance
- CDN Integration: Consider using a CDN for static assets if serving global clients
- Regular Maintenance: Clean up old logs and temporary files periodically
- Monitor Resources: Watch CPU, memory, and storage usage in Klutch.sh dashboard
Monitoring and Maintenance
Monitor your Crater deployment for:
- Response Times: Ensure the application loads quickly for users
- Database Performance: Monitor query execution times and slow queries
- Storage Usage: Track persistent volume usage and plan for expansion
- Error Logs: Regularly check
/var/www/html/crater/storage/logsfor application errors - Email Delivery: Monitor email delivery rates and bounce rates
- Backup Status: Verify that automated backups are running successfully
- Security Updates: Subscribe to Crater’s release notifications for security updates
- User Activity: Monitor login attempts and user activity for suspicious behavior
Data Management
- Invoice Retention: Configure retention policies based on your business and legal requirements
- Database Cleanup: Periodically archive or remove old data to maintain performance
- File Organization: Implement a naming convention for uploaded files and documents
- Export Capabilities: Regularly export financial data for accounting software integration
- Audit Trail: Enable and maintain audit logs for compliance purposes
- Client Data Privacy: Ensure compliance with GDPR, CCPA, or other privacy regulations
- Data Export: Provide clients with data export capabilities as required by law
Customization and Extensions
Custom Invoice Templates
Crater allows customization of invoice templates:
- Navigate to Settings → Invoice Settings
- Choose from multiple pre-built templates
- Customize colors, fonts, and layout
- Add your company logo and branding
- Preview before saving
Custom Fields
Add custom fields to invoices and estimates:
- Go to Settings → Custom Fields
- Click “Add Custom Field”
- Choose the module (Invoice, Estimate, Payment)
- Define field type (Text, Textarea, Number, etc.)
- Set as required or optional
Payment Gateway Integration
Configure payment gateways to accept online payments:
Supported Payment Gateways:
- Stripe
- PayPal
- Razorpay
- Mollie
Configuration Steps:
- Navigate to Settings → Payment Modes
- Click “Add Payment Mode”
- Enter gateway credentials
- Enable the payment method
- Test with a small transaction
Multi-Language Support
Crater supports multiple languages:
- Go to Settings → Preferences
- Select your preferred language
- Download additional language packs if needed
- Set default language for invoices
Troubleshooting
Cannot Access Crater Application
Symptoms: Browser shows connection error or timeout
Solutions:
- Verify your app is running in the Klutch.sh dashboard
- Check that the internal port is set to
80 - Ensure HTTP traffic type is selected
- Review application logs for startup errors
- Verify environment variables are set correctly
Database Connection Errors
Symptoms: Crater shows “Database connection failed” or similar errors
Solutions:
- Verify database credentials in environment variables
- Check database host and port are correct
- Ensure database server is running and accessible
- Test database connectivity from a temporary container
- Verify database user has proper permissions
- Check if database exists and is initialized
File Upload Failures
Symptoms: Cannot upload invoices, receipts, or company logo
Solutions:
- Confirm persistent volume is attached at
/var/www/html/crater/storage - Check volume has sufficient free space
- Verify file permissions on storage directory
- Review PHP upload limits in application logs
- Check for storage path configuration in environment
Email Not Sending
Symptoms: Invoices not arriving in client inboxes
Solutions:
- Verify SMTP credentials in environment variables
- Test SMTP connection separately
- Check email logs in
/var/www/html/crater/storage/logs - Verify sender email is authorized by SMTP provider
- Check for rate limiting or quota issues with email provider
- Ensure TLS/SSL encryption is configured correctly
Invoice PDF Generation Issues
Symptoms: PDF invoices fail to generate or display incorrectly
Solutions:
- Check application logs for PDF generation errors
- Verify required PHP extensions are installed (GD, mbstring)
- Ensure sufficient memory allocation for PDF generation
- Test with different invoice templates
- Verify fonts are properly installed in the container
Performance Issues
Symptoms: Slow page loads, timeouts, or unresponsive interface
Solutions:
- Monitor CPU and memory usage in Klutch.sh dashboard
- Consider increasing compute resources
- Review and optimize database queries
- Clear application cache:
php artisan cache:clear - Check for slow database queries
- Ensure adequate storage I/O performance
- Review application logs for bottlenecks
Migration Errors
Symptoms: Database migrations fail during deployment
Solutions:
- Verify database credentials are correct
- Check database user has CREATE/ALTER permissions
- Review migration logs for specific errors
- Ensure database charset is utf8mb4
- Try running migrations manually in container shell
Upgrading Crater
To upgrade Crater to a new version:
Step 1: Update Dockerfile
Modify your Dockerfile to checkout the desired version:
# Change from:RUN git clone https://github.com/crater-invoice/crater.git /var/www/html/crater \ && cd /var/www/html/crater \ && git checkout master
# To:RUN git clone https://github.com/crater-invoice/crater.git /var/www/html/crater \ && cd /var/www/html/crater \ && git checkout v6.0.0Step 2: Backup Before Upgrading
Critical: Always backup before upgrading:
- Create a snapshot of your persistent volume
- Export your database:
Terminal window mysqldump -h your-db-host -u crater_user -p crater > crater-backup.sql - Store backup in a secure location
Step 3: Deploy Update
git add Dockerfilegit commit -m "Upgrade Crater to version 6.0.0"git pushKlutch.sh will automatically rebuild and redeploy your application. Your data will be preserved in the persistent volume and database.
Step 4: Verify Upgrade
After deployment:
- Access your Crater installation
- Check version in Settings → About
- Verify all features work correctly
- Test invoice generation and email sending
- Review application logs for any errors
Scaling Crater for Growth
Horizontal Scaling
For high-traffic deployments:
- Separate Database: Move to a managed MySQL service with read replicas
- Object Storage: Use S3-compatible storage for file uploads
- Load Balancer: Deploy multiple Crater instances behind a load balancer
- Session Storage: Use Redis or database sessions for multi-instance deployments
- Cache Layer: Implement Redis for application caching
Vertical Scaling
Increase resources as needed:
- Start with 1GB RAM, 1 vCPU for small businesses
- Scale to 2-4GB RAM, 2 vCPUs for medium businesses
- Use 4-8GB RAM, 4+ vCPUs for large businesses with high transaction volumes
Additional Resources
- Klutch.sh Documentation
- Crater GitHub Repository
- Official Crater Documentation
- Klutch.sh Volumes Guide
- Klutch.sh Networking Guide
- Laravel Documentation
- PHP Docker Images
- MySQL Docker Images
Conclusion
Deploying Crater to Klutch.sh with Docker provides a robust, scalable invoicing and expense management solution for your business. By following this guide, you’ve set up a production-ready Crater instance with proper database configuration, persistent storage, email integration, and security best practices. Your invoicing platform is now ready to handle professional invoice generation, expense tracking, and financial reporting while maintaining full control over your financial data and business processes.