Skip to content

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

    1. Clone the Attendize repository

      Terminal window
      git clone https://github.com/Attendize/Attendize.git attendize-app
      cd attendize-app
    2. Install PHP dependencies with Composer

      Terminal window
      composer install --no-dev --optimize-autoloader
    3. Set up environment configuration

      Terminal window
      cp .env.example .env
      php artisan key:generate
    4. Configure your database in .env

      DB_CONNECTION=mysql
      DB_HOST=127.0.0.1
      DB_PORT=3306
      DB_DATABASE=attendize
      DB_USERNAME=your_username
      DB_PASSWORD=your_password
      APP_URL=http://localhost:8000
      APP_ENV=local
      APP_DEBUG=true
    5. Run database migrations

      Terminal window
      php artisan migrate --force
    6. Generate application key and storage links

      Terminal window
      php artisan storage:link
    7. Start the development server

      Terminal window
      php artisan serve --host=0.0.0.0 --port=8000

      Your 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:

<?php
use 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 instructions

Key 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 dependencies
RUN 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 extensions
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip
# Enable Apache mod_rewrite
RUN a2enmod rewrite
# Install Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
# Set working directory
WORKDIR /var/www/html
# Copy application files
COPY . .
# Install dependencies
RUN composer install --no-dev --optimize-autoloader --no-interaction
# Set permissions
RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
# Configure Apache
RUN sed -i 's!/var/www/html!/var/www/html/public!g' /etc/apache2/sites-available/000-default.conf
# Expose port 80
EXPOSE 80
# Start Apache
CMD ["apache2-foreground"]

Advanced Multi-Stage Dockerfile

For smaller images and faster deployments, use a multi-stage build:

# Build stage
FROM 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 stage
FROM php:8.1-apache
# Install system dependencies
RUN 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 modules
RUN a2enmod rewrite
# Set working directory
WORKDIR /var/www/html
# Copy application from builder
COPY --from=builder /app .
# Set permissions
RUN chown -R www-data:www-data storage bootstrap/cache \
&& chmod -R 775 storage bootstrap/cache
# Configure Apache document root
RUN sed -i 's!/var/www/html!/var/www/html/public!g' /etc/apache2/sites-available/000-default.conf
# Create entrypoint script
COPY 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/bash
set -e
# Wait for database to be ready
echo "Waiting for database connection..."
until php artisan migrate:status > /dev/null 2>&1; do
echo "Database not ready, waiting..."
sleep 3
done
# Run migrations
echo "Running database migrations..."
php artisan migrate --force
# Clear and cache configurations
echo "Optimizing application..."
php artisan config:cache
php artisan route:cache
php artisan view:cache
# Ensure storage link exists
php artisan storage:link || true
echo "Attendize is ready!"
# Execute the main command
exec "$@"

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

    1. 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)
    2. 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
    3. 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
    4. 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

    1. Provision a MySQL database

      See the MySQL deployment guide for detailed instructions on provisioning a database on Klutch.sh.

    2. Note the connection details

      After provisioning, you’ll receive:

      • Host address (e.g., mysql.klutch.sh)
      • Port (typically 8000 for TCP traffic)
      • Database name
      • Username and password
    3. 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

Terminal window
# Application
APP_NAME=Attendize
APP_ENV=production
APP_KEY=base64:your-32-character-key-here
APP_DEBUG=false
APP_URL=https://example-app.klutch.sh
# Database
DB_CONNECTION=mysql
DB_HOST=your-database-host
DB_PORT=3306
DB_DATABASE=attendize
DB_USERNAME=your_db_user
DB_PASSWORD=your_secure_password
# Mail (for sending tickets and notifications)
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=your_mail_username
MAIL_PASSWORD=your_mail_password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=noreply@yourdomain.com
MAIL_FROM_NAME=Attendize
# Stripe (for payment processing)
STRIPE_PUBLIC_KEY=pk_live_your_stripe_public_key
STRIPE_SECRET_KEY=sk_live_your_stripe_secret_key
# PayPal (alternative payment processor)
PAYPAL_CLIENT_ID=your_paypal_client_id
PAYPAL_SECRET=your_paypal_secret
PAYPAL_MODE=live

Optional Environment Variables

