How to setup Pocketbase on Debian 11/10/9 (with proxy)

In this post I'm going to share with you, how to setup Pocketbase on the latest Debian versions.


Pocketbase is a simple Firebase and Stripe alternative, you can use for your side project, side hustle etc. You can access your data over an API or using the JS or Flutter SDK.

Download

First, you'll want to copy the link to the latest release for Linux, at the time of writing: v0.14.1.
But by the time you read this, there'll probably be a more recent version, so go check here and copy the most recent version.

Installation

Then log into your server using ssh.

Run the command:

wget <your link>
Shell command for downloading the zip folder

Unzip the folder using unzip (or someother tool):

sudo apt-get install unzip

unzip <zip folder>
Shell commands for installing and using unzip

Now enter the directory:

cd <pocketbase folder>
Shell commands for entering the pocketbase folder

Start the server:

./pocketbase serve
Shell commands for starting the server

And that's it! Your server will be running using the following routes:

  • http://<server domain>:8090/_/ - Admin Panel
  • http://<server domain>:8090/api/ - API

Further setup - SSL, Proxying

You might have noticed, that your server is using http not https. This is because it's missing a SSL certificate. If you want to actually use the api on your website, you're going to get an error, because most modern browsers don't allow you accessing http content on an https site.

So if you want a SSL certificate for your Pocketbase server you're going to have to setup a reverse proxy using nginx, apache, etc.

Then generate an SSL certificate for that subdomain or suburl using Let's Encrypt. Here's my tutorial for that.


If I have helped you, consider signing up for free to get access to all my guides and my newsletter.

💪
Consider signing up for free to get access to all my guides and my newsletter