---
title: "Deploy Leaderboard"
description: "Real-time leaderboard with Next.js, Node.js, Socket.io, and Redis."
category: "Starters"
url: https://railway.com/deploy/leaderboard
---

# Deploy Leaderboard

Real-time leaderboard with Next.js, Node.js, Socket.io, and Redis.

**[Deploy Leaderboard on Railway](https://railway.com/template/leaderboard)**

- **Creator:** Danny Summers's Projects
- **Category:** Starters
- **Total deploys:** 3

## Template content

### leaderboard

- **Source:** dannysummers/leaderboard
- **Public domain:** Yes

### Frontend

- **Source:** dannysummers/leaderboard
- **Public domain:** Yes

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2.1
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

## Documentation

# Deploy and Host Leaderboard on Railway

A full-stack real-time leaderboard app with live score updates via WebSockets.

## Features

- **Real-time updates** via Socket.io — scores update live for all connected users
- **Next.js frontend** with a clean, responsive UI
- **Node.js + Express backend** with a REST API
- **Redis** for fast sorted-set leaderboard storage
- **Demo mode** — auto-generates fake scores so your leaderboard is always active
- **Admin dashboard** to manage players, toggle demo mode, and view activity
- **Multi-timeframe** leaderboards: all-time, daily, weekly

## About Hosting Leaderboard

This template deploys three services on Railway: a Node.js/Express/Socket.io API backend, a Next.js frontend, and a Redis database. The backend handles score submissions and real-time broadcasting via WebSockets. Redis stores sorted sets for fast rank lookups. The frontend connects to both the REST API and the Socket.io server to display live-updating scores. All services are pre-wired with reference variables so they connect automatically on first deploy.

## Common Use Cases

- Gaming leaderboards for web or mobile games
- Hackathon or competition scoreboards
- Employee recognition or gamification dashboards
- Live event scoring (trivia, esports, contests)

## Dependencies for Leaderboard Hosting

- Node.js 18+
- Redis 7+
- Next.js 14+

### Deployment Dependencies

- [dannysummers/leaderboard](https://github.com/dannysummers/leaderboard) — source repository

### Implementation Details

The backend uses Express with Socket.io for real-time score broadcasting. Redis sorted sets power O(log N) rank lookups. The frontend is a Next.js app that polls the REST API and subscribes to Socket.io events for live updates. CORS and Socket.io origins are automatically wired via Railway reference variables.

## Why Deploy Leaderboard 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 Leaderboard 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.

## Similar templates

- [open-excalidraw](https://railway.com/deploy/open-excalidraw) — Self-hostable collaborative drawing built on Excalidraw
- [caring-vibrancy](https://railway.com/deploy/caring-vibrancy) — Deploy and Host caring-vibrancy with Railway
- [Appsmith](https://railway.com/deploy/appsmith-1) — Low-code platform for internal tools, dashboards, and admin panels.

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