Terminal window
# Session
SESSION_DRIVER=file
SESSION_LIFETIME=120
# Cache
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
# Logging
LOG_CHANNEL=stack
LOG_LEVEL=info
# AWS S3 (for remote storage)
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=your_bucket
AWS_USE_PATH_STYLE_ENDPOINT=false

Customizing 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 command
  • NIXPACKS_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

    1. 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
      • .dockerignore file (to exclude unnecessary files)
      Terminal window
      git add .
      git commit -m "Add Dockerfile for Klutch.sh deployment"
      git push origin main
    2. Log in to Klutch.sh

      Navigate to klutch.sh/app

    3. Create a new project

      • Click “New Project”
      • Enter a project name (e.g., “Event Ticketing”)
      • Save the project
    4. 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., main or production)
    5. 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)
    6. 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
    7. Attach persistent volumes

      • Click “Add Volume”
      • Mount Path: /var/www/html/storage
      • Size: 5GB (or more based on needs)
      • Save the volume configuration
    8. 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
    9. Monitor the deployment

      Watch the build logs to ensure successful deployment. The process typically takes 3-5 minutes.

    10. 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:

    1. 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)
    2. 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
    3. Update APP_URL environment variable

      In your app settings, update:

      Terminal window
      APP_URL=https://tickets.yourdomain.com
    4. Wait for DNS propagation

      DNS changes can take up to 48 hours, but typically propagate within minutes.

    5. 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

    1. Access your Attendize URL

      Visit your deployed app URL (e.g., https://example-app.klutch.sh)

    2. Complete installation wizard

      Attendize will guide you through:

      • Creating the admin account
      • Configuring payment processors
      • Setting up email notifications
      • Customizing branding
    3. Create your first organiser

      • Log in to the admin panel
      • Navigate to “Organisers”
      • Add organiser details (name, email, logo)
    4. 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:

Terminal window
CACHE_DRIVER=redis
SESSION_DRIVER=redis
REDIS_HOST=your-redis-host
REDIS_PASSWORD=your-redis-password
REDIS_PORT=6379

Deploy 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

    1. Update Attendize regularly

      Terminal window
      git pull upstream main
      composer update
      php artisan migrate --force
      git push origin main

      Klutch.sh will automatically rebuild and redeploy.

    2. Database backups

      • Schedule regular database backups
      • Test restoration procedures
      • Store backups in multiple locations
    3. Security updates

      • Keep PHP and system packages updated
      • Rebuild Docker images regularly
      • Update composer dependencies
      • Monitor security advisories
    4. 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_KEY is 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:

    1. Use HTTPS exclusively

      • Always set APP_URL to https://
      • Klutch.sh provides automatic SSL certificates
      • Never disable SSL validation in production
    2. Secure environment variables

      • Never commit secrets to Git
      • Use Klutch.sh’s secure environment variable storage
      • Rotate API keys and passwords regularly
    3. Database security

      • Use strong, unique database passwords
      • Limit database user privileges
      • Enable database firewall rules
      • Use private networking when possible
    4. Application hardening

      • Set APP_DEBUG=false in production
      • Keep Laravel and dependencies updated
      • Implement rate limiting for API endpoints
      • Use CSRF protection (enabled by default)
    5. Payment security

      • Use official payment processor SDKs
      • Never store credit card details locally
      • Comply with PCI DSS requirements
      • Enable transaction logging
    6. User security

      • Implement strong password policies
      • Enable two-factor authentication
      • Regularly audit admin accounts
      • Monitor suspicious activities
    7. 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:

  1. Configure AWS S3 credentials

    Terminal window
    FILESYSTEM_DRIVER=s3
    AWS_ACCESS_KEY_ID=your_key
    AWS_SECRET_ACCESS_KEY=your_secret
    AWS_DEFAULT_REGION=us-east-1
    AWS_BUCKET=attendize-uploads
  2. Update Laravel filesystem config

    The configuration uses environment variables automatically.

  3. Redeploy the application

    Klutch.sh will rebuild with the new configuration.

Implementing Custom Analytics

Integrate analytics tools:

Terminal window
# Google Analytics
GOOGLE_ANALYTICS_ID=UA-XXXXXXXX-X
# Facebook Pixel
FACEBOOK_PIXEL_ID=your_pixel_id
# Custom analytics endpoint
ANALYTICS_ENDPOINT=https://analytics.yourdomain.com/track

Multi-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


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.