Skip to main content

Frontend Hosting

NaijaBase Sites lets you deploy your frontend — static HTML, React, Next.js, Vue, or Nuxt — directly to Lagos.

No Vercel. No Netlify. No USD bills.

Quick start

  1. Go to your project dashboard
  2. Click Sites in the sidebar
  3. Click New Site
  4. Enter your GitHub repo (format: username/repo)
  5. Select your framework
  6. Click Create
  7. Click Deploy

Your site is live at:

yoursitename.sites.naijabase.dev

Option 2 — Zip upload

  1. Build your site locally:
npm run build
  1. Zip the output folder:
# React/Vite
zip -r site.zip dist/

# Next.js static
zip -r site.zip out/

# Plain HTML
zip -r site.zip index.html
  1. Go to Sites → your site → Settings tab
  2. Upload the zip file
  3. Click Upload and Deploy

Framework presets

FrameworkBuild commandOutput directory
Static HTML.
React / Vitenpm run builddist
Next.js (static)npm run buildout
Vuenpm run builddist
Nuxtnpm run build.output/public

Environment variables

Add environment variables in Sites → your site → Settings → Environment Variables.

They are injected as .env at build time:

// In your React app
const apiUrl = import.meta.env.VITE_API_URL
const anonKey = import.meta.env.VITE_ANON_KEY
# In Settings → Environment Variables:
VITE_API_URL = https://api.naijabase.dev/projects/YOUR_PROJECT_ID/rest/v1
VITE_ANON_KEY = nb_anon_xxxx

Private GitHub repositories

Add your GitHub personal access token as an environment variable:

Key: GITHUB_TOKEN
Value: github_pat_xxxxxxxxxxxx

Get a fine-grained token at: github.com → Settings → Developer Settings → Fine-grained tokens → Contents: Read-only

The token is never shown in build logs and is excluded from your built app.

Custom domains

Connect your own domain to NaijaBase Sites:

1. Add a CNAME record at your DNS provider:

TypeNameValueTTL
CNAME@ or wwwyoursite.sites.naijabase.dev300

2. Connect in the dashboard:

  1. Go to Sites → your site → Domains tab
  2. Enter your domain
  3. Click Verify and Connect
  4. NaijaBase checks DNS and issues SSL automatically

Your domain is live with SSL in ~2 minutes.

Plan requirement

Custom domains require the Growth plan (₦25,000/month) or above.

Deploying with a NaijaBase backend

Connect your NaijaBase backend to your hosted frontend using environment variables:

# In Sites → Settings → Environment Variables:
NEXT_PUBLIC_NAIJABASE_URL = https://api.naijabase.dev/projects/YOUR_PROJECT_ID
NEXT_PUBLIC_NAIJABASE_ANON_KEY = nb_anon_xxxx
// In your frontend app:
import { createClient } from '@naijabase/js'

const naijabase = createClient(
import.meta.env.NEXT_PUBLIC_NAIJABASE_URL,
import.meta.env.NEXT_PUBLIC_NAIJABASE_ANON_KEY
)

const { data } = await naijabase
.from('products')
.select('*')

Backend and frontend — both in Lagos. Both in naira. Both NDPA compliant.

Build logs

Every deployment shows real-time build logs:

Sites → your site → Deployments → click any deployment → View Logs

[NaijaBase] Build started at 2026-07-24T12:00:00.000Z
[NaijaBase] Cloning username/repo (branch: main)...
$ git clone --depth 1 --branch main ...
[NaijaBase] Installing dependencies...
$ npm install
[NaijaBase] Building...
$ npm run build
[NaijaBase] Configuring web server...
[NaijaBase] Deployed in 33s ✓

Rollback

Every deployment is saved. Roll back to any previous version instantly:

Sites → your site → Deployments → click Rollback on any past deployment

Plan limits

PlanSitesCustom domains
Starter (₦0)1
Growth (₦25,000/mo)3
Scale (₦60,000/mo)10
Business (₦75,000/mo)Unlimited

NaijaBase Sites vs Vercel

FeatureVercelNaijaBase Sites
Hosting locationUSA / Global CDNLagos, Nigeria
BillingUSDFixed naira
NDPA compliantNoYes
Backend includedNo (separate)Yes (same platform)
Custom domainsYesYes (Growth+)
SSLYesYes (automatic)
Deploy from GitHubYesYes
Deploy from zipNoYes
Free tierYesYes