Quickstart
Deploy a static site to IPFS and make it accessible via a custom domain, all in under 5 minutes.
You need a Pinner account and an API key. Don't have one? Create an API key.
# 1. Authenticate (interactive: prompts for email and password)
pinner auth
# 2. Build your site (example with Vite)
npm run build
# 3. Deploy: create a website pointing to your CID
pinner websites create mysite.pinner.xyz --cid QmYourCIDHere
# Done: your site is live on IPFSimport { Pinner } from "@lumeweb/pinner";
const pinner = new Pinner({ jwt: process.env.PINNER_AUTH_TOKEN });
// Create a website pointing to your Content Identifier (CID)
const site = await pinner.websites.createWebsite({
domain: "mysite.pinner.xyz",
target_type: "ipfs",
target_hash: "QmYourCIDHere",
});
console.log("Site ID:", site.id);
console.log("Domain:", site.domain);
console.log("Status:", site.status);Non-interactive (CI/CD)
If you already have an API key from another machine or for automation:
pinner auth YOUR_JWTWhat just happened
The CLI created a website record that maps a domain to an IPFS CID. You provide the domain and CID, and Pinner handles routing and DNS validation. The SDK does the same thing; you give it a domain, target_type, and target_hash (CID), and Pinner handles the rest.
Next steps
- Deploy a static site end-to-end: a full walkthrough with custom domains
- Add a custom domain
- Understand how website hosting works