Table of Contents

heroku.gif

What is Heroku?

Heroku is a cloud Platform-as-a-Service (PaaS) that enables developers to build, run, and scale applications entirely in the cloud. Founded in 2007 and now part of Salesforce, Heroku abstracts away infrastructure complexities, allowing you to focus on your application rather than server management.

Why Heroku for OpenObserve?

  1. Zero DevOps Overhead: No need to manage servers, operating systems, or infrastructure
  2. Instant Deployment: Deploy in minutes with Git push
  3. Automatic Scaling: Scale up or down based on your needs
  4. Built-in Monitoring: Monitor your application health out of the box
  5. Free Tier Available: Perfect for testing and small workloads
  6. Add-ons Ecosystem: Easy integration with databases and other services

Prerequisites

Before starting, ensure you have:

  • A Heroku account (sign up at heroku.com)
  • Git installed on your local machine
  • Heroku CLI installed (download here)

Step-by-Step Deployment Guide

Step 1: Create Your Heroku Application

First, create a new Heroku application:

heroku create openobserve

This command creates a new app named "openobserve" and sets up a Git remote automatically.

Step 2: Clone Your Heroku Repository

Clone the empty Heroku repository to your local machine:

git clone https://git.heroku.com/openobserve.git
cd openobserve

Step 3: Configure the Stack

Set the Heroku stack to the latest version:

heroku stack:set heroku-24 -a openobserve

This ensures you're using the most recent runtime environment.

Step 4: Download OpenObserve Binary

Download the OpenObserve Linux AMD64 binary:

curl -L https://github.com/openobserve/openobserve/releases/download/v0.14.7/openobserve-v0.14.7-linux-amd64.tar.gz -o openobserve.tar.gz
tar -xvf openobserve.tar.gz
rm openobserve.tar.gz
chmod +x openobserve

Step 5: Create Required Files

Create a Procfile

The Procfile tells Heroku how to run your application:

web: ZO_ROOT_USER_EMAIL="$ZO_ROOT_USER_EMAIL" ZO_ROOT_USER_PASSWORD="$ZO_ROOT_USER_PASSWORD" ZO_HTTP_PORT=$PORT ./openobserve

Save this as Procfile (no file extension).

Create package.json

Create a minimal package.json to help Heroku detect the buildpack:

{
  "name": "openobserve-heroku",
  "version": "1.0.0",
  "description": "OpenObserve deployment on Heroku",
  "engines": {
    "node": "20.x"
  }
}

Step 6: Configure Environment Variables

Set the required environment variables:

heroku config:set ZO_ROOT_USER_EMAIL="admin@example.com" -a openobserve
heroku config:set ZO_ROOT_USER_PASSWORD="SecurePassword123!" -a openobserve
heroku config:set ZO_DATA_DIR="/app/data" -a openobserve

Step 7: Deploy to Heroku

Add all files to Git and deploy:

git add .
git commit -m "Deploy OpenObserve on Heroku"
git push

Step 8: Verify Deployment

Check the logs to ensure everything is running correctly:

heroku logs --tail

You should see OpenObserve starting up and listening on the assigned port.

Step 9: Access Your OpenObserve Instance

Visit your Heroku URL:

https://openobserve.herokuapp.com (you will get this as soon as deployment is successful)

Screenshot 2025-05-14 at 9.56.31 AM.png Log in with the email and password you configured earlier.

Scaling Your Application

Scale for better performance:

heroku ps:scale web=1:standard-2x -a openobserve

Troubleshooting Common Issues

Binary Format Error

If you see "cannot execute binary file", ensure you're using the Linux AMD64 binary:

file openobserve  # Should show: ELF 64-bit LSB executable, x86-64

Memory Issues

For larger workloads, upgrade your dyno:

heroku ps:resize web=performance-m -a openobserve

Port Binding Issues

OpenObserve automatically uses Heroku's PORT environment variable through our Procfile configuration.

Best Practices for Production

  1. Use External Storage: Configure S3 or compatible object storage
  2. Enable SSL: Heroku provides automatic SSL for your application
  3. Set Up Monitoring: Send logs and metrics to OpenObserve
  4. Configure Backup: Set up regular backups of your data
  5. Use Performance Dynos: For production workloads, use performance dynos

Detailed instructions to monitor Heroku logs can be found in: How to Monitor Heroku Logs: A Step-by-Step Guide for Developers.

Conclusion

Deploying OpenObserve on Heroku combines the power of a modern observability platform with the simplicity of cloud deployment. By following this guide, you can have a production-ready OpenObserve instance running in minutes, without the complexity of traditional infrastructure management.

Heroku's platform abstracts away the complexities of deployment, scaling, and maintenance, allowing you to focus on using OpenObserve for your observability needs. Whether you're monitoring applications, analyzing logs, or tracking metrics, this deployment method provides a reliable, scalable solution.

Next Steps

  • Explore OpenObserve's features for log analysis and metrics
  • Set up data ingestion from your applications
  • Configure alerts and dashboards
  • Integrate with your existing monitoring stack

Get Started with OpenObserve Today!

Sign up for a 14 day trial Check out our GitHub repository for self-hosting and contribution opportunities

About the Author

Chaitanya Sistla

Chaitanya Sistla

LinkedIn

Chaitanya Sistla is a Principal Solutions Architect with 16X certifications across Cloud, Data, DevOps, and Cybersecurity. Leveraging extensive startup experience and a focus on MLOps, Chaitanya excels at designing scalable, innovative solutions that drive operational excellence and business transformation.

Latest From Our Blogs

View all posts