Skip to main content
This guide takes you from signup to your first live deployment in under 5 minutes.

Prerequisites

Before you begin, make sure you have:
  • A Git repository (GitHub or any public Git URL)
  • For GitHub users: A GitHub account for OAuth authentication
  • For Node.js apps: Your application should listen on a configurable port via environment variables

Step 1: Create Your Account

DeployHub offers two signup methods:
1

Sign up with GitHub (Recommended)

Navigate to the signup page and click “Continue with GitHub”.
# OAuth flow redirects to:
GET https://api.deployhub.cloud/api/auth/github
This will:
  • Authenticate you via GitHub OAuth
  • Automatically access your repositories
  • Generate access and refresh tokens
  • Redirect you to the dashboard
GitHub authentication stores your githubAccessToken for repository access and automatic deployments.
2

Sign up with Email

Alternatively, create an account with email:Step 1: Initialize Registration
curl -X POST https://api.deployhub.cloud/api/register/init \
  -H "Content-Type: application/json" \
  -d '{
    "fullname": "John Doe",
    "email": "john@example.com",
    "password": "SecurePass123!@"
  }'
Response:
{
  "message": "Otp Sent Success"
}
Password must be at least 8 characters and include:
  • Uppercase letter
  • Lowercase letter
  • Number
  • Special character (@$!%*?&)
Step 2: Verify with OTPCheck your email for a 6-digit OTP code (expires in 10 minutes).
curl -X POST https://api.deployhub.cloud/api/register/verify \
  -H "Content-Type: application/json" \
  -d '{
    "email": "john@example.com",
    "otp": "123456"
  }'
Response:
{
  "message": "User register Success"
}

Step 2: Login and Get Access Token

After signup, authenticate to receive your access token.
curl -X POST https://api.deployhub.cloud/api/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "john@example.com",
    "password": "SecurePass123!@"
  }'
Response:
{
  "message": "Login Success",
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
The API returns both AccessToken and refreshToken as HTTP-only cookies. The accessToken is also returned in the response body for manual storage.

Step 3: Get Your Repositories (GitHub Users)

If you signed up with GitHub, fetch your accessible repositories:
curl -X GET https://api.deployhub.cloud/api/user/gitrepos \
  -H "Cookie: AccessToken=YOUR_ACCESS_TOKEN"
Response:
{
  "repos": [
    {
      "id": 123456789,
      "name": "my-portfolio",
      "full_name": "johndoe/my-portfolio",
      "private": false,
      "html_url": "https://github.com/johndoe/my-portfolio",
      "description": "My personal portfolio site",
      "default_branch": "main"
    }
  ]
}
If you signed up with email, you can use any public Git repository URL directly in the deployment step.

Step 4: Choose Your Plan

DeployHub offers two plans:

Free Plan

  • 512MB RAM
  • 0.1 vCPU
  • 2,000 requests/day
  • deployhub.online subdomain
  • ₹0 forever

Pro Plan

  • 2GB RAM
  • 1 vCPU
  • 1,00,000 requests/day
  • Custom domain support
  • ₹799/month (discounts available)

Initialize Your Plan

curl -X POST https://api.deployhub.cloud/api/subscription/init \
  -H "Content-Type: application/json" \
  -H "Cookie: AccessToken=YOUR_ACCESS_TOKEN" \
  -d '{
    "plan": "free"
  }'
Free Plan Response:
{
  "success": true,
  "project": {
    "_id": "60f7b3b3e4b0a4001f3e4e3a",
    "owner": "60f7b3b3e4b0a4001f3e4e3b",
    "status": "pending"
  }
}
Pro Plan Response:
{
  "id": "order_MNxUqz...",
  "amount": 85896,
  "currency": "INR",
  "receipt": "order_rcptid_0.123456789"
}
DurationDiscountEffective Price/Month
1 month0%₹799
3 months4%₹767
6 months8%₹735
12 months10%₹719
24 months15%₹679
Prices are in INR. Payment processed via Razorpay.
For Pro plan, you must complete the Razorpay payment flow and verify the payment before proceeding to deployment.
curl -X POST https://api.deployhub.cloud/api/subscription/verify \
  -H "Content-Type: application/json" \
  -H "Cookie: AccessToken=YOUR_ACCESS_TOKEN" \
  -d '{
    "razorpay_payment_id": "pay_...",
    "razorpay_order_id": "order_...",
    "razorpay_signature": "..."
  }'

Step 5: Deploy Your Project

