← Back to Guides
Header image for blog post: How to deploy Langtrace with Northflank
Daniel Adeboye
Published 15th October 2025

How to deploy Langtrace with Northflank

If you need a reliable and open-source solution to monitor, trace, and analyze your LLM applications, Langtrace is one of the best options available. It helps you observe every part of your AI workflows, from model calls to chain execution, making it easier to debug, optimize, and scale production systems.

With Northflank, you can deploy Langtrace in minutes using a one-click template or set it up manually. Northflank takes care of scaling, networking, and infrastructure so you can focus on monitoring and improving your AI applications.

Prerequisite

Before you begin, create a Northflank account.

What this tutorial covers

  • Deploying Langtrace with a one-click template on Northflank
  • Deploying Langtrace manually on Northflank

What is Northflank?

Northflank is a developer platform that makes it easy to build, deploy, and scale applications, databases, jobs, and GPU workloads. It abstracts away Kubernetes complexity with smart defaults, giving you production-ready deployments while still allowing advanced customization.

Option 1: Deploy Langtrace with a one-click template

You can launch Langtrace on Northflank in a few minutes using the official stack template. This is the fastest way to get Langtrace up and running without manual configuration.

image - 2025-10-15T104240.167.png

Template overview

The Langtrace deployment on Northflank includes:

  • 1 PostgreSQL addon for storing metadata and operational data
  • 1 ClickHouse service for analytics and trace storage
  • 2 secret groups for credentials and environment variables
  • 1 persistent volume for ClickHouse storage
  • 1 Langtrace service deployed from the official Docker image scale3labs/langtrace-client:latest

Getting started

  1. Visit the Langtrace template on Northflank.
  2. Click Deploy.
  3. Northflank will automatically:
    • Create a project, database, ClickHouse service, secret groups, and the Langtrace deployment
    • Link the database credentials to your secret groups
    • Expose a public URL for your Langtrace instance
  4. Once the deployment is complete, open the public URL to access the Langtrace UI.

Option 2: Deploy Langtrace manually on Northflank

If you want more flexibility or need to customize your setup, you can deploy Langtrace manually. This approach provides you with complete control over configuration and integration.

Note: You can also customise Northflank's one-click deploy templates.

Step 1: Create a Northflank project

Log in to your Northflank dashboard and click the Create new button in the top right corner. Select Project from the dropdown.

image - 2025-10-15T104246.517.png

Projects act as workspaces that group related services, making it easier to manage multiple resources.

Step 2: Configure your project

You’ll need to fill out a few details before moving forward.

  • Enter a project name, such as langtrace-project and optionally pick a color for quick identification in your dashboard.

  • Select Northflank Cloud as the deployment target. This uses Northflank’s fully managed infrastructure, so you do not need to worry about Kubernetes setup or scaling.

    (Optional) If you prefer to run on your own infrastructure, you can select Bring Your Own Cloud and connect AWS, GCP, Azure, or on-prem resources.

  • Choose a region closest to your users to minimize latency.

  • Click Create project to finalize the setup.

image - 2025-10-15T104249.317.png

Step 3: Create a PostgreSQL addon

Inside your project, go to the Addons tab and click “Create new addon.” Then, select PostgreSQL as the Addon type, give it a descriptive name such as langtrace-db. Select your preferred version, and choose a compute plan size.

  • If you’re testing or experimenting, the smallest option is cost-effective and sufficient.
  • For production, we recommend starting with nf-compute-50. This provides more resources and stability, ensuring Langflow runs reliably under real workloads.

Once you’ve configured the settings, click Create addon to provision your database.

image - 2025-10-15T104252.031.png

Step 4: Create a Secret group for ClickHouse

Next, navigate to the Secrets tab and click "Create Secret Group." Name it something easy to recognize, such aslangtrace-clickhouse-secrets. This group will hold all the environment variables required by ClickHouse. You can find the full list of supported variables in the Clickhouse docs.

