Running automation scripts on standard browsers is a fast track to getting banned. Websites detect Selenium and Puppeteer almost instantly. That's where antidetect browsers change the game.

Morelogin automation works by exposing a local API and debug ports that automation frameworks can connect to. Instead of controlling a detectable Chrome instance, your scripts control isolated browser profiles with unique fingerprints.

This guide walks you through the complete setup process. You'll learn to automate Morelogin profiles using Python with Selenium, Node.js with Puppeteer, and even Playwright.

What You'll Learn

  • Setting up Morelogin's local API for automation
  • Connecting Selenium to Morelogin browser profiles
  • Automating with Puppeteer and Playwright
  • Running headless automation for server environments
  • Handling multiple profiles simultaneously

Why Use Morelogin for Web Automation?

Standard browser automation tools leave obvious fingerprints. Websites check for WebDriver properties, automation flags, and inconsistent browser fingerprints.

Morelogin creates isolated browser profiles with real fingerprint parameters. Each profile has its own Canvas hash, WebGL renderer, fonts, screen resolution, and dozens of other attributes.

When you connect Selenium or Puppeteer to a Morelogin profile, the automation framework controls a properly fingerprinted browser. The target website sees a regular user instead of a bot.

This matters for social media management, e-commerce tasks, data collection, and any scenario where detection means account bans.

Step 1: Install and Configure Morelogin

Download Morelogin from the official website at morelogin.com. The application runs on Windows and macOS.

After installation, create your Morelogin account and log in. New accounts receive 2 free permanent browser profiles.

Before running any automation, you need to enable the API interface. Open Morelogin, click the gear icon for Settings, then navigate to the API section.

The API page displays three critical pieces of information: your API ID, API Key, and the local API address. The default API endpoint is http://127.0.0.1:40000.

Write down or copy your API credentials. You'll need these for authentication in your automation scripts.

Important: The API only works while Morelogin is running. Keep the application open in the background during automation tasks.

Step 2: Create Browser Profiles for Automation

Each automation task needs a browser profile. You can create profiles manually through the interface or programmatically via the API.

For manual creation, click "New Profile" in Morelogin. Configure the following settings:

  • Browser Type: Chrome or Firefox (Chrome recommended for Puppeteer)
  • Operating System: Match your target platform (Windows/macOS/Android)
  • Proxy: Add your proxy if needed (residential proxies work best)
  • Fingerprint Settings: Leave on auto-generate for realistic fingerprints

After creating the profile, right-click it in the list. Select "Copy Browser Profile ID" to get the unique identifier you'll use in scripts.

Bulk Profile Creation via API

For automation at scale, create profiles through the API. Here's a Python example:

import requests

API_URL = "http://127.0.0.1:40000"
HEADERS = {
    "Content-Type": "application/json",
    "X-Api-Id": "YOUR_API_ID",
    "X-Api-Key": "YOUR_API_KEY"
}

def create_profiles(count):
    payload = {
        "browserTypeId": 1,      # 1 = Chrome, 2 = Firefox
        "operatorSystemId": 1,   # 1 = Windows, 2 = macOS
        "quantity": count
    }
    
    response = requests.post(
        f"{API_URL}/api/env/create/quick",
        json=payload,
        headers=HEADERS
    )
    
    result = response.json()
    if result["code"] == 0:
        return result["data"]  # Returns list of profile IDs
    else:
        print(f"Error: {result['msg']}")
        return []

# Create 5 new profiles
profile_ids = create_profiles(5)
print(f"Created profiles: {profile_ids}")

This script creates profiles with default fingerprint settings. The API returns an array of profile IDs.

Step 3: Start Profiles and Get Debug Ports

Before connecting automation frameworks, you must start the browser profile through the API. The start endpoint returns a debug port for WebSocket connections.

Here's how to start a profile and get its debug port:

import requests
import time

API_URL = "http://127.0.0.1:40000"
HEADERS = {
    "Content-Type": "application/json",
    "X-Api-Id": "YOUR_API_ID",
    "X-Api-Key": "YOUR_API_KEY"
}

