Website Owner Documentation
Server Administrator Documentation
Automation and Developer Documentation
Introduction
In addition to the automation APIs and billing system modules, Installatron includes a number of human-friendly command-line interfaces that automate the process of installing new applications and managing existing installed applications.
JSON Output
If JSON output is preferred to human-friendly output, append this to any command:
--api=json
This effectively makes all output the same as the HTTP-API.
JSON Input
If JSON input is preferred to key-value pairs, /usr/local/installatron/installatron will accept JSON input. For example:
echo '{
"cmd":"install",
"application":"wordpress",
"user":"ws124",
"url":"http://company.com/blog",
}' | /usr/local/installatron/installatron
List available applications and application information
Command:
./installatron --browser
./installatron --browser --application magento
Optional arguments:
- application: The ID of the application to list available versions of. This can be a single application or an array of multiple applications. By default the latest version of each application is listed.
- version: When "application" set to one application, set this to only list the specific version.
- from-version: When "application" set to one application, set this to list all versions the specified version can be upgraded to.
- versions-available-from: When "application" set to one application, instead of the usual output this will return two lists, "versions-available" and "versions-available-minor", each listing the versions upgradable to from the specified value.
- language: The language application information should be returned in. For example, "en" for English or "zh_tw" for Chinese Traditional. If omitted, the defined website's default language or English is assumed. See: Available Installatron Translations.
Install an application
Note: When the install is complete, the new install owner will be emailed install login information.
Command:
./installatron --install
Required arguments:
- application: The ID of the application to be installed. For example, "wordpress" or "magento". See: List of applications.
Optional arguments:
- user: If authenticated as a reseller, admin, or super-user, this argument must be set to the control panel account the install is for.
- version: The version of the application to be installed. If omitted, the latest, compatible version is assumed.
- autoup: Change automatic update configuration. Values: 0 = Off (default); 1 = Update to minor versions only; 2 = Update to any version.
- url: The URL to where the application should be installed. If omitted, the application is installed in the root directory of the first available domain.
- url-ip: If the DNS will not resolve the provided "url" to the correct IP, use this argument to provide the correct IP. This argument is typically omitted.
- background: When defined, the request will exit immediately and the task will be transferred to a background process. Use the tasks API to query the status of the background task.
Optional database arguments:
- db: Set this to "auto" to create a new database for the application, or "manual" to specify an existing database for the application.
- db-host: The database server.
- db-name: The pre-created database.
- db-user: The pre-created database username.
- db-pass: The pre-created database password.
- db-prefix: If a database prefix other than the default prefix should be used, specify the value here.
Further optional arguments that may be ignored by some applications:
- language: The language of the application to be installed. For example, "en" for English or "zh-tw" for Chinese Traditional. If omitted, the user's default language or English is assumed.
- login: The username for the installed application's administrative account. If omitted, typically a randomized admin username is assumed.
- passwd: The password for the installed application's administrative account. If omitted, a randomized password is assumed.
- sitetitle: The site title value for the installed application. If omitted, "My {type}" is assumed, where {type} is the type of application. For example, "My Forum".
- content: Should the application be installed with demo content? Valid values: "yes" or "no". If omitted, "no" is typically assumed.
Import an existing application
Command:
./installatron --import
Required arguments:
- application: The ID of the application to be installed. For example, "wordpress" or "magento". See: List of applications.
Optional arguments:
- user: If authenticated as a reseller, admin, or super-user, this argument must be set to the control panel account the install is for.
- version: The version of the application to be imported. If omitted, the installed version is detected.
- url: The URL to where the application is installed.
- url-ip: If the DNS will not resolve the provided "url" to the correct IP, use this argument to provide the correct IP. This argument is typically omitted.
List installed applications or backups
Command:
./installatron --installs
./installatron --backups
Optional arguments:
- user: If authenticated as a reseller, admin, or super-user, set this argument to the user installed applications should be listed for.
- filter-version-available=yes: Only list installed applications that have new version upgrades available.
View/sync an installed application
Command:
./installatron --details
Required arguments:
- id: The ID of the installed application to be synced and displayed.
Optional arguments:
- user: If authenticated as a reseller, admin, or super-user, this argument must be set to the owner of the installed application.
Edit an installed application
Note: Optional arguments can be omitted if they should remain unchanged.
Command:
./installatron --edit
Required arguments:
- id: The ID of the installed application to be edited, a list of installed application ID's separated by a plus (+), or an asterisk can be specified to match all installed applications on the server.
Optional arguments:
- user: If authenticated as a reseller, admin, or super-user, this argument must be set to the owner of the installed application.
- url: The URL to the installed application.
- autoup: Change automatic update configuration. Values: 0 = Off; 1 = Update to minor versions only; 2 = Update to any version.
- db-host: The server that hosts the installed application's database.
- db-name: The name of the installed application's database.
- db-user: The database username used to connect to the installed application's database.
- db-pass: The database username password.
- db-prefix: The prefix each database table begins with, including trailing underscore (if any).
Backup an installed application
Command:
./installatron --backup
Required arguments:
- id: The ID of the installed application to be backed up, a list of installed application ID's separated by a plus (+), or an asterisk can be specified to match all installed applications on the server.
Optional arguments:
- user: If authenticated as a reseller, admin, or super-user, this argument must be set to the owner of the installed application.
- background: When defined, the request will exit immediately and the task will be transferred to a background process. Use the tasks API to query the status of the background task.
Clone an installed application
Command:
./installatron --clone
Required arguments:
- id: The ID of the installed application to be cloned.
Optional arguments:
- user: If authenticated as a reseller, admin, or super-user, this argument must be set to the control panel account the install is for.
- url: The URL to where the application should be installed. If omitted, the application is installed in the root directory of the first available domain.
- url-ip: If the DNS will not resolve the provided "url" to the correct IP, use this argument to provide the correct IP. This argument is typically omitted.
- background: When defined, the request will exit immediately and the task will be transferred to a background process. Use the tasks API to query the status of the background task.
Optional database arguments:
- db: Set this to "auto" to create a new database for the cloned application, or "manual" to specify an existing database for the cloned application.
- db-host: The database server.
- db-name: The pre-created database.
- db-user: The pre-created database username.
- db-pass: The pre-created database password.
- db-prefix: If a database prefix other than the default prefix should be used, specify the value here.
Migrate an installed application from a different server
Note: This is correctly the same command as import—the inclusion of the source-ftu and soruce-url arguments instruct Installatron to treat the request as a migration.
Command:
./installatron --import
Required arguments:
- source-ftu: The FTP URI to the source installed application. For example, "ftp://user:pass@website.com/public_html/wordpress".
- source-url: The URL to the source installed application. For example, "http://website.com/wordpress".
Optional arguments:
- user: If authenticated as a reseller, admin, or super-user, this argument must be set to the control panel account the install is for.
- url: The URL to where the application should be migrated to. If omitted, the application is installed in the root directory of the first available domain.
- url-ip: If the DNS will not resolve the provided "url" to the correct IP, use this argument to provide the correct IP. This argument is typically omitted.
- source-url-ip: If the DNS will not resolve the provided "source-url" to the correct IP, use this argument to provide the correct IP. This argument is typically omitted.
- background: When defined, the request will exit immediately and the task will be transferred to a background process. Use the tasks API to query the status of the background task.
Optional database arguments:
- db: Set this to "auto" to create a new database for the migrated application, or "manual" to specify an existing database for the migrated application.
- db-host: The database server.
- db-name: The pre-created database.
- db-user: The pre-created database username.
- db-pass: The pre-created database password.
- db-prefix: If a database prefix other than the default prefix should be used, specify the value here.
Upgrade an installed application
Note: It's always recommended to create a backup prior to upgrading any installed application.
Command:
./installatron --upgrade
Required arguments:
- id: The ID of the installed application to be upgraded, a list of installed application ID's separated by a plus (+), or an asterisk can be specified to match all installed applications on the server.
Optional arguments:
- user: If authenticated as a reseller, admin, or super-user, this argument must be set to the owner of the installed application.
- version: The version to be upgraded to. If omitted, the latest, compatible version is assumed.
- revert: If set to 'yes', a backup will be created prior to attempting the upgrade, and the backup will automatically be restored if the upgrade fails.
- background: When defined, the request will exit immediately and the task will be transferred to a background process. Use the tasks API to query the status of the background task.
Example 1: Upgrade specified installed applications on the server to the most recent version.
/usr/local/installatron/installatron --upgrade --id='519d6fe412b34ce4757f251381cf8a99+c4ca4238a0b923820dcc509a6f75849b'
Example 2: Upgrade all installed applications on the server to the most recent version, creating a backup for each install and reverting to the backup on failure.
/usr/local/installatron/installatron --upgrade --id='*' --revert
Restore an installed application backup
Command:
./installatron --restore
Required arguments:
- id: The ID of the installed application backup to be restored.
Optional arguments:
- user: If authenticated as a reseller, admin, or super-user, this argument must be set to the owner of the installed application.
- background: When defined, the request will exit immediately and the task will be transferred to a background process. Use the tasks API to query the status of the background task.
Uninstall an installed application
Command:
./installatron --uninstall
Required arguments:
- id: The ID of the installed application to be uninstalled, a list of installed application ID's separated by a plus (+), or an asterisk can be specified to match all installed applications on the server.
Optional arguments:
- user: If authenticated as a reseller, admin, or super-user, this argument must be set to the owner of the installed application.
- background: When defined, the request will exit immediately and the task will be transferred to a background process. Use the tasks API to query the status of the background task.
Delete an installed application backup
Command:
./installatron --delete
Required arguments:
- id: The ID of the installed application backup to be deleted, a list of installed application backup ID's separated by a plus (+), or an asterisk can be specified to match all installed application backups on the server.
Optional arguments:
- user: If authenticated as a reseller, admin, or super-user, this argument must be set to the owner of the installed application backup.
- background: When defined, the request will exit immediately and the task will be transferred to a background process. Use the tasks API to query the status of the background task.
List currently executing and recently completed tasks
Command:
./installatron --tasks
Optional arguments:
- user: If authenticated as a reseller, admin, or super-user, this argument must be set to the owner of the installed application backup.