Published on
Where should you deploy a Node.js and PostgreSQL MVP in Brazil?
For an MVP with a Node.js backend, managed PostgreSQL, and users in Brazil, the cheapest option billed in reais is a platform that runs both the application and the database in São Paulo. On Zenifra, for example, the Basic plan (0.5 vCPU and 512 MB) with DB-Starter costs R$ 41.80 a month, plus R$ 0.20 per GB of disk. Render and Railway bill in dollars and have no South America region: Render comes to US$ 13 (R$ 74.02 with the exchange rate and the 3.5% IOF) and Railway starts at US$ 10 plus the CPU you use (R$ 56.94). Supabase has a database region in São Paulo but does not run an always-on application, and its Pro plan costs US$ 25 (R$ 142.35). This guide compares region, price, billing, backups, and free plans across the four and walks through deploying a Node.js API from GitHub all the way to the database connection.
What an MVP with a backend needs to stay online
An MVP with a backend is not a static site. It has a Node.js process that stays up waiting for requests, stores data in a database, and needs secret values, such as that database’s password, kept outside the code. That asks three things of the platform: enough memory for the process, a PostgreSQL database with backups, and a simple way to publish every change in the repository.
For memory, 512 MB is a realistic floor for an Express or Fastify API with the PostgreSQL driver, because the Node.js process, its dependencies, and the garbage collector share that space. Plans with 128 MB work for a static site, not for a backend that talks to a database and handles your users’ requests.
The second point is keeping the process always on. Many free plans shut the application down after a few minutes without traffic, and the next request waits for the process to start again. During a demo for an investor or for your first paying customers, that wait looks like a bug in the product, not like a way to save resources.
The third point is distance. If your users are in Brazil, an application and a database in Brazil respond faster, and the two need to sit in the same region. In the benchmark Zenifra published, measured from São Paulo, a new HTTPS connection to a server in the same city reached the first byte in 18 ms, against 378 ms to a server in Washington. With the database on another continent, 20 sequential queries wait about 2.5 seconds, against 100 ms with the application and the database in the same region.
How much does a Node.js and PostgreSQL MVP cost on each platform?
In the smallest setup that can carry a backend, an always-on 512 MB application plus the smallest paid PostgreSQL, the monthly bill comes to R$ 41.80 on Zenifra, from R$ 56.94 plus CPU on Railway, and R$ 74.02 on Render. Dollars were converted at the PTAX selling rate of November 6, 2026, R$ 5.5013, plus the 3.5% IOF charged on Brazilian cards. Supabase shows up differently, because it bills only for the database: the application has to live on another platform, so the table adds both bills.
Dollar prices come from the official pages, checked between September 29 and November 6, 2026, and Zenifra prices come from its public plan catalog on November 6, 2026. Database disk is billed separately on all four, so each number in the table is that platform’s floor.
| Platform | Setup | Monthly price in the billing currency | In reais, with PTAX and the 3.5% IOF |
|---|---|---|---|
| Zenifra | Basic (0.5 vCPU, 512 MB) + DB-Starter (0.3 vCPU, 256 MB) | R$ 41.80, plus R$ 0.20 per GB of disk | R$ 41.80, no IOF |
| Render | 512 MB instance (US$ 7) + smallest paid Postgres (US$ 6) | US$ 13.00 | R$ 74.02 |
| Railway | 0.5 GB of RAM for the API and 0.5 GB for Postgres, billed by usage | From US$ 10.00, plus the CPU used | From R$ 56.94, plus CPU |
| Supabase Pro with the API on Render | Supabase Micro database (US$ 25) + Render 512 MB instance (US$ 7) | US$ 32.00 | R$ 182.20 |
On Railway, the US$ 5 Hobby subscription turns into usage credit. With 1 GB of RAM across the API and the database, usage passes US$ 10 a month before counting CPU, so the bill lands at that amount plus compute and changes from month to month with traffic. On Render, the price per service is fixed, and the Hobby workspace has no monthly fee.
On Zenifra, PostgreSQL disk costs R$ 0.20 per GB per month, so the MVP with a 1 GB database comes to R$ 42.00. To test for a few hours, hourly billing is R$ 0.05 for Basic and R$ 0.018 for DB-Starter. To keep it running all month, the monthly plan is cheaper, because 720 hours of Basic billed by the hour already add up to R$ 36.00 for the application alone.
Where are the servers, and how does each platform bill?
Of the four, only Zenifra and Supabase run in São Paulo, and only Zenifra also runs the application in Brazil and bills in reais. Render has regions in Oregon, Ohio, Virginia, Frankfurt, and Singapore. Railway has regions in California, Virginia, Amsterdam, and Singapore. For users in Brazil, the closest region on both is in Virginia, in the United States.
Currency matters as much as region. Render, Railway, and Supabase bill in dollars on a credit card, with the 3.5% IOF and the day’s exchange rate. On Zenifra, the organization’s credit is topped up by PIX, from R$ 5 to R$ 5,000, or by boleto, from R$ 30 to R$ 49,999.99, and a card in reais is optional, used as a fallback when the credit does not cover a charge.
| Platform | Region closest to Brazil | Currency | Payment methods | Database backups | Free plan |
|---|---|---|---|---|---|
| Zenifra | São Paulo, application and database | Brazilian reais | PIX, boleto, or card, billed hourly, monthly, or yearly | Included in the price: one a day kept for 7 days on DB-Starter | None; for testing, hourly billing from R$ 0.05 on Basic |
| Supabase | São Paulo (sa-east-1), database only | Dollars | Credit card | Pro with daily backups kept for 7 days; Free has no automatic backups | 2 active projects, 500 MB database, paused after 1 week of inactivity |
| Render | Virginia (US) | Dollars | Credit or debit card | Point-in-time recovery of 3 days on the Hobby workspace and 7 days on Pro; nothing on free | Web service sleeps after 15 minutes without traffic and Postgres expires in 30 days |
| Railway | Virginia (US) | Dollars | Post-paid credit card | Manual or scheduled volume backups, billed as disk | One-time US$ 5 credit for 30 days, then US$ 1 a month |
Render and Railway regions, prices, and payment methods were checked on their official pages on September 29, 2026. The Supabase free plan and backups and Render and Railway backups were checked on November 6, 2026, and Zenifra plans on November 19, 2026.
Can the free plans of Render, Supabase, and Railway carry an MVP?
It can carry the validation of an idea, as long as you know which limit matters on each one. The main difference is what each platform shuts down: Render puts the application to sleep and deletes the free database after 30 days, Supabase pauses a project that has been idle for a week, and Railway replaces the free plan with a small credit.
On Render, the free web service sleeps after 15 minutes without traffic, and the next visit waits for the application to wake up. The free Postgres database expires in 30 days and has no data recovery at all. It works well for a weekend prototype, but not for your first real users.
On Supabase, the Free plan gives you up to 2 active projects, each with a 500 MB database, and projects with no activity for a week are paused. There are no automatic backups on Free. Since Supabase does not run an always-on Node.js application, the backend still needs hosting somewhere else, free or paid.
On Railway, a new account gets a one-time US$ 5 credit to use within 30 days. After that, the Free plan gives US$ 1 of usage per month, which barely covers a small process running for a few days.
On Zenifra, validation runs on hourly billing: the application on Basic, with 0.5 vCPU and 512 MB, costs R$ 0.05 an hour and is not shut down for lack of traffic. PostgreSQL on DB-Starter, with 0.3 vCPU and 256 MB, costs R$ 0.018 an hour, plus R$ 0.20 per GB of disk per month, and has a daily backup kept for 7 days. Sign-up asks for a Brazilian CPF or CNPJ, a mobile number, and an address in Brazil, and CPU and memory metrics are available on plans from Premium up.
A practical rule helps: use the free plan to validate, and move to a paid plan before you charge your first customer. A daily backup kept for a week and an application that does not sleep are the minimum for anyone to depend on your product.
How do database backups work on each platform?
All four back up the database on paid plans, but in different ways, and only Supabase and Render offer point-in-time recovery. For an MVP, a daily backup kept for a week is usually enough. What changes from one platform to the next is who runs the restore and how much it costs.
On Zenifra, backups are automatic and included in the price, including the space they take. DB-Starter takes 1 backup a day, at 03:00 Brasília time, kept for 7 days. DB-Basic takes 2 a day, at 03:00 and 15:00, also kept for 7 days. Restores are still requested from support, by WhatsApp or email, and by default they go into a new project without touching the current database. There is no point-in-time recovery.
On Supabase, the Pro plan keeps daily backups for 7 days, and point-in-time recovery is an add-on of US$ 100 a month for each 7 days of retention, about R$ 569.38 with the exchange rate and IOF. The Free plan has no automatic backups.
On Render, paid databases have point-in-time recovery within the past 3 days on the Hobby workspace and within the past 7 days on Pro or higher. The free database has no recovery at all.
On Railway, the database is a service with a volume, and backups are volume backups. You create each one manually or schedule a daily routine, kept for 6 days, a weekly one, kept for 27 days, or a monthly one, kept for 89 days. They are billed as storage, by the incremental size of each copy.
# Export the whole database in pg_restore format
pg_dump --format=custom --no-owner --no-acl "$DATABASE_URL" > backup.dump
# Check that the file can be read
pg_restore --list backup.dump > /dev/null && echo "backup ok"Whichever platform you pick, also keep your own pg_dump export of the data you cannot lose, and test a restore from time to time. The platform’s backup protects you from accidental deletion and corrupted data. Your own copy protects you on the day you want to switch platforms or need an old record that has already left the retention window.
How much do the exchange rate and IOF change the bill in reais?
Enough to show up in an MVP budget. Every dollar bill paid with a Brazilian card carries the 3.5% IOF and the day’s exchange rate, with the bank’s spread, so the same usage costs a different amount in reais from one month to the next, with nothing changing in the application.
At the PTAX selling rate of November 6, 2026, R$ 5.5013, Render’s US$ 13 becomes R$ 74.02. If the dollar goes to R$ 6.00, the same bill becomes R$ 80.73. On Supabase Pro, US$ 25 becomes R$ 142.35 today. On Railway, besides the exchange rate, the dollar amount itself changes with the CPU used during the month, so there are two moving parts instead of one.
When you pay in reais, the plan price is the bill. On Zenifra, R$ 41.80 a month stays R$ 41.80 if the dollar rises, and topping up by PIX or boleto avoids relying on a card with an international limit, which many small companies do not have. CPF and CNPJ accounts work the same way, which helps anyone still validating the idea before opening a company.
Step by step: from the API on GitHub to a connected database
The path below follows the REST API with Express and PostgreSQL example in Zenifra’s documentation. On other platforms the field names change, but the order is the same: create the database, store the connection string in an environment variable, and publish the application from the repository.
Start with the code. The project needs a package.json with a start command and a committed package-lock.json, because Node.js builds on Zenifra install dependencies with npm ci, which requires that file. Run npm install on your machine and push the lockfile with the code. The application must listen on 0.0.0.0, not on localhost, and on the port you will enter in the Console.
After the code comes the Console. The steps below create the database first, because the application needs the connection string from its very first start:
- 1. In the Console, click Create project, choose PostgreSQL Database, and select the plan, for example DB-Starter. Both the user and the database are named app. Copy the connection string as soon as the project is created, because the full password only appears at that moment or after a rotation.
- 2. Connect GitHub to the organization if you have not yet, then click Create project again, this time choosing HTTP Application.
- 3. Under Project source, choose Git repository, with GitHub as the Git provider, and select the repository and the main branch.
- 4. Choose the Node.js runtime, version 24, leave the Build Command empty, and use
npm startas the Start Command. - 5. Enter 3000 in the Port field, the same port the application listens on.
- 6. Under Environment Variables, create
DATABASE_URLwith the connection string you copied in step 1. - 7. Set Deployment mode to Automatic by branch and click Create Project. From then on, every push to the branch publishes a new version.
- 8. Open the project URL on
*.clients.zenifra.comand test the/healthand/usersroutes. If something fails, Build logs show each command in the order it ran, with its output.
{
"name": "my-api",
"version": "1.0.0",
"scripts": {
"start": "node index.js"
},
"dependencies": {
"express": "^5.1.0",
"pg": "^8.16.0"
}
}const express = require("express");
const { Pool } = require("pg");
const app = express();
app.use(express.json());
// The Console URI already turns TLS on (sslmode=require): just pass it.
const pool = new Pool({ connectionString: process.env.DATABASE_URL, max: 5 });
app.get("/health", (req, res) => res.json({ status: "ok" }));
app.get("/users", async (req, res) => {
const { rows } = await pool.query("SELECT id, name, email FROM users ORDER BY id DESC");
res.json(rows);
});
async function start() {
await pool.query("CREATE TABLE IF NOT EXISTS users (id SERIAL PRIMARY KEY, name TEXT NOT NULL, email TEXT UNIQUE NOT NULL)");
const port = process.env.PORT || 3000;
app.listen(port, "0.0.0.0", () => console.log("API on port " + port));
}
start().catch((error) => {
console.error("Failed to start", error);
process.exit(1);
});Saving a variable restarts the instances but does not rebuild. For variables read at runtime, such as DATABASE_URL, that is enough, because the application reads the new value when it starts again. As the project grows, replace the CREATE TABLE at startup with a migration tool and run migrations in the start command, before the server comes up.
How do you connect Node.js to PostgreSQL with TLS?
Use the connection string the Console shows, unchanged. The Zenifra PostgreSQL URI ends with ?sslmode=require, which turns TLS on: password, queries, and data travel encrypted between the application and the database.
With the pg driver, node-postgres, just pass the URI as connectionString, as in the example above. The driver prints a warning about what sslmode=require means, but it connects with TLS. If you build the connection from separate host, port, user, and password, pg does not ask for TLS on its own and the database refuses the connection; in that case, pass ssl: true in the config or, better, use the URI.
With the postgres driver, postgres.js, and with Bun.sql, the Console URI also works unchanged. Do not use sslmode=disable to make the connection work: the database requires TLS by default and refuses unencrypted connections. Always use the host shown in the Console, which is the name the certificate was issued for.
Another thing to watch is the pool size. Each application instance opens its own pool, so the total number of connections is the pool size times the number of instances. With max: 5 on the Pool, three instances open at most 15 connections. On any platform, check the connection limit of the database plan before raising the pool, because an oversized pool exhausts the database before it exhausts the CPU.
# The public URI, as the Console shows it after creation
DATABASE_URL=postgresql://app:<password>@postgresql-<project-id>.managed.zenifra.com:<port>/app?sslmode=requireCan you keep the database off the internet?
Yes, and it is the recommended step once everything works. On Zenifra, you create a private connection on the organization’s connection map by dragging from the application’s connector to the database, then wait for the status to change from Preparing to Active.
Next, replace DATABASE_URL with the internal address shown on the map, in the <project>.<organization-id>.zenifra.local:5432 format, validate the connection, and turn off the Public access card when editing the database. From then on, the database accepts only the applications connected to it, and traffic between the two never crosses the internet.
Over the internal address, the connection is still encrypted, but the certificate belongs to the database’s public name, so the internal name is not verified. The private connections documentation explains how to configure TLS in that case, and the credentials stay the same. If the platform you choose has no private network between application and database, the minimum is to restrict public access and keep certificate validation on.
Common errors on the first deploy
Almost every failed first deploy of a Node.js API falls into one of these cases, and the logs show which one:
- The build stops at install because the repository has no package-lock.json.
npm cirequires the lockfile, so runnpm installlocally and commit the file. - The build passes, but the application does not respond. Usually the server is listening on localhost instead of 0.0.0.0, or on a port different from the one set in the Port field.
- The application starts and crashes right away with a database connection error. Check that
DATABASE_URLexists in the project and that the password was not rotated after you copied the URI. - The pg driver complains about a file called system (
ENOENT). That is the old Console URI, withsslrootcert=system: copy the URI again from the Console, which now ends with?sslmode=require. - The database refuses new connections when traffic grows. The pools of all instances together went past the plan’s limit, and the fix is to lower the pool’s
maxor move the database to a bigger plan. - You changed a variable used during the build and nothing happened. Variables baked into the build only show up after a new publication, which you start with New build in Build logs or with a new commit.
How much does it cost when the MVP becomes production?
It depends on how much traffic arrives and how well the product has to withstand failures. On Zenifra, the most common steps cost from R$ 42.00 to R$ 84.00 a month on the monthly plan, with 1 GB of disk per database instance.
| Scenario | Application | Database | Monthly price on Zenifra |
|---|---|---|---|
| MVP | 1 Basic instance (0.5 vCPU, 512 MB) | DB-Starter (0.3 vCPU, 256 MB) with 1 GB | R$ 42.00 |
| API with more memory | 1 Premium instance (1 vCPU, 1 GB) | DB-Starter with 1 GB | R$ 75.00 |
| Small business system | 1 Basic instance | DB-Basic (1 vCPU, 1 GB) with 1 GB | R$ 80.00 |
| Production with redundancy | 2 Basic instances | DB-Starter with 2 instances of 1 GB | R$ 84.00 |
The documentation recommends 2 or more instances of the application and the database for production, so one instance can fail or be updated without taking the service down. Paid PostgreSQL scales from one to six instances, and with replicas you also get a separate read address.
Premium also unlocks CPU and memory metrics and a healthcheck, which Basic does not have. For an MVP that can wait, but once the product has paying customers, seeing memory climb before the process crashes is worth the price difference.
Supabase or your own Node.js backend: which one for the MVP?
Choose Supabase if your MVP is mostly a front end that reads and writes data with access rules in the database, and you want authentication, file storage, and APIs generated from your tables without writing a backend. Choose your own Node.js backend if the business logic is yours: payment integrations, calculations, calls to other APIs, and scheduled tasks.
The two paths do not rule each other out. Many teams start with Supabase and, as the logic grows, put a Node.js API in front of the same PostgreSQL database. In that case, remember that Supabase does not run an always-on application, so the API goes to another platform, and the database and the application need to stay close. With Supabase in São Paulo and the API in Virginia, every query crosses the continent and comes back.
With your own backend, the database is a standard PostgreSQL, and authentication comes from a library or an external service. In return, leaving the platform is simple, because the application is an ordinary Node.js repository and the database leaves whole with pg_dump.
When another platform is the better choice
Not every MVP belongs in Brazil. If most of your users are in the United States or Europe, Render and Railway have regions there, and latency starts working in their favor. If the company already earns in dollars, exchange rate swings stop being a risk, because revenue and cost move together.
If traffic is very irregular, with whole days without visits, Railway’s usage-based model can come out cheaper than a fixed monthly plan. And if the product needs point-in-time recovery from day one, Supabase and Render already offer it on paid plans, while Zenifra restores from scheduled backups through support.
Finally, if the MVP is a front end with login and data, with no business logic on the server, Supabase delivers authentication and ready-made APIs that save weeks of development. In all of these cases, the questions stay the same: where the database runs, which currency the bill comes in, and what happens to the data on the free plan.
In short
For a Node.js and PostgreSQL MVP with users in Brazil, what matters most is keeping the application and the database in the same region, close to your users, with daily backups and a bill that does not move with the dollar. Render and Railway handle deploys well, but they run in the United States and bill in dollars. Supabase has a database in São Paulo, but the application needs another home, and the free plan pauses idle projects.
If you want to try the path in this guide, Zenifra bills the API and the PostgreSQL database by the hour, R$ 0.068 an hour for Basic with DB-Starter, plus disk, and the calculator shows what your scenario would cost in reais.