rimbra
Deploy guides

Deploy a Web3 app

Your Rimbra backend is an always-on Node.js server, not a function with a time limit, so it can hold a WebSocket open to the chain, listen to contract events and run an indexer between requests. Around it sits the rest of a web3 app: a Next.js or Vite frontend, signature checks, webhooks and a database. Contracts live on the chain and you reach it through an RPC provider such as Alchemy, Infura, QuickNode or Helius.

How Rimbra runs Web3

BackendA long-running Node.js server, not functions, so WebSocket connections, timers and in-memory caches stay alive between requests. That fits an API that verifies signed messages, a webhook receiver for Alchemy, Helius or Moralis, and a service that listens to contract events.
Detected byThe framework underneath: next, vite and react, express, fastify or nestjs in package.json. Rimbra has no separate web3 mode, so the framework guides apply to each part.
FrontendNext.js and Vite apps build with your build script. Wallet libraries such as wagmi, viem, ethers, RainbowKit and Solana wallet-adapter are ordinary npm packages and bundle as usual.
DataManaged PostgreSQL, MySQL and Redis for indexed events, user profiles, metadata caches and off-chain order books. DATABASE_URL and REDIS_URL are set for you when you connect one.
Scheduled workCron jobs and Queues for price polling, syncs and retries.
SecretsEnvironment variables on the Variables tab, for RPC URLs and API keys.
Node.jsNode.js 22 unless you ask for another in .nvmrc, .node-version, .tool-versions or engines.node, or in Settings → Runtime version.

Prepare your Web3 app

  1. 1

    Keep RPC URLs, chain IDs and contract addresses in environment variables, one set per network, so the same code runs against a testnet and mainnet.

  2. 2

    Values the browser needs, such as NEXT_PUBLIC_ or VITE_ variables, are written into the JavaScript at build time and are public. Changing one needs a redeploy. Keep anything secret in the backend.

  3. 3

    Never put a private key in the repository or in a browser-visible variable. If a deployer or signing key must live on a server, store it as a variable on the Variables tab and limit what it can do.

  4. 4

    Check wallet signatures on the server. Issue a one-time nonce, have the wallet sign it, and verify the signature in your backend before you start a session.

  5. 5

    Listen on process.env.PORT in your backend. Rimbra picks the port and routes your address to it.

  6. 6

    Run wallet code in the browser only. In Next.js, mark wallet components as client components, because wallets live on window and don’t exist during server rendering.

server.js
const express = require("express")
const crypto = require("crypto")
const { verifyMessage } = require("ethers")

const app = express()
app.use(express.json())

// Nonces in memory are lost on restart. Keep them in Redis (REDIS_URL) for real use.
const nonces = new Map()
const text = (nonce) => "Sign in to my app. Nonce: " + nonce

app.get("/auth/nonce", (req, res) => {
  const nonce = crypto.randomBytes(16).toString("hex")
  nonces.set(nonce, Date.now())
  res.json({ nonce, message: text(nonce) })
})

app.post("/auth/verify", (req, res) => {
  const { nonce, signature } = req.body
  if (!nonces.delete(nonce)) return res.status(400).json({ error: "Unknown nonce" })
  const address = verifyMessage(text(nonce), signature)
  res.json({ address }) // start a session for this address
})

app.listen(process.env.PORT || 3000)

Deploy it

  1. 1

    Push your Web3 app to GitHub. In Rimbra, choose New → Application and pick the repository.

  2. 2

    Rimbra finds the framework underneath, such as next, vite or express in your package.json and sets up the build for Web3. To change a command or the root directory, use Settings → Build & runtime.

  3. 3

    Add your variables on the Variables tab, then choose Deploy and follow the build log.

  4. 4

    Your app goes live at your-app.rimbra.live over HTTPS, and every push to the branch deploys again.

Connect a database

Connect a PostgreSQL or MySQL database and DATABASE_URL is set when the server starts. A common pattern is an indexer: the backend listens to contract events and writes each one to the database, so your frontend reads fast from your own tables instead of querying the chain. Make the insert safe to repeat, because after a restart you will re-read some blocks.

