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
Option 1 — GitHub (recommended)
- Go to your project dashboard
- Click Sites in the sidebar
- Click New Site
- Enter your GitHub repo (format:
username/repo) - Select your framework
- Click Create
- Click Deploy
Your site is live at:
yoursitename.sites.naijabase.dev
Option 2 — Zip upload
- Build your site locally:
npm run build
- 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
- Go to Sites → your site → Settings tab
- Upload the zip file
- Click Upload and Deploy
Framework presets
| Framework | Build command | Output directory |
|---|---|---|
| Static HTML | — | . |
| React / Vite | npm run build | dist |
| Next.js (static) | npm run build | out |
| Vue | npm run build | dist |
| Nuxt | npm 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:
| Type | Name | Value | TTL |
|---|---|---|---|
| CNAME | @ or www | yoursite.sites.naijabase.dev | 300 |
2. Connect in the dashboard:
- Go to Sites → your site → Domains tab
- Enter your domain
- Click Verify and Connect
- NaijaBase checks DNS and issues SSL automatically
Your domain is live with SSL in ~2 minutes.
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
| Plan | Sites | Custom domains |
|---|---|---|
| Starter (₦0) | 1 | ❌ |
| Growth (₦25,000/mo) | 3 | ✅ |
| Scale (₦60,000/mo) | 10 | ✅ |
| Business (₦75,000/mo) | Unlimited | ✅ |
NaijaBase Sites vs Vercel
| Feature | Vercel | NaijaBase Sites |
|---|---|---|
| Hosting location | USA / Global CDN | Lagos, Nigeria |
| Billing | USD | Fixed naira |
| NDPA compliant | No | Yes |
| Backend included | No (separate) | Yes (same platform) |
| Custom domains | Yes | Yes (Growth+) |
| SSL | Yes | Yes (automatic) |
| Deploy from GitHub | Yes | Yes |
| Deploy from zip | No | Yes |
| Free tier | Yes | Yes |