npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

pvea_proxmox

v1.1.0

Published

proxmox api library for node.js.

Readme

pvea_proxmox

Node.js Version npm version Security

pvea_proxmox (pronounced pea-va) is a modern and up-to-date node.js client for the proxmox api. Note: This is a reupload of pvea package of Jade Cole!

Proxmox API wiki.
Proxmox API documentation.

Installation:

npm i pvea_proxmox or yarn add pvea_proxmox.

Requirements

  • Node.js: >=16.0.0 (tested with Node.js 16, 18, 20, and 22)
  • npm: Any recent version

Security Notice

⚠️ Version 1.1.0 contains critical security updates! This version fixes multiple high-severity vulnerabilities in the axios dependency. Please upgrade immediately if you're using version 1.0.0.

To-Do List:

  • [X] Basic functionality.

    • [X] Authenticate with Proxmox VE API.
    • [X] Check if authentication token is expired.
    • [X] Get api version.
  • [X] storage

    • [X] getStorage(param)
    • [X] createStorage(param)
    • [X] getStorageConfig(storage)
    • [X] deleteStorageConfig(storage, param)
    • [X] getStorageStatus(node, storage)
    • [X] getStorageRrdData(node, storage, param)
    • [X] getStorageContent(node, storage, param)
    • [X] allocateDiskImage(node, storage, param)
    • [X] getVolumeAttributes(node, storage, volume, param)
    • [X] deleteVolume(node, storage, volume, param)
    • [X] createBackup(node, param)
    • [X] getBackupConfig(node, param)
  • [X] pools

    • [X] getPools()
    • [X] getPoolConfig(poolid)
    • [X] deletePoolConfig(poolid)
    • [X] updatePoolConfig(poolid, param)
  • [X] nodes

    • [X] getNodes()
    • [X] wakeNode(node)
    • [X] getNodeVersion(node)
    • [X] getNodeTime(node)
    • [X] updateNodeTimeZone(node, param)
    • [X] getNodeLog(node, param)
    • [X] getNodeSubscriptionStatus(node)
    • [X] deleteNodeSubscriptionKey(node)
    • [X] setNodeSubscriptionKey(node)
    • [X] updateNodeSubscriptionKey(node)
    • [X] stopAll(node, param)
    • [X] getNodeStatus(node)
    • [X] rebootNode(node)
    • [X] shutdownNode(node)
    • [X] startAll(node, param)
    • [X] getNodeRrdData(node)
    • [X] getNodeReport(node)
    • [X] getNodeNetstat(node)
    • [X] migrateAll(node, param)
    • [X] getNodeJournal(node, param)
    • [X] getNodeHostname(node)
    • [X] setNodeHostname(node, param)
    • [X] getNodeDnsSettings(node)
    • [X] setNodeDnsSettings(node, param)
    • [X] listNodeCpu(node)
    • [X] getNodeConfig(node, param)
    • [X] updateNodeConfig(node, param)
    • [X] getNodeAplInfo(node)
  • [X] tasks

    • [X] getNodeTasks(node, param)
    • [X] stopTask(node, upid)
    • [X] getTaskLog(node, upid, param)
    • [X] getTaskStatus(node, upid)
  • [X] services

    • [X] reloadService(node, service)
    • [X] restartService(node, service)
    • [X] startService(node, service)
    • [X] stopService(node, service)
    • [X] getServiceState(node, service)
    • [X] listServices(node)
  • [X] lxc

    • [X] listLxcContainers(node)
    • [X] createLxcContainer(node, param)
    • [X] createLxcTemplate(node, vmid)
    • [X] getLxcRRDData(node, vmid, param)
    • [X] resizeLxcContainer(node, vmid, param)
    • [X] getLxcPending(node, vmid)
    • [X] getLxcConfig(node, vmid)
    • [X] cloneLxcContainer(node, vmid, param)
    • [X] suspendLxcContainer(node, vmid)
    • [X] stopLxcContainer(node, vmid)
    • [X] resumeLxcContainer(node, vmid)
    • [X] rebootLxcContainer(node, vmid)
    • [X] getLxcContainerStatus(node, vmid)
    • [X] deleteLxcContainer(node, vmid, param)
    • [X] getLxcSnapshot(node, vmid)
    • [X] createLxcSnapshot(node, vmid, param)
    • [X] deleteLxcSnapshot(node, vmid, snapName, param)
    • [X] getLxcSnapshotConfig(node, vmid, snapName)
    • [X] updateLxcSnapshotMetadata(node, vmid, snapName, param)
    • [X] rollbackLxcContainer(node, vmid, snapName)
    • [X] getLxcFirewallRefs(node, vmid)
    • [X] getLxcFirewallOptions(node, vmid)
    • [X] setLxcFirewallOptions(node, vmid, param)
    • [X] getLxcFirewallLog(node, vmid, param)
    • [X] getLxcFirewallRules(node, vmid)
    • [X] createLxcFirewallRule(node, vmid, param)
    • [X] getLxcFirewallIPSets(node, vmid)
    • [X] createLxcFirewallIPSet(node, vmid, param)
    • [X] getLxcFirewallAliases(node, vmid)
    • [X] createLxcFirewallAlias(node, vmid, param)
  • [X] qemu

    • [X] listQemuVms(node)
    • [X] getQemuVmConfig(node, vmid)
    • [X] checkQemuVmFeature(node, vmid)
    • [X] getQemuVmMigrationPreconditions(node, vmid)
    • [X] cloneQemuVm(node, vmid, param)
    • [X] suspendQemuVm(node, vmid)
    • [X] stopQemuVm(node, vmid)
    • [X] startQemuVm(node, vmid)
    • [X] shutdownQemuVm(node, vmid)
    • [X] resumeQemuVm(node, vmid)
    • [X] rebootQemuVm(node, vmid)
    • [X] execQemuMonitorCommand(node, vmid, param)
    • [X] moveQemuVmDisk(node, vmid, param)
    • [X] getQemuVmPendingConfig(node, vmid)
    • [X] getQemuSnapshot(node, vmid)
    • [X] createQemuSnapshot(node, vmid, param)
    • [X] deleteQemuSnapshot(node, vmid, snapName, param)
    • [X] getQemuSnapshotConfig(node, vmid, snapName)
    • [X] updateQemuSnapshotMetadata(node, vmid, snapName, param)
    • [X] rollbackQemuVm(node, vmid, snapName)
    • [X] createQemuVm(node, param)
    • [X] getQemuVmCloudinitConfig(node, vmid)
    • [X] makeQemuVmTemplate(node, vmid, param)
    • [X] createQemuVmTermProxy(node, vmid, param)
    • [X] getQemuFirewallRefs(node, vmid)
    • [X] getQemuFirewallOptions(node, vmid)
    • [X] setQemuFirewallOptions(node, vmid, param)
    • [X] getQemuFirewallLog(node, vmid, param)
    • [X] getQemuFirewallRules(node, vmid)
    • [X] createQemuFirewallRule(node, vmid, param)
    • [X] getQemuFirewallIPSets(node, vmid)
    • [X] createQemuFirewallIPSet(node, vmid, param)
    • [X] createQemuFirewallIPSet(node, vmid, param)
    • [X] unlinkQemuVmDisk(node, vmid, param)
    • [X] createQemuVmVncProxy(node, vmid, param)
    • [X] getQemuRRDData(node, vmid, param)
    • [X] execGetQemuAgentCommand(node, vmid, command)
    • [X] execPostQemuAgentCommand(node, vmid, command, params)
    • [X] deleteQemuVm(node, vmid, param)
    • [X] getCurrentQemuVmState(node, vmid)
  • [ ] Write documentation for this library.

