Guides

How to Deploy a Next.js App in Nigeria (and Pay in Naira)

You wrote the app. Now you need it live on a real URL — without a dollar card, an FX markup, or a payment that keeps getting declined. Here is the full path from a GitHub repo to a production Next.js app you can pay for in naira.

Last updated: 8 July 2026 · ~8 min read

If you build for the web in Nigeria, you already know the deployment tax. The tutorials all say “just push to Vercel” or “spin it up on Heroku,” and then the free tier runs out, you reach for your card, and the charge bounces. Your naira card gets declined on a dollar checkout, or it goes through and your bank adds an FX markup on top of an already dollar-denominated bill. For a hobby project that’s annoying. For a client app or a small SaaS, it’s a monthly headache you never signed up for.

This guide walks through deploying a real Next.js app to production from Nigeria on OneBit Deploy — a Nigerian platform-as-a-service where you push from GitHub, get automatic HTTPS and a live URL, and are billed in naira with no foreign-exchange markup. It works the same whether you’re on the App Router or the Pages Router, and whether your app is a static export or a full Node server.

What you need before you start

  • A Next.js app that runs locally with next build and next start.
  • A GitHub account with the app pushed to a repository.
  • Node.js 18 or newer locally. Check with node -v.
  • A OneBit account — the free plan is enough to follow along and requires no card.

Step 1 — Get your Next.js app build-ready

Before you deploy anywhere, confirm the app builds cleanly. A build that fails locally will fail in the cloud too, so save yourself the round trip:

# From your project root
npm install
npm run build   # runs "next build"
npm start       # runs "next start" on port 3000

If npm start serves your app on http://localhost:3000, you’re ready. Make sure your package.json has the standard scripts — OneBit Deploy looks for these when it builds your image:

{
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start -p $PORT"
  }
}

The one Nigeria-specific gotcha: read the port from $PORT rather than hard-coding 3000. Managed platforms inject the port the container should listen on, and next start -p $PORT honours it. Then commit and push to GitHub:

git add .
git commit -m "Prepare for deploy"
git push origin main

Step 2 — Create a free OneBit account

Head to the OneBit Deploy panel and sign up. The Free plan gives you 5 apps, 1 GB of memory, automatic HTTPS, custom domains and live logs — and it does not ask for a card, so there’s nothing to decline. You only add a payment method when you move to a paid plan, and when you do, it’s a normal naira card payment through your OneBit account.

This is the part that quietly matters. On a foreign platform, the signup is free but the upgrade is a dollar charge that your Nigerian card may reject outright. Here the whole billing path — free to Starter (₦10,000/month) to Hobby (₦30,000/month) to Enterprise (₦89,000/month) — is priced and charged in naira, so there is no FX markup and no international-card friction.

Step 3 — Connect your repository

In the console, press Add an app and open the From my GitHub tab. Connect GitHub once (OneBit only reads your code to put it online; it never changes it), pick the project you just pushed, choose the Branch to put online and press Use this project. If you’d rather not connect GitHub, the Upload a .zip tab takes a .zip of your project instead, and tells you straight away if it can build that kind of project from a .zip — but for a Next.js server app, GitHub is the way, because every future git push to your main branch will trigger a fresh deployment automatically.

OneBit looks inside the project, tells you what it found (“A website made with Next.js.”) and sets sensible defaults, so there is usually nothing for you to set:

  • Build command: npm install && npm run build
  • Start command: npm start
  • Port: injected via $PORT (that’s why Step 1 matters)

If your project builds differently, open More settings on the same page: Build command, Folder the project is in and Port your app listens on are there. Then give the app a Name (it is used in your free web address) and press Put it online.

If your app is a fully static export (output: 'export' in next.config.js), set the Output folder to out on the app’s Settings tab (How it is built → Change how it is built) — it’ll be served as static files.

Step 4 — Add your environment variables

