Download the PHP package nawasara/whm without Composer

On this page you can find all versions of the php package nawasara/whm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package whm

Nawasara WHM

A WHM/cPanel management dashboard for Nawasara. Manage OPD hosting accounts, email accounts, and mail server operations without opening WHM directly.

Features

Hosting

Email (advanced features need SSH)

Cross-cutting


WHM API Token Setup

The WHM API Token is used for every operation that goes through the HTTP API (account, email, and package management). It is safer than the root password because it can be revoked, scope-restricted, and IP-restricted.

Step 1: Log in to WHM

Log in as root or a reseller user that has API access.

Step 2: Open the API Tokens menu

Step 3: Generate the token

  1. Click Generate Token
  2. Fill in the form:
    • Token Name: nawasara
    • IP Address Restrictions (optional but strongly recommended): the Nawasara server IP
    • Expiration: Does Not Expire for a permanent integration
  3. Privileges, at minimum:

    Privilege Required? Reason
    List Accounts yes List cPanel accounts
    Create / Modify / Suspend / Terminate Account yes Account CRUD
    List / Add / Edit / Kill Package yes Package management
    Show Account Summary yes Account detail
    Basic WHM Functions yes Version, service, load
    Email (Email::*) yes, for the Email Accounts feature UAPI: list_pops_with_disk, add_pop, delete_pop, passwd_pop, edit_popquota, suspend, unsuspend_

    In practice, pick All Features if the user is a root admin.

  4. Save. The token appears once, so copy it right away.

Step 4: Store it in Nawasara Vault

  1. Vault -> Credentials -> WHM / cPanel -> + Add Instance
  2. Fill in the form:
    • Instance Name: WHM-Ryder, cpanel-kominfo, and so on
    • Host: https://cpanel.ponorogo.go.id:2087
    • Username: root (or the user that generated the token)
    • API Token: paste the token
    • Server Role: hosting, mail, or both
      • hosting: cPanel website server
      • mail: email server (Email Accounts, Mail Queue, Mail Log, Email Stats, and Mail Security will auto-select this server)
      • both: multi-purpose server
  3. (Optional) SSH fields, required for the Mail Queue/Log/Stats/Security features. See the SSH Setup section below.
  4. Save

Step 5: Verify

  1. Open WHM Hosting -> Accounts and confirm the cPanel accounts show up
  2. Open WHM Hosting -> Email Accounts. Email addresses appear after the first "Sync Now" run.

Common errors:


SSH Setup (for Mail Queue / Log / Stats / Security)

Those four mail-ops features use SSH to the mail server, because access to the Exim queue and logs over the HTTP API is limited. If you only need Email Account CRUD, you can skip SSH.

Step 1: Check the mail server's SSH port

Log in to the mail server over SSH with whatever tool you normally use (PuTTY, a terminal), then:

Note the port. It is usually 22, sometimes custom (2222, 6416, and so on).

Step 2: Generate a dedicated SSH key for Nawasara

Do not reuse an existing root key. Generate a new one so it can be revoked at any time.

Result:

Step 3: Install the public key into authorized_keys

Step 4: Copy the private key

Copy the whole thing, including the -----BEGIN ... and -----END ... lines:

Step 5: Fill in the SSH fields in Vault

Edit the WHM instance and set the SSH fields:

Field Value
SSH Host (optional) leave blank if the SSH host is the same as the WHM host (auto-extracted from the WHM URL)
SSH Port the result of step 1 (default 22)
SSH User usually root
SSH Private Key (PEM) paste the private key from step 4 (textarea, multi-line)

Save.

Step 6: Verify

Via tinker:

Or just open WHM Hosting -> Mail Queue. If it works, the queue shows up. If it fails, the page gives a hint about what went wrong.


Multi-Server Setup

Add a new instance in Vault for each server. Every role-aware page (Email, Queue, Stats, Security, Account, and so on) auto-filters to the servers matching its role and shows a "Server" dropdown to switch between them.

Each server must have its own API token. Do not share a token across servers.


Sync to Registry

cPanel accounts are mirrored into the Registry at the end of every account sync (AccountRegistrySync, from the local accounts table — no extra WHM call). Until 6 Nov 2026 this only ran from whm:sync-accounts --registry by hand, so new accounts never reached the registry and their PICs never saw them in Akun Kisara.


Permissions

After install or update, run:

