How to Host Pocketbase on Your Webdock Server

Last updated: January 29th 2025

Introduction

Building a robust, fully-functional backend is no small feat. This is why many solo developers and small companies lean into serverless solutions like Firebase or Supabase. But what if you could self-host your own backend with similar ease? Enter PocketBase—a 14MB executable that packs everything you need into a single file:

  • Authentication (users, OAuth, tokens)
  • Database (SQLite-based with schema builder)
  • Realtime subscriptions
  • Rate limiting (built-in protection)
  • Cron jobs (scheduled tasks)
  • Email sending (SMTP integration)
  • Database events (hooks like beforeInsertafterUpdate)
  • File storage (uploads and management)
  • Admin dashboard (GUI for managing data)
  • Frontend JavaScript SDK

Prerequisites

  • A running Webdock server (using a distro of your choice)
  • SSH access to your server

Why PocketBase Shines

There are other solutions, as mentioned, like Firebase or Supabase, but here's why Pocketbase shines more.

  • Self-Hosted Freedom: Avoid vendor lock-in. Host it on your server, Raspberry Pi, or even a $5 VPS.
  • Zero Bloat: No complicated setup—just a single binary.
  • Extensible: Add custom logic with JavaScript hooks (e.g., validate data before saving).
  • Cost-Effective: Free and open-source (MIT license).

Now that you know the pro's, let's get started with setting it up.

Setting Up PocketBase

First, download the latest release from PocketBase’s GitHub repo.

Next, unzip the file.

$ unzip pocketbase_0.24.4_linux_amd64.zip -d ./pocketbase

The name of the zip file may change so modify the command accordingly. If you do not have unzip installed, install it with the distro package manager (with apt, yum, etc)

Now, navigate to the folder and make the pocketbase binary executable.

$ cd ./pocketbase
$ chmod +x ./pocketbase

Finally, run the executable.

$ ./pocketbase serve --http 'IP:8090'  # Starts the server

In the above command, replace the IP with your server's public IP. You'll have to open port 8090 in your firewall if you have installed one on your server.

You'll see something like this:

root@pocketbase:~# ./pocketbase serve --http '45.136.71.144:8090'
2025/01/29 09:05:54 Server started at http://45.136.71.144:8090
├─ REST API:  http://45.136.71.144:8090/api/
└─ Dashboard: http://45.136.71.144:8090/_/

Now, visit the Admin UI to create collections, manage users, and configure settings. Your backend is ready! 🚀

For more information and configuration options head over to Pocketbase documentation

A Word of Caution ⚠️

PocketBase is a side project developed by a solo maintainer. While it’s stable, backward compatibility isn’t guaranteed until v1.0.0. If you’re comfortable checking changelogs and handling occasional manual migrations, dive in. For mission-critical apps, you might wait for a stable release.

Conclusion

This article outlined steps on setting up Pocketbase on your server. Should you need any assistance with this article, contact Webdock Support

This article was written by Ahmad AdelAhmad is a freelance writer and also a backend developer.

Related articles