Core directives

user (Core directives)

Main context. Selects the account and group of worker processes when the master can set their credentials. If the group is omitted, Nginx uses the group named after the user. Package defaults vary. A non-root master cannot use this directive to change identity; configure the service manager identity instead.

Formal Syntax & Structure

nginx syntaxnginx
user user [group];

Parameters & Attributes

NameTypeDescription
useraccount nameExisting dedicated worker account
groupgroup nameExisting worker group; defaults to the user name when omitted

Working Example

Example Snippetnginx
user bytemind-web bytemind-web; # illustrative privileged master; account must exist
Nginx Reference