Documentation
Deploying

Deploying Hi.Events

Hi.Events offers flexible deployment options for both cloud and self-hosted environments. Whether you're looking for a quick setup or a fully customized configuration, this guide will help you get up and running.

For most users, our recommended approach is using Docker, which simplifies deployment and ensures consistency across different environments.

Overview

Hi.Events consists of two main components:

  • Frontend: A Node.js React application that handles the user interface
  • Backend: A Laravel PHP application that powers the API and business logic

You can deploy these components either:

  • Together using our all-in-one Docker image (simplest approach)
  • Separately for better scalability and control (recommended for production)

Deployment Options

One-Click Cloud Deployment

The fastest way to deploy Hi.Events is through our verified cloud partners:

Deploy on DigitalOcean (opens in a new tab)

Deploy to Render (opens in a new tab)

Deploy on Railway (opens in a new tab)

Deploy on Zeabur (opens in a new tab)

Deploy on Elestio
💡

Production Considerations

While one-click deployments are convenient for getting started, production environments require careful configuration of:

  • Server resources based on expected traffic
  • Database size and performance
  • Security settings and environment variables
  • Proper file storage configuration

Environment Variables

To configure your Hi.Events deployment properly, you'll need to set up several environment variables. These control everything from database connections to email delivery settings.

Frontend Variables

Variable NameDescriptionExample
VITE_FRONTEND_URLFrontend URLhttps://your-app.com
VITE_API_URL_CLIENTAPI URL for use in the browserhttps://your-app.com/api
VITE_API_URL_SERVERAPI URL for use on serverThis is used for server-side rendering. For the All-in-one image, it is usually http://localhost:8000/api. If you're hosting frontend and backend separately, this value would usually be the same as VITE_API_URL_CLIENT.
VITE_STRIPE_PUBLISHABLE_KEYStripe public keypk_test_51...

Backend Variables

Mail Configuration

You can use email providers like Postmark (opens in a new tab), SendGrid (opens in a new tab), or AWS SES (opens in a new tab).

Variable NameDescriptionExample
MAIL_MAILERMail driversmtp
MAIL_HOSTMail server hostsmtp.mailtrap.io
MAIL_PORTMail server port2525
MAIL_USERNAMEMail server usernameyour-username
MAIL_PASSWORDMail server passwordyour-password
MAIL_FROM_ADDRESSMail from addressme@mywebsite.com
MAIL_FROM_NAMEMail from nameYour App Name

For more details on configuring mail settings in Laravel, refer to the Laravel Mail Documentation (opens in a new tab).

Stripe Configuration

For more information on obtaining Stripe API keys, visit the Stripe API Keys Documentation (opens in a new tab).

Variable NameDescriptionExample
STRIPE_PUBLIC_KEYStripe public keypk_test_51...
STRIPE_SECRET_KEYStripe secret keysk_test_51...
STRIPE_WEBHOOK_SECRETStripe webhook secretwhsec_...
Setting up the Stripe webhook

For Stripe to work correctly, you need to set up the webhook in your Stripe dashboard:

  1. Go to https://dashboard.stripe.com/webhooks (opens in a new tab)
  2. Click "Add endpoint"
  3. Set the webhook URL to: https://your-app.com/api/webhooks/stripe
  4. You should listen for the following events:
  • payment_intent.succeeded
  • payment_intent.payment_failed
  • charge.refund.updated
  • account.update

General Configuration

Variable NameDescriptionExample
APP_KEYApplication keybase64:...
APP_SAAS_MODE_ENABLEDEnable SaaS modetrue
APP_SAAS_STRIPE_APPLICATION_FEE_PERCENTStripe application fee percentage. Only relevant in SAAS mode1.5
APP_FRONTEND_URLFrontend URLhttps://your-app.com
APP_CDN_URLCDN URLhttps://cdn.your-app.com
APP_DISABLE_REGISTRATIONDisable registrationDisables people from registering new accounts. Suggested for non-SaaS deployments.
FILESYSTEM_PUBLIC_DISKFilesystem diskDefault: s3-public. public if you're using local disk storage
FILESYSTEM_PRIVATE_DISKFilesystem diskDefault: s3-private. local if you're using local disk storage
JWT_SECRETJWT secret keybase64:...
LOG_CHANNELLog channelstderr

Generate the APP_KEY using:

echo "base64:$(openssl rand -base64 32)"

AWS Configuration

These variables are required if you'd like to use AWS S3 for file storage. You can also use other s3-compatible services like DigitalOcean Spaces (opens in a new tab).

Production note

To avoid losing files during updates or server failures, we highly recommend using cloud file storage for production deployments.

Variable NameDescriptionExample
AWS_ACCESS_KEY_IDAWS access key IDyour-access-key-id
AWS_SECRET_ACCESS_KEYAWS secret access keyyour-secret-access-key
AWS_DEFAULT_REGIONAWS regionus-west-1
AWS_PUBLIC_BUCKETAWS public bucket nameyour-public-bucket
AWS_PRIVATE_BUCKETAWS private bucket nameyour-private-bucket

Database Configuration

You can either set individual database configuration variables or use the DATABASE_URL to simplify the configuration.

Variable NameDescriptionExample
DB_CONNECTIONDatabase connection typepgsql
DB_HOSTDatabase hostyour-database-host
DB_PORTDatabase port5432
DB_DATABASEDatabase nameyour-database-name
DB_USERNAMEDatabase usernameyour-database-username
DB_PASSWORDDatabase passwordyour-database-password
DATABASE_URLDatabase URL (alternative to individual values)postgres://user:password@host:port/database

Redis Configuration

Variable NameDescriptionExample
REDIS_HOSTRedis hostyour-redis-host
REDIS_PASSWORDRedis passwordyour-redis-password
REDIS_USERRedis usernameyour-redis-username
REDIS_PORTRedis port6379
REDIS_URLRedis URLredis://user:password@host:port

Queue Configuration

Variable NameDescriptionExample
QUEUE_CONNECTIONQueue connection typeDefault: sync. Set to redis for production deployments.

Production note

For convenience, QUEUE_CONNECTION is set to sync by default. It is highly recommended to use a queue system like Redis for production deployments.

Important Deployment Considerations

⚠️

Common Issues

  • Environment variable misconfiguration is the most common cause of deployment problems
  • Performance issues typically stem from underpowered hardware or incorrectly configured queues
  • In most cloud environments, the filesystem is ephemeral - uploaded files will be lost on redeploy unless you use cloud storage

Checklist Before Going Live

  • All environment variables are properly configured
  • Queue system is set up according to
  • File storage solution is configured (local vs cloud storage)
  • SSL certificates are installed and valid
  • Backups are configured
  • Monitoring is in place

If you're planning to host events that might experience sudden bursts of traffic (like popular ticket sales or flash sales), you'll want to take extra precautions with your deployment:

Tips for High Traffic Events

When expecting high traffic:

  • Ensure you have queues set up for background processing. Do not set QUEUE_CONNECTION to sync.
  • Use a more powerful database instance, as this is typically the bottleneck
  • Consider using a CDN for static assets
  • Monitor your infrastructure metrics during the event
  • Have a plan in place for scaling up if needed
  • Consider using a managed database service for better scalability
  • Use a load balancer to distribute traffic