Permission Purpose
Account
whm.account.view View the account list
whm.account.create Create a new account
whm.account.suspend Suspend and unsuspend
whm.account.terminate Delete an account permanently
whm.account.manage Change password, change package
Package
whm.package.view View the package list
whm.package.manage Create and delete packages
Server
whm.server.view View server status
whm.server.manage Future: restart service, etc.
Email
whm.email.view View the email account list
whm.email.create Add an email account
whm.email.manage Edit quota, reset password, suspend, delete
Mail Queue
whm.mailqueue.view View the Exim queue
whm.mailqueue.manage Force/freeze/thaw/bounce/delete a message
Mail Log
whm.maillog.view Search and trace the mail log
Email Stats
whm.emailstats.view View the stats dashboard
Spam / Mail Security
whm.spam.view View the reject log analysis
whm.spam.manage Future: blacklist/whitelist editing
System
whm.ssh.execute Gate for operations over SSH
whm.sync.execute Run a manual sync
Session (cross-package, webmail SSO bridge)
whm.session.create Internal: call the create_user_session API
webmail.session.launch User-facing webmail auto-login (attached by default to the guest and developer roles)
webmail.session.audit.view Audit only: view the launch history without the ability to launch (for a compliance reviewer)
webmail.session.launch_as Admin impersonation: open any user's webmail. Sensitive, assign manually per admin
whm.cpanel.launch_as Admin impersonation: open any cPanel account (full hosting control). Sensitive, kept separate from webmail.*

All permissions are automatically assigned to the developer role.

Note on the webmail.* and whm.cpanel.launch_as permissions: the webmail.* namespace is shared with a controller in nawasara/core (WebmailLaunchController) but declared here because it is the WHM API that mints the Roundcube session. If you install nawasara/core without nawasara/whm, the webmail.* permissions will not exist in the DB and launching will be denied. Install both packages, or remove the launch button from the UI.


Audit Log

Every mutation (create email, change password, suspend, delete, and so on) is recorded at /admin/sync/jobs with:

Filter by user, service, or status for quick investigation.


Troubleshooting

WHM API

Problem Cause Fix
Unauthorized Token wrong, expired, or revoked Regenerate in WHM, update in Vault
Connection refused Wrong host/port, or an IP firewall block Test telnet host 2087 from the Nawasara server
cURL error 60 SSL Self-signed cert Already handled by withoutVerifying(). A remaining error means an outbound firewall block
cURL error 28 timed out Slow server or network Raise timeout in config/nawasara-whm.php
listaccts empty The token user has no access to accounts Log in as root or a reseller with accounts under it

SSH (Exim ops)

Problem Cause Fix
SSH credentials belum di-set di Vault SSH fields not filled in Fill them in Vault -> instance -> SSH fields
SSH authentication gagal Public key not installed on the server, or the key is invalid Check cat ~/.ssh/authorized_keys on the server and confirm the Nawasara public key is there
Invalid SSH private key Wrong PEM format or corrupted newlines Make sure you pasted the full key including the -----BEGIN/END----- lines, and use the textarea (not a single line)
Connection timeout Custom SSH port or firewall block Check ss -tlnp \| grep sshd on the server and adjust the SSH Port in Vault
Permission denied during exim -Mrm / exim -Mf The SSH user is not root and there is no sudo Either use the root user, or grant sudo NOPASSWD for the /usr/sbin/exim binary
Mail Queue/Log empty Non-default log path Override the EximClient::DEFAULT_MAINLOG constant, or pass path in the searchLog() filters

Performance

Symptom Tuning
Email Accounts page is slow Check /admin/sync/jobs to see whether sync_emails finished. If it is pending, the queue worker is down. Run php artisan queue:work
Mail Log search is slow Lower the limit filter. The default is 200, so try a smaller value. The SSH timeout of 60s is enough for GB-sized logs.
Stats trend empty for previous days The Exim log is daily-rotated and the aggregator already reads *.gz. If it is still empty, check ls /var/log/exim_mainlog* on the server

All versions of whm with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^12.0
spatie/laravel-permission Version ^6.0
nawasara/ui Version *
nawasara/keycloak Version *
nawasara/search Version *
nawasara/sync Version *
nawasara/vault Version *
nawasara/registry Version *
livewire/livewire Version ^3.0
phpseclib/phpseclib Version ^3.0
nawasara/auth-primitives Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nawasara/whm contains the following files

Loading the files please wait ...