Usage Examples:

Basic Usage

const pveajs = require("pvea_proxmox")

// Create a new instance
const pvea = new pveajs('hostname', 'user@auth', 'password')

// Basic example
async function main() {
    // Get version of proxmox API
    const version = await pvea.getVersion()
    console.log(version)
    
    // Get nodes
    const nodes = await pvea.getNodes()
    console.log(nodes)
}

// Execute the application
pvea.run(main)

Advanced Usage with Error Handling

const pveajs = require("pvea_proxmox")

// Use environment variables for production
const pvea = new pveajs(
  process.env.PROXMOX_HOST || 'proxmox.example.com',
  process.env.PROXMOX_USER || 'admin@pve', 
  process.env.PROXMOX_PASSWORD || 'your-password',
  null,   // AgentOpts (null for self-signed certificates)
  8006,   // Port (default: 8006)
  false   // Silent mode (default: false)
)

async function main() {
  try {
    // Check if authenticated
    if (!pvea.isAuthenticated()) {
      console.log('Will authenticate automatically...')
    }

    // Get API version
    const version = await pvea.getVersion()
    console.log('API Version:', version)

    // Get all nodes
    const nodes = await pvea.getNodes()
    
    for (const node of nodes) {
      const status = await pvea.getNodeStatus(node.node)
      console.log(`Node ${node.node}:`, status)
    }

  } catch (error) {
    console.error('Error:', error.message)
    process.exit(1)
  }
}

// Run with error handling
pvea.run(main).catch(error => {
  console.error('Failed to run:', error.message)
  process.exit(1)
})

Silent Mode (No Console Output)

const pveajs = require("pvea_proxmox")

// Create instance with silent mode enabled
const pvea = new pveajs('hostname', 'user@auth', 'password', null, 8006, true)

async function main() {
    // All operations will run without console output
    const version = await pvea.getVersion()
    return version
}

pvea.run(main)

Contributors

Thanks to Creator of this package Jade, uqlel, andressantamaria2003, and simonfrfr.

Notes

Thanks to Creator of this package ttarvis for writing node-proxmox! Code was used for reference and function names are taken from it. Also thanks to alo-is for writing another module also called node-proxmox.