This document contains a complete description of command line utilities, commands, and
options for Plesk for Linux/Unix.
Who Should Read This Document
This document is intended for Plesk administrators who want to manage the Plesk server
and its configuration locally using command line utilities. The document can also be used by
third-party developers to integrate Plesk with other products installed on the same server.
6 Preface
Typographical Conventions
Formatting convention
Type of Information
Example
Special Bold
Items you must select, such as
menu options, command
buttons, or items in a list.
Go to the QoS tab.
Titles of chapters, sections,
and subsections.
Read the Basic Administration chapter.
Italics
Used to emphasize the
importance of a point, to
introduce a term or to
designate a command line
placeholder, which is to be
replaced with a real name or
value.
The system supports the so called
wildcard character search.
Monospace
The names of style sheet
selectors, files and directories,
and CSS fragments.
The license file is located in the
httpdocs/common/license
directory.
Preformatted
On-screen computer output in
your command-line sessions;
source code in XML, C++, or
other programming languages.
# ls –al /files
total 14470
Preformatted Bold
What you type, contrasted with
on-screen computer output.
# cd /root/rpms/php
The following kinds of formatting in the text identify special information.
Feedback
If you have found a mistake in this guide, or if you have suggestions or ideas on how to
improve this guide, please send your feedback using the online form at
http://www.parallels.com/en/support/usersdoc/. Please include in your report the guide's title,
chapter and section titles, and the fragment of text in which you have found an error.
This chapter describes the version-specific changes in the CL utilities. The changes are
C H A P T E R 1
History of Changes in CL Utilities
grouped by new features in CLI. To describe a particular change in CLI, we use the
following notation:
(+) - the defined utility or command or option is added
(-) - the defined utility or command or option is deprecated
(*) - the defined utility or command or option is modified
Plesk 8.6
Added managing permission on selecting database server on which a database is to
Plesk Command Line Interface (CLI) is designed for integration of Plesk Server
Utility
Affected Object(s)
admin (on page 14)
Plesk administrator control panel interface preferences
and personal information.
ai_prefs(on page 138)
Operating System update sources.
anonftp (on page 17)
Anonymous FTP access on domains with physical
hosting on a Plesk server.
autoresponder (on page 123)
Mail autoresponders.
certificate (on page 171)
SSL certificates.
cfsetting (on page 41)
ColdFusion service on the Plesk server.
client (on page 20)
Client accounts.
client_pref (on page 25)
Client limits and permissions, IP pool, and Plesk
interface preferences (for example, the default
language and skin) for Plesk clients.
client_template (on page 33)
Client templates.
custombutton (on page 42)
Custom buttons.
database (on page 52)
Databases and database users.
database-server (on page 49)
Database servers.
C H A P T E R 2
Overview
Administrator with third-party applications. It can also be used for managing Plesk
installations by administrators experienced in using Plesk. This feature provides the
command line interface to the majority of management tasks that can be performed by
Plesk administrator. The CLI provides the alternative means of control for various
business objects in Plesk. Plesk command line utilities use the Plesk core functionality
to create, manage, and delete clients, domains, services and other Plesk objects.
Plesk CL utilities may be used by the root user from the console or script. The utilities
require "root" or "psaadm" privileges to operate.
Plesk CLI supports localized names of business objects in the same manner as Plesk
does. Therefore, you can create clients with contact names using a locale of your
choice. Use the LANG environment variable to set up a particular locale.
Plesk CLI does not require the Web interface of Plesk Server Administrator to run.
Plesk CLI is commonly included in the Plesk distribution kit and is also available as the
separate plesk-api-cli package.
The table below presents the command utilities provided by the current version of
Plesk (in alphabetical order).
10 Overview
Utility
Affected Object(s)
desktop (on page 57)
Desktop presets.
dns (on page 66)
DNS zones on domains and domain aliases.
domadmin (on page 84)
Domain administrator accounts.
domain (on page 73)
Domain accounts.
domain_pref (on page 94)
Domain limits and preferences for applications,
scripting support, e-mail, and other services.
domain_template (on page 98)
Domain templates.
domalias (on page 91)
Domain aliases.
init_conf (on page 143)
Initial configuration of the Plesk server; Plesk
administrator personal info.
interface_template (on page
111)
Control panel interface templates.
ipmanage (on page 114)
IP addresses on Plesk server.
mail (on page 117)
Domain-level mail service, and mail names (e-mail
accounts).
maillist (on page 134)
Mailing lists.
mailserver (on page 129)
Server-wide mail server settings.
protdir (on page 161)
Password protection of Web directories on domains.
server_dns (on page 60)
Server-wide DNS zone template.
server_pref (on page 107)
Plesk default interface preferences, and Plesk server
system preferences.
service (on page 140)
Services on the Plesk server.
siteapp (on page 152)
Site application packages.
siteapp-item (on page 155)
Site application items.
siteapp-license (on page
159)
Site application licenses.
skeleton (on page 165)
Site skeletons (directory structure).
spamassassin (on page 167)
Spamassassin spam filter.
sso (on page 148)
Single sign-on configuration.
subdomain (on page 175)
Subdomains.
tomcat (on page 180)
Tomcat service and the Java-based Web applications
on domains.
webstat (on page 183)
Webalizer preferences.
webuser (on page 185)
Web users on domains.
The Plesk for Linux/Unix command line utilities must be run from the directory in which
they are stored. For general instructions on executing command line utilities on Plesk
server, consult the Getting Started with Command-Line Utilities (on page 11) section.
Command line utilities for Plesk for Linux/Unix are located in the
C H A P T E R 3
Getting Started with Command Line
Utilities
/usr/local/psa/bin directory on the Plesk server.
To run command line utilities:
1 Log in to the Plesk server via SSH.
2 Use one of the following options to run a utility:
To run a utility from any directory, use the following command line format:
To run a utility when the /usr/local/psa/bin/ is your current directory, use
the following format:
# ./<utility name> [parameters] [options]
Upon successful execution, utilities return the 0 code. If an error occurs, utilities return
code 1 and display the description of the encountered problem on stderr.
For exact command syntax for each utility, consult the corresponding sections in the
Chapter "Using Command Line Utilities (on page 12)".
Warning: Passing passwords through CLI as parameters of the -passwd option
may potentially compromise the system's security as command line can be observed
by other users of the system. It is more secure to pass passwords through the
environment variables. You can transfer non-encrypted passwords by using
environment variable PSA_PASSWORD while using single quotes to specify the empty
values in the command line for the arguments of the -passwd - -passwd_type
options. Similarly, you can transfer encrypted passwords through the environment
variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty
values in the command line for the arguments of the -passwd and -passwd_type
options.
Plesk for Linux/Unix command line utilities enable Plesk administrators to manage the
C H A P T E R 4
Using Command Line Utilities
Plesk server and its configuration, client accounts, domains, and various services. The
utilities can be used for integration of third-party products with Plesk and for routine
management of Plesk servers by system administrators.
This chapter describes in detail the commands and options currently available for the
command-line utilities. Each command and option is accompanied by a description and
a usage example.
Using Command Line Utilities 13
In this chapter:
Administrator's Server Preferences: admin Utility .............................................. 14
Tomcat Service and Java Applications on Domains: tomcat Utility .................... 180
Web Statistics: webstat Utility ............................................................................ 183
Web Users: webuser Utility ............................................................................... 185
14 Using Command Line Utilities
Administrator's Server Preferences:
Command
Parameter
Description
Example
-update
or -u
Updates Plesk
administrator's
server
preferences.
To set the WinXP Olivegreen skin as the default
interface skin:
# ./admin --update -skin "WinXP
Olivegreen"
or
# ./admin -u -skin "WinXP Olivegreen"
--info or
-i
Displays Plesk
administrator’s
personal
information and
preferences.
To view Plesk administrator’s personal information
and preferences:
# ./admin --info
or
# ./admin -i
--xml-
info or -
xi
Displays Plesk
administrator’s
personal
information and
preferences in the
XML format.
To view Plesk administrator’s personal information
and preferences in the XML format:
# ./admin --xml-info
or
# ./admin -xi
admin Utility
The admin utility is used to manage Plesk administrator control panel interface
preferences and view the administrator's personal information and interface
preferences through CLI.
Sets the default interface
language for Plesk
administrator's control panel
interface.
The argument of the
command must be a valid
four-letter language code
derived from the language
code described in ISO-639-2
and the corresponding country
code described in ISO-3166.
For example, the Plesk code
for the Italian language code
is it-IT; the Plesk code for
the American variant of
English is en-US; the Plesk
code for the British variant of
English is en-GB.
To set the default interface
language to Russian:
# ./admin -u -locale
ru-RU
-skin
<skin_name>
Sets the default interface skin
for Plesk administrator's
control panel interface.
To set the default interface
skin to WinXP Olivegreen:
# ./admin -u -skin
"WinXP Olivegreen"
template
<template_name>
Applies an interface
customization template to
Plesk administrator's control
panel interface.
To apply the customization
template CustomTemplate
to administrator's control
panel interface:
# ./admin -u template
CustomTemplate
multiple
sessions
true|false
Allows/Prohibits having
several simultaneous sessions
under administrator's login.
To allow multiple sessions
to run simultaneously under
administrator's login:
# ./admin -u multiple-sessions
true
Options
16 Using Command Line Utilities
Option
Parameter
Description
Example
-maxbuttonlength
<number>
Limits button label length for
the Plesk administrator's
control panel interface.
To restrict the maximum
button label length for the
Plesk administrator's
control panel interface to
10:
# ./admin -u -maxbutton-length 10
-lockscreen
true|false
Prevents/Allows working with
Plesk until page is completely
loaded.
To allow Plesk
administrator to work with
the control panel even if
control panel screens are
not completely loaded:
# ./admin -u -lockscreen false
Using Command Line Utilities 17
Anonymous FTP Access: anonftp Utility
Command
Parameter
Description
Example
--update
or -u
<domain_
name>
Updates the
anonymous FTP
settings on a
specified domain.
To enable downloading files from the incoming
directory by users on the domain example.com:
Displays
information about
the anonymous
FTP settings on a
specified domain.
To view information about anonymous FTP
settings on the domain example.com:
# ./anonftp --info example.com
or
# ./anonftp -i example.com
The anonftp utility is used to manage anonymous FTP access on domains with
physical hosting on a Plesk server. By using this utility, you can perform the following
tasks:
enabling/disabling the anonymous FTP access on a domain
restricting download bandwidth and the maximum number of simultaneous FTP
connections
managing the incoming directory properties
configuring welcome message displayed upon anonymous FTP user login
To change client login name to John and
set password to mypass for the client with
current login name JDoe :
# ./client --update JDoe -login
John -passwd mypass
or
# ./client -u JDoe -login John passwd mypass
The client utility is used to manage Plesk client accounts through CLI. By using this
utility, you can perform the following tasks:
creating, renaming, and removing client accounts
enabling and disabling existing client accounts
edit client's login name and password
edit client's personal information
Example
The following command creates the client account with the contact name John Doe,
Plesk control panel login name JDoe, and password sample, specifies the Unites States as the client’s country, and prevents automatic sending of standard Plesk mail
notifications (if they are enabled) about the account creation.
Note: Use of this option is not recommended. Passing passwords through CLI as
parameters of the -passwd option may potentially compromise the system's security
as command line can be observed by other users of the system. It is more secure to
pass passwords through the environment variables. You can transfer non-encrypted
passwords by using environment variable PSA_PASSWORD while using single quotes to
specify the empty values in the command line for the argument of the -passwd - passwd_type options.
Similarly, you can transfer encrypted passwords through the environment variable
PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the
command line for the argument of the -passwd and -passwd_type options.
Using Command Line Utilities 25
Client Limits, Permissions, and Interface
Command
Parameter
Description
Example
--update or
-u
<login_nam
e>
Updates
preferences
and limits for
an existing
client account.
To disable changing domain limits for the
client account with the login name JDoe:
Displays the list
of available
control panel
interface skins.
To view the list of available interface skins:
# ./client_pref --skin-list
or
# ./client_pref -sl
--info or -i
<login_nam
e>
Displays
information
about client
account
preferences
and limits.
To view information about preferences and
limits set on the client account with login
name JDoe:
# ./client_pref --info JDoe
or
# ./client_pref -i JDoe
Settings: client_pref Utility
The client_pref utility enables the administrator to set and edit the client's limits
and permissions, to manage the client's IP pool, and to define Plesk interface
preferences (e.g. the default language and skin) for the client through CLI.
Example
The following command updates the client account with the login name JDoe as
follows: the client is allowed to manage log rotation and mailing lists and to create up to
20 subdomains. The use of disk space allotted for the client is restricted to 20 GB, and
the expiration date of the client account is set to 2008-12-31.