image - 2025-10-15T104254.881.png

If you don't want to go through the stress of manually configuring or searching for environment variables to use, you can use the already configured ones below:

CLICKHOUSE_DB="langtrace_metrics"
CLICKHOUSE_USER="clickhouse"
CLICKHOUSE_PASSWORD=XXXXXXXXXXXXXXXX
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT="1"

Notes about these values:

  • CLICKHOUSE_DB specifies the name of the database Langtrace will use for metrics and trace data.
  • CLICKHOUSE_USER defines the username used to connect to ClickHouse.
  • CLICKHOUSE_PASSWORD should be replaced with a strong, unique password for production environments.
  • CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT enables user access control within ClickHouse, improving security and access management.

Step 5: Create the ClickHouse deployment service

Within your project, navigate to the Services tab in the top menu and click ’Create New Service’. Select Deployment and give your service a name such as lantrace-clickhouse-server.

For the deployment source, choose External image and enter the official ClickHouse Docker image: clickhouse/clickhouse-server:latest.

image - 2025-10-15T104257.574.png

Select compute resources

Choose the compute size that best matches your workload:

  • Small plans are fine for testing or lightweight usage.
  • Larger plans are recommended for production, as Langflow can be resource-intensive under real-world traffic.

The flexibility to adjust resources later means you can start small and scale up as needed.

image - 2025-10-15T104300.188.png

Set up a port so your app is accessible:

  • Port: 8123
  • Protocol: HTTP
  • Public access: enable this to let people access your app from the internet

Northflank will automatically generate a secure, unique public URL for your service. This saves you from having to manage DNS or SSL certificates manually.

image - 2025-10-15T104302.968.png

Click Create service to deploy ClickHouse. Once successful, you’ll see the public URL in the top right corner. e.g.: p01--clickhouse--lppg6t2b6kzf.code.run

Step 6: Create a persistent volume

Inside your project, go to the Volumes tab and click Create new volume.

  • Name it langtrace-clickhouse-volume
  • Choose a storage type (NVMe is recommended)
  • Choose a storage size (start small for testing, scale up for production)
  • Set the volume mount path to /var/lib/clickhouse
  • Attach the volume to your Langtrace-clickhouse-server service to enable persistent storage.

image - 2025-10-15T104305.595.png

Click Create volume to finalize.

After successfully creating your volume, you need to restart your service. Once completed, you can access your deployed ClickHouse service.

Step 7: Create a Secret group for Langtrace

Go back to the Secrets tab and click Create Secret Group. Name it langtrace-secrets. This group will hold the environment variables required by Langtrace. Refer to the Langtrace documentation for the full list.

image - 2025-10-15T104308.176.png

If you prefer, you can use the example variables below:

ADMIN_EMAIL=XXXXXXXXXXXXXXXXX
ADMIN_PASSWORD=XXXXXXXXXXXXXXXXX
NEXT_PUBLIC_ENABLE_ADMIN_LOGIN=true
NEXT_PUBLIC_APP_NAME="Langtrace"
NEXT_PUBLIC_HOST="https://${refs.langtrace-app.ports.0.dns}"
NEXT_PUBLIC_ENVIRONMENT="production"
NEXTAUTH_URL="https://${refs.langtrace-app.ports.0.dns}"
NEXTAUTH_URL_INTERNAL="https://${refs.langtrace-app.ports.0.dns}"
NEXTAUTH_SECRET="difficultsecret"
CLICK_HOUSE_PASSWORD="${CLICKHOUSE_PASSWORD}"
CLICK_HOUSE_DATABASE_NAME="${CLICKHOUSE_DB}"
CLICK_HOUSE_USER="${CLICKHOUSE_USER}"
CLICK_HOUSE_HOST="https://${refs.langtrace-clickhouse-server.ports.0.dns}"
POSTGRES_HOST="${DB_HOST}:${DB_PORT}"
POSTGRES_PRISMA_URL="${POSTGRES_URL}?pgbouncer=true&connect_timeout=15"