def start_profile(profile_id):
    payload = {"envId": profile_id}
    
    response = requests.post(
        f"{API_URL}/api/env/start",
        json=payload,
        headers=HEADERS
    )
    
    result = response.json()
    if result["code"] == 0:
        debug_port = result["data"]["debugPort"]
        print(f"Profile started on debug port: {debug_port}")
        return debug_port
    else:
        print(f"Failed to start: {result['msg']}")
        return None

def stop_profile(profile_id):
    payload = {"envId": profile_id}
    
    response = requests.post(
        f"{API_URL}/api/env/close",
        json=payload,
        headers=HEADERS
    )
    
    result = response.json()
    return result["code"] == 0

The debugPort in the response is what Selenium, Puppeteer, and Playwright use to connect. Each profile gets its own unique port.

Pro Tip: Always check the profile status before connecting. Use the /api/env/status endpoint to verify the browser is fully loaded.

def check_profile_status(profile_id):
    payload = {"envId": profile_id}
    
    response = requests.post(
        f"{API_URL}/api/env/status",
        json=payload,
        headers=HEADERS
    )
    
    result = response.json()
    if result["code"] == 0:
        return result["data"]["status"]  # "running" or "stopped"
    return None

Step 4: Connect Selenium to Morelogin Profiles

Selenium works with Morelogin through the Remote WebDriver. Instead of launching a new browser, you connect to the already-running profile.

Install the required packages first:

pip install selenium requests

Here's a complete Morelogin automation script using Python and Selenium:

import requests
import time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By

# Configuration
API_URL = "http://127.0.0.1:40000"
PROFILE_ID = "YOUR_PROFILE_ID"
HEADERS = {
    "Content-Type": "application/json",
    "X-Api-Id": "YOUR_API_ID",
    "X-Api-Key": "YOUR_API_KEY"
}

def start_profile(profile_id):
    """Start a Morelogin profile and return the debug port."""
    payload = {"envId": profile_id}
    response = requests.post(
        f"{API_URL}/api/env/start",
        json=payload,
        headers=HEADERS
    )
    result = response.json()
    
    if result["code"] == 0:
        return result["data"]["debugPort"]
    raise Exception(f"Failed to start profile: {result['msg']}")

def stop_profile(profile_id):
    """Stop a running Morelogin profile."""
    payload = {"envId": profile_id}
    requests.post(
        f"{API_URL}/api/env/close",
        json=payload,
        headers=HEADERS
    )

def create_driver(debug_port):
    """Create Selenium driver connected to Morelogin profile."""
    options = Options()
    options.debugger_address = f"127.0.0.1:{debug_port}"
    
    driver = webdriver.Chrome(options=options)
    return driver

def main():
    debug_port = None
    driver = None
    
    try:
        # Start the profile
        debug_port = start_profile(PROFILE_ID)
        time.sleep(3)  # Wait for browser to fully load
        
        # Connect Selenium
        driver = create_driver(debug_port)
        
        # Your automation logic here
        driver.get("https://example.com")
        print(f"Page title: {driver.title}")
        
        # Example: Fill a form
        # driver.find_element(By.ID, "username").send_keys("test")
        
        time.sleep(5)
        
    finally:
        if driver:
            driver.quit()
        stop_profile(PROFILE_ID)

if __name__ == "__main__":
    main()

The key is the debugger_address option. This tells Selenium to connect to an existing Chrome DevTools Protocol session instead of launching a new browser.

Handling ChromeDriver Versions

Morelogin uses its own Chromium core. The API response includes the path to a compatible WebDriver. Use this to avoid version mismatch errors:

def get_webdriver_path(profile_id):
    payload = {"envId": profile_id}
    response = requests.post(
        f"{API_URL}/api/env/status",
        json=payload,
        headers=HEADERS
    )
    result = response.json()
    
    if result["code"] == 0:
        return result["data"].get("webdriver")
    return None

Step 5: Automate with Puppeteer and Playwright

