Installation
NetPad is a Next.js application that can be deployed to Vercel or self-hosted. This guide covers both deployment options.
Prerequisitesโ
- Node.js 18 or higher
- MongoDB connection (Atlas, self-hosted, or cloud)
- npm or yarn package manager
Quick Setup (Vercel - Recommended)โ
The fastest way to get NetPad running is to deploy to Vercel:
-
Fork or Clone the Repository:
git clone https://github.com/mrlynn/netpad-v3
cd netpad-v3 -
Install Dependencies:
npm install -
Configure Environment Variables: Create a
.env.localfile with the required variables (see Configuration for details) -
Deploy to Vercel:
- Connect your GitHub repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy automatically on push
Local Development Setupโ
For local development:
-
Clone the Repository:
git clone https://github.com/mrlynn/netpad-v3
cd netpad-v3 -
Install Dependencies:
npm install -
Set Up Environment Variables:
cp .env.example .env.local
# Edit .env.local with your configuration -
Generate Encryption Keys:
# Generate SESSION_SECRET
openssl rand -base64 32
# Generate VAULT_ENCRYPTION_KEY
openssl rand -base64 32 -
Set Up MongoDB:
- Create a MongoDB database named
form_builder_platform - Organization databases will be created automatically as
org_{orgId}
- Create a MongoDB database named
-
Run Development Server:
npm run devThe application will be available at
http://localhost:3000
Self-Hosted Deploymentโ
For self-hosted deployments:
-
Build the Application:
npm install
npm run build -
Set Environment Variables: Configure all required environment variables (see Configuration)
-
Start the Application:
npm start -
Use a Process Manager (Recommended):
# Using PM2
pm2 start npm --name "netpad" -- start -
Configure Reverse Proxy (nginx example):
server {
listen 80;
server_name yourdomain.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Docker Deployment (Future)โ
Docker deployment support is planned for a future release. See Deployment Guide for details.
Verificationโ
After installation, verify your setup:
- Visit your NetPad URL
- Sign up for an account
- Create your first form
- Connect to a MongoDB instance
Troubleshootingโ
Common installation issues:
- Connection Errors: Verify
MONGODB_URIis correct - Encryption Errors: Ensure
VAULT_ENCRYPTION_KEYis properly set - Build Errors: Clear
.nextfolder and rebuild - Port Conflicts: Change port with
PORT=3001 npm run dev
For more help, see Troubleshooting or open an issue on GitHub.
Next Stepsโ
- Configuration Guide - Configure your environment
- Quick Start Guide - Create your first form
- Deployment Guide - Production deployment