Notes about these values:

  • ADMIN_EMAIL and ADMIN_PASSWORD are used to create the default admin account for logging into your Langtracedashboard.
  • NEXT_PUBLIC_ENABLE_ADMIN_LOGIN enables admin authentication. Keep this set to true to access the admin panel.
  • NEXT_PUBLIC_APP_NAME sets the display name of your Langtrace instance, which appears in the UI.
  • NEXT_PUBLIC_HOST defines the public URL of your application. This uses ${refs.langtrace-app.ports.0.dns} so Northflankcan automatically inject the correct domain name for your service.
  • NEXT_PUBLIC_ENVIRONMENT sets the environment type, such as production or staging.
  • NEXTAUTH_URL and NEXTAUTH_URL_INTERNAL are required for authentication and session management. These point to the same public domain and should match your host.
  • NEXTAUTH_SECRET is a randomly generated string used to securely sign and encrypt session tokens. You should replace the example with a strong secret.
  • CLICK_HOUSE_PASSWORDCLICK_HOUSE_DATABASE_NAMECLICK_HOUSE_USER, and CLICK_HOUSE_HOSTconfigure your ClickHouse database connection. These values are automatically injected from your ClickHouse secret group and service reference.
  • POSTGRES_HOST specifies the connection string (host and port) for your PostgreSQL database.
  • POSTGRES_PRISMA_URL configures the database URL used by Prisma. It includes pgbouncer and timeout settings for improved performance and stability.
  • References like ${refs.langtrace-app.ports.0.dns} and ${refs.langtrace-clickhouse-server.ports.0.dns} are dynamic placeholders. When you deploy, Northflank automatically replaces them with the correct DNS values for each service, so you don’t need to hardcode domain names or ports.

Link the PostgreSQL addon to your secret group

Northflank addons expose connection details like username and password. Instead of copying values manually, you can link the addon directly to your secret group. This way, if credentials rotate, your service receives the updated values automatically.

  • Map USERNAME to POSTGRES_USER
  • Map PASSWORD to POSTGRES_PASSWORD
  • Map DATABASE to POSTGRES_DATABASE and DATABASE
  • Map POSTGRES_URI to POSTGRES_URL_NO_SSLPOSTGRES_URL, and POSTGRES_URL_NON_POOLING
  • Map HOST to DB_HOST
  • Map PORT to DB_PORT

image - 2025-10-15T104312.208.png

Click Create secret group to save everything.

Step 8: Create the Langtrace deployment service

Open the Services tab and click Create New Service. Select Deployment and name your service langtrace-app.

For the deployment source, choose External image and enter the official Langtrace image: scale3labs/langtrace-client:latest.

image - 2025-10-15T104314.901.png

Select compute resources

Choose the compute size that best matches your workload:

  • Small plans are fine for testing or lightweight usage.
  • Larger plans are recommended for production, as Langtrace can be resource-intensive under real-world traffic.

image - 2025-10-15T104300.188.png

Set up a port so your app is accessible:

  • Port: 3000
  • Protocol: HTTP
  • Public access: enable this to let people access your app from the internet

Northflank will generate a secure, unique public URL for your service.

image - 2025-10-15T104320.306.png

Deploy your service

Click Create service. Once deployed, the public URL will be visible at the top right corner, e.g.: p01--langtrace--lppg6t2b6kzf.code.run

Screenshot 2025-10-15 at 10.57.23.png

Conclusion

Deploying Langtrace on Northflank gives you a production-ready observability platform without managing Kubernetes, networking, or scaling infrastructure.

Whether you use the one-click template for speed or manual setup for full control, Northflank provides the platform while Langtrace powers your tracing and analytics. This combination is ideal for monitoring, debugging, and optimizing LLM-based applications at scale.

Share this article with your network
X