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:
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 Name | Description | Example |
---|---|---|
VITE_FRONTEND_URL | Frontend URL | https://your-app.com |
VITE_API_URL_CLIENT | API URL for use in the browser | https://your-app.com/api |
VITE_API_URL_SERVER | API URL for use on server | This 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_KEY | Stripe public key | pk_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 Name | Description | Example |
---|---|---|
MAIL_MAILER | Mail driver | smtp |
MAIL_HOST | Mail server host | smtp.mailtrap.io |
MAIL_PORT | Mail server port | 2525 |
MAIL_USERNAME | Mail server username | your-username |
MAIL_PASSWORD | Mail server password | your-password |
MAIL_FROM_ADDRESS | Mail from address | me@mywebsite.com |
MAIL_FROM_NAME | Mail from name | Your 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 Name | Description | Example |
---|---|---|
STRIPE_PUBLIC_KEY | Stripe public key | pk_test_51... |
STRIPE_SECRET_KEY | Stripe secret key | sk_test_51... |
STRIPE_WEBHOOK_SECRET | Stripe webhook secret | whsec_... |
Setting up the Stripe webhook
For Stripe to work correctly, you need to set up the webhook in your Stripe dashboard:
- Go to https://dashboard.stripe.com/webhooks (opens in a new tab)
- Click "Add endpoint"
- Set the webhook URL to:
https://your-app.com/api/webhooks/stripe
- You should listen for the following events:
payment_intent.succeeded
payment_intent.payment_failed
charge.refund.updated
account.update
General Configuration
Variable Name | Description | Example |
---|---|---|
APP_KEY | Application key | base64:... |
APP_SAAS_MODE_ENABLED | Enable SaaS mode | true |
APP_SAAS_STRIPE_APPLICATION_FEE_PERCENT | Stripe application fee percentage. Only relevant in SAAS mode | 1.5 |
APP_FRONTEND_URL | Frontend URL | https://your-app.com |
APP_CDN_URL | CDN URL | https://cdn.your-app.com |
APP_DISABLE_REGISTRATION | Disable registration | Disables people from registering new accounts. Suggested for non-SaaS deployments. |
FILESYSTEM_PUBLIC_DISK | Filesystem disk | Default: s3-public . public if you're using local disk storage |
FILESYSTEM_PRIVATE_DISK | Filesystem disk | Default: s3-private . local if you're using local disk storage |
JWT_SECRET | JWT secret key | base64:... |
LOG_CHANNEL | Log channel | stderr |
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 Name | Description | Example |
---|---|---|
AWS_ACCESS_KEY_ID | AWS access key ID | your-access-key-id |
AWS_SECRET_ACCESS_KEY | AWS secret access key | your-secret-access-key |
AWS_DEFAULT_REGION | AWS region | us-west-1 |
AWS_PUBLIC_BUCKET | AWS public bucket name | your-public-bucket |
AWS_PRIVATE_BUCKET | AWS private bucket name | your-private-bucket |
Database Configuration
You can either set individual database configuration variables or use the DATABASE_URL
to simplify the configuration.
Variable Name | Description | Example |
---|---|---|
DB_CONNECTION | Database connection type | pgsql |
DB_HOST | Database host | your-database-host |
DB_PORT | Database port | 5432 |
DB_DATABASE | Database name | your-database-name |
DB_USERNAME | Database username | your-database-username |
DB_PASSWORD | Database password | your-database-password |
DATABASE_URL | Database URL (alternative to individual values) | postgres://user:password@host:port/database |
Redis Configuration
Variable Name | Description | Example |
---|---|---|
REDIS_HOST | Redis host | your-redis-host |
REDIS_PASSWORD | Redis password | your-redis-password |
REDIS_USER | Redis username | your-redis-username |
REDIS_PORT | Redis port | 6379 |
REDIS_URL | Redis URL | redis://user:password@host:port |
Queue Configuration
Variable Name | Description | Example |
---|---|---|
QUEUE_CONNECTION | Queue connection type | Default: 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