Now you’re ready to deploy! DeployHub supports static sites and Node.js applications.
Deploy a static site like React, Vue, or any framework that builds to HTML/CSS/JS:
curl -X POST https://api.deployhub.cloud/api/deployment \
  -H "Content-Type: application/json" \
  -H "Cookie: AccessToken=YOUR_ACCESS_TOKEN" \
  -d '{
    "projectId": "60f7b3b3e4b0a4001f3e4e3a",
    "name": "my-portfolio",
    "codeLink": "https://github.com/johndoe/my-portfolio",
    "projectType": "static",
    "branchname": "main",
    "isFolder": false,
    "buildCommand": "npm run build",
    "publishDir": "dist",
    "env": {
      "VITE_API_URL": "https://api.example.com",
      "NODE_ENV": "production"
    }
  }'
Required Fields:
  • projectId: From Step 4 (plan initialization)
  • name: Display name for your project
  • codeLink: GitHub repository URL or public Git URL
  • projectType: "static" for static sites
  • branchname: Git branch to deploy (e.g., “main”, “master”)
  • isFolder: false if project is at repo root, true if in a subfolder
  • buildCommand: Command to build your site (e.g., “npm run build”, “yarn build”)
  • publishDir: Directory containing built files (e.g., “dist”, “build”, “public”)
Optional Fields:
  • env: Environment variables as key-value pairs
  • folderName: Required if isFolder: true (e.g., “packages/frontend”)
Deployment Response:
{
  "success": true,
  "buildId": "60f7b3b3e4b0a4001f3e4e3c",
  "status": "queued",
  "newProject": {
    "_id": "60f7b3b3e4b0a4001f3e4e3a",
    "name": "my-portfolio",
    "subdomain": "my-portfolio-x8k2j4",
    "status": "building",
    "projectType": "static",
    "repoLink": "https://github.com/johndoe/my-portfolio"
  }
}
Your deployment is now queued! The build process typically takes 1-3 minutes depending on your project size.

Step 6: Access Your Deployment

Once the build completes, your project will be live at:
https://[subdomain].deployhub.online
For example: https://my-portfolio-x8k2j4.deployhub.online

Check Build Status

Monitor your deployment progress:
curl -X GET https://api.deployhub.cloud/api/projects/60f7b3b3e4b0a4001f3e4e3a/builds \
  -H "Cookie: AccessToken=YOUR_ACCESS_TOKEN"
Response:
{
  "builds": [
    {
      "_id": "60f7b3b3e4b0a4001f3e4e3c",
      "project": "60f7b3b3e4b0a4001f3e4e3a",
      "status": "success",
      "commitSha": "a1b2c3d4e5f6...",
      "createdAt": "2024-01-15T10:30:00.000Z",
      "completedAt": "2024-01-15T10:32:15.000Z"
    }
  ]
}
Build Statuses:
  • queued: Build is waiting to start
  • building: Build is in progress
  • success: Build completed successfully, site is live
  • failed: Build failed (check logs for errors)

Next Steps

Common Deployment Examples

{
  "projectType": "static",
  "buildCommand": "npm install && npm run build",
  "publishDir": "dist",
  "env": {
    "VITE_API_URL": "https://api.example.com"
  }
}
{
  "projectType": "static",
  "buildCommand": "npm install && npm run build",
  "publishDir": "out"
}
Make sure your next.config.js includes:
module.exports = {
  output: 'export'
}
{
  "projectType": "static",
  "buildCommand": "npm install && npm run build",
  "publishDir": "dist"
}
{
  "projectType": "node",
  "startCommand": "node server.js",
  "port": 3000,
  "env": {
    "DATABASE_URL": "mongodb+srv://...",
    "JWT_SECRET": "your-secret",
    "NODE_ENV": "production"
  }
}
{
  "projectType": "node",
  "startCommand": "npm run start:prod",
  "port": 3000,
  "env": {
    "DATABASE_HOST": "db.example.com",
    "PORT": "3000"
  }
}

Troubleshooting

Common causes:
  • Incorrect buildCommand or publishDir
  • Missing dependencies in package.json
  • Build script errors
Solution: Check build logs via:
curl -X GET https://api.deployhub.cloud/api/projects/{projectId}/builds/{buildId} \
  -H "Cookie: AccessToken=YOUR_ACCESS_TOKEN"
Common causes:
  • App not listening on the correct port
  • Missing environment variables
  • Incorrect startCommand
Solution: Ensure your app uses the port you specified:
const PORT = process.env.PORT || 3000;
app.listen(PORT);
Your access token may have expired. Refresh it:
curl -X GET https://api.deployhub.cloud/api/refresh/refreshtoken \
  -H "Cookie: refreshToken=YOUR_REFRESH_TOKEN"
If using a private repository:
  • You must authenticate via GitHub OAuth
  • DeployHub uses your stored githubAccessToken to access private repos
  • Public Git URLs only work for public repositories

API Reference

For complete API documentation, see:
Congratulations! You’ve successfully deployed your first project on DeployHub. Your site is now live and accessible to the world.