BlogNetwork Pro

Installation Guide

Installation Guide

Follow these step-by-step instructions to set up Multi-Domain AutoBlogger on your system. This guide assumes you have basic knowledge of using a terminal/command line.

Prerequisites

Before you begin, ensure you have the following installed and configured:

1. Node.js 18 or Higher

Download and install Node.js from nodejs.org. Verify installation by running:

node --version

You should see version 18.0.0 or higher.

2. npm (Node Package Manager)

npm comes bundled with Node.js. Verify installation:

npm --version

3. PostgreSQL Database

You'll need a PostgreSQL database. Recommended options:

  • Neon (Recommended): neon.tech - Serverless PostgreSQL
  • Vercel Postgres: Integrated with Vercel hosting
  • Supabase: supabase.com - Alternative PostgreSQL
  • Any PostgreSQL Database: Works with any PostgreSQL 12+ database

4. Anthropic API Key (Required)

For AI content generation, you'll need an Anthropic API key:

  1. Sign up at console.anthropic.com
  2. Create an API key
  3. Copy the key for use in configuration

5. Optional: GoHighLevel Account

For email capture and CRM integration (optional):

  • Sign up at gohighlevel.com
  • Create a private integration with required scopes
  • Get your Location ID and API Key

6. Optional: Google Analytics 4

For website analytics (optional):

Step 1: Extract and Navigate to Project

  1. Extract the downloaded ZIP file to your desired location
  2. Open a terminal/command prompt
  3. Navigate to the project directory:
    cd path/to/blogger

Step 2: Install Dependencies

Install all required Node.js packages:

npm install

This may take a few minutes. Wait for the installation to complete.

Note: If you encounter errors during installation, ensure you have Node.js 18+ installed and try deleting the node_modules folder and package-lock.json file, then run npm install again.

Step 3: Configure Environment Variables

Create a file named .env.local in the root directory of the project. This file stores your configuration settings.

Create .env.local File

Create a new file called .env.local in the project root with the following content:

# Database Connection
DATABASE_URL=your_postgresql_connection_string_here

# AI Generation (Required)
ANTHROPIC_API_KEY=your_anthropic_api_key_here

# Authentication
NEXTAUTH_SECRET=your_random_secret_string_here_minimum_32_characters
ADMIN_PASSWORD=your_admin_password_here

# Cron Job Authentication (Required for scheduled posts)
CRON_SECRET=your_secure_random_string_minimum_16_characters

# Multi-Domain Admin Access Control (Recommended)
# Set this to one of your domain names after adding domains in admin panel
# This domain will have full admin access (can manage all domains, themes, plugins)
# Other domains will have limited access (can only manage their own posts and categories)
MAIN_DOMAIN=your-main-domain.com

# Optional: Third-party Plugins
PLUGINS_JSON_URL=https://your-plugins-feed-url.com/plugins.json

Environment Variable Details

Variable Required Description Example
DATABASE_URL Yes PostgreSQL connection string postgresql://user:pass@host:5432/dbname
ANTHROPIC_API_KEY Yes Anthropic Claude API key for AI generation sk-ant-api03-...
NEXTAUTH_SECRET Yes Random secret for session encryption (min 32 chars) Generate with: openssl rand -base64 32
ADMIN_PASSWORD No Default admin password (defaults to "admin123") your_secure_password
CRON_SECRET Yes Secret for cron job authentication (min 16 chars) Generate with: openssl rand -base64 16
MAIN_DOMAIN Recommended Domain name with full admin access. Other domains have limited access (posts/categories only). Set this after adding domains in admin panel. example.com
PLUGINS_JSON_URL No URL to third-party plugins JSON feed https://example.com/plugins.json
Important Notes on MAIN_DOMAIN:
  • The easiest way to get started is to run npm run dev locally first to set up your database and create your first admin user.
  • After deploying to Vercel (or your hosting provider), add your domains through the admin panel.
  • Set MAIN_DOMAIN to one of the domain names you added in the admin panel.
  • Re-deploy if you changed MAIN_DOMAIN after initial deployment.
  • The domain specified in MAIN_DOMAIN will have full administrative access (can manage all domains, themes, plugins).
  • Other domains will have limited access (can only manage their own posts and categories).

Generating Secure Secrets

To generate secure random strings for NEXTAUTH_SECRET and CRON_SECRET:

Step 4: Set Up Database

4.1 Push Database Schema

Create all required database tables:

npm run db:push

This command creates all necessary tables in your PostgreSQL database.

4.2 Seed Initial Data

Create the default admin user:

npx tsx scripts/seed.ts

This creates an admin user with:

Important: Change the default admin password immediately after first login for security.

Step 5: Start Development Server

Start the development server to test your installation:

npm run dev

The server will start on http://localhost:3000

Note: The first startup may take a minute or two as Next.js compiles the application.

Step 6: Access Admin Panel

  1. Open your web browser
  2. Navigate to http://localhost:3000/admin/login
  3. Login with:
    • Email: admin@example.com
    • Password: Your ADMIN_PASSWORD or "admin123"
Congratulations! If you can access the admin panel, your installation is successful!

Step 7: Create Your First Domain

After logging in, create your first domain:

  1. Click on "Domains" in the admin navigation
  2. Click "New Domain" button
  3. Enter your domain name (e.g., example.com)
  4. Configure basic settings:
    • Select or create a theme
    • Add site title and description
    • Configure SEO settings
  5. Click "Save"
Note: For local development, you can use localhost:3000 or add entries to your /etc/hosts file (Mac/Linux) or C:\Windows\System32\drivers\etc\hosts (Windows) to test with custom domains.

Production Deployment

For production deployment, we recommend using Vercel:

Deploy to Vercel

  1. Push your code to a GitHub repository
  2. Go to vercel.com and sign in
  3. Click "New Project"
  4. Import your GitHub repository
  5. Configure environment variables in Vercel dashboard:
    • Add all variables from your .env.local file
    • Ensure CRON_SECRET is set for scheduled posts
  6. Click "Deploy"
  7. After deployment completes:
    1. Add your custom domains in Vercel project settings
    2. Configure DNS records as instructed by Vercel
    3. Add your domains through the admin panel (Admin > Domains)
    4. Set the MAIN_DOMAIN environment variable in Vercel to one of your domain names
    5. Re-deploy if you changed MAIN_DOMAIN after initial deployment
Recommended Workflow:
  1. Start with local development (npm run dev) to set up your database and create your first admin user
  2. Deploy to Vercel (or your hosting provider) with all environment variables configured
  3. After deployment, add your domains through the admin panel
  4. Set MAIN_DOMAIN environment variable to one of your domain names (the one you want to have full admin access)
  5. Re-deploy if you changed MAIN_DOMAIN after initial deployment

Build for Production

To test the production build locally:

npm run build
npm start

Troubleshooting

Database Connection Errors

API Key Errors

Port Already in Use

If port 3000 is already in use:

Module Not Found Errors

Next Steps

Now that installation is complete, you can: