Host your Nostr Relay via the Flux Marketplace!

Flux Official
6 min readFeb 9, 2023

--

Flux — The Web3 Cloud

Flux’s core values and ethos center around the rise of Web 3.0 — By and For the People. Evoke the power of corporations and restore it to the common people. The Flux Cloud is decentralized, based on thousands of single servers from all over the world connected in one operating system. Individuals are also the backbone of technology. They provide the cloud with computational resources via home-based bare metal machines or rented servers and get incentivized by 50% of the total block reward.

To this date, the decentralized cloud of Flux is supported by over 15,000 nodes all around the globe. Its total available computational resources total over 110,000 Cores, over 300 TB of RAM, and 7+ PT (Petabytes) of SSD. A Web 3.0 cloud powerhouse that can deploy applications in a decentralized and censor-resistant manner. There are plenty of advantages to using Flux instead of traditional Web2 infrastructure providers:

  • All applications are redundant and have automatic failovers in case of outages.
  • The Flux Cloud is agnostic to code language as it uses Docker Hub containers as an on-ramp.
  • The Flux Cloud automatically keeps applications up to date with the respective container.
  • The Flux Cloud offers uncompetitive pricing.

Nostr — Notes and Other Stuff Transmitted by Relays

Nostr is revolutionizing the Social Media landscape by introducing an open-source protocol that opens the door to a new generation of Web3-based Social Media applications. These applications are free from corporate influence, advertisements, algorithmic manipulation, and censorship. Instead, they are designed to supply a space where people can freely share their content and connect. With the help of Nostr relays on Flux, we may finally have a genuinely decentralized Social Media platform that is the people’s voice.

Enough introduction! Let us go ahead with the guide on deploying your very own Nostr Relay via the Flux Marketplace in very few steps!

  1. We first need to head over to https://home.runonflux.io/
  2. Once here, we need to log in using our ZelID. Available for us via Zelcore https://zelcore.io/ (Remember to always use the official links)

2.1 If you do not have an account created in Zelcore, you first need to download and install the app

2.2 Next (mandatory for your wallet’s safety), enable d2FA on the App section inside Zelcore.

2.3 Now you can authenticate by clicking on the fingerprint button or manually by signing the message manually on your Zelcore Wallet with the ZelID App

3. Now that you have been authenticated, head over to https://home.runonflux.io/apps/marketplace and look for the Nostr Application — You will find it under the ‘Hosting’ category. You will see something remarkably like this:

4. You can add certain parameters to your Nostr Relay via Environmental (ENV). They are NAME, DESCRIPTION, RELAY_URL, CONTACT, and PUB_KEY. Click on each tab to fill in your parameters. There is an explanation for each below. Keep in mind all the parameters are optional. You can click “Start Launching Marketplace App” if you do not want to insert any.

5.

  • NAME [Optional]: You assign your personalized name to your Nostr Relay
  • DESCRIPTION [Optional]: Assign a description to your Nostr Relay
  • RELAY_URL [Optional]: Add your custom Domain to your Nostr Relay. If you need help setting up the proxy, visit https://jetpack2.app.runonflux.io/#/guides/domain for a guide
  • CONTACT [Optional]: Add your email so individuals using your Nostr Relay can reach out to you easily. You can add it by putting the syntax mailto: before the email. For example mailto:flux@gmail.com
  • PUB_KEY [Optional]: Enter your Nostr Public Key here. This public key finds an actor (usually a person) and is shared — your Nostr Identity. You can create your first one at common Nostr front ends like Branle at https://branle.netlify.app/

6. Once you have filled in all your preferred ENV parameters, click “Start Launching Marketplace App.” You will see something similar to this:

6. You can click next or copy the Registration Message if you are signing the message manually from your ZelID App and then click next

7. Here, you can click the fingerprint button to sign the request for the Application, or if done, manually paste the signed message on your ZelID from the earlier step

8. Now, you get the monthly cost for your application. Click on Register Flux App

9. Now, you are provided with some payment info in FLUX. Payment is made through the FLUX blockchain in FLUX coins.

10. Select “Pay with Zelcore” to make the payment for the app

11. You are done! We now need to wait for your Nostr Relay to be spawned on an available node, which takes around 10–30 minutes.

Usage of the Nostr Relay

When logged in via your ZelID at https://home.runonflux.io you can head over to the “Global Apps” menu tab that you find on the left ledge. Once on that page, navigate to the “My Apps” Tab. Here, you can manage and visit your Nostr Relay deployments that you have done so far. Click on the arrow pointing down to see your application specifications and the IPs running it.

More importantly, you see your “Automatic Domains,” which were generated by the Flux-Domain-Manager (FDM). You’ll need the first one listed there, in our case nostr1675877184478.app.runonflux.io.
Because Nostr uses a WebSocket connection instead of HTTPS, we will need to add a wss:// before the domain given.

→ wss://nostr1675877184478.app.runonflux.io

Now you are ready to use your Nostr Relay in production! Most Nostr applications connect you to specify default Nostr Relays but allow you to customize them by adding or deleting certain ones. The settings page is usually where you’ll find that option. Below is an example of how it looks like on branle at https://branle.netlify.app/

Monitoring of your instances

You can check the Logs of the individual IPs to see if the Relay is running properly.

  1. Visit one IP by clicking on “Visit FluxNode.”
  2. Log in with your ZelID
  3. Navigate to “Apps,” “Local Apps,” “My Local Apps”
  4. Click “Manage,” “Manage App,” or “Log File”

Remember, your Nostr Relay is only subscribed for 22,000 Flux blocks which are ~ 44,000 minutes (about 1 month) for around one month. You will need to renew payment monthly so your Relay does not get kicked off the network.

  1. Visit https://home.runonflux.io/ and log in with your ZelID
  2. Navigate to “Apps,” “Global Apps,” “My Apps”
  3. Click “Manage,” “Manage App,” “Update Specifications”
  4. Leave all the variables like they are; click “Compute Update Message.”
  5. Sign the Message with the ZelID App and click “Update Flux App” after
  6. Click “Pay with Zelcore” to make the Flux Payment
  7. Voilà your Node has been renewed for 22,000 blocks

Have Fun supporting Nostr with decentralized infrastructure!

Learn more about Flux at www.runonflux.io
Learn more about Nostr at https://nostr.com/

--

--