Setting up your project with PocketCloud

This tutorial will walk you through setting up PocketCloud to get started with using hosted PocketBase in your project.

Deploying

Go to pocketcloud.xyz and click on Deploy to power up a new instance. You will be asked to create an account if you don't have one already or aren't logged in.

Once deployed, you should see the new instance on your Dashboard.

Click on the link mentioned at the top of the Dashboard. This will take you to the Admin UI. You will need to sign up to access the Admin panel of PocketBase.

Now you have a PocketBase instance running on the cloud, ready to connect with your frontend.

Connecting

Install the PocketBase NPM package.

npm i pocketbase

The following code connects your application to the instance we deployed earlier. Replace xxxxx with your unique instance ID.

import PocketBase from 'pocketbase';
const pb = new PocketBase('https://xxxxx.pocketcloud.xyz');

You can now start querying the database via the PocketBase API.

const records = await pb.collection('users').getFullList({
    sort: '-created',
});

PocketCloud