Deploy PocketBase
Open Source realtime backend for SaaS and Mobile Apps in 1 file
PocketBase
Just deployed
/pb/pb_data
Deploy and Host PocketBase on Railway

PocketBase is an open-source backend platform that provides a database, user authentication, file storage, and a REST API in a single package. It includes a web-based administration dashboard and real-time subscriptions, making it a practical choice for developers building web and mobile applications without managing multiple backend services.
About Hosting PocketBase
Hosting PocketBase on Railway gives you a publicly accessible backend and administration dashboard with minimal setup. Once deployed, Railway provides a generated domain that you can use to access your PocketBase instance and connect your frontend application to its API.
The administration dashboard is available at /_/ on your generated domain. This template uses port 8090 for HTTP traffic and /api/health for health checks. A persistent volume mounted at /pb/pb_data stores your application data across container replacements and redeployments.
After deployment, you must create your first superuser account using the installation URL provided in the deployment logs before signing in to the dashboard.
Common Use Cases
- Web and mobile application backends: Provide database access, authentication, file storage, and APIs for applications built with Astro, React, Vue, Svelte, or mobile frameworks.
- User authentication and management: Add user registration, login, and access control without building an authentication system from scratch.
- Rapid prototyping and MVPs: Build and test full-stack applications with a built-in database, API, and administration dashboard.
Dependencies for PocketBase Hosting
- PocketBase — Open-source backend platform.
- PocketBase GitHub repository — Source code, releases, and project documentation.
Implementation Details
Access your PocketBase instance
After deployment, open the public domain generated by Railway.
- Administration dashboard:
https://your-app.up.railway.app/_/ - API base URL:
https://your-app.up.railway.app/api/
Replace your-app.up.railway.app with your actual Railway-generated domain.
Create your first superuser account
PocketBase prints a special installation URL in the deployment logs to create your first superuser account.
- Open your PocketBase service in Railway and view its deployment logs.
- Find the message instructing you to launch the URL to create your first superuser account.
- Copy the installation URL shown in the logs. It will resemble
http://0.0.0.0:8090/_/#/pbinstall/your-installation-token. - Remove the internal host and port,
http://0.0.0.0:8090, while keeping the complete path and installation token beginning with/_/#/pbinstall/. - Append that path to your Railway-generated domain.
For example, if your Railway domain is https://your-app.up.railway.app, the final URL should look like this:
https://your-app.up.railway.app/_/#/pbinstall/your-installation-token
- Open the resulting URL in your browser and follow the instructions to create your superuser account.
Important: Use the actual installation token from your deployment logs. The example token above is a placeholder. Do not open the internal 0.0.0.0:8090 address directly.
After creating your account, visit https://your-app.up.railway.app/_/ and sign in to access the administration dashboard.
Railway configuration
- HTTP port:
8090 - Healthcheck path:
/api/health - Persistent volume mount path:
/pb/pb_data - Public access: Use the Railway-generated domain.
The persistent volume stores PocketBase's database, uploaded files, and other application data. Keep the volume attached to the service to preserve data across container replacements and redeployments.
Why Deploy PocketBase on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying PocketBase on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
PocketBase
elestio/pocketbase:latest