> For the complete documentation index, see [llms.txt](https://docs.hostinger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostinger.com/websites/pocketbase.md).

# PocketBase Backend

Add a PocketBase backend to a website on Hostinger web hosting for a database, user sign-in, file storage and realtime updates served from the website's own domain.

A PocketBase backend gives a website its own **database**, **user accounts**, **file storage** and **realtime updates**, running on your hosting and served from the website's own domain. Use it when a static, JavaScript or Node.js site needs to keep what visitors enter: form submissions, sign-ups, comments, votes, bookings or orders. You don't need a separate server or a third-party database account.

[PocketBase](https://pocketbase.io) is an open-source backend. Hostinger runs it for you on your hosting account.

## Availability

* PocketBase backends work on websites hosted on **Web** and **Cloud** hosting plans.
* You add and manage them with an AI assistant connected through [Hostinger Connector](https://docs.hostinger.com/hostinger-connector/overview.md), or with the [Hostinger API](https://docs.hostinger.com/api-reference/endpoints/hosting/pocketbase.md). There's no hPanel screen for them yet.
* PocketBase is rolling out gradually. If your account doesn't have access yet, creating a backend fails with a `422` error.

## How it works

Once a website has a backend, two paths on its domain belong to PocketBase:

| Path                    | What it serves                                                  |
| ----------------------- | --------------------------------------------------------------- |
| `https://<domain>/api/` | The PocketBase REST and realtime API                            |
| `https://<domain>/_/`   | The PocketBase dashboard, for managing data, users and settings |

Every other path keeps serving your website, including `/.well-known/`, so SSL certificates keep renewing. Because the site and its backend share one domain, the browser calls the API directly: there's no CORS setup, no API address to configure and no keys in your frontend code.

> **Warning:** If your website already serves its own pages or routes under `/api` or `/_`, they stop working when you add a backend. Move them to another path first.

Things to know:

* Each website can have one PocketBase backend.
* Headless WordPress websites and parked domains aren't supported. For a parked domain, add the backend to the website it's parked on.
* The backend's data is stored outside your website's files. Deploying or redeploying the website, uploading files or installing an app never changes the backend or its data.

## Create a backend

### With Hostinger Connector

Make sure the **Websites** product group is enabled in [Hostinger Connector](https://docs.hostinger.com/hostinger-connector/using-the-connector.md), then ask your assistant, for example:

* "Add a PocketBase backend to mydomain.com"
* "Save the contact form submissions on my Hostinger site so I can read them later"
* "Let visitors sign up and log in on my app hosted on Hostinger"

Because the website's `/api` and `/_` paths change hands, your assistant should check the website with you before it creates the backend.

### With the API

Call [Create PocketBase backend](https://docs.hostinger.com/api-reference/endpoints/hosting/pocketbase/create-pocketbase-backend.md) with the hosting account's username and the website's domain. To start a brand-new website for a PocketBase app, you can [create the website](https://docs.hostinger.com/api-reference/endpoints/hosting/websites.md) with the type `headless_pocketbase`, wait until its setup is completed, and then create the backend.

### What you get back

Creating a backend usually takes a few seconds. The response includes:

| Field                | What it is                                                                               |
| -------------------- | ---------------------------------------------------------------------------------------- |
| `api_url`            | The API address, `https://<domain>/api/`                                                 |
| `admin_url`          | The dashboard address, `https://<domain>/_/`                                             |
| `superuser_email`    | The dashboard admin's email. Defaults to the website owner's email                       |
| `superuser_password` | The dashboard admin's password. Generated unless you set your own (10 to 128 characters) |
| `state`              | How the backend is doing. See [Check a backend's status](#check-a-backends-status)       |
| `next_steps`         | What to do next with the new backend                                                     |

> **Warning:** The superuser password is shown only once. Hostinger doesn't store it. Save it in your password manager right away.

## Sign in to the dashboard

1. Open `https://<domain>/_/`.
2. Sign in with the superuser email and password.

In the dashboard you create collections (tables), set their access rules, browse and edit records, manage your app's users and change PocketBase settings.

## Connect your website

Use the [PocketBase JavaScript SDK](https://github.com/pocketbase/js-sdk) and point it at the site's own address:

```js
import PocketBase from "pocketbase"

const pb = new PocketBase(window.location.origin)
```

Access is controlled by each collection's **API rules**, which PocketBase checks on every request. Set them in the dashboard for every collection: a rule left empty lets anyone perform that action.

> **Warning:** Never put the superuser email or password in frontend code. Anyone visiting the site can read it. For trusted server-side work in a Node.js app, store them as [environment variables](https://docs.hostinger.com/node.js/environment-variables.md).

Realtime subscriptions work out of the box. A page subscribed to a collection gets new, changed and deleted records as they happen, as long as the collection's rules let that visitor see them.

## Manage superusers

Superusers are the dashboard admins. To set a new password for one, use [Set PocketBase superuser](https://docs.hostinger.com/api-reference/endpoints/hosting/pocketbase/set-pocketbase-superuser.md), or ask your assistant to "reset the PocketBase superuser password for mydomain.com".

* Use it when the password is lost or may have leaked.
* Give it a different email to add another superuser.
* Leave out the password to get a strong generated one. Like on creation, the new password is shown only once.

The old password stops working at once, so update any script or app that uses it. Your app's own user accounts are managed in the dashboard or through the PocketBase API, not here.

## Check a backend's status

[Get PocketBase backend](https://docs.hostinger.com/api-reference/endpoints/hosting/pocketbase/get-pocketbase-backend.md) shows one website's backend, and [List account PocketBase backends](https://docs.hostinger.com/api-reference/endpoints/hosting/pocketbase/list-account-pocketbase-backends.md) shows every backend in a hosting account with its disk usage. Your assistant uses them when you ask "How is the PocketBase backend of mydomain.com doing?".

The `state` field tells you how the backend is doing:

| State                             | Meaning                                                                                                                                                     |
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asleep`                          | Normal. It wakes on the next request                                                                                                                        |
| `starting`, `running`, `stopping` | Healthy                                                                                                                                                     |
| `failed`                          | The last start didn't succeed. Your data is safe, and Hostinger tries again on its own after `retry_after_seconds`. See [Troubleshooting](#troubleshooting) |
| `unregistered`                    | The backend is broken. Contact support                                                                                                                      |
| `missing`                         | Its files are gone from the server. Creating the backend again sets up a new, empty one                                                                     |
| empty                             | The server couldn't be reached. Try again later                                                                                                             |

The password is never shown here. If you lost it, [set a new one](#manage-superusers).

## Sleep and wake-up

A backend sleeps when nobody uses it and wakes on the next request. The first request after a quiet period can take a few seconds, so keep client timeouts at 10 seconds or more and retry once if a request fails. An open realtime connection keeps the backend awake.

## Email

To send password-reset and verification emails reliably, add your mail server in the dashboard under **Settings** → **Mail settings**. You can use a [Hostinger email account](https://docs.hostinger.com/emails/overview.md) and its SMTP details.

## Backups

Hostinger's automatic account [backups](https://docs.hostinger.com/websites/backups.md) include the database of every PocketBase backend in the account.

For restore points you control, use PocketBase's own backups in the dashboard under **Settings** → **Backups**. You can create, download and restore them there. Backup files are stored with the backend and count toward your hosting plan's disk space.

## Limits

A PocketBase backend runs on your hosting plan's resources:

* **Disk space**: its data and uploaded files count toward your plan's disk space. `disk_usage_kb` shows how much a backend uses.
* **Processes**: it shares the account's process limit with your Node.js apps. If running Node.js apps use all of it, the backend can't start and its state shows `failed` with `failure_reason: process_limit`.
* **Traffic**: to protect the server, Hostinger can limit the request rate, request size and open realtime connections of a backend. A request over a limit gets `413`, `429` or `503`. Wait for the time in the `Retry-After` header, then try again.

## Delete a backend

Use [Delete PocketBase backend](https://docs.hostinger.com/api-reference/endpoints/hosting/pocketbase/delete-pocketbase-backend.md), or ask your assistant to "delete the PocketBase backend of mydomain.com". Deleting a backend permanently removes all its data: collections, records, users and uploaded files. It gives `/api` and `/_` back to your website, and any app using the backend stops working.

> **Warning:** This can't be undone. Download a backup from the dashboard under **Settings** → **Backups** first. If you only lost the password, [set a new one](#manage-superusers) instead.

## Troubleshooting

| Problem                                     | What to do                                                                                                                                                                |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Creating a backend fails with `422`         | Your account doesn't have PocketBase access yet, the website already has a backend, or the website is headless WordPress or a parked domain                               |
| The first request is slow                   | The backend was asleep. It wakes within a few seconds                                                                                                                     |
| State is `failed` with `process_limit`      | Your Node.js apps are using the account's process slots. Stop an app you don't need, or wait: Hostinger tries again after `retry_after_seconds`. Don't delete the backend |
| State is `failed` with `start_failed`       | Wait for `retry_after_seconds` and check again. If it keeps failing, contact support. Your data is safe                                                                   |
| A page under `/api` or `/_` stopped working | Those paths now belong to PocketBase. Move the page to another path                                                                                                       |
| Visitors can't read or write records        | Check the collection's **API rules** in the dashboard                                                                                                                     |
| Lost the superuser password                 | [Set a new one](#manage-superusers). Don't delete the backend                                                                                                             |

## Related

* [Databases](https://docs.hostinger.com/websites/databases.md): MySQL databases for PHP, WordPress and other SQL apps
* [Environment Variables](https://docs.hostinger.com/node.js/environment-variables.md): keep credentials out of your code
* [Hostinger Connector](https://docs.hostinger.com/hostinger-connector/overview.md): manage Hostinger from your AI assistant
* [PocketBase API reference](https://docs.hostinger.com/api-reference/endpoints/hosting/pocketbase.md): the five PocketBase endpoints
* [PocketBase documentation](https://pocketbase.io/docs/): collections, API rules, authentication and the SDKs

***

*Last updated: November 16, 2026*
