dApp Frontend Hosting

Deploy your decentralized application's static frontend to Walrus Protocol for fully censorship-resistant hosting.

Overview

By hosting your dApp's frontend on Walrus, your application is as decentralized as your smart contracts. No CDN provider can take down your UI.

Build & Upload

Build your frontend, then upload the output directory:

# Build your app
npm run build

# Upload build output via Tuskr CLI
tuskr deploy ./dist --tag dapp-frontend --epochs 365

Upload via API

Or use the API to upload each file programmatically:

import { glob } from "glob"
import fs from "fs"

const files = await glob("./dist/**/*", { nodir: true })

for (const file of files) {
  await tuskr.upload({
    file: fs.readFileSync(file),
    name: file.replace("./dist/", ""),
    tag: "dapp-frontend",
    epochs: 365,
  })
}

See Also