Most real apps need secrets: a database URL, an API key, an auth secret. Add these on the app’s Keys & passwords tab (environment variables): Add a key takes a Name and a Value, and Paste many at once takes the lines of your .env file. The keys live on the app, so you add them once it exists, right after Put it online. Saving restarts the app so it picks the values up; if the first build needed one of them, press Update now after adding it to build again. A typical Next.js app might set:

DATABASE_URL=postgres://user:pass@host:5432/dbname
NEXTAUTH_SECRET=your-long-random-string
NEXT_PUBLIC_API_URL=https://your-app-k3x9p.app.onebit.ng/api

Remember the Next.js rule: variables that need to be readable in the browser must be prefixed with NEXT_PUBLIC_. Those are baked in when the app is built, so after adding or changing one, press Update now. Everything else stays server-side and never ships to the client.

Need a database too? You don’t have to reach for a foreign managed Postgres with its own dollar bill. On a paid OneBit plan you can provision managed PostgreSQL, MySQL, MariaDB or MongoDB right next to your app, get a connection string, and paste it straight into DATABASE_URL — all billed in the same naira invoice.

Step 5 — Deploy and go live

Once you press Put it online (or Update now later), OneBit builds your Next.js app into a container image and runs it on its managed Kubernetes platform. The app’s page shows each step as it happens — Got your project, Worked out what it is, Building it, Switching it on, Giving it an address — and its Logs tab (Builds) shows the build itself in live logs — install, then next build, then the container boots. When it’s healthy you get a public URL like your-app-k3x9p.app.onebit.ng with a free, automatically managed TLS certificate. No Nginx config, no Let’s Encrypt cron, no certificate renewals to babysit.

To put it on your own domain, open the app’s Your own name tab, type app.yourdomain.com under Use a name you own and press Add it. It shows the records to add at the company you bought the name from; once they point at OneBit, HTTPS (the padlock) is provisioned for the custom domain automatically. If you don’t have a domain yet, you can register a .ng domain through OneBit (Get one in Domains) and pay for that in naira as well.

That’s the whole loop.

Push to main → OneBit rebuilds → your live URL updates. No manual redeploys, no SSH, no dollar invoice at the end of the month.

What this costs vs. deploying abroad

The headline difference isn’t just the sticker price — it’s that the price is in naira, predictable, and doesn’t move with the exchange rate or attract a card FX markup. A quick comparison:

ConcernTypical foreign PaaSOneBit Deploy
Billing currencyUS dollarsNaira (₦)
FX markupAdded by your bank on every chargeNone
Card acceptanceNigerian cards often declinedLocal naira payment
Free planShrinking / removed5 apps, 1 GB, HTTPS, no card
Paid entry point$7–$25/mo (+ FX)₦10,000/mo (Starter)

Common issues (and quick fixes)

Build succeeds but the app won’t start

Almost always a port issue. Make sure your start script is next start -p $PORT, not a hard-coded -p 3000.

“Module not found” in the cloud but fine locally

Your dependency is probably in devDependencies but needed at runtime, or you committed a stale lockfile. Move it to dependencies and push again.

Environment variable is undefined in the browser

It needs the NEXT_PUBLIC_ prefix and a rebuild (Update now on the app) — client-side env vars are baked in at build time, not read at runtime.

Custom domain shows a certificate warning

DNS hasn’t propagated yet. Give it up to an hour after pointing the record; the TLS certificate is issued automatically once the domain resolves to OneBit.

Frequently asked questions

Do I need a dollar card to deploy on OneBit?

No. The free plan needs no card at all, and paid plans are charged in naira through your OneBit account — no dollar checkout, no FX markup.

Does it support the App Router and Server Actions?

Yes. Your app runs as a full Node server via next start, so App Router, Server Components, API routes and Server Actions all work. Static exports are supported too.

Where are the servers?

Apps run on OneBit’s managed Kubernetes platform. OneBit is a Nigerian company and everything is billed in naira.

Ready to put your Next.js app live?

Start on the free plan — no card required. Connect your GitHub repo, deploy, and get a live HTTPS URL in minutes, billed in naira with no FX markup.

See full naira pricing or talk to us.