B4J Tutorial [Web] Mastering Pocketbase: Your Ultimate Guide to a Flawless SQLite WebServer Install on Windows!

Hi Fam

Download

PocketBase is a SQLite Webserver with some powerful functionality. Whilst it provides functionality to be a database, it also has a nice UI to manage that database. You can host it locally and also run it on a VPS. It does not support shared hosting.

1. Download and unzip this repo (15MB), this is what you will find.

1717698550902.png


2. Double click the run_server_1001.bat file, this will start a command prompt.

1717698857592.png


3. Leave this running. If there is an update of pocketbase, it will be updated before your app can start.
4. sdbms is the sub-domain of our web site. We publish all our js & css and html files there. You can rename the file to be anything you want. This sub-domain is inside the pb_public

1717699015100.png


5. If you don't use a sub-domain, just publish your website on the root of the pb_public folder. Ensure you also update the bat file to point to.

B4X:
start http://127.0.0.1:1001/index.html

6. As there is no website published on this webserver, nothing will be shown in the browser, you will see. This means there is no database collections and no website.

1717699205176.png

7. Now double click the "PocketBase Admin" browser link. You should see this.

1717699281004.png


8. Create your administrator account. When done, you should see this.

1717699346981.png


9. Now you need to update a few things, click Settings..

1717699405320.png


10. Update the Application and Application url. Always ensure that the Application URL is correct and it reflects the port you are running from also. The Application name will be changed on the browser tab.

1717699444932.png


1717699534052.png


11. You can also update the mail settings by using SMTP. This will help you send emails via PocketBase, reset your password and send password forgot resets in case. Its important to set this should you forget your password and other things.

1717699697577.png


Follow this guide to use a GMail account to send emails inside PocketBase.

You can play around and visit the documentation for more details.

Using it with B4J? Check this link, https://www.b4x.com/android/forum/t...th-postman-and-then-httputils.144227/#content

Using any other port besides 1001.

Let's say you want to use port 1002, this is the guide. Close any running instance of 1001.

1. Rename run_server_1001.bat to run_server_1002.bat
2. Edit run_server_1001.bat and update it to be

B4X:
start http://127.0.0.1:1002/sdbms/index.html
pocketbase update
pocketbase serve --http="127.0.0.1:1002"
pause

3. Save the file
4. Right click on the "PocketBase Admin" file, then Properties,change the URL to be

1717698745668.png

5. Click Apply for the changes to take effect.

Have fun!

Related Content (e.g how to use GMail for sending emails, reasons why you can use it as your backend)


Forum Search of PocketBase
 
Last edited:
Top