# Ephemerelay

> A tiny open-source, self-hosted Nostr relay in about 100 lines of Deno TypeScript that never stores events, supporting NIP-01, NIP-15 and NIP-20.

- **Category:** [Communication](https://selfhost.directory/communication)
- **Licence:** unlicense
- **Source model:** Open source
- **Author:** Soapbox
- **Platforms:** Deno, Systemd
- **Ports:** 5000 (WebSocket/HTTP port the relay server listens on)
- **Requires:** Deno
- **Tags:** Chat, WebSocket, Ephemeral, Deno, Typescript, Nostr, Relay, Pub Sub

## What is Ephemerelay?

Ephemerelay is a Nostr relay written in roughly 100 lines of TypeScript for Deno that keeps nothing: any subscription immediately receives EOSE and then only live events that match the filter, and submitted events go only to clients connected at that moment. Because there is no database, operators do not worry about storage, spam or cost, which makes it suited to chatting with friends who are online or to feeding events onward to fully-persistent relays. It implements NIP-01, NIP-15 and NIP-20, parses EVENT, REQ and CLOSE messages, and checks event signatures. Running it means cloning the repository and starting the server with Deno; a production install adds a systemd unit and an nginx WebSocket proxy, and the project publishes no container image. Development appears dormant, with the last recorded activity in July 2023.

## Should you self-host Ephemerelay?

Ephemerelay scores **47/100** on selfhost.directory ([how scoring works](https://selfhost.directory/scoring)) and ranks **#30 of 34** in [Communication](https://selfhost.directory/communication).

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. It is unlicense-licensed.

Its closest alternative on selfhost.directory is [Jitsi Meet](https://selfhost.directory/project/jitsi-meet) (79/100, 30 279 stars). It scores higher overall, so compare the two before you pick. [See Ephemerelay vs Jitsi Meet side by side.](https://selfhost.directory/compare/ephemerelay-vs-jitsi-meet)

## Features

- Ephemeral events only
- Event signature verification
- Immediate EOSE for subscriptions
- Live client distribution
- Nostr Relay
- WebSocket transport

## How to install Ephemerelay

### Install Ephemerelay with Deno

Requirements: Deno

```sh
# Install Deno
curl -fsSL https://deno.land/install.sh | sh

# Clone repo
git clone https://gitlab.com/soapbox-pub/ephemerelay.git
cd ephemerelay

# Run server
deno task dev
```

Note: Local development workflow.

### Install Ephemerelay with Systemd

```sh
# Clone repo
git clone https://gitlab.com/soapbox-pub/ephemerelay.git /opt/ephemerelay

# Add systemd unit
cp /opt/ephemerelay/installation/ephemerelay.service /etc/systemd/system/

# Start Ephemerelay
systemctl enable --now ephemerelay

# Install nginx
sudo apt install -y nginx

# Copy nginx config
cp /opt/ephemerelay/installation/ephemerelay.conf /etc/nginx/sites-enabled/
```

Note: The systemd unit runs `deno run -A server.ts`; the shipped nginx config proxies to 127.0.0.1:5000 with WebSocket upgrade headers. Edit User/WorkingDirectory and server_name as needed.

## Ephemerelay alternatives

- [nostream](https://selfhost.directory/project/nostream): Own a relay for social network nobody can switch off (compare: https://selfhost.directory/compare/ephemerelay-vs-nostream)
- [nostr-watch](https://selfhost.directory/project/nostr-watch): nostr-watch is a self-hosted, open-source TypeScript monorepo for monitoring Nostr relays via NIP-66, with Docker Compose stacks for easy deployment. (compare: https://selfhost.directory/compare/ephemerelay-vs-nostr-watch)
- [nostr-rs-relay-compose](https://selfhost.directory/project/nostr-rs-relay-compose): A Docker Compose deployment that runs the Rust-based nostr-rs-relay with Traefik for TLS termination, letting you host your own Nostr relay on your infrastructure. (compare: https://selfhost.directory/compare/ephemerelay-vs-nostr-rs-relay-compose)
- [zen-relay](https://selfhost.directory/project/zen-relay): Zen Relay is an open-source, self-hosted WebSocket relay server for Zen Client and Bridge, written in Node.js with Express and Socket.IO. (compare: https://selfhost.directory/compare/ephemerelay-vs-zen-relay)
- [Minds Nostr Relay](https://selfhost.directory/project/minds-nostr-relay): Minds Nostr Relay is a self-hostable Nostr relay server, enabling decentralized social media communication via the Nostr protocol. It supports multiple NIPs and integrates with Redis and MySQL for event storage and rate limiting. (compare: https://selfhost.directory/compare/ephemerelay-vs-minds-nostr-relay)
- [Nostr Nests](https://selfhost.directory/project/nostr-nests): Nests is a self-hosted, open-source platform for live audio conversations — podcasts, group chats, music jams, and conferences — built on Nostr with MoQ. (compare: https://selfhost.directory/compare/ephemerelay-vs-nostr-nests)
- [NNostr](https://selfhost.directory/project/nnostr): NNostr is a self-hosted, open-source Nostr relay and client library written in C# that supports paid events via BTCPay Server integration. (compare: https://selfhost.directory/compare/ephemerelay-vs-nnostr)
- [strfry](https://selfhost.directory/project/strfry): strfry is a self-hosted, open-source Nostr relay in C++ using LMDB with negentropy sync and Prometheus metrics. (compare: https://selfhost.directory/compare/ephemerelay-vs-strfry)

## More in Communication

- [Ergo](https://selfhost.directory/project/ergo): Self-hosted, open-source IRC server written in Go that merges ircd, NickServ/ChanServ/HostServ services and bouncer history in one daemon.
- [erxes](https://selfhost.directory/project/erxes): Self-hosted, open-source Experience Operating System unifying marketing, sales, support and operations with plugins and federated GraphQL.
- [evobot](https://selfhost.directory/project/evobot): Open-source, self-hosted Discord music bot in TypeScript: plays YouTube tracks and playlists with queue, loop, lyrics and slash commands in 20+ locales.
- [Evolution API](https://selfhost.directory/project/evolution-api): Self-hosted, open-source WhatsApp REST API (Baileys or Meta Cloud API) with webhooks, queues, and chatbot/CRM integrations like Typebot, Chatwoot, Dify and n8n.
- [ferdium-server](https://selfhost.directory/project/ferdium-server): Open-source, self-hostable backend for Ferdium messaging aggregator to manage accounts, workspaces, and custom recipes on your infrastructure.
- [Flarum](https://selfhost.directory/project/flarum): Open-source, self-hosted forum software built on PHP and Laravel, with tags, moderation, private messages, real-time updates and a huge extension ecosystem.
- [flexisip](https://selfhost.directory/project/flexisip): Flexisip is a self-hosted, open-source SIP server suite in C++20 providing proxy, presence, conference, B2BUA, and push notifications for real-time communications.
- [fonoster](https://selfhost.directory/project/fonoster): Open-source, self-hosted voice-agent platform for real phone calls: Autopilot agents defined in YAML, SIP trunks and numbers, transfer, recording, webhooks.
- [Forward Email](https://selfhost.directory/project/forward-email): Forward Email is a self-hosted, open-source email service with forwarding, encrypted mailboxes, SMTP/IMAP/POP3, CalDAV/CardDAV, and webhooks.
- [Freepbx](https://selfhost.directory/project/freepbx): FreePBX is an open-source web-based graphical user interface (GUI) that manages Asterisk, the world's most popular open-source IP PBX. It provides users with the tools to build a phone system tailored to their needs.
- [Friendica](https://selfhost.directory/project/friendica): Friendica is a self-hosted, open-source decentralized social network connecting to the Fediverse via ActivityPub, Diaspora, and other protocols.
- [FusionPBX](https://selfhost.directory/project/fusionpbx): FusionPBX is a self-hosted, open-source PBX web interface for FreeSWITCH providing multi-tenant VoIP, call center, and device provisioning for businesses.

## Links

- [Homepage](https://gitlab.com/soapbox-pub/ephemerelay)

---
Source: https://selfhost.directory/project/ephemerelay