Skip to content

Adding a new site

Overview

Use the psnew script to add a new site to your Cito server, in the format:

psnew -d <domain> -t <type>

If you do not specify the username we generate one automatically for you. The script has several option flags, explained below.

Usage

Usage: psnew  -d <domain> -u <user> -t <type> -v <version> -s -i

  -d: Domain name (required).
  -u: Username (optional, automatically generated if not set).
  -t: Site type. Either 'php' or 'nodejs'.
  -v: PHP Version. Defaults to 8.2. Do not specify if using NodeJS.
  -s: Silent. Does not prompt for user interaction.
  -i: Install wordpress automatically.
  -x: Do not copy SSH keys from admin to the new user.
  -p: Generate a preview (testing) URL for the domain.

Example: psnew -d testsite.com -t php -v 8.2 -s -i
(Adds 'testsite.com' with PHP version 8.2 and automatically installs Wordpress).

Cito automatically creates a home directory, system user (users are isolated from one another for security) and PHP-FPM pool. We copy the SSH keys from the admin account to the new user; you can toggle this behaviour with the -x flag as above.

Cito will also attempt to issue an SSL certificate for domain names that point to the server already.

You can use the pslist script to view this information.

cito~ # pslist
[+] Cito Stack on cito.yourserver.com
[+] Sites on this server:

id   hostname              username              homedir                     phpver
---  --------------------  --------------------  --------------------------  ------
1    mydomain.com          mydomain              /home/mydomain/             7.4

Site SSH Keys

We automatically pull SSH public keys from the Prostack Portal. To add or amend these keys, log in and click 'Account details' under the right hand side menu.

From here, paste your keys into the Cito Site Keys field. psnew uses these keys when adding a new site.