Railway

Deploy Hey

Decentralized and permissionless social media app built with Lens Protocol

Deploy Hey

/var/lib/postgresql/data

Just deployed

Deploy and Host Hey on Railway

Hey is a decentralized, permissionless social media application built on the Lens Protocol. It leverages Web3 technologies, Next.js, and GraphQL to provide a robust, censorship-resistant platform. Hey allows users to connect their wallets, interact with the decentralized social graph, and manage their Web3 social presence.

About Hosting Hey

Hosting Hey on Railway simplifies the deployment of a modern Web3 monorepo stack. Railway manages the underlying infrastructure, allowing this Turborepo-based Node.js application to run seamlessly in the cloud. Deploying Hey involves provisioning a Node.js environment to serve the API and frontend, alongside a PostgreSQL database for backend data management.

Railway's automatic environment variables map directly to Hey's required configuration, such as Lens Protocol keys and internal API secrets. Railway also automatically provisions HTTPS and a public domain, exposing the application securely. The platform easily scales both horizontally and vertically, handling traffic spikes typical in social media applications without requiring manual server configuration.

Common Use Cases

  • Decentralized Social Network
  • Web3 Community Hub
  • Lens Protocol Client Application

Dependencies for Hey Hosting

  • Node.js (v22 or higher)
  • PostgreSQL
  • Lens Protocol (External Web3 Dependency)

Deployment Dependencies

Implementation Details

Public Networking

Proxy TypeTarget Port
HTTP Proxy4783

Environment Variables

VariableRequiredDescription
PORTYesInternal application listening port (Must be set to 4783).
PRIVATE_KEYYesPrivate key used to sign Lens Protocol requests.
SHARED_SECRETYesToken for internal API authorization.
DATABASE_URLYesConnection string for the PostgreSQL database.
PORT=4783
PRIVATE_KEY=your_lens_private_key
SHARED_SECRET=your_internal_api_secret
DATABASE_URL=${{Postgres.DATABASE_URL}}

Database

Hey requires a PostgreSQL database to function correctly. To set this up on Railway:

  1. Right-click on the Railway project canvas or click "New".
  2. Select "Database" and choose "Add PostgreSQL".
  3. Add the DATABASE_URL variable to your Hey service and use the Railway reference variable ${{Postgres.DATABASE_URL}} to securely connect them.

Build & Start commands

Hey is built using a pnpm monorepo architecture. Railway will typically handle Node.js deployments automatically using Nixpacks. If you need to specify custom commands in your service settings, use the following:

  • Install Command: corepack enable && pnpm install
  • Build Command: pnpm build
  • Start Command: pnpm start

Accessing the Application

To access your deployed Hey instance:

  1. Open your Hey application service in the Railway dashboard.
  2. Navigate to Settings.
  3. Under the Networking section, click "Generate Domain".
  4. Railway will automatically provision an SSL certificate and provide a public URL to access your decentralized social media app.

Why Deploy Hey 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 Hey 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
Pixelfed
Explore + Share beautiful photos and videos on the Fediverse

Evan Boehs
29
View Template
NEW
Hexo
Self-hosted Hexo blog with editor, comments, and S3 storage

INAPP
1
View Template
NodeBB
Node.js based forum software built for the modern web

Six
65