App Store template
Loki icon

Loki

Loki is a horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus.

Launch in your Sealos workspace.

Loki template preview
Template previewFull screenshot
Template deployments
15 on Sealos
Deployment
Your own instance
Category
Monitoring

About this template

Overview

Loki is Grafana's open source log aggregation system designed to store and query logs with Prometheus-style labels. This template deploys a single-node Loki instance with persistent storage and a public HTTPS endpoint on Sealos Cloud.

From the documentation

Loki stores compressed log streams and indexes metadata labels instead of full log text, which keeps ingestion lightweight for application and infrastructure logs. The Sealos template runs Loki as a StatefulSet, persists /loki data on a 1 GiB volume, and exposes the HTTP API on port 3100.

How to deploy Loki

  1. Choose Deploy now to start Loki in your Sealos workspace.
  2. Sign in to Sealos and review the template configuration in your workspace.
  3. Launch the template, then inspect the application status and resource cards in Canvas.

Resources to plan for

Start with the resources defined by the Loki template. Review CPU, memory, persistent storage, and network allocations for every service in Canvas. Capacity needs depend on your data and workload; monitor usage as they grow.

Template configuration and setup

Access after deployment

Use the application URL or connection details shown in Canvas. Follow the deployment guide for first-time account setup or client configuration, and keep generated credentials available for that step.

Hosting and billing

Sealos monthly plans include compute, memory, storage, and traffic. Size your plan for all deployed services. Software licenses and external AI or API services may have separate terms and charges. Confirm the applicable plan and optional charges in Cost Center.

Compare Sealos resource plans
Read full documentationCollapse documentation

For current cloud charges, refer to Sealos plan pricing. Upstream documentation may reference earlier billing models.

Deploy and Host Loki on Sealos

Loki is Grafana's open source log aggregation system designed to store and query logs with Prometheus-style labels. This template deploys a single-node Loki instance with persistent storage and a public HTTPS endpoint on Sealos Cloud.

About Hosting Loki

Loki stores compressed log streams and indexes metadata labels instead of full log text, which keeps ingestion lightweight for application and infrastructure logs. The Sealos template runs Loki as a StatefulSet, persists /loki data on a 1 GiB volume, and exposes the HTTP API on port 3100.

This deployment is suitable for development, testing, small observability stacks, and lightweight log collection. It does not include Grafana or a log shipper, so you can connect Grafana, Promtail, Grafana Alloy, or compatible clients after deployment.

Common Use Cases

  • Application Log Collection: Store logs from apps, workers, and services using Loki's push API.
  • Grafana Log Exploration: Add the Loki endpoint as a Grafana data source and query logs with LogQL.
  • Lightweight DevOps Monitoring: Keep a small persistent log backend for development and staging environments.
  • Troubleshooting Pipelines: Send CI, job, or batch logs into a searchable backend.

Dependencies for Loki Hosting

The Sealos template includes all runtime dependencies required to start Loki: the official Loki container image, a Kubernetes StatefulSet, a ClusterIP Service, an Ingress, and persistent storage.

Deployment Dependencies
Implementation Details

Architecture Components:

This template deploys the following resources:

  • Loki StatefulSet: Runs docker.io/grafana/loki:3.7.2 with the built-in local filesystem configuration.
  • Persistent Volume: Mounts /loki for chunks, indexes, and rule data.
  • Service: Exposes Loki internally on port 3100.
  • Ingress and App Entry: Provides an HTTPS endpoint for the Loki HTTP API.

Configuration:

Loki starts with its default single-binary local configuration. Authentication is disabled by the upstream local config, so protect the endpoint according to your workspace and network policy before sending sensitive logs. The template does not create users, passwords, or an initialization flow.

License Information:

Loki is licensed under the GNU Affero General Public License v3.0. This Sealos template is provided under the license terms of the templates repository.

Why Deploy Loki on Sealos?

Sealos is an AI-assisted Cloud Operating System built on Kubernetes that unifies application deployment, networking, storage, and operations. By deploying Loki on Sealos, you get:

  • One-Click Deployment: Deploy Loki from the App Store without writing Kubernetes YAML.
  • Persistent Storage Included: Keep log data across restarts with a managed persistent volume.
  • Instant Public Access: Use the generated HTTPS endpoint for API clients and Grafana data source configuration.
  • Resource Controls: Adjust CPU, memory, and storage from the Sealos Canvas when your log volume grows.
  • Kubernetes-Based Operations: Run Loki on a managed Kubernetes foundation without managing cluster primitives directly.

