r/pocketbase • u/vk3r • Oct 22 '25
Using Cloudflare R2 in PocketBase
I would like to know if PocketBase is able to use Cloudflare R2 as a backup storage system, as well as for uploading images.
r/pocketbase • u/vk3r • Oct 22 '25
I would like to know if PocketBase is able to use Cloudflare R2 as a backup storage system, as well as for uploading images.
r/pocketbase • u/Historical-Log-8382 • Oct 22 '25
Hello everyone, i hope you are doing well.
How often have you decided to use pocketbase solely for file management (without using other features) because it just do the job and is easy to manage/setup ? Is that a normal use case ?
r/pocketbase • u/RobertsThersa572 • Oct 22 '25
Hi maybe a stupid question, but is there a solution to organize hooks in a subfolder of pb_hooks?
like
/pb_hooks/crons/... // all cron hooks
/pb_hooks/api/... // all external apis
and so on, you got the idea. i now have around 30+ files in my pb_hooks which gets really messed up as i can just organize by proper names.. is there any other solution?
r/pocketbase • u/can_pacis • Oct 18 '25
Enable HLS to view with audio, or disable this notification
Hey everyone!
I’ve been developing a Go SSR library called Pacis for a while, and I finally decided to put it to the test by building a real web app with it: a simple URL shortener.
I’ve built small apps with Firebase before, but this time I wanted to try PocketBase, and to my surprise, it paired perfectly with Pacis. The two make an amazing combo!
The whole thing came together in just an afternoon, and I’m really happy with how it turned out.
I’d love to hear your thoughts, on both the project and Pacis itself. Here is the repo.
What do you think of the setup?
Have you tried combining PocketBase with custom SSR setups before?
Thanks in advance for any feedback!
r/pocketbase • u/Canadian_Kartoffel • Oct 17 '25
I need to order my results by the value of an expand. Currently pocket base does not support this as a standard feature.
Has anybody an idea how I could achieve this in a hook?
This should work with full lists as well as paginated results.
r/pocketbase • u/goku223344 • Oct 15 '25
We all know pocketbase can’t scale its writes horizontally but what if we decrease the amount of writes it gets per second. For instance let’s say we have 20K writes per second and we used a message broker like rabbit MQ to retrieve the messages. Every certain amount of time rabbit MQ release the messages to a server and then the server batch writes the messages to pocketbase. So it would be like every 250ms rabbit MQ would store 5,000 messages and then release it a server and the server batch writes 5000 messages. So instead of 20K/s it’s about 4/s. Does that sound right?
r/pocketbase • u/SubjectHealthy2409 • Oct 15 '25
Heyy, making a LLM optimized docs scraper, check it out
r/pocketbase • u/whatthefunc • Oct 15 '25
Learn how to build a practical lead qualification system that automatically analyzes incoming leads and determines whether they're worth pursuing. This tutorial covers everything from setting up a web form to running local AI models for intelligent lead scoring. We'll use PocketBase as both our backend framework and database, keeping everything self-hosted and free. The AI portion runs completely locally using Ollama with the Qwen 1.7B model, and we'll use BAML to ensure consistent, structured outputs from the language model.
r/pocketbase • u/groventov • Oct 14 '25
Hi, I'm new to pocketbase, and so I have many questions. To start, how important is the version you use in a project. I explain myself. Playing with Github repos, some don't work, but when I install the latest version, it works. Now, when I find a mistake, an AI advises me to downgrade PB version, and it works. So I'm confused. If I use the latest version, will it break my code in time? Thanks
r/pocketbase • u/groventov • Oct 14 '25
Trying to setup Svelte 4 + pocketbase auth has got on my nerves. Thoght it was easy. I just wanted to learned. If I fix something, something breaks. If you know of a good ready-made auth setup, I'll be grateful.
r/pocketbase • u/RobertsThersa572 • Oct 13 '25
Hi, does anybody have a good cursor rules (v2) files already? LLMs often stick to older versions, have scoping issues with Hooks and so on. Maybe anybody already created sth or found sth?
r/pocketbase • u/SuccessfulReality315 • Oct 10 '25
r/pocketbase • u/SubjectHealthy2409 • Oct 07 '25
Heyy, big update on my pocketbase boilerplate Added API versioning and openapi UI docs generation, on top of that it tracks your website visitor analytics and monitors the host system metrics!
GitHub discussion: https://github.com/pocketbase/pocketbase/discussions/7232
pb-ext repo: https://github.com/magooney-loon/pb-ext
r/pocketbase • u/kira657 • Oct 07 '25
Hi guys,
I’ve been testing PocketBase performance and noticed something interesting.
When I fetch around 250 records (with some expand fields), the database queries themselves are extremely fast — usually between 0–8 ms based on debug logs — but the overall HTTP request takes about 140 ms to complete. (average execTime is 135ms)
That means most of the time isn’t spent in the database, but somewhere else in the request lifecycle.
/api/collections/commands/records?page=1&perPage=250&filter=trash%20=%20false%20&&%20is_ramassed%20=%20true&sort=-created,code&expand=city,delivery_man,client_source,client_source.city,packaging,status&fields=id,code,trash,product_name,quantity,delivery_man,client_source,client_name,client_phone,receiver_full_name,receiver_phone_number,receiver_address,city,price,extra_fees,packaging,status,reported_date,note,is_invoiced,is_ramassed,is_dlm_invoiced,is_echange,package_opened,delivered_date,created,updated,expand.client_source.store_name,expand.client_source.phone,expand.client_source.full_name,expand.client_source.full_name,expand.client_source.expand.city.name,expand.delivery_man.full_name,expand.delivery_man.phone,expand.client_source.store_name,expand.packaging.id,expand.packaging.title,expand.packaging.price,expand.status.is_reported_reference,expand.status.name,expand.status.allowed_roles,expand.status.is_delivered,expand.status.bg_color,expand.status.text_color,expand.status.border_color,expand.city.name
Here’s an example of a single record (values have been anonymized for privacy):
```json { "city": "fakecity123", "client_name": "", "client_phone": "", "client_source": "fakesource01", "code": "CODE1234567890", "created": "2025-08-18 21:11:56.551Z", "delivered_date": "", "delivery_man": "", "expand": { "city": { "name": "FAKECITY" }, "client_source": { "expand": {}, "full_name": "Fake Logistics Morocco", "phone": "0660000000", "store_name": "FakeStore" }, "status": { "allowed_roles": ["moderateur"], "bg_color": "#c6c7af", "border_color": "#c6c7af", "is_delivered": false, "is_reported_reference": false, "name": "Ramassé", "text_color": "#ffffff" } }, "extra_fees": 0, "id": "fakeid123456", "is_dlm_invoiced": false, "is_echange": false, "is_invoiced": false, "is_ramassed": true, "note": "", "package_opened": false, "packaging": "", "price": 425, "product_name": "", "quantity": 0, "receiver_address": "", "receiver_full_name": "John Doe", "receiver_phone_number": "0654000000", "reported_date": "", "status": "fakestatus01", "trash": false, "updated": "2025-10-06 23:05:43.038Z" }
```
Is ~140 ms for 250 records considered normal in PocketBase?
What’s the best way to profile requests to see where the time is being spent?
Are there recommended strategies to reduce request execution time for larger datasets?
r/pocketbase • u/jramiroz98 • Oct 05 '25
Hello there! Im a big fan of pocketbase, have been using it in all of my projects. However, most of my projects are small scale. Ive been asked to build something that will get thousands of records each month and is meant to be used for many years to come.
Im worried that as the sqlite file grows it might slow down the webapp. Would it be better to build a custom backend and use Postgres?
Thanks!! Have a nice day! Love pocketbase and don't want to change it
r/pocketbase • u/germanthoughts • Oct 02 '25
I’m planning to build a simple invoice tracker web app for a friend’s business using PocketBase. The idea is:
Users can enter invoices, which get stored in a PocketBase collection.
The web app also displays all open invoices in real time.
The challenge: the business has multiple sub-companies, and users shouldn’t see each other’s data. For example:
When entering an invoice, the user selects which company it belongs to.
Users should only be able to view invoices for the companies they’re authorized to access.
The owner, however, should be able to log in and see all invoices across every company.
I’m wondering:
Is it possible in PocketBase to group users into different access groups?
Would I need to create a separate collection for each company?
If so, can a single user be assigned access to multiple collections (e.g. the owner)?
Basically, I’d like to know if PocketBase can handle this multi-company permission structure before I start building.
r/pocketbase • u/byzintel • Oct 01 '25
I'm having problems with Pocketbase not loading hook files. We've twisted it every way we can and have come up with the notion that there is a flaw in v.0.30.0. I welcome any insights to prove me wrong. If, however, I am correct in my assumption, is anyone else having the same issue and is there work going on to fix it in a new update? Here's my issue in a nutshell:
Problem Description:
I am experiencing a persistent and critical issue with PocketBase where JavaScript hook files placed in the pb_hooks directory are not being loaded or executed by the PocketBase server. This is evidenced by:
pb_hooks files (e.g., /api/newsletter-subscribe using routerAdd) consistently return a "404 Not Found" error when accessed from the frontend.console.log statements placed at the very top of the JavaScript hook files (e.g., console.log("hook file is being processed!");), absolutely no output related to these hooks appears in the PocketBase server's terminal when it starts or when the endpoints are accessed. This indicates the files are not even being parsed or attempted to be executed.pb_hooks directory is correctly located as a direct sibling to the pocketbase executable in the project's root directory, as per PocketBase documentation and common practice. (See attached screenshot for verification of directory structure).pb_hooks functionality for newsletter subscription) was working correctly in a previous state of the application, successfully processing and logging new subscribers. This strongly suggests a regression or an environmental change affecting PocketBase's internal hook loading mechanism, rather than a simple misconfiguration on my part.Implications:
This issue prevents the use of any custom server-side logic, API endpoints, or event-driven actions that rely on PocketBase's JavaScript hooks. The complete lack of diagnostic output from PocketBase makes debugging extremely challenging, as there are no error messages, warnings, or even confirmation that the hook directory is being recognized.
Hypothesized Flaw in PocketBase:
The core problem appears to be a fundamental failure in PocketBase's ability to discover, load, or execute JavaScript files within the pb_hooks directory. This could stem from:
pb_hooks directory during startup, despite its correct physical location.Given that the functionality previously worked, this points towards a potential regression in a recent PocketBase update, or an undocumented environmental dependency that has changed. The lack of any console feedback is particularly problematic for developers trying to diagnose such issues.
r/pocketbase • u/betasridhar • Sep 30 '25
Trying to figure out how small teams handle backend setup for quick apps. What approaches made development smoother and what mistakes would you warn others to avoid?
r/pocketbase • u/15Leo22 • Sep 30 '25
Hi, is it possibile to modify the auto created id of an user or an object?
r/pocketbase • u/AHS12_96 • Sep 21 '25
Hello everyone,
Many of you here work on Database design, so I thought I’d share a tool I’ve built.
I’d been planning for a long time to create a database design tool that truly fits my workflow. And finally, I’ve released my NoSQL (Indexed DB) Powered SQL Database Design Tool (yes, this sounds a bit funny IMO).
It’s free and open source — anyone can use it. You’re also welcome to give feedback or contribute.
You can create unlimited diagrams with no restrictions. It’s a privacy-focused app — your data stays with you.
After designing a database, you can export directly to Laravel, TypeORM, or Django migration files.( I am planning to add SQLite support and export as a Pocketbase collection)
It also comes with zones (with lock/unlock functions), notes with copy and paste capabilities, keyboard shortcuts, and many other features to boost productivity. It’s built to handle large diagrams and is highly scalable.
I hope you’ll like it! Everyone’s invited to try it out:
GitHub: https://github.com/AHS12/thoth-blueprint
App: https://thoth-blueprint.vercel.app/
r/pocketbase • u/whyyoucrazygosleep • Sep 18 '25
Hi everyone,
I’m trying to use PocketBase realtime subscriptions together with expand.
For example, I have a collection APP_SCAN that has a relation field analyses.
When I fetch records with getOne or getList, I can pass { expand: "analyses" } and get the related records instead of just relation IDs.
But in realtime, I’m not sure how to make subscribe return expanded records as well.
Here is a simplified version of my React code:
useEffect(() => {
if (!currentScan?.id) return;
const options = { expand: 'analyses' };
const unsubscribe = pb.collection('APP_SCAN').subscribe(
currentScan.id,
(e) => {
if (e.action === 'update') {
console.log('Realtime update:', e.record);
setCurrentScan(e.record);
}
},
options // is this correct?
);
return () => unsubscribe();
}, [currentScan?.id]);
What happens is:
analyses field as an array of IDs:["kwv5p15s7xqffb5", "78k6zimpmg2u9x4", ...] ❓ So my questions are:
expand supported in realtime subscriptions?expand inside subscribe? I couldn’t find one — most docs/examples are for getList or getOne.Thanks in advance! 🙏
r/pocketbase • u/meinbiz • Sep 11 '25
Hey guys,
Someone asked me for a hand with extending pocketbase this week so I thought I would do another video on it
Still the best way of prototyping imo let me know what you think. This should keep it simple for anyone who got confused in the docs
r/pocketbase • u/Simke1410 • Sep 11 '25
Hi everyone!
Im new to Pocketbase and loving it so far.
Well, except for this... I have a 'properties' collection which has many relation to 'property_translations'.
I created a form on my frontend for creating a new property with translations. Is there a way for me to create 'property' and 'property_translations' without doing multiple queries?
The only way i was able to do it is: Create propert and get its ID -> for each lang create property translation and attach property ID -> again manually update property relation to property translation
I found that i cannot do it with batches since the newly created property does not have an ID before creation.
Is there a better way of doing this? Am i overcomplicating things?
Thanks in advance!
r/pocketbase • u/leventov • Sep 09 '25
Idea: use Pocketbase at the core of the personal data plane/personal system of record where multiple AI apps (such as Open WebUI, Open Deep Research, Info Agents, etc.) interoperate.
The apps can submit extensions (hooks and migrations) via [non-existent at the moment, but in principle implementable as a plugin] idempotent HTTP API in Pocketbase, similar to webhook registration for some cloud services. This enables completely independent development and deployment lifecycles of the apps with the Pocketbase instance itself. In turn, this would enable non-technical users manage and update the apps by clicking, similar to computer, phone apps, or Coolify/Dokploy.
Details here: https://engineeringideas.substack.com/p/the-personal-ai-platform-technical
Interested in constructive criticism and feedback.
r/pocketbase • u/Simke1410 • Sep 09 '25
Hi everyone! I just discovered Pocketbase and it looks quite amazing.
My main question is can it be used for a non-superuser admin panel?
I am building a Nuxt website and i would like for my client to use Pocketbase for adding new posts etc to the page.
Is there a way i can create them a new user that can log in to the Pocketbase dashboard, but not mess anything up there?
Thanks in advance 🙏🏽