Deploying Attendize
Introduction
Attendize is a powerful open-source event management and ticketing platform built with Laravel and PHP. It provides a complete solution for creating events, selling tickets online, managing attendees, and tracking ticket sales in real-time. With features like custom event pages, multiple ticket types, promotional codes, embedded ticket widgets, and detailed analytics, Attendize is perfect for conferences, meetups, concerts, and any event requiring professional ticketing capabilities.
Deploying Attendize on Klutch.sh gives you a scalable, production-ready infrastructure with automatic Dockerfile detection, persistent storage for uploads and databases, secure environment variable management, and built-in SSL certificate provisioning. This comprehensive guide walks through installing Attendize locally, creating an optimized Dockerfile, configuring MySQL database connections, setting up persistent volumes for data retention, and deploying to Klutch.sh with production best practices.
Whether you’re hosting community events, running a ticketing business, or managing corporate conferences, this guide provides everything you need to deploy and maintain a reliable Attendize installation on Klutch.sh.
Prerequisites
Before deploying Attendize on Klutch.sh, ensure you have:
- A Klutch.sh account with access to the dashboard
- A GitHub repository (Klutch.sh uses GitHub as the git source)
- Basic knowledge of Docker, PHP, and Laravel applications
- A MySQL database instance (can be provisioned on Klutch.sh or externally)
- Familiarity with environment variables and database configuration
What is Attendize?
Attendize is a feature-rich, self-hosted event ticketing and management platform that offers:
- Event Creation: Create unlimited events with custom branding, descriptions, and media
- Ticket Management: Multiple ticket types with price tiers, quantities, and sales periods
- Attendee Management: Track registrations, check-ins, and attendee information
- Payment Processing: Integrated with Stripe and PayPal for secure online payments
- Promotional Codes: Discount codes and promotional campaigns
- Email Communication: Automated attendee emails and custom messaging
- Embeddable Widgets: Ticket widgets that can be embedded on external websites
- Real-time Analytics: Track sales, revenue, and attendee metrics in real-time
- QR Code Tickets: Automatic QR code generation for mobile ticket scanning
- Multi-event Management: Manage multiple events from a single dashboard
Built on the Laravel framework, Attendize provides a modern, maintainable codebase with excellent documentation and an active community.
Getting Started: Local Installation
Before deploying to Klutch.sh, let’s set up Attendize locally to understand its structure and configuration.
Installation Steps
-
Clone the Attendize repository
Terminal window git clone https://github.com/Attendize/Attendize.git attendize-appcd attendize-app -
Install PHP dependencies with Composer
Terminal window composer install --no-dev --optimize-autoloader -
Set up environment configuration
Terminal window cp .env.example .envphp artisan key:generate -
Configure your database in .env
DB_CONNECTION=mysqlDB_HOST=127.0.0.1DB_PORT=3306DB_DATABASE=attendizeDB_USERNAME=your_usernameDB_PASSWORD=your_passwordAPP_URL=http://localhost:8000APP_ENV=localAPP_DEBUG=true -
Run database migrations
Terminal window php artisan migrate --force -
Generate application key and storage links
Terminal window php artisan storage:link -
Start the development server
Terminal window php artisan serve --host=0.0.0.0 --port=8000Your Attendize installation should now be accessible at http://localhost:8000
Sample Event Creation Code
Once installed, you can interact with Attendize programmatically. Here’s a sample PHP snippet showing how to create an event using Attendize’s models:
<?phpuse App\Models\Event;use App\Models\Organiser;
// Create an organiser$organiser = Organiser::create([ 'name' => 'My Event Company', 'email' => 'contact@myevents.com', 'description' => 'Professional event management',]);
// Create an event$event = Event::create([ 'title' => 'Tech Conference 2024', 'description' => 'Annual technology conference', 'location' => 'San Francisco Convention Center', 'start_date' => '2024-06-15 09:00:00', 'end_date' => '2024-06-17 18:00:00', 'organiser_id' => $organiser->id, 'venue_name' => 'Main Hall', 'tickets_on_sale' => 1,]);
echo "Event created: " . $event->title;This demonstrates Attendize’s Laravel-based architecture, making it easy to extend and customize for your specific needs.
Project Structure
Understanding Attendize’s file structure helps with Docker configuration and persistent storage planning:
attendize-app/├── app/ # Laravel application logic├── bootstrap/ # Application bootstrap files├── config/ # Configuration files├── database/ # Migrations and seeds│ └── migrations/ # Database schema├── public/ # Web server document root│ ├── index.php # Application entry point│ └── assets/ # Public assets (CSS, JS, images)├── resources/ # Views, raw assets│ └── views/ # Blade templates├── storage/ # Generated files, logs, uploads│ ├── app/ # Application storage│ │ └── public/ # Public uploads (ticket images, etc.)│ ├── framework/ # Framework cache, sessions│ └── logs/ # Application logs├── vendor/ # Composer dependencies├── .env # Environment configuration├── artisan # Laravel command-line interface├── composer.json # PHP dependencies└── Dockerfile # Docker build instructionsKey directories for persistence:
/var/www/html/storage— Uploaded files, logs, sessions, cache/var/www/html/.env— Environment configuration (use env vars instead)
Creating a Production Dockerfile
Klutch.sh automatically detects and uses a Dockerfile when present in your repository’s root directory. Here’s a production-ready Dockerfile for Attendize:
Basic Production Dockerfile
FROM php:8.1-apache
# Install system dependenciesRUN apt-get update && apt-get install -y \ git \ curl \ libpng-dev \ libonig-dev \ libxml2-dev \ zip \ unzip \ libzip-dev \ mariadb-client \ && rm -rf /var/lib/apt/lists/*
# Install PHP extensionsRUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip
# Enable Apache mod_rewriteRUN a2enmod rewrite
# Install ComposerCOPY --from=composer:2 /usr/bin/composer /usr/bin/composer
# Set working directoryWORKDIR /var/www/html
# Copy application filesCOPY . .
# Install dependenciesRUN composer install --no-dev --optimize-autoloader --no-interaction
# Set permissionsRUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
# Configure ApacheRUN sed -i 's!/var/www/html!/var/www/html/public!g' /etc/apache2/sites-available/000-default.conf
# Expose port 80EXPOSE 80
# Start ApacheCMD ["apache2-foreground"]Advanced Multi-Stage Dockerfile
For smaller images and faster deployments, use a multi-stage build:
# Build stageFROM composer:2 as builder
WORKDIR /app
COPY composer.json composer.lock ./RUN composer install --no-dev --no-scripts --no-autoloader --prefer-dist
COPY . .RUN composer dump-autoload --optimize --no-dev
# Production stageFROM php:8.1-apache
# Install system dependenciesRUN apt-get update && apt-get install -y \ libpng-dev \ libonig-dev \ libxml2-dev \ libzip-dev \ mariadb-client \ && docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip \ && rm -rf /var/lib/apt/lists/*
# Enable Apache modulesRUN a2enmod rewrite
# Set working directoryWORKDIR /var/www/html
# Copy application from builderCOPY --from=builder /app .
# Set permissionsRUN chown -R www-data:www-data storage bootstrap/cache \ && chmod -R 775 storage bootstrap/cache
# Configure Apache document rootRUN sed -i 's!/var/www/html!/var/www/html/public!g' /etc/apache2/sites-available/000-default.conf
# Create entrypoint scriptCOPY docker-entrypoint.sh /usr/local/bin/RUN chmod +x /usr/local/bin/docker-entrypoint.sh
EXPOSE 80
ENTRYPOINT ["docker-entrypoint.sh"]CMD ["apache2-foreground"]Docker Entrypoint Script
Create docker-entrypoint.sh for initialization tasks:
#!/bin/bashset -e
# Wait for database to be readyecho "Waiting for database connection..."until php artisan migrate:status > /dev/null 2>&1; do echo "Database not ready, waiting..." sleep 3done
# Run migrationsecho "Running database migrations..."php artisan migrate --force
# Clear and cache configurationsecho "Optimizing application..."php artisan config:cachephp artisan route:cachephp artisan view:cache
# Ensure storage link existsphp artisan storage:link || true
echo "Attendize is ready!"
# Execute the main commandexec "$@"Persistent Storage Configuration
Attendize requires persistent storage for uploaded files, session data, and logs. Klutch.sh provides persistent volumes that survive deployments and restarts.
Setting Up Persistent Volumes
-
Identify required persistent directories
/var/www/html/storage— File uploads, session data, cache, logs/var/www/html/public/user_content— Public uploaded content (if used)
-
Create a persistent volume in Klutch.sh
In the Klutch.sh dashboard, navigate to your app settings:
- Click “Add Volume”
- Set Mount Path:
/var/www/html/storage - Set Size:
5GB(adjust based on expected file uploads) - Save the configuration
-
Update Dockerfile permissions
Ensure the Docker user has write access:
RUN chown -R www-data:www-data /var/www/html/storage \&& chmod -R 775 /var/www/html/storage -
Verify persistence after deployment
After deploying, upload test files through Attendize and redeploy to confirm files persist.
Database Setup and Configuration
Attendize requires a MySQL database. You can use Klutch.sh’s database offerings or an external managed database.
Option 1: Using Klutch.sh MySQL
-
Provision a MySQL database
See the MySQL deployment guide for detailed instructions on provisioning a database on Klutch.sh.
-
Note the connection details
After provisioning, you’ll receive:
- Host address (e.g.,
mysql.klutch.sh) - Port (typically
8000for TCP traffic) - Database name
- Username and password
- Host address (e.g.,
-
Configure environment variables
Set these in your Klutch.sh app configuration (see next section).
Option 2: External MySQL Database
You can use any MySQL-compatible database:
- Managed MySQL services (AWS RDS, Google Cloud SQL, DigitalOcean Managed Databases)
- Self-hosted MySQL instances
- PlanetScale, Supabase, or other MySQL providers
Ensure network connectivity between Klutch.sh and your database server, and note the connection credentials for environment variable configuration.
Environment Variables
Configure Attendize by setting environment variables in the Klutch.sh dashboard. These replace the .env file in production.
Required Environment Variables
# ApplicationAPP_NAME=AttendizeAPP_ENV=productionAPP_KEY=base64:your-32-character-key-hereAPP_DEBUG=falseAPP_URL=https://example-app.klutch.sh
# DatabaseDB_CONNECTION=mysqlDB_HOST=your-database-hostDB_PORT=3306DB_DATABASE=attendizeDB_USERNAME=your_db_userDB_PASSWORD=your_secure_password
# Mail (for sending tickets and notifications)MAIL_DRIVER=smtpMAIL_HOST=smtp.mailtrap.ioMAIL_PORT=2525MAIL_USERNAME=your_mail_usernameMAIL_PASSWORD=your_mail_passwordMAIL_ENCRYPTION=tlsMAIL_FROM_ADDRESS=noreply@yourdomain.comMAIL_FROM_NAME=Attendize
# Stripe (for payment processing)STRIPE_PUBLIC_KEY=pk_live_your_stripe_public_keySTRIPE_SECRET_KEY=sk_live_your_stripe_secret_key
# PayPal (alternative payment processor)PAYPAL_CLIENT_ID=your_paypal_client_idPAYPAL_SECRET=your_paypal_secretPAYPAL_MODE=liveOptional Environment Variables
# SessionSESSION_DRIVER=fileSESSION_LIFETIME=120
# CacheCACHE_DRIVER=fileQUEUE_CONNECTION=sync
# LoggingLOG_CHANNEL=stackLOG_LEVEL=info
# AWS S3 (for remote storage)AWS_ACCESS_KEY_ID=your_keyAWS_SECRET_ACCESS_KEY=your_secretAWS_DEFAULT_REGION=us-east-1AWS_BUCKET=your_bucketAWS_USE_PATH_STYLE_ENDPOINT=falseCustomizing Commands with Nixpacks
If you need to customize the build or start command (though the Dockerfile handles this), you can use Nixpacks environment variables:
NIXPACKS_BUILD_CMD— Custom build commandNIXPACKS_START_CMD— Custom start command (e.g.,apache2-foreground)
However, when using a Dockerfile, Klutch.sh automatically uses the Dockerfile’s CMD and ENTRYPOINT directives.
Deploying to Klutch.sh
Now that your Dockerfile and configuration are ready, follow these steps to deploy Attendize to Klutch.sh.
Deployment Steps
-
Push your repository to GitHub
Ensure your repository contains:
Dockerfile(in the root directory)docker-entrypoint.sh(if using the entrypoint script)- Attendize application files
.dockerignorefile (to exclude unnecessary files)
Terminal window git add .git commit -m "Add Dockerfile for Klutch.sh deployment"git push origin main -
Log in to Klutch.sh
Navigate to klutch.sh/app
-
Create a new project
- Click “New Project”
- Enter a project name (e.g., “Event Ticketing”)
- Save the project
-
Create a new app
- Click “New App” within your project
- Connect your GitHub repository
- Select the repository containing your Attendize code
- Select the branch (e.g.,
mainorproduction)
-
Configure app settings
- Traffic Type: Select HTTP (Attendize is a web application)
- Internal Port: Set to 80 (the port Apache listens on in the container)
- Region: Choose the region closest to your users
- Compute Resources: Select appropriate CPU and memory (start with 1 CPU, 1GB RAM)
- Instances: Set to 1 (scale up later based on traffic)
-
Add environment variables
Click “Add Environment Variable” and enter all required variables from the previous section:
- Database credentials (
DB_HOST,DB_DATABASE,DB_USERNAME,DB_PASSWORD) - Application key (
APP_KEY) - Application URL (
APP_URL— use your Klutch.sh URL or custom domain) - Mail configuration
- Payment processor credentials
- Database credentials (
-
Attach persistent volumes
- Click “Add Volume”
- Mount Path:
/var/www/html/storage - Size:
5GB(or more based on needs) - Save the volume configuration
-
Deploy the application
Click “Create App” or “Deploy”
Klutch.sh will:
- Clone your repository
- Detect the Dockerfile automatically
- Build the Docker image
- Deploy the container with your configuration
- Expose the app on HTTP with automatic routing
-
Monitor the deployment
Watch the build logs to ensure successful deployment. The process typically takes 3-5 minutes.
-
Access your Attendize installation
Once deployed, access your app at the provided URL:
https://example-app.klutch.sh
Complete the initial Attendize setup in your browser.
Custom Domain Configuration
To use your own domain with Attendize on Klutch.sh:
-
Add a custom domain in Klutch.sh
- Go to your app settings in the Klutch.sh dashboard
- Navigate to “Domains” section
- Click “Add Custom Domain”
- Enter your domain (e.g.,
tickets.yourdomain.com)
-
Configure DNS records
Update your DNS provider with the records provided by Klutch.sh:
- Add a CNAME record pointing to your Klutch.sh app
- Or add A/AAAA records as instructed
-
Update APP_URL environment variable
In your app settings, update:
Terminal window APP_URL=https://tickets.yourdomain.com -
Wait for DNS propagation
DNS changes can take up to 48 hours, but typically propagate within minutes.
-
Verify SSL certificate
Klutch.sh automatically provisions SSL certificates for custom domains. Once DNS propagates, your site will be accessible via HTTPS.
For more details, see the custom domains documentation.
Post-Deployment Configuration
After deploying Attendize, complete these configuration steps:
Initial Setup Wizard
-
Access your Attendize URL
Visit your deployed app URL (e.g.,
https://example-app.klutch.sh) -
Complete installation wizard
Attendize will guide you through:
- Creating the admin account
- Configuring payment processors
- Setting up email notifications
- Customizing branding
-
Create your first organiser
- Log in to the admin panel
- Navigate to “Organisers”
- Add organiser details (name, email, logo)
-
Create your first event
- Click “Create Event”
- Fill in event details
- Create ticket types
- Publish the event
Configuring Payment Processors
Attendize supports Stripe and PayPal:
Stripe Configuration:
- Obtain API keys from Stripe Dashboard
- Add keys as environment variables (
STRIPE_PUBLIC_KEY,STRIPE_SECRET_KEY) - Enable Stripe in Attendize settings
PayPal Configuration:
- Create app in PayPal Developer Portal
- Add credentials as environment variables
- Enable PayPal in Attendize settings
Email Configuration
For transactional emails (tickets, confirmations):
- Use services like SendGrid, Mailgun, AWS SES, or Postmark
- Configure SMTP settings via environment variables
- Test email delivery by creating a test ticket order
Scaling and Performance
As your event traffic grows, optimize Attendize performance:
Vertical Scaling
Increase compute resources in Klutch.sh:
- Navigate to app settings
- Adjust CPU and memory allocation
- Recommended for events with 1,000+ attendees: 2 CPU, 4GB RAM
Horizontal Scaling
Run multiple instances:
- Increase instance count in app settings
- Klutch.sh automatically load-balances traffic
- Ensure session storage uses database or Redis (not file-based)
Database Optimization
- Use connection pooling
- Add indexes to frequently queried tables
- Regular database maintenance and optimization
- Consider read replicas for high-traffic events
Caching Strategy
Update environment variables:
CACHE_DRIVER=redisSESSION_DRIVER=redisREDIS_HOST=your-redis-hostREDIS_PASSWORD=your-redis-passwordREDIS_PORT=6379Deploy a Redis instance on Klutch.sh or use a managed Redis service.
Monitoring and Maintenance
Application Monitoring
Monitor your Attendize deployment:
- Check application logs in Klutch.sh dashboard
- Set up uptime monitoring (Pingdom, UptimeRobot)
- Monitor database performance
- Track ticket sales metrics in Attendize admin panel
Regular Maintenance
-
Update Attendize regularly
Terminal window git pull upstream maincomposer updatephp artisan migrate --forcegit push origin mainKlutch.sh will automatically rebuild and redeploy.
-
Database backups
- Schedule regular database backups
- Test restoration procedures
- Store backups in multiple locations
-
Security updates
- Keep PHP and system packages updated
- Rebuild Docker images regularly
- Update composer dependencies
- Monitor security advisories
-
Performance reviews
- Review slow queries
- Optimize images and assets
- Clean up old log files
- Archive completed events
Troubleshooting
Common issues and solutions:
Issue: Application shows 500 error
- Check logs:
storage/logs/laravel.log - Verify database connection
- Ensure
APP_KEYis set - Check file permissions on
storage/directory
Issue: Database connection failed
- Verify
DB_HOST,DB_PORT,DB_USERNAME,DB_PASSWORD - Test connection:
mysql -h $DB_HOST -u $DB_USERNAME -p - Check network connectivity between app and database
- Verify database server is running
Issue: Emails not sending
- Test SMTP credentials manually
- Check
MAIL_*environment variables - Verify firewall allows outbound SMTP traffic
- Check spam folders
Issue: File uploads failing
- Verify persistent volume is mounted at
/var/www/html/storage - Check disk space on volume
- Verify write permissions:
chown -R www-data:www-data storage
Issue: Tickets not generating QR codes
- Ensure GD PHP extension is installed
- Check
storage/write permissions - Verify sufficient disk space
Security Best Practices
Protect your Attendize installation:
-
Use HTTPS exclusively
- Always set
APP_URLtohttps:// - Klutch.sh provides automatic SSL certificates
- Never disable SSL validation in production
- Always set
-
Secure environment variables
- Never commit secrets to Git
- Use Klutch.sh’s secure environment variable storage
- Rotate API keys and passwords regularly
-
Database security
- Use strong, unique database passwords
- Limit database user privileges
- Enable database firewall rules
- Use private networking when possible
-
Application hardening
- Set
APP_DEBUG=falsein production - Keep Laravel and dependencies updated
- Implement rate limiting for API endpoints
- Use CSRF protection (enabled by default)
- Set
-
Payment security
- Use official payment processor SDKs
- Never store credit card details locally
- Comply with PCI DSS requirements
- Enable transaction logging
-
User security
- Implement strong password policies
- Enable two-factor authentication
- Regularly audit admin accounts
- Monitor suspicious activities
-
Backup and disaster recovery
- Schedule automated backups
- Test restoration procedures regularly
- Store backups in different geographic regions
- Document recovery procedures
Cost Optimization
Optimize your Klutch.sh hosting costs:
- Right-size compute resources: Start small and scale based on actual usage
- Use efficient Docker images: Multi-stage builds reduce image size
- Implement caching: Reduce database queries with Redis or application cache
- Optimize storage: Regularly clean up old logs and temporary files
- Schedule scaling: Scale up before events, scale down after
- Monitor usage: Track metrics to identify optimization opportunities
Advanced Configuration
Using External Storage (S3)
For large-scale deployments, use S3 for file storage:
-
Configure AWS S3 credentials
Terminal window FILESYSTEM_DRIVER=s3AWS_ACCESS_KEY_ID=your_keyAWS_SECRET_ACCESS_KEY=your_secretAWS_DEFAULT_REGION=us-east-1AWS_BUCKET=attendize-uploads -
Update Laravel filesystem config
The configuration uses environment variables automatically.
-
Redeploy the application
Klutch.sh will rebuild with the new configuration.
Implementing Custom Analytics
Integrate analytics tools:
# Google AnalyticsGOOGLE_ANALYTICS_ID=UA-XXXXXXXX-X
# Facebook PixelFACEBOOK_PIXEL_ID=your_pixel_id
# Custom analytics endpointANALYTICS_ENDPOINT=https://analytics.yourdomain.com/trackMulti-Tenant Setup
Run multiple event organizations:
- Use environment variables to configure branding per deployment
- Deploy separate instances for different brands
- Use custom domains for each tenant
- Implement white-labeling in the application
Resources
- Attendize GitHub Repository
- Official Attendize Documentation
- Laravel Documentation
- Klutch.sh Quick Start Guide
- Klutch.sh Volumes Guide
- Klutch.sh MySQL Guide
- Custom Domains Documentation
Conclusion
Deploying Attendize on Klutch.sh provides a robust, scalable solution for event ticketing and management. With automatic Dockerfile detection, persistent storage, secure environment variables, and built-in SSL, Klutch.sh simplifies the deployment process while maintaining production-grade reliability.
This guide covered local installation for development, creating optimized Dockerfiles, configuring databases and persistent storage, setting environment variables, deploying to Klutch.sh with detailed steps, adding custom domains, scaling for high traffic, implementing security best practices, and maintaining your deployment long-term.
Whether you’re running small community events or large-scale conferences, Attendize on Klutch.sh gives you professional ticketing capabilities with minimal operational overhead. Start your deployment today and experience the power of self-hosted event management.