DEV Community

Alex Spinov
Alex Spinov

Posted on

PocketBase Has a Free API That Gives You a Backend in a Single Executable File

PocketBase is a backend in one file. SQLite database, auth, file storage, real-time subscriptions, admin UI — all in a 15MB executable. No dependencies.

Quick Start

# Download and run
./pocketbase serve
# Admin UI at http://127.0.0.1:8090/_/
# API at http://127.0.0.1:8090/api/
Enter fullscreen mode Exit fullscreen mode

JavaScript SDK

import PocketBase from 'pocketbase'

const pb = new PocketBase('http://127.0.0.1:8090')

// Auth
await pb.collection('users').authWithPassword('user@example.com', 'password')

// CRUD
const posts = await pb.collection('posts').getList(1, 20, { filter: 'published = true', sort: '-created' })
await pb.collection('posts').create({ title: 'New Post', content: 'Hello', published: true })

// Real-time
pb.collection('posts').subscribe('*', (e) => {
  console.log(e.action, e.record) // 'create' | 'update' | 'delete'
})
Enter fullscreen mode Exit fullscreen mode

Deploy

One file on any $5 VPS. No Docker, no Node, no database server.

scp pocketbase user@server:~/
ssh user@server "./pocketbase serve --http=0.0.0.0:8090"
Enter fullscreen mode Exit fullscreen mode

The Bottom Line

PocketBase is the simplest backend for side projects. One file, zero deps, real-time + auth + storage included.


Need to automate data collection or build custom scrapers? Check out my Apify actors for ready-made tools, or email spinov001@gmail.com for custom solutions.

Top comments (0)