For Node.js projects, Puppeteer offers better performance than Selenium. Playwright provides additional browser support and modern features.

Puppeteer Setup

Install puppeteer-core (not the full puppeteer package):

npm install puppeteer-core axios

Here's a complete Puppeteer script for Morelogin automation:

const puppeteer = require('puppeteer-core');
const axios = require('axios');

const API_URL = 'http://127.0.0.1:40000';
const PROFILE_ID = 'YOUR_PROFILE_ID';
const HEADERS = {
    'Content-Type': 'application/json',
    'X-Api-Id': 'YOUR_API_ID',
    'X-Api-Key': 'YOUR_API_KEY'
};

async function startProfile(profileId) {
    const response = await axios.post(
        `${API_URL}/api/env/start`,
        { envId: profileId },
        { headers: HEADERS }
    );
    
    if (response.data.code === 0) {
        return response.data.data.debugPort;
    }
    throw new Error(`Failed to start: ${response.data.msg}`);
}

async function stopProfile(profileId) {
    await axios.post(
        `${API_URL}/api/env/close`,
        { envId: profileId },
        { headers: HEADERS }
    );
}

async function main() {
    let browser = null;
    
    try {
        // Start Morelogin profile
        const debugPort = await startProfile(PROFILE_ID);
        console.log(`Profile started on port: ${debugPort}`);
        
        // Wait for browser initialization
        await new Promise(r => setTimeout(r, 3000));
        
        // Connect Puppeteer
        const browserWSEndpoint = `ws://127.0.0.1:${debugPort}`;
        browser = await puppeteer.connect({
            browserWSEndpoint,
            defaultViewport: null
        });
        
        // Get existing page or create new one
        const pages = await browser.pages();
        const page = pages[0] || await browser.newPage();
        
        // Your automation logic
        await page.goto('https://example.com');
        console.log(`Page title: ${await page.title()}`);
        
        // Example: Take screenshot
        await page.screenshot({ path: 'screenshot.png' });
        
        await new Promise(r => setTimeout(r, 5000));
        
    } finally {
        if (browser) {
            await browser.disconnect();
        }
        await stopProfile(PROFILE_ID);
    }
}

main().catch(console.error);

The puppeteer.connect() method attaches to the running browser instead of launching one. This preserves all fingerprint settings from Morelogin.

Playwright Setup

Playwright works similarly. Install it with:

npm install playwright-core axios
const { chromium } = require('playwright-core');
const axios = require('axios');

// Same API configuration as Puppeteer example...

async function main() {
    const debugPort = await startProfile(PROFILE_ID);
    
    const browser = await chromium.connectOverCDP(
        `http://127.0.0.1:${debugPort}`
    );
    
    const context = browser.contexts()[0];
    const page = context.pages()[0] || await context.newPage();
    
    await page.goto('https://example.com');
    console.log(await page.title());
    
    await browser.close();
    await stopProfile(PROFILE_ID);
}

Playwright uses connectOverCDP instead of a WebSocket URL. The rest of the workflow remains identical.

Step 6: Run Headless Automation on Servers

For production environments and servers, you need headless execution. Morelogin supports a headless service mode that runs without a GUI.

Starting Headless Mode

Launch Morelogin in headless mode from the command line:

Windows:

cd "C:\Program Files\MoreLogin"
start /WAIT MoreLogin.exe --headless=true --port=40000

macOS:

"/Applications/MoreLogin.app/Contents/MacOS/MoreLogin" --headless=true --port=40000

The --port parameter specifies which port the API listens on. Make sure this matches your scripts.

Starting Profiles in Headless Mode

Profiles can also run headless. Add the isHeadless parameter when starting:

def start_headless_profile(profile_id):
    payload = {
        "envId": profile_id,
        "isHeadless": True
    }
    
    response = requests.post(
        f"{API_URL}/api/env/start",
        json=payload,
        headers=HEADERS
    )
    
    return response.json()

Headless mode requires Morelogin version 2.36.0 or higher.

Running Multiple Profiles Simultaneously

