Press enter or click to view image in full size
Hi, I’m Simi, the author of Silobase.
Silobase is an open-source backend-as-a-service (BaaS), similar to Supabase or Firebase — but without vendor lock-in. Instead of being tied to Postgres (Supabase) or a proprietary database (Firebase), Silobase lets you bring your own database.
With just a package.json and a .env file, you can spin up a REST API on top of your database in minutes. In this tutorial, I’ll show you how to:
- Set up a Postgres database on Render
2. Deploy Silobase as your backend on Render
3. Test the API with sample requests
1. Set up your database
Create a database on Render
Head to Render’s dashboard and create a new Postgres database.
Save the credentials (database URL, username, password, host, and port) — you’ll need them later.
Create tables
Unlike Firebase or Supabase, where you log into a web UI to create tables, with Silobase you control your own database schema.
Connect to your Render Postgres database with a tool like DBeaver or PgAdmin, then run this SQL to create a users table:
CREATE TABLE users (id SERIAL PRIMARY KEY,
username VARCHAR(50) UNIQUE NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
password_hash TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
If you already have existing tables, you can skip this step.
2. Set up Silobase locally
First, create a new GitHub repository and add a package.json like this:
{"name": "silobase-app",
"version": "1.0.0",
"description": "Silobase deployment on Render",
"scripts": {
"start": "silobase start"
},
"dependencies": {
"silobase": "1.0.0"
},
"engines": {
"node": ">=18"
}
}
Install dependencies and start the backend locally:
npm install && npm startYou should see logs confirming the server is running:
> [email protected] start> silobase start
Server running on port 3000
Server listening at http://127.0.0.1:3000
3. Deploy Silobase on Render
Create a new Render service
- Link your GitHub repository
- Set the Build Command: npm build
- Set the Start Command: npm start
Configure environment variables
Add a .env file to store your DB connection and API keys. Example:
DB_CLIENT=pgDB_HOST=your-db-host
DB_USER=youruser
DB_PASSWORD=yourpassword
DB_PORT=5432
DB_NAME=yourdbname
API_KEY_READ=read_key
API_KEY_WRITE=write_key
API_KEY_FULL=admin_key
MASK_FIELDS=password,ssn
- Fill in the DB credentials from your Render database
- Generate secure API keys (you can use an online MD5/UUID generator)
- Add any sensitive fields you want masked in API responses
Click Deploy Web Service and wait for Render to build and launch your backend.
4. Test your API
Once deployed, Render will give you a URL like:
https://silobase-demo.onrender.com/Now you can query your database through Silobase. For example, to fetch all users with your read-only API key:
curl --location 'https://silobase-demo.onrender.com/rest/v1/users' \--header 'x-api-key: <API_KEY_READ>'
Sample response:
{"status": "success",
"data": {
"count": 5,
"rows": [
{
"id": 1,
"username": "alice",
"email": "[email protected]",
"password_hash": "******",
"created_at": "2025-10-01T19:37:41.290Z",
"updated_at": "2025-10-01T19:37:41.290Z"
},
{
"id": 2,
"username": "bob",
"email": "[email protected]",
"password_hash": "******",
"created_at": "2025-10-01T19:37:41.290Z",
"updated_at": "2025-10-01T19:37:41.290Z"
}
]
},
"code": 200
}
Notice how password_hash is automatically masked—Silobase ensures sensitive fields don’t leak through your API. You can configure additional fields to mask via the .env file:
MASK_FIELDS=password,emailThat’s it!
In just a few steps, you’ve:
- Created a Postgres database on Render
- Deployed Silobase as your backend API
- Queried your database securely with API keys and field masking
With Silobase, deploying a backend API is as simple as writing a package.json and a .env file. No boilerplate code, no custom backend, no vendor lock-in. Just your database + Silobase = production-ready API.