indexer.js
const { WebSocketProvider, Contract } = require("ethers")
const { Pool } = require("pg")

const pool = new Pool({ connectionString: process.env.DATABASE_URL })
const provider = new WebSocketProvider(process.env.RPC_WSS_URL)
const token = new Contract(
  process.env.TOKEN_ADDRESS,
  ["event Transfer(address indexed from, address indexed to, uint256 value)"],
  provider
)

token.on("Transfer", async (from, to, value, event) => {
  await pool.query(
    "insert into transfers (tx_hash, log_index, from_addr, to_addr, value) values ($1, $2, $3, $4, $5) on conflict do nothing",
    [event.log.transactionHash, event.log.index, from, to, value.toString()]
  )
})

Common Web3 problems

The wallet button throws “window is not defined” in a Next.js build or on first loadWallet code only works in the browser. Put wallet components in a client component ("use client"), or load them with next/dynamic and ssr: false.
A NEXT_PUBLIC_ or VITE_ value, such as the RPC URL or contract address, is empty in productionAdd it on the Variables tab before the build and redeploy. These values are written into the bundle at build time.
The event listener stops receiving events after a whileRPC providers close idle WebSocket connections. Reconnect when the connection closes, and on startup read the blocks you missed from the last one you saved.
A Vite build complains that Buffer, process or crypto is not defined in the browserSome older web3 libraries expect Node globals. Use a current viem or ethers, or add a Node polyfill plugin to your Vite config.
Requests to your RPC provider fail with 401 or 429 after deployingCheck the key in the Variables tab, and whether the provider restricts keys to certain domains. Add your Rimbra address or custom domain to the allowed list.

See every detected framework and its default commands in the frameworks docs.

What stays outside your hosting

Chain nodesRunning your own Ethereum or Solana node needs far more disk and memory than a plan offers. Use an RPC provider such as Alchemy, Infura, QuickNode or Helius.
Contract deploymentYou deploy contracts with Hardhat or Foundry from your own machine or CI. Rimbra only hosts the app that talks to them.
IPFS and ArweaveBuckets is S3-compatible storage, not IPFS pinning. Use Pinata or web3.storage for permanent on-chain-style storage, and Buckets for ordinary files.
Wallet sign-in in the Auth productThat product covers email, Google and GitHub today. Wallet sign-in means writing the sign-in check in your own app, which is a small amount of code.

Questions

Can Rimbra host a web3 app?

Yes, the app part. Rimbra hosts the frontend and the backend that talk to a blockchain, along with a database, cron jobs and your own domain. The chain itself is reached through an RPC provider, and contracts are deployed separately.

Can I run my own Ethereum or Solana node on Rimbra?

No. A node needs far more disk and memory than a plan offers. Use an RPC provider such as Alchemy, Infura, QuickNode or Helius.

Can I deploy my smart contracts with Rimbra?

No. Deploy contracts with Hardhat or Foundry from your own machine or CI. Rimbra only hosts the app that talks to them.

Can I store files on IPFS or Arweave?

Not through Rimbra. Buckets is S3-compatible storage, not IPFS pinning. Use Pinata or web3.storage for permanent storage, and Buckets for ordinary files.

Does Rimbra Auth support signing in with a wallet?

Not yet. Auth covers email, Google and GitHub. For wallet sign-in, verify a signed message in your own backend, as in the example above.

Which chains work?

Any chain with a JavaScript or TypeScript library, such as Ethereum and other EVM chains with viem or ethers, or Solana with its web3.js and wallet-adapter packages. Rimbra runs your code and does not care which chain it talks to.

Can I host a Web3 app for free?

Yes. Rimbra’s Free plan needs no card and includes 2 applications, 1 database, 100 build minutes and 20 GB of bandwidth a month, with a free HTTPS address for each one.

Ship your next app here.

Free to start, no card, and your app stays on.

See pricing