Morelogin automation really shines with multi-profile workflows. Here's a pattern for parallel execution:

import asyncio
import aiohttp

async def start_and_automate(session, profile_id):
    # Start profile
    async with session.post(
        f"{API_URL}/api/env/start",
        json={"envId": profile_id},
        headers=HEADERS
    ) as response:
        result = await response.json()
        debug_port = result["data"]["debugPort"]
    
    # Connect and automate
    options = Options()
    options.debugger_address = f"127.0.0.1:{debug_port}"
    driver = webdriver.Chrome(options=options)
    
    # Run your tasks...
    driver.get("https://example.com")
    
    driver.quit()
    
    # Stop profile
    async with session.post(
        f"{API_URL}/api/env/close",
        json={"envId": profile_id},
        headers=HEADERS
    ) as response:
        pass

async def main():
    profile_ids = ["profile1", "profile2", "profile3"]
    
    async with aiohttp.ClientSession() as session:
        tasks = [
            start_and_automate(session, pid) 
            for pid in profile_ids
        ]
        await asyncio.gather(*tasks)

asyncio.run(main())

Keep in mind the API rate limit of 60 requests per minute per endpoint. Space out your profile starts if running many simultaneously.

Best Practices for Morelogin Automation

Use Proxies Per Profile

Each profile should have its own proxy IP. This prevents correlation between accounts. Configure proxies through the Morelogin interface or API before starting profiles.

Add Random Delays

Instant actions trigger bot detection. Add random pauses between interactions:

import random
import time

def human_delay(min_seconds=1, max_seconds=3):
    time.sleep(random.uniform(min_seconds, max_seconds))

Check Profile Status Before Connecting

Network delays can cause connection failures. Always verify the profile is running:

def wait_for_profile(profile_id, timeout=30):
    start_time = time.time()
    while time.time() - start_time < timeout:
        status = check_profile_status(profile_id)
        if status == "running":
            return True
        time.sleep(1)
    return False

Clean Up Profiles

Clear cookies and cache periodically using the API:

def clear_profile_cache(profile_id):
    payload = {
        "envId": profile_id,
        "cookie": True,
        "localStorage": True,
        "indexedDB": True
    }
    
    requests.post(
        f"{API_URL}/api/env/removeLocalCache",
        json=payload,
        headers=HEADERS
    )

Common Issues and Fixes

Profile Won't Start

Check that Morelogin is running and logged in. The API requires an active session.

Selenium Can't Connect

The profile might not be fully loaded. Increase the delay after starting or use the status endpoint to wait for "running" state.

ChromeDriver Version Mismatch

Use the WebDriver path returned by the status API. Morelogin bundles compatible drivers for each Chromium version.

Rate Limiting

The API limits requests to 60 per minute per endpoint. Implement request queuing for high-volume operations.

Final Thoughts

Morelogin automation gives you the detection evasion of an antidetect browser combined with the power of standard automation frameworks. The local API approach means your existing Selenium or Puppeteer skills transfer directly.

Start with a single profile to test your workflow. Once it works reliably, scale up to multi-profile automation with proper proxies and delays.

The key advantage over raw browser automation is fingerprint isolation. Each Morelogin profile maintains its own browser identity across sessions, making long-term account management practical.

For high-volume scraping or data collection tasks, consider pairing Morelogin with residential proxies from Roundproxies.com to further reduce detection risk.

FAQ

Does Morelogin automation work on Linux servers?

Morelogin currently supports Windows and macOS only. For Linux servers, run the Morelogin client on a Windows instance and connect your scripts via the API over your local network.

Can I use Firefox profiles with Puppeteer?

No, Puppeteer only supports Chromium-based browsers. Use Selenium or Playwright for Firefox profile automation with Morelogin.

How many profiles can run simultaneously?

This depends on your system resources and Morelogin subscription tier. Each profile runs a full browser instance, so RAM is usually the limiting factor.

Do I need to keep Morelogin open during automation?

Yes, the local API only functions while Morelogin is running and logged in. Use headless mode for server deployments.