Dokumentacja jest dostępna po angielsku i po rosyjsku. To jest wersja angielska.

Shell client

The Shell client is a terminal on the server, opened in the panel. Small jobs such as restarting an app, pulling new code or fixing a permission can be done there without starting an SSH client.

What it is

The command line opens in a browser tab. It is the same shell you would get over SSH, with the same programs. WardPane 2.0 has two kinds of terminal.

The root terminal is available only in a session signed in as root (see panel security). It runs as root and can change anything on the server.

The owner’s terminal is opened from a site. It runs as the site’s owner, the Linux user that owns the files (www-root by default), starts in the site folder and has exactly the owner’s access.

In either case the shell has the rights of the account behind it and no more.

Typical uses

Node.js apps with PM2

Node.js sites run under one PM2 daemon per owner, so you can use PM2 commands in the owner’s terminal:

pm2 list                    # the owner's apps, named after their domains
pm2 restart example.com     # restart one app
pm2 logs example.com        # follow its output (Ctrl+C to stop)

The version, start command, environment and limits belong in the panel. The panel regenerates the PM2 configuration from its settings, so changes made with PM2 itself are lost. See Node.js.

Installing dependencies and building

cd /var/www/www-root/data/www/example.com
npm ci                      # or press "npm install" on the Handler tab
npm run build

Deploying with git

cd /var/www/www-root/data/www/example.com
git pull

For a Node.js site, restart the app afterwards (pm2 restart example.com or Restart in the panel).

PHP sites

cd /var/www/www-root/data/www/example.com
wp plugin update --all            # WP-CLI, if installed
php artisan migrate               # Laravel

Commands you run in the shell are not limited by the PHP sandbox the way the website is. Installing WordPress plugins and updates from the shell is therefore safer than from the WordPress admin page, which needs Run .php files from writable folders for that. See PHP.

File permissions

Site files must be readable by everyone (644 for files, 755 for folders):

find . -type d -exec chmod 755 {} +
find . -type f -exec chmod 644 {} +

After such changes on a PHP site, press Re-apply & fix permissions on the Handler tab to hand the writable folders back to PHP.

Databases

WardPane 2.0 does not manage databases. If you installed MySQL or MariaDB yourself, its tools work in the terminal as usual:

mysql -u myshop -p myshop                  # open a database
mysqldump -u myshop -p myshop > dump.sql   # make a backup

Databases managed from the panel are planned for 2.1 (see Databases).

Security notes

  • Anyone who can sign in to the panel can open the terminal of a site owner, and a root session can run anything as root. Use strong passwords, and limit panel access by address with PANEL_ALLOW_IPS if you can.
  • For settings the panel manages (sites, handlers, certificates), use the panel rather than the root terminal. Otherwise the panel’s idea of the server no longer matches the server.
  • Do not edit generated files such as /etc/wardpane/php/<id>/php.ini or the PM2 configuration: the panel overwrites them. Change the settings in the panel instead.
  • Do not paste commands from sources you do not trust: a command run here has the same effect as one typed over SSH.
  • The terminal traffic goes over the panel’s HTTPS connection, like every other page of the panel.