Expose PocketBase backend
This tutorial will explain how to expose a localhost PocketBase backend and give it a shareable link that is accessible from the internet.
PocketBase
Open Source backend for your next SaaS and Mobile app in 1 file, consisting of embedded database (SQLite) with realtime subscriptions, built-in users management, convenient dashboard UI and simple REST-ish API.
Explore the documentation to see all the features and capabilities of PocketBase.
Prerequisites
Step 1 - Start PocketBase service
./pocketbase serve
# > Server started at: http://localhost:8090
# - REST API: http://localhost:8090/api/
# - Admin UI: http://localhost:8090/_/Step 2 - Create admin account
Navigate to http://localhost:8090/_/ and fill the required fields.

Step 3 - Create a collection with some records (optional)
Create collection for example post collection:

Add some posts:

Step 4 - API access
Grant access to API list action:

Confirm API access via localhost:
JSON result (example):
Step 5 - Access PocketBase API from the internet
Create HTTP tunnel and forward the traffic to local PocketBase address.
which results:

Test API access via loclx.io sub-domain:

You can also utilize the PocketBase Javascript SDK (pocketbase/js-sdk) to consume the API.
Last updated
Was this helpful?