Deployment Guide

  1. Open the Loki template and click Deploy Now.
  2. Keep the default parameters or adjust the generated app name and host in the popup dialog.
  3. Wait for deployment to complete, typically 2-3 minutes. After deployment, you will be redirected to the Canvas. For later changes, describe your requirements in the AI dialog or click the StatefulSet, Service, Ingress, or storage resource cards to modify settings.
  4. Access Loki through the generated URL:
    • Readiness Check: https://[your-loki-url]/ready
    • Build Info: https://[your-loki-url]/loki/api/v1/status/buildinfo
    • Push API: https://[your-loki-url]/loki/api/v1/push
    • Query API: https://[your-loki-url]/loki/api/v1/query_range

API Access

Loki does not provide a standalone web UI in this template. Use its HTTP API or connect the generated URL to Grafana as a Loki data source.

Example API checks:

curl https://[your-loki-url]/ready
curl https://[your-loki-url]/loki/api/v1/status/buildinfo

Example log ingestion:

NOW=$(date +%s)000000000
curl -X POST "https://[your-loki-url]/loki/api/v1/push" \
  -H 'Content-Type: application/json' \
  --data "{\"streams\":[{\"stream\":{\"job\":\"demo\"},\"values\":[[\"$NOW\",\"hello from Sealos Loki\"]]}]}"

Configuration

After deployment, you can configure Loki through:

  • AI Dialog: Describe resource or runtime changes and let Sealos apply updates.
  • Resource Cards: Click the StatefulSet, Service, Ingress, or storage cards in Canvas.
  • Client Configuration: Point Grafana, Promtail, Grafana Alloy, or compatible clients to the generated HTTPS endpoint.

Scaling

This template is a single-node Loki deployment intended for lightweight workloads. To scale resources:

  1. Open the Canvas for your deployment.
  2. Click the Loki StatefulSet resource card.
  3. Adjust CPU, memory, or storage according to ingestion volume.
  4. Apply the changes and wait for the pod to become ready.

For high-volume or highly available production logging, use Loki's distributed deployment mode and object storage architecture instead of this single-node template.

Troubleshooting

Loki endpoint returns no log results
  • Cause: Loki has no ingested streams matching your LogQL query, or the query time range is too narrow.
  • Solution: Push a test log through /loki/api/v1/push, then query with /loki/api/v1/query_range and a label selector such as {job="demo"}.
Grafana cannot connect
  • Cause: The data source URL may be wrong or the Loki pod may still be starting.
  • Solution: Confirm https://[your-loki-url]/ready returns ready, then use the generated HTTPS URL as the Grafana Loki data source URL.
Pod restarts during heavy ingestion
  • Cause: The default template resources target a lightweight deployment.
  • Solution: Increase CPU and memory from the StatefulSet resource card, then retry ingestion.

Additional Resources

License

This Sealos template is provided under the license terms of the templates repository. Loki is licensed under the GNU Affero General Public License v3.0.

From launch to everyday operations

Why deploy
on Sealos

A shorter path from an app you want to an app you can run. Sealos brings deployment and ongoing operations into one place.

  1. One-click deployment

    Start with a ready-made template. Review its configuration and launch from the Sealos console.

  2. Managed Kubernetes

    Run on managed infrastructure with built-in workload scheduling and recovery.

  3. Automatic HTTPS

    Give your application a public HTTPS endpoint with certificates managed for you.

  4. Persistent storage

    Keep application data on persistent volumes across container restarts.

  5. Room to grow

    Adjust CPU, memory, and replicas from the console as your workload changes.

One template. Connected resources.

You Get the Whole Stack

Sealos provisions the resources defined by your template and brings them together in your workspace.

  • App Service

    Container workloads with configurable CPU, memory, and replicas.

  • Public HTTPS URL

    An address for your app, with managed TLS certificates.

  • Database

    A database provisioned alongside your app when the template calls for one.

  • Persistent Volume

    Storage for the files and data your application needs to keep.

  • Environment Variables

    Application settings and secrets configured in one place.

  • Logs & Metrics

    Inspect container logs and resource usage from the console.

Resources and their configuration vary by template. Review the deployment form for this app’s exact setup.

Explore more production-ready templates.

More