🎁 Surprise Discount: Enjoy 90% Off Your Subscription!

⚡️ Nstproxy - 110M+ IPs for Lightning-Fast Scraping & Automation, Starting at $0.1/GB.

  • Pricing
  • Documentation
EN
Contact

© 2025 NST LABS TECH LTD. ALL RIGHTS RESERVED

Products

Anti-Detect Browser
Nstbrowser RPA
Cloudflare Bypass
Web Unblocker

Solutions

Cloud Fingerprint Browser
Multi-Account Management
Web Scraping & Automation
Anti-Detection Bot

Resources

Pricing
Download
RPA Marketplace
Affiliate Program
Partners
Blog
Release Notes

Support

Contact

Documentation

Legal

Terms
Privacy Policy
Cookies Policy

ProductsSolutionsResourcesSupportLegal

ProductsSolutionsResources

SupportLegal

© 2025 NST LABS TECH LTD. ALL RIGHTS RESERVED

Back to Blog
crawler on ubuntu
solution

How to Use Nstbrowser Agent to Build a Crawler Service on Ubuntu?

This article will provide developers with a detailed guide on how to install and run the Nstbrowser Agent on Ubuntu systems and connect to the launched browser via Puppeteer.
Feb 24, 2025Carlos Rivera

Nstbrowser is a browser focused on privacy protection and fingerprint management, making it suitable for developers or business scenarios that require customized fingerprint environments.

1. Article Content and Purpose

The purpose of this tutorial is to help developers quickly get started with the installation and usage of the Nstbrowser Agent. It covers the entire process from script installation to operating the browser via Puppeteer. By following this article, you will be able to:

  • Install Nstbrowser Agent on Ubuntu.
  • Start and run the Agent service.
  • Use Puppeteer to interact with the browser launched by the Agent.

2. Installing Nstbrowser Agent

System requirements and environment preparation

To ensure the service runs smoothly, make sure your server meets the following requirements before starting the setup:

  1. Operating System: Currently, Nstbrowser-agent is only compatible with the following system versions:
  • Ubuntu 22.04 (AMD64 or ARM64 architecture)
  • Ubuntu 24.04 (AMD64 or ARM64 architecture)
  1. Hardware Requirements:
  • At least 2 GB of RAM
  • At least 10 GB of available disk space
  1. Network Environment:
  • Ensure the server can access the internet to download necessary files.

Executing the Nstbrowser-agent one-click installation script

Nstbrowser GitHub provides a convenient installation script. You can download and run it directly using the following command:

Bash Copy
wget -qO- https://github.com/Nstbrowser/nstbrowser-agent-setup/releases/download/v1.0/agent_install.sh | sudo bash

Note: By default, the installation script will download and install necessary fonts and kernels. If you don't need these components, you can skip them using the following options:

  • Skip kernel installation: --no-kernel
  • Skip font installation: --no-fonts

For example, if you only want to install Nstbrowser-agent without fonts and kernels, run the following command:

Bash Copy
wget -qO- https://github.com/Nstbrowser/nstbrowser-agent-setup/releases/download/v1.0/agent_install.sh | sudo bash -s --no-kernel --no-fonts

Installation Process Breakdown

The installation script will automatically complete the following tasks:

  • Check if the system meets the minimum requirements (e.g., OS version, memory, and disk space).
  • Update system packages and install necessary dependencies.
  • Download and install the latest Nstbrowser-agent.
  • Download and install fonts and kernels (unless skipped).

After the installation is complete, you will see the prompt: "agent install success!"

agent install success!

Starting Nstbrowser-agent

After installation, run the following command to start Nstbrowser-agent:

Bash Copy
sudo ./agent --referer=client
Starting Nstbrowser-agent

By default, Nstbrowser-agent uses port 8848 to provide services. Once started, you can access your crawler server by visiting http://<YOUR_SERVER_IP>:8848.

3. Connecting to Agent Using Puppeteer

After installing and starting Nstbrowser-agent, you can begin using it for crawler development. Since Nstbrowser supports mainstream automation tools like Puppeteer and Playwright, you can easily integrate it into your existing crawler framework.

For example, if you are using Puppeteer, you can connect to Nstbrowser-agent with the following code:

JavaScript Copy
import puppeteer from 'puppeteer-core';

async function execPuppeteer(browserWSEndpoint) {
    try {
        const browser = await puppeteer.connect({
            browserWSEndpoint: browserWSEndpoint,
        });
        const page = await browser.newPage();
        await page.goto('https://www.google.com');
        await page.screenshot({ fullPage: true, path: "google.png" })
        await browser.close()
    } catch (err) {
        console.error(err);
    }
}

async function createAndConnectToBrowser() {
    const host = 'YOU_SERVER_IP:8848';
    const apiKey = 'YOU_API_KEY';
    const config = {
        headless: true, // Must be true
        name: 'NstProfile',
        platform: 'linux',
        kernel: 'chromium', 
        kernelMilestone: '132',
        once: true,
    };
    const query = new URLSearchParams({
        'x-api-key': apiKey, // required
        config: encodeURIComponent(JSON.stringify((config))),
    });
    
    const browserWSEndpoint = `ws://${host}/devtool/launch?${query.toString()}`;
    await execPuppeteer(browserWSEndpoint)
}

