---
title: "Deploy Alby Hub"
description: "Self-custodial Bitcoin Lightning node and NWC wallet, pinned and persistent"
category: "Other"
url: https://railway.com/deploy/alby-hub-1
---

# Deploy Alby Hub

Self-custodial Bitcoin Lightning node and NWC wallet, pinned and persistent

**[Deploy Alby Hub on Railway](https://railway.com/template/alby-hub-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/alby-hub-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Other

## Template content

### Alby Hub https://raw.githubusercontent.com/getAlby/hub/v1.24.7/frontend/public/icon-512.png

- **Source:** https://github.com/aalfath/alby-hub-railway-template
- **Health check:** /api/info
- **Public domain:** Yes

## Documentation

# Deploy and Host Alby Hub on Railway

Alby Hub is an open-source, self-custodial Bitcoin Lightning wallet and node from Alby. It runs an embedded LDK Lightning node (or connects to LND, Phoenixd or CLN) and lets you link apps to your wallet with Nostr Wallet Connect (NWC), each with its own budget and permissions, from one web interface.

## About Hosting Alby Hub

This template runs the official Alby Hub v1.24.7 image, pinned by digest, as one service built from a public GitHub repo, so you get Railway's update notices when the version is bumped. A volume at `/data` keeps the database, encrypted seed and Lightning channel state across redeploys. A setup code is generated for each deploy: copy `SETUP_CODE` from the service's Variables tab, open `https://YOUR-DOMAIN/?c=SETUP_CODE`, choose an unlock password and save your recovery phrase. After each redeploy, open the hub and unlock it so the node starts again. Keep one replica only.

## Common Use Cases

* Run your own always-online, self-custodial Lightning wallet and node
* Connect Nostr clients, zaps and Lightning apps to your wallet with NWC budgets
* Receive and send Lightning payments while you keep the keys and channel data

## Dependencies for Alby Hub Hosting

* A Railway volume for the hub's data (included)
* Outbound internet access to Lightning peers, Esplora/Electrum and Nostr relays (Railway provides it)

### Deployment Dependencies

* Alby Hub repository and docs: https://github.com/getAlby/hub
* Release v1.24.7: https://github.com/getAlby/hub/releases/tag/v1.24.7
* Template repository: https://github.com/aalfath/alby-hub-railway-template
* Alby Hub guides: https://guides.getalby.com/user-guide/alby-hub

### Implementation Details

* Variables: `SETUP_CODE` (generated), `PORT=8080`, `RAILWAY_DEPLOYMENT_DRAINING_SECONDS=300` so the node shuts down cleanly. The deploy asks for nothing.
* Health check: `/api/info`, which answers without login.
* Optional: set `AUTO_UNLOCK_PASSWORD` to start the node without unlocking after a redeploy, `LN_BACKEND_TYPE` to use an external node, or `LOG_LEVEL`. See the Alby Hub README.
* Updates: when the template repo pins a new release, Railway shows an update notice on your project. Read the CHANGELOG in the template repo, apply the update, then unlock the hub again.
* Back up your recovery phrase. Without it, losing the volume can lose funds.

## Why Deploy Alby Hub 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 Alby Hub 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

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/alby-hub-1
