---
title: "Deploy Logwell"
description: "Self-hosted logging platform with SSE, full text search, and OTLP ingestion"
category: "Observability"
url: https://railway.com/deploy/logwell
---

# Deploy Logwell

Self-hosted logging platform with SSE, full text search, and OTLP ingestion

**[Deploy Logwell on Railway](https://railway.com/template/logwell)**

- **Creator:** Div's Projects
- **Category:** Observability
- **Total deploys:** 5

## Template content

### divkix/logwell:latest

- **Image:** ghcr.io/divkix/logwell:latest
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:17

## Documentation

# Deploy and Host Logwell on Railway

Logwell is a lightweight, self-hosted log aggregation platform built with SvelteKit and PostgreSQL. It provides real-time streaming, full-text search, and OTLP-compatible ingestion without the complexity of ELK or the costs of SaaS solutions. Engineered for simplicity and performance, Logwell allows you to own your data completely while providing a clean UI for viewing and searching logs.

## About Hosting Logwell

Hosting Logwell requires a PostgreSQL database and a Bun runtime environment. The platform leverages PostgreSQL's built-in `tsvector` capabilities for high-performance full-text search, eliminating the need for Elasticsearch or separate search clusters. Railway's deployment is fully automated—the template provisions a PostgreSQL instance, configures all required environment variables, and establishes health monitoring. The application runs database migrations on startup and handles session encryption automatically.

## Common Use Cases

- **Centralized Logging**: Aggregate logs for side projects, startups, and small teams without worrying about per-GB pricing or retention limits
- **Real-time Monitoring**: Debug applications during development with live SSE (Server-Sent Events) log streaming
- **Data Sovereignty**: A self-hosted alternative to Datadog, Logtail, or Papertrail that ensures complete ownership and privacy of your log data
- **OTLP Integration**: seamless compatibility with OpenTelemetry SDKs, serving as a backend for apps already using OTLP exporters

## Dependencies for Logwell Hosting

- **PostgreSQL 12+**: Primary database used for storing logs, user sessions, and executing full-text search queries via `tsvector`
- **Bun 1.0+**: The JavaScript runtime used to power the SvelteKit backend (included in the Docker image)

### Deployment Dependencies

- [Logwell GitHub Repository](https://github.com/divkix/logwell) - Source code and issue tracking
- [Logwell Documentation](https://github.com/divkix/logwell#readme) - Setup guides and API reference
- [OpenTelemetry Log Exporters](https://opentelemetry.io/docs/specs/otel/logs/) - Standard for OTLP ingestion

### Required Environment Variables

| Variable | Description |
|----------|-------------|
| `BETTER_AUTH_SECRET` | Secret key for session encryption (auto-generated by Railway) |
| `DATABASE_URL` | PostgreSQL connection string (auto-set by Railway) |

### Optional Configuration

| Variable | Default | Description |
|----------|---------|-------------|
| `ADMIN_PASSWORD` | `null` | If set, seeds an initial admin account (`admin@example.com`) on startup |

## Why Deploy Logwell on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Logwell on Railway, you get:

- **One-click provisioning** of the required PostgreSQL database with zero configuration
- **Automatic migrations** that run immediately upon deployment to set up your schema
- **Secure session management** with auto-generated encryption secrets
- **Full-stack hosting** that keeps your log aggregator close to your other services
- **Vertical scaling** to handle increased log volume without migration headaches

Railway handles the infrastructure complexity so you can focus on debugging and monitoring your applications.

## Similar templates

- [Pyroscope profiling](https://railway.com/deploy/pyroscope-profiling) — Protected continuous profiling with durable Pyroscope storage.
- [SigOnly](https://railway.com/deploy/sigonly) — Deploy SigNoz with a working demo app & config in one click
- [Unwrapped Spotify Music Stats](https://railway.com/deploy/wide-bold) — Unwrapped Spotify Music Stats, Estatísticas de músicas disponíveis

Open this page in a browser: https://railway.com/deploy/logwell
