DEV Community

Alex Spinov
Alex Spinov

Posted on

Every Free Database You Can Use in 2026 (With Setup Commands)

You don't need to pay for a database

I've used 15+ databases across side projects, client work, and production apps. Most of them have generous free tiers — and some are completely free forever.

Here's my complete list with the exact setup command for each one.


Relational Databases

1. PostgreSQL (Free Forever)

The gold standard. Powers Instagram, Spotify, and probably your favorite startup.

# Install
brew install postgresql@16  # macOS
sudo apt install postgresql  # Ubuntu

# Start & create database
pg_ctl start
createdb myapp
psql myapp -c "CREATE TABLE users (id SERIAL, name TEXT, email TEXT);"
Enter fullscreen mode Exit fullscreen mode

Best for: Everything. Seriously, start with Postgres unless you have a specific reason not to.


2. SQLite (Free Forever, Zero Setup)

A database in a single file. No server, no config, no process to manage.

# Already installed on macOS/Linux. Just:
sqlite3 myapp.db "CREATE TABLE logs (ts DATETIME, event TEXT, data JSON);"
Enter fullscreen mode Exit fullscreen mode
import sqlite3
conn = sqlite3.connect('myapp.db')
conn.execute('INSERT INTO logs VALUES (datetime("now"), "signup", \'{}\'')
Enter fullscreen mode Exit fullscreen mode

Best for: Prototypes, CLIs, mobile apps, embedded systems, any app with <1M rows.


3. MySQL (Free Forever)

brew install mysql
mysql_secure_installation
mysql -e "CREATE DATABASE myapp;"
Enter fullscreen mode Exit fullscreen mode

Best for: WordPress, legacy apps, or when the team already knows MySQL.


4. Neon (Free Tier: 0.5GB, 1 project)

Serverless Postgres. Branches like Git. Perfect for dev environments.

# Sign up at neon.tech, then:
pip install psycopg2-binary
python3 -c "import psycopg2; conn=psycopg2.connect('postgres://user:pass@ep-xxx.neon.tech/mydb'); print('Connected!')"
Enter fullscreen mode Exit fullscreen mode

Best for: Side projects that need Postgres without managing a server.


5. PlanetScale (Free Tier: 1 database, 1B row reads/mo)

MySQL-compatible, serverless, with branching.

# Install CLI
brew install planetscale/tap/pscale
pscale auth login
pscale database create myapp --region us-east
Enter fullscreen mode Exit fullscreen mode

Best for: Apps that need MySQL with horizontal scaling.


Document Databases

6. MongoDB Atlas (Free Tier: 512MB)

# Install mongosh
brew install mongosh
# Connect to Atlas free cluster
mongosh "mongodb+srv://user:pass@cluster0.xxx.mongodb.net/mydb"
Enter fullscreen mode Exit fullscreen mode
db.users.insertOne({name: "Alex", skills: ["Python", "scraping"]})
db.users.find({skills: "Python"})
Enter fullscreen mode Exit fullscreen mode

Best for: Flexible schemas, rapid prototyping, when your data doesn't fit tables.


7. CouchDB (Free Forever)

Sync-first database. Built-in replication.

brew install couchdb
curl -X PUT http://localhost:5984/mydb
curl -X POST http://localhost:5984/mydb -H "Content-Type: application/json" -d '{"name":"test"}'
Enter fullscreen mode Exit fullscreen mode

Best for: Offline-first apps, mobile sync, IoT.


Key-Value / Cache

8. Redis (Free Forever)

In-memory data store. Sub-millisecond reads.

brew install redis
redis-server --daemonize yes
redis-cli SET user:1:name "Alex"
redis-cli GET user:1:name
Enter fullscreen mode Exit fullscreen mode

Best for: Caching, sessions, rate limiting, pub/sub, queues.


9. Upstash Redis (Free Tier: 10K commands/day)

Serverless Redis with a REST API. No connection management.

curl -X POST https://your-endpoint.upstash.io/set/greeting/hello \
  -H "Authorization: Bearer YOUR_TOKEN"
Enter fullscreen mode Exit fullscreen mode

Best for: Edge functions, serverless apps, Vercel/Cloudflare Workers.


Search Engines

10. Meilisearch (Free Forever)

Blazing fast full-text search. 100x easier than Elasticsearch.

curl -L https://install.meilisearch.com | sh
./meilisearch --master-key=YOUR_KEY

# Add documents
curl -X POST 'http://localhost:7700/indexes/products/documents' \
  -H 'Content-Type: application/json' \
  -d '[{"id":1,"name":"Python Automation Toolkit","price":29}]'
Enter fullscreen mode Exit fullscreen mode

Best for: Product search, documentation search, autocomplete.


11. Typesense (Free Forever)

docker run -p 8108:8108 typesense/typesense:0.25.2 \
  --data-dir /data --api-key=YOUR_KEY
Enter fullscreen mode Exit fullscreen mode

Best for: Typo-tolerant search, e-commerce filtering.


Time Series

12. InfluxDB (Free Forever, OSS)

brew install influxdb
influx setup --username admin --password password123 --org myorg --bucket metrics
Enter fullscreen mode Exit fullscreen mode

Best for: Metrics, monitoring, IoT sensor data.


Graph Databases

13. Neo4j (Free Community Edition)

brew install neo4j
neo4j start
# Open http://localhost:7474
cypher-shell -u neo4j -p password "CREATE (a:Person {name:'Alex'})-[:KNOWS]->(b:Person {name:'Bob'})"
Enter fullscreen mode Exit fullscreen mode

Best for: Social networks, recommendation engines, knowledge graphs.


Vector Databases (for AI/LLM apps)

14. ChromaDB (Free Forever)

pip install chromadb
Enter fullscreen mode Exit fullscreen mode
import chromadb
client = chromadb.Client()
col = client.create_collection('docs')
col.add(documents=['Python is great', 'Redis is fast'], ids=['1','2'])
results = col.query(query_texts=['best language'], n_results=1)
print(results)
Enter fullscreen mode Exit fullscreen mode

Best for: RAG apps, semantic search, LLM memory.


15. Qdrant (Free Forever, self-hosted)

docker run -p 6333:6333 qdrant/qdrant
Enter fullscreen mode Exit fullscreen mode

Best for: Production vector search, high-performance similarity matching.


My recommendation

For 90% of projects: SQLite for prototyping → PostgreSQL for production → Redis for caching → ChromaDB if you need AI/vector search.

That stack handles everything from a weekend hack to a million-user app.


I've built data tools and pipelines for 3 years, including 77 scrapers on Apify and 290+ repos on GitHub.

What database do you use for side projects? I'm always curious what people choose when they're not constrained by corporate decisions.


Building something and need help with data infrastructure? Let's talk.


More from me: 10 Dev Tools I Use Daily | 77 Scrapers on a Schedule | 150+ Free APIs

Top comments (0)