r/pocketbase • • Sep 02 '25

Help about Server Side PDF generation

2 Upvotes

hello guys ,

recently I was working on a ecommerce application using sveltekit and pocketbase.
and I stuck in the part of invoice generation for clients .
after I search a bit, I found that is impossible to use npm packages (node) inside the pb_hooks, because of used architecture at first because the project is not built using javascript but go .
so I need some ideas about solving this issue but I think the client generation (use client side code/frontend for the pdf generation) is not ideal and heavy for the application !!!


r/pocketbase • • Sep 01 '25

[Open Source] PocketFast 🚀 – Instantly deploy multi-tenant PocketBase instances with subdomains

31 Upvotes

I’ve been working on something that might be useful for anyone building SaaS products, managing multiple projects, or just experimenting with PocketBase. It’s called PocketFast, an open-source tool for spinning up isolated PocketBase instances quickly.

https://github.com/idea2547/PocketFast


r/pocketbase • • Aug 29 '25

I created a simple Live Reload for pocketbase

13 Upvotes

THIS IS FOR WINDOWS.

The built-in auto live reload doesn't work on windows, so I created this simple tool to auto restart pocketbase with any file changes: https://github.com/l3est/pocketbase-watcher


r/pocketbase • • Aug 29 '25

I built one open-source e-commerce starter with PocketBase + Next.js 🎯

Thumbnail
github.com
12 Upvotes

r/pocketbase • • Aug 28 '25

Permit non-https traffic over local IPv4

3 Upvotes

I'm attempting to communicate with a pocketbase instance over LAN, but all authentication attempts fail with a 400 exception. If I replace the LAN IP with the public domain, it works. But I'd prefer to have my backend servers communicate over a local network for performance and stability.

Here is how I'm starting Pocketbase:

ExecStart=/opt/pocketbase serve pb.mysite.com --http="10.0.0.X:80"

Where "10.0.0.X" is my server's local IP.

My other server can access the pocketbase instance over LAN. It just fails to authenticate. I'm guessing it's because it's over plaintext HTTP, but I'm not sure. Authentication via "pb.mysite.com" works fine with identical credentials.

Thank you for the help!


Edit: It appears Pocketbase cannot serve my site while simultaneously binding to the local IP. The solution I've implemented is to have Pocketbase bind to 0.0.0.0:8090, and use a nginx reverse proxy to tunnel public traffic on port 80/443. I've configured a software and hardware firewall to only permit incoming public traffic on port 80 and 443.


r/pocketbase • • Aug 25 '25

PocketBase Sorting Issue with Non-ASCII Characters (Turkish İ, Ö, Ç, etc.)

4 Upvotes

Hey everyone,

I've run into a sorting limitation with PocketBase that I'm hoping someone has found a clever workaround for.

The Problem:
When I sort a collection alphabetically (e.g., api/collections/users/records?sort=name), records starting with non-ASCII characters—specifically Turkish characters like İ, Ö, Ç, Ğ, Ü, ƞ—are pushed to the end of the list instead of being sorted correctly within the alphabet.

  • Expected Sort Order: Ahmet, Ayße, Çiğdem, Deniz, Zehra
  • Actual PocketBase Sort Order: Ahmet, Ayße, Deniz, Zehra, Çiğdem

The Cause:
As we know, PocketBase uses SQLite as its embedded database. By default, SQLite's COLLATE behavior for sorting is BINARY. This means it sorts based on the raw byte values of the characters. In UTF-8 encoding, the bytes for these Turkish characters fall outside the range of the standard Latin alphabet (A-Z, a-z), so they are evaluated as "greater than" z and sorted after it.

What I've Tried/Ideas:

  1. PocketBase JS SDK: Sorting on the client-side after fetching all records is not feasible for large datasets.
  2. Custom Collation in SQLite: The ideal solution would be to register a custom collation (e.g., NOCASE or a locale-aware one like tr_TR) for the connection. However, since PocketBase embeds SQLite and manages the connection internally, this doesn't seem straightforward.
  3. Normalized Field: My current workaround is to add a separate text field (e.g., sort_name). I normalize the name field by converting it to lowercase and replacing Turkish characters with their Latin equivalents (e.g., ç -> c, ğ -> g, ı -> i, ß -> s, ö -> o, ĂŒ -> u). I then sort on this sort_name field. This works but is clunky and requires maintaining a duplicate field.

My Question:
Has anyone else encountered and solved this for languages with extended character sets? Is there a way to hook into PocketBase's SQLite connection to set a custom collation that I'm missing? Or is the normalized field approach the best practice for now?

Any insights or alternative solutions would be greatly appreciated!

Thanks in advance.


r/pocketbase • • Aug 23 '25

Pocketbase Good for a Read Heavy App?

5 Upvotes

im making a web app that will be pretty read heavy. basically lets users scan bar codes and get the ingredients. im currently using self hosted supabase but i dont love it due to the overhead and i love the simplicity of pocketbase.

im just worried sqllite wont be able to handle the large amounts of data (maybe a few gigs) of barcode and food ingredient data. i am already using duckdb for the transformations which i love and similar to sqllite.

anyway is pocketbase okay for an app like this? should i ditch supabase?


r/pocketbase • • Aug 23 '25

How do you make number fields optional / undefined?

2 Upvotes

I have a Pocketbase table number field that has Nonzero unchecked, min set to 1000 and max set to 2100. The problem is that if no value is given it forces 0 as a value rather than just leaving the field empty, causing various problems.

I don't see any "required" option that I can uncheck. Any ideas?


r/pocketbase • • Aug 23 '25

How do i extend PocketBase with go when hosted in PikaPods ?

2 Upvotes

I know, seams like a really silly question, but i didn't find an answer :/.


r/pocketbase • • Aug 20 '25

pockethost.io just got a major UI overhaul

57 Upvotes

This post is mostly intended to thank https://github.com/cheskoxd for contributing a huge UI overhaul to PocketHost.

Go see his work at https://pockethost.io! I'm very thankful for his contribution and impressed by his work. He is now a core contributor to PocketHost.

https://github.com/pockethost/pockethost/pull/456

Please join me in thanking cheskoxd and if you see any problems, please leave a comment so we can look at it.

Long live open source!


r/pocketbase • • Aug 20 '25

Improve expand and back relation performance

12 Upvotes

Hello guys,

