DEV Community

Cover image for Introduction & Setup PocketBase
Jannis
Jannis

Posted on • Edited on • Originally published at Medium

3

Introduction & Setup PocketBase

Today we are going to dive into PocketBase and set it up!

💡 What's PocketBase?

PocketBase is an open-source Backend-as-a-service (BaaS). It offers all necessary needed features like authentication, file storage, realtime database and web dashboard.

PocketBase uses an SQLite Database behind the scene and is written in Go. They offer an awesome JavaScript/Go SDK and you can even extend it by using it as a Go Framework.

You are able to configure permission rules, OAuth2, external file storage (S3) and mail (SMTP).

PocketBase
PocketBase Demo:

 🛠️ Setup Pocketbase

The setup of Pocketbase is so easy it takes less than 1 minute to be able to start using it!

Download & extract

Download the archive from the documentation that's correct for you operating system. Now move it in the root folder in your project.

Archive in root folder

Next extract the archive and you should be left with a folder which contains an executable (pocketbase).

Extracted Archive

Start Pocketbase

Move into this directory and run the ./pocketbase serve command.



cd ./<directory

./pocketbase serve


Enter fullscreen mode Exit fullscreen mode

Terminal with commands to start PocketBase

And you are all set up! Visit the Admin UI page to setup your admin account and start using PocketBase!

🐳 Setup via docker-compose

In the favor of many developers there's a way to set it up via Docker as well.

Repo: https://github.com/muchobien/pocketbase-docker

Even easier than above you just add the pocketbase to your docker-compose.yml file like that:



version: "3.7"
services:
  pocketbase:
    image: ghcr.io/muchobien/pocketbase:latest
    container_name: pocketbase
    restart: unless-stopped
    command:
      - --encryptionEnv #optional
      - ENCRYPTION #optional
    environment:
      ENCRYPTION: example #optional
    ports:
      - "8090:8090"
    volumes:
      - /path/to/data:/pb_data
      - /path/to/public:/pb_public #optional


Enter fullscreen mode Exit fullscreen mode

After starting your docker stack it automatically installs and sets up PocketBase and you're instantly ready to start working!

Thanks for reading!
Support me

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay