Deploy Graylog

Open-source log management: Graylog 7.2 with OpenSearch and MongoDB

Deploy Graylog

/usr/share/graylog/data

/data/db

Just deployed

/usr/share/opensearch/data

Deploy and Host Graylog on Railway

Graylog is an open-source log management platform. It collects logs from servers, applications and network devices, indexes them in OpenSearch, and lets you search, build dashboards, define streams and processing pipelines, and send alerts when events match your rules. This template runs Graylog Open 7.2.2.

About Hosting Graylog

A Graylog server needs two backing services: MongoDB for its configuration (users, inputs, streams, dashboards) and OpenSearch to store and search log messages. This template deploys all three, each built from a public GitHub repo that pins the official images, with a persistent volume on each and the services talking over Railway's private network. The admin password, password secret and MongoDB password are generated for each deploy, so there are no default credentials and the deploy page asks for nothing. Logs arrive through inputs that you launch in the web interface; Railway routes HTTP and TCP to them, but not UDP.

Common Use Cases

  • Centralize logs from apps, containers and servers in one searchable place
  • Alert on errors, failed logins or traffic spikes with event definitions and notifications
  • Keep audit and security logs with retention rules and dashboards for troubleshooting

Dependencies for Graylog Hosting

  • MongoDB 7.0 (configuration and metadata)
  • OpenSearch 2.19 (log storage and search)

Deployment Dependencies

Implementation Details

Sign in as admin with the GRAYLOG_ROOT_PASSWORD value from the Graylog service's Variables tab. Change that variable and redeploy to change the password, but never change GRAYLOG_PASSWORD_SECRET after the first deploy.

To receive logs, open System → Inputs and launch an input with bind address :::

  • GELF HTTP on port 12201: add a second domain on the Graylog service with target port 12201, then POST JSON to https://YOUR-INPUT-DOMAIN/gelf.
  • Syslog TCP, GELF TCP or Beats: add a Railway TCP proxy for the input's port.
  • Apps in the same project: send to graylog.railway.internal on the input's port over the private network.

Graylog and OpenSearch each start with a 1 GB heap (GRAYLOG_SERVER_JAVA_OPTS, OPENSEARCH_JAVA_OPTS). Any other Graylog setting can be added as a variable named GRAYLOG_ plus the setting name in upper case, for example the GRAYLOG_TRANSPORT_EMAIL_* settings for email alerts. OpenSearch is reachable only on the private network. Updates to the pinned versions arrive as Railway update notices from the repo; see its CHANGELOG first.

Why Deploy Graylog 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 Graylog on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Rootprint
Open-source logs and traces with full-text search on object-storage.

Rootprint
1
View Template
Pyroscope profiling
Protected continuous profiling with durable Pyroscope storage.

Anton Orel
1
View Template
SigOnly
Deploy SigNoz with a working demo app & config in one click

zoeyjones
21