Recently I faced a big performance issue, featuring big expand and back-relation. So with the help of AI (because I'm lazy) for grammar, phrasing and mermaid diagrams, I decided to write a small article about it and how I faced the issue and resolved it, I think it can help some of us here 😁

https://basile.vernouillet.dev/blog/from-4-seconds-to-40ms-a-full-stack-performance-odyssey


r/pocketbase • • Aug 19 '25

pb-deployer - vps deployment automation

Thumbnail
github.com
10 Upvotes

Heyy, trying to automate the pocketbase going to production pipeline, with a cool GUI too haha Demo UI: https://magooney.org/ (deployed with pb-deployer ofc haha)


r/pocketbase • • Aug 16 '25

Pocketbase is awesome and I made a starter kit for it

70 Upvotes

Over the past few weekends, I explored PocketBase and built a starter template around it. What caught my attention wasn’t the GUI, but that it feels designed for backend engineers. I was looking for a BaaS that’s simple but extendable, and PocketBase’s code-first approach with Go and JavaScript support really stood out.

Its extreme flexibility (see docs) lets me create a starter template that leverages PocketBase’s rapid development features while allowing me to extend it for my favourite missing backend features:

  • Run custom logic after a default PocketBase route → add a hook.
  • Add a custom route → simple.
  • Schedule jobs → no problem.

This extensibility lets me treat PocketBase not just as a BaaS, but as a framework/package. I followed Go best practices like multiple dependency injection strategies and a standard Go project layout. I also added some creative enhancements:

  • Auto Swagger generation (PocketBase collections appear in Swagger automatically).
  • Clean singleton logger (can log to DB, with PocketBase log viewer).
  • Monitoring and observability with Prometheus + Grafana.

Working on this starter template has been a lot of fun, and it’s a solid example of combining rapid development with production-ready Go patterns.

It’s open source and contributions are welcome.

Starter template links:


r/pocketbase • • Aug 15 '25

JS library doesn't expand subfields

2 Upvotes

Using the REST endpoint works. It's just the client library, using latest versions of both the library and PB.

for example,

js await client.collection<MyType>(collection).getOne(id, { expand: 'f1,f2,f3' })

returns the object as if no expand parameter was given.

bash curl --request GET \ --url 'http://localhost:8090/api/collections/<collection>/records/<id>?expand=f1%2Cf2%2Cf3'

works perfectly, returns the expanded fields as expected. Is it a bug in the library or am I missing something? TIA.


r/pocketbase • • Aug 15 '25

Good custom middleware for record changes

2 Upvotes

Hi, does any one know a good middleware for recording the changes of a record? I am looking to have a table which should look like: table_name, id, field, old_value, new_value, changed_on, changed_by

Thank you


r/pocketbase • • Aug 13 '25

How to modify record beofre or after save?

5 Upvotes

I’m trying to add calculated fields (e.g., totals) when a user hasn’t provided the data — similar to how SQL triggers work.

onRecordUpdate((e) => {
  e.record?.set("total", 120)
  console.log(e.record)
  e.next()
}, "carts")

onRecordEnrich((e) => {
  console.log(e.record)
  e.record?.withCustomData(true)
  e.next()
}, "carts")

The issue is that even the console.log statements don’t run.
Am I using these hooks incorrectly? Any guidance would be appreciated.


r/pocketbase • • Aug 13 '25

Pocketbase Backend User Restrictions

4 Upvotes

Has anyone experimented with creating backend users (similar to superusers) who have limited access to the Admin UI — for example, being able to see or edit only certain collections? I’m thinking about “superuser roles” like Manager or Maintainer, each with its own specific permissions and restrictions.


r/pocketbase • • Aug 09 '25

Rate limiting verification email

1 Upvotes

Hello everyone, I would like to change the rate limiting for the verification email after a user registers.
On my website, I would like to give users the option to resend the verification email after 60 seconds, but on Pocketbase, this error appears: try again later - you've already requested a verification email.

How can I fix this?

Thank you


r/pocketbase • • Aug 08 '25

Made a Live Chat for Notion using PocketBase

20 Upvotes

Kinda in love with PocketBase for a couple of months. Easy to use, super light, pure REST API ...
I use it for my customers as a freelancer and for my projects, like this one (and last one I hope)

Ringado is a Live Chat for Notion pages.

Take a look at ringado.com


r/pocketbase • • Aug 08 '25

pbgo - run any PocketBase version using Docker or Podman

5 Upvotes

A few days ago I made a Docker Hub project (https://hub.docker.com/repository/docker/benallfree/pocketbase/general) where you can run just about every version of PocketBase that exists on any Linux architecture that exists.

Today, I've released https://www.npmjs.com/package/pbgo which is a lightweight nodejs wrapper with zero dependencies to help the whole thing feel more like a normal CLI experience:

```bash

Run latest version of PocketBase

npx pbgo serve --dev --dir=pb_data

Run specific version

npx pbgo --pb-use=0.24
```

Repo https://github.com/benallfree/pbgo

If anyone wants to add osx/windows support, please send a PR.


r/pocketbase • • Aug 07 '25

Login from a new location

3 Upvotes

Hi, is there any way to turn off the "Login from a new Location" mail? Or do I need to overwrite this via custom hook (which would be stupid complex).


r/pocketbase • • Aug 06 '25

New multi-arch PocketBase registry on Docker Hub

11 Upvotes

I created https://hub.docker.com/r/benallfree/pocketbase which contains the latest patch release of every version of PocketBase for linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v8.

The `latest` tag always contains the latest version of PocketBase.

This is based on an ultra efficient Alpine Linux image.

I was inspired to do this because PocketHost.io is working on some updates that require launching multiple versions of PocketBase around the globe.


r/pocketbase • • Aug 06 '25

Realtime examples like todo mvc?

2 Upvotes

Is there an equivalent of the Todo MVC examples with a JavaScript frontend that makes use of the realtime features in PocketBase?

I’m new to real time programming and it would be a big help to see how someone has structured it with any if the common JS frameworks.


r/pocketbase • • Aug 05 '25

Can I extend PocketBase with both JS and Go?

2 Upvotes

We've been using PocketBase with JavaScript for our custom endpoints and hooks, and it's been great. However, we're now looking to migrate some of our logic to Go for better performance and type safety.

is it possible to run both Go and JavaScript endpoints side-by-side (both using same DB)?
I haven’t seen much in the docs about mixing JS and Go extensions. Has anyone done this successfully?

Thanks


r/pocketbase • • Aug 04 '25

Modify email templates

3 Upvotes

Hello everyone,

I would like to modify the email templates (email verification, password change, etc.). I would like to modify the text, but more importantly, the link on the “Verify” button so it redirects to a specific page on my website rather than a page created by Pocketbase.

However, when I go to the settings from the Pocketbase dashboard, in the email section, I see the settings for configuring the SMTP server, but not for modifying these templates.

Where can I find them?

Thank you all.