Skip to content

All about UNIX users

A UNIX user is the account that owns one site: its files, the processes that run its code, and the login you use for SSH and SFTP. Everything else that belongs to the site — its domains, its mailboxes, its scheduled commands — hangs off it.

Most of the time you don't create one yourself. Creating a project creates one per environment, so a project with staging has two: one owning the production files, one owning the staging files. You create one by hand when you need it outside a project, for example for mail.

This article covers what you set when creating one, the websites-or-mail choice you can't change afterwards, and the related toggles.


Where to find UNIX users

The top-level 'UNIX Users' page lists every UNIX user across your clusters. Click 'Create' to add one.

One choice you can't change afterwards: 'Usage' is either 'Virtual Hosts' or 'Mail Domains'. One UNIX user can't do both.

Creating one

Required fields

  • 'Cluster' — which cluster the user lives on. Clusters that do not support UNIX users are disabled in the dropdown.
  • 'Username' — used for SSH and SFTP login. Lowercase, digits, dash, underscore. Max 32 characters.
  • 'Description' — free-form label.

Password and SSH access

  • 'Password' — optional. Minimum 24 characters when set. Leave it empty for key-only access. The 'Generate' button produces a secure password.

Add SSH keys to the user after creation.

Default PHP and Node.js versions

  • 'Default PHP Version' — shown only when the cluster supports PHP.
  • 'Default Node.js Version' — shown only when the cluster supports Node.js.

How these defaults are enforced, and why they only work with namespacing: UNIX user namespacing. To change them later, the navigation in Install Puppeteer applies to any UNIX user.

Usage: Virtual Hosts or Mail Domains

Picked at create time as a 'Usage' tile:

  • 'Virtual Hosts' — the user hosts websites. Virtual hosts are created under it.
  • 'Mail Domains' — the user hosts mail. Mail domains are created under it.

A single UNIX user cannot do both. To run websites and mail on the same cluster, create one UNIX user per purpose.

A greyed-out tile means the cluster does not support that usage; the tooltip says so.

Advanced: 'Shell'

Under 'Show advanced options'. On by default.

Turn it off and the user cannot log in via SSH at all. Useful for users that only own files and run processes, with no interactive sessions.

Daemons

A daemon is a long-running process Cyberfusion supervises for you — a Laravel queue worker, Horizon, a Craft queue listener, or any custom command.

Daemons appear under the 'Daemons' section on the UNIX user page, and on the project page when the user belongs to a project.

Each daemon runs on one or more nodes you select. The cluster keeps it running and restarts it if it dies or hits its 'Memory Limit (MiB)'. 'CPU Limit (cores)' caps the CPU it may use.

A daemon's PHP version can look wrong

Some daemons, Laravel Horizon in particular, start sub-processes using the exact path of the running PHP interpreter. That path can show an older version number (for example php8.3) than the default PHP version you selected, even though your selected version is the one running. See Why a daemon's PHP version can look wrong.

Restarting a daemon from a deploy script

Create an empty file at:

{home directory}/tmp/.daemon-restart.{daemon name}.txt

Cyberfusion picks the file up, restarts the daemon, and removes the file. So your deploy scripts never need API credentials.

Trigger file must be owned by the daemon's UNIX user

The watcher checks the file's owner against the daemon's UNIX user. If they do not match, the file is ignored — easy to trip over when the file is created by a different user, for example root.

Malware scanning

Cyberfusion runs a daily malware scan (maldet) across home directories. Scans cover files modified in the last day, so detection happens close to upload time.

Hits are recorded against the owning UNIX user, matched by whose home directory the file path falls under. They appear under 'Malware' on the UNIX user page and on the project page, with the file path and a 'Last Seen' timestamp.

A record disappears automatically once the file is gone from disk.

What to do about a hit: Clean up after a hack.

Usage tracking

A UNIX user reports periodic usage stats, mainly disk space.

Turn on 'Record Usage Files' (set after creation) and each report also carries a files list with the top 10 largest files in the user's home directory. Useful when tracking down what is eating space.

All about FTP users covers an extra login over FTP only, which can be limited to one directory. Needed when a supplier only supports FTP, or when someone may only reach one subdirectory.