Deploy Watch Dog

Self-hosted error tracking, performance monitoring and session replay.

Deploy Watch Dog

Just deployed

/var/lib/postgresql/data

Deploy and Host Watchdog on Railway

Watchdog is a self-hosted error tracking and monitoring tool. It catches errors from your web, Node, React and mobile apps (React Native and Expo), tracks performance and custom metrics, and records session replays so you can see what users did before something broke. Alerts go to Slack, Discord, Telegram or email.

About Hosting Watchdog

Watchdog deploys as two services: the Watchdog app and a PostgreSQL database. The app is built from a Dockerfile and serves both the dashboard and the API on one public domain, so there is nothing separate to wire up. Database migrations run automatically on every start. A secret key and a setup token are generated for you at deploy time. Open the generated domain, enter the setup token, create the owner account, and add two-step verification. Then create a project and copy its DSN into your app's SDK.

Common Use Cases

  • Catch and group errors from your frontend, backend and mobile apps in one place you control.
  • Watch session replays and performance traces to find slow requests and the steps that led up to a bug.
  • Get alerted in Slack, Discord, Telegram or email when a new issue appears, a fixed one returns, or errors spike.

Dependencies for Watchdog Hosting

  • PostgreSQL database (added automatically by this template)
  • Optional: an SMTP mail server, for team invite emails and email sign-in codes

Implementation Details

The template sets these variables for you:

DATABASE_URL=${{Postgres.DATABASE_URL}}
WATCHDOG_SECRET_KEY=${{secret(64, "abcdef0123456789")}}
TRUST_PROXY=1
SETUP_TOKEN=${{secret(32)}}
PORT=3000

Back up WATCHDOG_SECRET_KEY, because stored alert credentials can't be decrypted without it. After your first sign-in, send events from your app:

import { init } from '@watchdog-sdk/browser';

init({ dsn: 'https://@your-watchdog.up.railway.app/', release: '1.0.0' });

Packages are also available for Node (@watchdog-sdk/node), React (@watchdog-sdk/react) and React Native and Expo (@watchdog-sdk/react-native).

Why Deploy Watchdog 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 Watchdog 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
VPS Fleet Watch Hub with Beszel
A persistent Beszel hub for external VPS agents and fleet alerts.

dankeewithtwoes
0
View Template
Pyroscope profiling
Protected continuous profiling with durable Pyroscope storage.

Anton Orel
1