Skip to content

Commit f2fb270

Browse files
JTorreGADubhlaoich
andauthored
docs: add agent unprivileged doc (#297)
* docs: add agent unprivileged doc * Update content/agent/installation-upgrade/installation-unprivileged.md Co-authored-by: Alan Dooley <[email protected]> * Update content/agent/installation-upgrade/installation-unprivileged.md Co-authored-by: Alan Dooley <[email protected]> * Update content/agent/installation-upgrade/installation-unprivileged.md Co-authored-by: Alan Dooley <[email protected]> * Update content/agent/installation-upgrade/installation-unprivileged.md Co-authored-by: Alan Dooley <[email protected]> * Update content/agent/installation-upgrade/installation-unprivileged.md Co-authored-by: Alan Dooley <[email protected]> * docs: remove indentation * Update content/agent/installation-upgrade/installation-unprivileged.md * Update content/agent/installation-upgrade/installation-unprivileged.md * chore: remove separators --------- Co-authored-by: Alan Dooley <[email protected]>
1 parent b62ab52 commit f2fb270

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Run without root privileges
3+
weight: 450
4+
toc: true
5+
type: how-to
6+
product: Agent
7+
---
8+
9+
## Overview
10+
11+
If the policies of your organization do not allow running processes as root, you can run NGINX Agent under a user without root privileges.
12+
13+
This also aligns with the principle of least privilege, which is a security concept that limits the access rights of users to the bare minimum permissions they need to perform their work.
14+
15+
---
16+
17+
## Before you begin
18+
19+
Please note that **root access is required to install NGINX Agent**. The agent can be run under a non-root user after the installation.
20+
21+
---
22+
23+
## Installation
24+
25+
The installation process involves installing NGINX Plus without root privileges and then installing NGINX Agent:
26+
27+
### Install NGINX Plus without root privileges
28+
29+
You can install NGINX Plus without root privileges following the steps on the [NGINX Plus installation page]({{< ref "/nginx/admin-guide/installing-nginx/installing-nginx-plus/#unpriv_install" >}}). The steps include a script that will allow you to install NGINX Plus in a non-root environment.
30+
31+
{{< note >}}
32+
NGINX Agent has its own user group (`nginx-agent`) which is created when NGINX Agent is installed. The user NGINX is running under is added to this user group during the installation of NGINX Agent. If you change the NGINX user after installing NGINX Agent, you will need to [manually add the new NGINX user]({{< ref "/agent/configuration/configure-nginx-agent-group.md" >}}) to the `nginx-agent` group.
33+
{{< /note >}}
34+
35+
### Install NGINX Agent
36+
37+
After installing NGINX Plus, you can install NGINX agent following the steps on the [NGINX Agent installation page]({{< ref "/agent/installation-upgrade/installation-oss.md" >}}).
38+
39+
### Start NGINX Agent
40+
41+
Run the command corresponding to your operating system to start NGINX Agent:
42+
43+
{{<bootstrap-table "table table-striped table-bordered">}}
44+
45+
| Operating System | Command(s) |
46+
|------------------------------------------------------|------------------------------------------------|
47+
| RHEL, CentOS,<br>Rocky Linux, AlmaLinux,<br>Oracle Linux, Ubuntu,<br>Debian, SLES, Amazon Linux | ```sudo systemctl start nginx-agent``` |
48+
| Alpine Linux | ```sudo rc-service nginx-agent start```<br>or<br>```sudo /etc/init.d/nginx-agent start``` |
49+
| FreeBSD | ```sudo service nginx-agent start``` |
50+
51+
{{</bootstrap-table>}}
52+
53+
You can confirm that NGINX Agent is running under the same user as NGINX Plus by running the following command:
54+
55+
```bash
56+
ps aux | grep nginx-agent
57+
```

0 commit comments

Comments
 (0)