---
title: "Deploy Hey"
description: "Decentralized and permissionless social media app built with Lens Protocol"
category: "Blogs"
url: https://railway.com/deploy/hey
---

# Deploy Hey

Decentralized and permissionless social media app built with Lens Protocol

**[Deploy Hey on Railway](https://railway.com/template/hey)**

- **Creator:** Muhammad Bilal
- **Category:** Blogs

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### hey

- **Source:** bilalnawaz072/hey
- **Public domain:** Yes

## Documentation

# 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

* [GitHub Repository](https://github.com/slymnoyann/hey-1)
* [Official Website](https://hey.xyz)

### Implementation Details

**Public Networking**

| Proxy Type | Target Port |
| --- | --- |
| HTTP Proxy | 4783 |

**Environment Variables**

| Variable | Required | Description |
| --- | --- | --- |
| `PORT` | Yes | Internal application listening port (Must be set to 4783). |
| `PRIVATE_KEY` | Yes | Private key used to sign Lens Protocol requests. |
| `SHARED_SECRET` | Yes | Token for internal API authorization. |
| `DATABASE_URL` | Yes | Connection string for the PostgreSQL database. |

```env
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.

## Similar templates

- [Pixelfed](https://railway.com/deploy/OZSdEw) — Explore + Share beautiful photos and videos on the Fediverse
- [Hexo](https://railway.com/deploy/hexo) — Self-hosted Hexo blog with editor, comments, and S3 storage
- [NodeBB](https://railway.com/deploy/nodebb) — Node.js based forum software built for the modern web

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