Configuration Guide
PocketStarter requires a few configuration steps to get your application running properly, but it depends on the functionality you'd like to enable for your app.
Required configuration
1. Environment Variables
In the Getting Started guide, you created a .env.local
files in the frontend
directory with the following variables (assuming you develop locally):
# .env.local (frontend directory)
NEXT_PUBLIC_POCKETBASE_URL=http://localhost:8090
NEXT_PUBLIC_SITE_URL=http://localhost:3000
The PocketBase instance does not need an .env
file for now, only when you add functionality in further steps.
2. PocketBase built-in settings
To make use of default important PocketBase functionality, you need to configure the newly setup database.
- Go to Dashboard → Settings
- Enter your Application settings, with at least your Application name and URL. If you are using PocketBase on a subdomain, remember to use the frontend URL.
- Enable Rate Limiting
- Go to Mail settings and enter your details as mentioned in the Email Sending guide.
- Go to Backups and enable auto backups.
3. Site Configuration
Update your site information in frontend/src/config/seo.ts
as described in the SEO guide.
Also, create these images in your frontend/public
directory according to the same guide:
favicon.ico
(32x32)favicon-96x96.png
(96x96)favicon.svg
(scalable)apple-touch-icon.png
(180x180)og-image.jpg
(1200x630 for social sharing)
Optional configuration
Amazing, you have now configured all essential settings. Depending on other features you enable, you might need to configure:
Development
For some configuration (like Stripe payments or email marketing), you might need to add environment variables to PocketBase. There are many ways to run PocketBase (Docker, etc.), but if you have trouble adding environment variables, you can load them directly when starting PocketBase:
export STRIPE_SECRET_KEY=sk_test_1234567890
export STRIPE_WEBHOOK_SECRET=whsec_abcdefg
./pocketbase serve