Home cPanel How to Use CPGuard CLI for Powerful Server Protection

How to Use CPGuard CLI for Powerful Server Protection

by SupportPRO Admin

If you’ve ever wrangled a server or run your own hosting setup, you already know: security isn’t optional. You need solid protection, and that’s where CPGuard comes in. It’s a tough, feature-packed security suite built for web servers. Sure, it plays nice with control panels like cPanel and DirectAdmin, but what really sets it apart for power users is the Command Line Interface—the CLI. If you like working straight from the terminal, this is your playground.

Let’s dig in. I’ll show you how to get around the CPGuard CLI, use the most important commands, and handle your security setup without breaking a sweat.

Why bother with the CLI?

Look, the CPGuard web interface is clean and user-friendly. But if you’re a sysadmin, or you’re juggling a bunch of servers, the CLI gives you the kind of fast, direct control you need. With it, you can:

– Check malware scans as they happen

– Manage quarantined files

– Update malware definitions and rules

– Restart services

– Check your system’s status in seconds

And if you’re into scripting or automation, the CLI is a must.

Getting Started

Once you’ve installed CPGuard, fire up the CLI with:

cpguard

You’ll see a list of available subcommands. Or tack on the help flag to see more options:

cpguard –help

You’ll get something like this:

Usage: cpguard [options] [command]

Options:

 -v, –version   Show version

 -h, –help      Show help message

Commands:

 scan            Scan files or directories

 quarantine      Manage quarantined files

 update          Update definitions

 status          Check CPGuard service status

 logs            View scan and activity logs

 license         Manage license

Now, let’s break down the commands you’ll actually use day to day.

1. Checking Service Status

Want to see if CPGuard is running? Easy:

cpguard status

You’ll get the current status of the CPGuard daemon and related services. If it says “active” or “running,” you’re all set.

2. Running a Malware Scan

Malware scanning is the heart of CPGuard. To kick off a scan for a directory or file, just do:

cpguard scan /home/username/public_html

You can customize the scan with flags:

–quick      Run a fast scan that uses fewer resources

–full       Dig deep—scan every file

–path=/path/to/dir   Point it to a specific directory

During or after the scan, CPGuard will flag any suspicious or infected files, and if you’ve set it up that way, quarantine them automatically.

3. Managing Quarantined Files

Found something nasty? CPGuard throws it into quarantine. To see what’s locked away:

cpguard quarantine list

Want to restore a file from quarantine?

cpguard quarantine restore <filename>

Ready to get rid of something for good?

cpguard quarantine delete <filename>

Always double-check before deleting—sometimes a harmless file gets flagged by accident.

4. Updating Signatures and Definitions

Security tools are only as good as their latest updates. To make sure your definitions are fresh:

cpguard update

This pulls down the newest definitions and rules from CPGuard’s servers. Set it up with a cron job and you’ll never worry about falling behind.

5. Viewing Logs

When stuff goes sideways, logs are where you look. To check recent scan or activity logs:

cpguard logs

You can filter by category or severity. That way, you see when scans ran, what got detected, or if an update failed.

Want to dig in deeper? All logs are stored here:

/usr/local/cpguard/logs/

Check them out manually, or watch them live:

tail -f /usr/local/cpguard/logs/scan.log

6. License Management

Need to check your license?

cpguard license

You’ll see your license key, when it expires, and its status. Got a new key? Update it like this:

cpguard license –update <your_license_key>

Keeps your install running without any interruptions.

Wrapping Up

That’s your starter kit for the CPGuard CLI. It’s fast, flexible, and made for admins who want hands-on control—no web panel required. Also, experts at SupportPRO are just a click away for any assistance you may need with CPGuard.

Partner with SupportPRO for 24/7 proactive cloud support that keeps your business secure, scalable, and ahead of the curve.

Contact Us today!
guy server checkup

Leave a Comment