Looking to just use PingPilot? Check out the Quickstart guide instead. This installation guide is for self-hosting the platform.
Prerequisites
Before you begin, ensure you have the following installed:- Node.js v18 or higher
- npm or pnpm package manager
- PostgreSQL database (local or hosted like Neon)
- Git for version control
Clone the Repository
Start by cloning the PingPilot repository:Install Dependencies
Install all required packages:postinstall script will automatically run prisma generate to set up the database client.
Environment Configuration
Configure Database
Add your PostgreSQL connection string:
.env
- Neon (Recommended)
- Local PostgreSQL
- Other Providers
- Create a free account at neon.tech
- Create a new project
- Copy the connection string from the dashboard
- Paste it into your
.envfile
Configure Clerk Authentication
PingPilot uses Clerk for authentication. Set up your Clerk application:
- Create a free account at clerk.com
- Create a new application
- Copy your API keys from the Clerk dashboard
- Add them to your
.envfile:
.env
Configure Discord Bot
To send Discord notifications, create a Discord bot:
- Go to Discord Developer Portal
- Click “New Application” and give it a name
- Navigate to the “Bot” section
- Click “Reset Token” to get your bot token
- Add the token to your
.envfile:
.env
- Enable the following Privileged Gateway Intents:
- Presence Intent
- Server Members Intent
- Message Content Intent
Configure Telegram Bot (Optional)
For Telegram notifications:
- Message @BotFather on Telegram
- Send
/newbotand follow the instructions - Copy the bot token provided
- Add it to your
.envfile:
.env
Configure Stripe (Optional)
If you want to enable paid plans:
- Create a Stripe account
- Get your API keys from the dashboard
- Add them to your
.envfile:
.env
Configure Redis (Optional)
For caching and improved performance, add Redis:We recommend Upstash Redis for serverless Redis.
.env
Database Setup
Set up your database schema using Prisma:Run Migrations
- Create all necessary tables (User, Event, EventCategory, Quota)
- Set up relationships and indexes
- Generate the Prisma Client
Run the Application
- Development
- Production
Start the development server with hot reload:Your application will be available at
http://localhost:3000.The development server includes hot module replacement for faster development.
Deployment Options
PingPilot can be deployed to various platforms:- Vercel (Recommended)
- Cloudflare Pages
- Docker
- Railway
The easiest way to deploy PingPilot:
- Push your code to GitHub
- Import your repository on Vercel
- Add all environment variables from your
.envfile - Deploy!
Post-Deployment
Test Your Deployment
- Visit your deployed URL
- Create a test account
- Set up a category and send a test event
- Verify notifications are working
Set Up Monitoring
Monitor your application health:
- Enable Vercel Analytics
- Set up error tracking (e.g., Sentry)
- Monitor database performance
- Track API response times
Environment Variables Reference
Here’s a complete list of all environment variables:.env
Troubleshooting
Database connection errors
Database connection errors
- Verify your
DATABASE_URLis correct - Check that your database server is running
- Ensure your IP is whitelisted (for hosted databases)
- Try connecting with
npx prisma db pullto test the connection
Build failures
Build failures
- Clear
.nextfolder:rm -rf .next - Delete
node_modulesand reinstall:rm -rf node_modules && npm install - Check that all environment variables are set
- Run
npx prisma generatemanually
Discord notifications not working
Discord notifications not working
- Verify your bot token is correct
- Ensure the bot has necessary permissions
- Check that Privileged Gateway Intents are enabled
- The bot must be able to send DMs to users
Port already in use
Port already in use
Change the port in
package.json or use:Next Steps
API Reference
Learn how to integrate PingPilot into your applications
Architecture
Understand how PingPilot works under the hood
Contributing
Contribute to the PingPilot open-source project
Support
Get help from the community or report issues