createAndConnectToBrowser().then();
Connecting to Agent Using Puppeteer

Note: Since Nstbrowser-agent typically runs in a headless server environment without a virtual graphical display, the browser can only be launched in headless mode.

4. Using APIs to Operate the Agent

Nstbrowser-agent provides powerful API support, allowing users to programmatically create and manage browser configurations. These configurations can be used for automated testing, crawler development, or other scenarios requiring browser instances.

Next, we demonstrate a specific API usage example: Createfile

Javascript Copy
import axios from 'axios';

async function createProfile() {
    const host = 'YOU_SERVER_IP:8848';
    const apiUrl = `http://${host}/api/agent/profile`; 
    const apiKey = 'YOU_API_KEY'; 

    const profileData = {
        name: 'NstProfile',
        platform: 'linux',
        kernel: 'chromium',
        kernelMilestone: '132',
        proxy: 'http://username:password@proxy_ip:proxy_port',
        startupUrls: ['https://www.google.com'], // The URL that is loaded at startup
        args: {
            "--headless": true // chrome startup parameter
        }
    };
    try {
        const response = await axios.post(apiUrl, profileData, {
            headers: {
                'x-api-key': apiKey,
                'Content-Type': 'application/json',
            },
        });

        console.log('Profile created successfully:', response.data);
    } catch (error) {
        console.error('Failed to create profile:', error);
    }
}

createProfile();

After running successfully, you will get the following result:

PowerShell Copy
Profile created successfully: {
  data: {
    profileId: 'YOU_PROFILEID',
    fingerprintId: 'YOU_FINGERPRINTID',
    groupId: 'YOU_GROUP_ID',
    teamId: 'YOU_TEAM_ID',
    userId: 'YOU_USER_ID',
    name: 'NstProfile',
    kernel: 0,
    kernelVersion: '',
    kernelMilestone: '132',
    uaFullVersion: '132.0.6834.83',
    platform: 2,
    platformVersion: '6.3.3',
    saveLocal: false,
    status: 1,
    note: '',
    tags: null,
    _id: 'YOU_ID',
    createdAt: '2025-01-01T00:00:00.000Z',
    updatedAt: '2025-01-01T00:00:00.000Z'
  },
  err: false,
  msg: 'success',
  code: 200
}

5. Nstbrowser Resources

Below are the official resource links for Nstbrowser. Developers can explore further as needed:

  • Official Website: https://www.nstbrowser.io - Learn about Nstbrowser's product features and latest updates.
  • Documentation: https://docs.nstbrowser.io - Get detailed instructions on installation, configuration, and API development.
  • Discord Community: https://discord.gg/apuW9DgB - Join the community to exchange experiences with other developers or get technical support.
More
Understanding NFTs: A Beginner's Guide to Non-Fungible Tokens in 2025
Headless BrowsersolutionBrowser Fingerprint
Understanding NFTs: A Beginner's Guide to Non-Fungible Tokens in 2025
Demystify NFTs with this beginner's guide for 2025. Learn what non-fungible tokens are, how they work, their diverse applications, and how to securely engage with the NFT ecosystem using Nstbrowser
Oct 14, 2025Carlos Rivera
How to Get Crypto Airdrops
Headless BrowserMulti-accountingsolution
For Beginners: How to Get Crypto Airdrops in 2025 – The Ultimate Guide
New to crypto airdrops in 2025? This guide covers how to find, participate, maximize gains, mitigate risks, and use Nstbrowser for secure multi-wallet management to seize wealth opportunities.
Oct 06, 2025Carlos Rivera
Why Is My TikTok Account Suspended? 2025 Causes & Solutions
Multi-accountingsolution
Why Is My TikTok Account Suspended? 2025 Causes & Solutions
Has your TikTok account been suspended? This guide deeply analyzes common causes of account suspension, detailed appeal processes, and preventive strategies to help you avoid bans, and recommends Nstbrowser for secure multi-account management.
Oct 04, 2025Robin Brown
Discord Account Guide
Headless BrowserMulti-accountingsolution
Discord Account Disabled? 2025 Guide to Reactivate & Recover
Has your Discord account been disabled? This guide provides detailed steps, appeal tips, and preventive measures to help you quickly return to the Discord community and securely manage multiple accounts with Nstbrowser.
Oct 02, 2025Robin Brown
How to Recover Instagram Account
RPAsolutionMulti-accounting
Instagram Disabled My Account: How to Recover It Quickly
Has your Instagram account been disabled? This guide provides detailed recovery steps, appeal tips, and preventive measures to help you quickly regain access and manage multiple accounts securely with Nstbrowser.
Oct 01, 2025Robin Brown
How to Know If You're Banned from ChatGPT and How to Fix It (2025 Guide)
solution
How to Know If You're Banned from ChatGPT and How to Fix It (2025 Guide)
Banned from ChatGPT? Learn how to identify a ban, why it happens, and actionable steps to fix it. Discover how Nstbrowser can help you regain access and boost performance in 2025.
Sep 16, 2025Luke Ulyanov
Catalogue