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, SendGrid, or AWS SES.
| 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.
Stripe Configuration
For more information on obtaining Stripe API keys, visit the Stripe API Keys Documentation.
| 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
- Click “Add endpoint”
- Set the webhook URL to:
https://your-app.com/api/public/webhooks/stripe - You should listen for the following events:
payment_intent.succeededpayment_intent.payment_failedcharge.refund.updated(Deprecated, but you should still include it for compatibility)refund.updatedaccount.update
General Configuration
| Variable Name | Description | Example |
|---|---|---|
APP_KEY | Application key | base64:... |
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 |
CORS_ALLOWED_ORIGINS | A comma-separated list of allowed origins for CORS requests. Enter ’*’ to allow all origins. | https://your-app.com, https://another-origin.com |
Generate the APP_KEY using:
echo "base64:$(openssl rand -base64 32)"SaaS Configuration
Note
These variables are only relevant if you are using the SaaS version of Hi.Events.
| Variable Name | Description | Example |
|---|---|---|
APP_SAAS_MODE_ENABLED | Enable SaaS mode (Defaults to false | true |
APP_SAAS_STRIPE_APPLICATION_FEE_PERCENT | Stripe application fee percentage. Only relevant in SAAS mode | 1.5 for 1.5% |
APP_SAAS_STRIPE_APPLICATION_FEE_FIXED | Stripe application fee fixed. Only relevant in SAAS mode | .40 for 40c |
OPEN_EXCHANGE_RATES_APP_ID | Open Exchange Rates App ID for currency conversion | your-app-id |
The SAAS fees are used to populate the account_configuration table. To adjust the fees after deployment you need
to update the account_configuration table directly.
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.
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.
Running the Scheduler
Hi.Events uses Laravel’s task scheduler for background tasks like scheduled messages and waitlist processing. If the scheduler isn’t running, these features won’t work.
The all-in-one Docker image (daveearley/hi.events-all-in-one) runs the scheduler automatically — no extra setup needed.
For separate image deployments or manual setups, you need to add a single cron entry on the server running your backend. This cron job calls Laravel’s schedule:run command every minute, and Laravel decides internally which scheduled tasks are due:
* * * * * cd /path-to-your-backend && php artisan schedule:run >> /dev/null 2>&1Replace /path-to-your-backend with the actual path to your Hi.Events backend directory. If you’re running the backend in a Docker container, you can add this to the container’s crontab or run it via docker exec:
* * * * * docker exec your-backend-container php artisan schedule:run >> /dev/null 2>&1You can verify the scheduler is working by running php artisan schedule:list — this shows all registered scheduled tasks and when they’re next due.
For more details on Laravel’s scheduler (daemon mode, running without cron, etc.), see the Laravel Scheduling documentation.
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