Skip to content

Commit ae7312e

Browse files
committed
docs: add host/change-linux-user
1 parent d1db956 commit ae7312e

6 files changed

Lines changed: 164 additions & 130 deletions

File tree

‎docs/src/content/docs/getting-started/prerequisites.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ On Fedora, RHEL, Rocky Linux and CentOS, the new user gets no password and no su
185185

186186
To see a user created and added to sudo by hand, watch [Docker on Proxmox LXC: creating a non-root user at 10:20](https://youtu.be/-ZSQdJ62r-Q?t=620) (manual setup; Deployrr does this for you).
187187

188+
To switch to another user after **Environment**, more than this step has to change. See [Use a different Linux user after setup](/host/change-linux-user/).
189+
188190
**Done status.** Your username in green.
189191

190192
## 5. System Type

‎docs/src/content/docs/getting-started/system-checks-failed.md‎

Lines changed: 3 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ related:
2727
- getting-started/requirements-not-met
2828
- host/shim-task-debian
2929
- docker/no-internet-in-containers
30-
- using-deployrr/edit-env-and-secrets
30+
- host/change-linux-user
3131
last_reviewed: 2026-11-14
3232
status: current
3333
old_paths: ["/host/system-checks-failed"]
@@ -194,137 +194,13 @@ The name saved in the **Username** step is not a Linux user on this server. The
194194
3. If the user does not exist, run **Username** again. Deployrr asks if you want to create the user and add it to sudoers.
195195
4. Run System Checks again.
196196

197-
If the user was renamed, or you want Deployrr to use a different user on purpose, read [Use a different Linux user after setup](#use-a-different-linux-user-after-setup) before you change anything.
197+
If the user was renamed, or you want Deployrr to use a different user on purpose, read [Use a different Linux user after setup](/host/change-linux-user/) before you change anything.
198198

199199
To see a user created by hand, watch [Docker on Proxmox LXC: creating a non-root user at 10:20](https://youtu.be/-ZSQdJ62r-Q?t=620). For the written steps, read [UDMS part 05: create a non-root Linux user](https://www.simplehomelab.com/udms-05-installing-ubuntu-on-proxmox/#1_Create_a_New_User) (manual setup).
200200

201201
## Use a different Linux user after setup
202202

203-
**Username** only saves a name. It does not change anything you set up earlier. Your Docker folder, your apps and a few other steps keep the old user until you update them.
204-
205-
The simplest choice is to keep the user you set up with. Change it only if you have to.
206-
207-
In the commands below, `NEW_USER`, `OLD_USER` and `DOCKER_FOLDER` are values you fill in. `DOCKER_FOLDER` is the path to your Docker folder.
208-
209-
### Before Environment
210-
211-
If you have not run **Prerequisites** > **Environment** yet, run **Username** again and enter the new name. Nothing else needs to change.
212-
213-
### After setup
214-
215-
:::caution
216-
These steps change who owns your Docker files and what your apps run as. A mistake can stop apps from starting or writing their data. Back up first and check each app afterwards.
217-
:::
218-
219-
1. Back up the Docker folder. See [Backups](/using-deployrr/backups/#back-up-the-docker-folder).
220-
2. Check that the new user exists:
221-
222-
```bash
223-
id NEW_USER
224-
```
225-
226-
You should see a `uid` and a `gid`. If you see `no such user`, create it in the next step when Deployrr offers to.
227-
228-
3. Go to **Prerequisites** > **Username** and enter the new name. Deployrr refuses `root`. If the user does not exist, it asks "Do you want to create this user and add it to sudoers?". You see "Username set to NEW_USER", or "User NEW_USER has been created" if Deployrr created it. From now on, start Deployrr as `NEW_USER`.
229-
4. Get the user's numeric IDs:
230-
231-
```bash
232-
id -u NEW_USER
233-
id -g NEW_USER
234-
```
235-
236-
5. Change four values in the `.env` file in your Docker folder: `PUID` (the first number), `PGID` (the second number), `PRIMARY_USERNAME` (the name) and `USERDIR` (`/home/NEW_USER`). Use **Tools** > **.env Editor** (Pro) or edit by hand. See [Edit .env values and secrets](/using-deployrr/edit-env-and-secrets/#edit-a-value-with-the-env-editor) and [Edit by hand without Pro](/using-deployrr/edit-env-and-secrets/#edit-by-hand-without-pro).
237-
238-
:::note
239-
Don't run **Environment** again to do this. It warns "If you proceed, you may break previously installed apps", and both **Recreate** and **Reuse** delete files. **Reuse** also removes your apps' compose files.
240-
:::
241-
242-
6. Give the new user the same folders the old user had. Don't run a recursive `chown` on `appdata` or the whole Docker folder. Some apps, such as pgAdmin, Mosquitto and n8n, own their folders with fixed IDs, and you would break them.
243-
244-
```bash
245-
sudo chown NEW_USER:NEW_USER DOCKER_FOLDER DOCKER_FOLDER/appdata
246-
sudo chown -R NEW_USER:NEW_USER DOCKER_FOLDER/compose DOCKER_FOLDER/logs
247-
sudo setfacl -m u:NEW_USER:rwX DOCKER_FOLDER
248-
sudo setfacl -dm u:NEW_USER:rwX DOCKER_FOLDER
249-
sudo setfacl -Rm u:NEW_USER:rwX DOCKER_FOLDER/appdata DOCKER_FOLDER/compose DOCKER_FOLDER/logs
250-
sudo setfacl -Rdm u:NEW_USER:rwX DOCKER_FOLDER/appdata DOCKER_FOLDER/compose DOCKER_FOLDER/logs
251-
```
252-
253-
These commands leave `secrets` and `.env` alone. They stay owned by root and readable only by root.
254-
255-
If your Docker folder is inside the old user's home, for example `/home/OLD_USER/docker`, the new user may not be allowed into that home folder. Check with `sudo -u NEW_USER ls DOCKER_FOLDER`.
256-
257-
7. Run [System Checks again](#run-system-checks-again).
258-
8. Recreate your apps so they read the new `.env` values. Use **Tools** > **Stack Manager** > **Recreate** and choose `all` (Basic, Plus or Pro license). Without a license, use the Docker Compose command on that page. See [Which one after which change](/using-deployrr/restart-recreate-reinstall/#which-one-after-which-change). Restart does not pick up the change.
259-
9. Open each app and check that it works. Cloud Commander, Double Commander and VS Code show your files under `/data/NEW_USER` now.
260-
261-
If one app can't write its files after this, give that app's folder to the new user. Replace `APP` with the app's name:
262-
263-
```bash
264-
sudo chown -R NEW_USER:NEW_USER DOCKER_FOLDER/appdata/APP
265-
```
266-
267-
Don't do this for apps that use fixed IDs, such as pgAdmin, Mosquitto and n8n. Restore from your backup if an app breaks.
268-
269-
### Other steps that keep the old user
270-
271-
Redo these only if you use them:
272-
273-
- **Bash Aliases** are in the old user's `~/.bashrc`. With **Username** set to the new user, run **Bash Aliases** again (Basic, Plus or Pro license). It writes to the new user's `~/.bashrc`, whoever you are logged in as. Then open a new session as the new user. See [Turn on the aliases](/using-deployrr/bash-aliases/#turn-on-the-aliases).
274-
- The Rclone mount runs as the old user. Its config is in `appdata/rclone` in your Docker folder. The old user's home only holds a link to it. Remove the mount service and run **Automount** again. See [Change the mount folder, cache or NAS details](/storage/rclone-smb-setup/#change-the-mount-folder-cache-or-nas-details).
275-
- **Mail Relay** maps the old user to your FROM address. Run **System** > **Mail Relay** again. See [Change your SMTP details later](/host/smtp-mail-relay/#change-your-smtp-details-later).
276-
- A Migration Package needs the same user on the new server. See [Move to a new server](/using-deployrr/move-to-new-server/).
277-
278-
### Renaming the user
279-
280-
Deployrr expects the user's home folder to be `/home/USERNAME`. The default Docker folder is inside it, at `/home/USERNAME/docker`. If you rename the user and move the home folder, the Docker folder moves too. Deployrr then looks for it in the wrong place.
281-
282-
If your Docker folder is in the old user's home, don't rename the user. Keep the old user, or create a new user and switch to it with the steps above. The Docker folder stays where it is.
283-
284-
### Check it worked
285-
286-
1. Show the saved values. The file is root-only, so use `sudo`:
287-
288-
```bash
289-
sudo grep -E '^(PUID|PGID|PRIMARY_USERNAME|USERDIR)=' DOCKER_FOLDER/.env
290-
```
291-
292-
They should match the new user.
293-
294-
2. Open **Prerequisites**. The new username shows in green.
295-
3. System Checks shows `DONE`, and your apps start and write their files.
296-
297-
### Remove the old user's access (optional)
298-
299-
When Deployrr created your Docker folder, it gave the old user read and write access to it with ACLs (access control lists). New files and folders inside get the same access. The commands above add access for the new user but don't remove the old user's access. If you are retiring the old account, remove it too.
300-
301-
Do this only after everything works as the new user, including the [other steps](#other-steps-that-keep-the-old-user) you use. Skip it if your Docker folder is in the old user's home and you keep that account.
302-
303-
1. Check the current entries on the Docker folder:
304-
305-
```bash
306-
getfacl DOCKER_FOLDER
307-
```
308-
309-
Look for `user:OLD_USER:rw-` and `default:user:OLD_USER:rw-`.
310-
311-
2. Remove the old user's entries from every file and folder, then the default entries from every folder:
312-
313-
```bash
314-
sudo setfacl -R -x u:OLD_USER DOCKER_FOLDER
315-
sudo find DOCKER_FOLDER -type d -exec setfacl -x d:u:OLD_USER {} +
316-
```
317-
318-
This also clears the old entry from `secrets` and `.env`. It had no effect there, because those stay readable only by root.
319-
320-
3. Run `getfacl DOCKER_FOLDER` again. The `OLD_USER` lines are gone. If you ran step 6 of [After setup](#after-setup), the `NEW_USER` lines are still there.
321-
4. Open a few apps and check that they still work. If one breaks, give the old user access to that app's folder again first. Replace `APP` with the app's folder in `appdata`:
322-
323-
```bash
324-
sudo setfacl -Rm u:OLD_USER:rwX DOCKER_FOLDER/appdata/APP
325-
```
326-
327-
Then restart the app. Restore the folder from your backup only as a last resort: the backup is from before the switch, so anything the app saved since then is lost.
203+
**Username** only saves a name. Your Docker folder, your apps and a few other steps keep the old user until you update them. The steps now have their own page: [Use a different Linux user after setup](/host/change-linux-user/).
328204

329205
## Fix Docker is missing or not running (steps 3 and 4)
330206

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
---
2+
title: Use a different Linux user after setup
3+
description: Switch Deployrr to another Linux user after setup without breaking your apps, update the .env values and folder access, and remove the old user's access.
4+
type: how-to
5+
tags:
6+
- host
7+
- docker
8+
- install
9+
applies_to: v6.0+
10+
related:
11+
- getting-started/system-checks-failed
12+
- using-deployrr/edit-env-and-secrets
13+
- using-deployrr/restart-recreate-reinstall
14+
- using-deployrr/backups
15+
- getting-started/prerequisites
16+
further_reading:
17+
- title: "UDMS part 05: create a non-root Linux user"
18+
url: "https://www.simplehomelab.com/udms-05-installing-ubuntu-on-proxmox/#1_Create_a_New_User"
19+
videos:
20+
- id: "-ZSQdJ62r-Q"
21+
start: 620
22+
title: "Docker on Proxmox LXC: creating a non-root user and adding it to sudo"
23+
last_reviewed: 2026-11-14
24+
status: current
25+
sources: []
26+
sidebar:
27+
order: 6
28+
---
29+
30+
Use this page if you want Deployrr to run as a different Linux user than the one you set up with, or if System Checks shows `Username YOUR_USERNAME not found` because the user was renamed. See [Fix "Username not found"](/getting-started/system-checks-failed/#fix-username-not-found-step-2) for the other causes of that message.
31+
32+
**Prerequisites** > **Username** only saves a name. It does not change anything you set up earlier. Your Docker folder, your apps and a few other steps keep the old user until you update them.
33+
34+
The simplest choice is to keep the user you set up with. Change it only if you have to.
35+
36+
In the commands below, `NEW_USER`, `OLD_USER` and `DOCKER_FOLDER` are values you fill in. `DOCKER_FOLDER` is the path to your Docker folder.
37+
38+
## Before Environment
39+
40+
If you have not run **Prerequisites** > **Environment** yet, run **Username** again and enter the new name. Nothing else needs to change.
41+
42+
## After setup
43+
44+
:::caution
45+
These steps change who owns your Docker files and what your apps run as. A mistake can stop apps from starting or writing their data. Back up first and check each app afterwards.
46+
:::
47+
48+
1. Back up the Docker folder. See [Backups](/using-deployrr/backups/#back-up-the-docker-folder).
49+
2. Check that the new user exists:
50+
51+
```bash
52+
id NEW_USER
53+
```
54+
55+
You should see a `uid` and a `gid`. If you see `no such user`, create it in the next step when Deployrr offers to.
56+
57+
3. Go to **Prerequisites** > **Username** and enter the new name. Deployrr refuses `root`. If the user does not exist, it asks "Do you want to create this user and add it to sudoers?". You see "Username set to NEW_USER", or "User NEW_USER has been created" if Deployrr created it. From now on, start Deployrr as `NEW_USER`. To see how a user is created and added to sudo by hand, watch [Docker on Proxmox LXC: creating a non-root user at 10:20](https://youtu.be/-ZSQdJ62r-Q?t=620), or read [UDMS part 05: create a non-root Linux user](https://www.simplehomelab.com/udms-05-installing-ubuntu-on-proxmox/#1_Create_a_New_User) (manual setup).
58+
4. Get the user's numeric IDs:
59+
60+
```bash
61+
id -u NEW_USER
62+
id -g NEW_USER
63+
```
64+
65+
5. Change four values in the `.env` file in your Docker folder: `PUID` (the first number), `PGID` (the second number), `PRIMARY_USERNAME` (the name) and `USERDIR` (`/home/NEW_USER`). Use **Tools** > **.env Editor** (Pro) or edit by hand. See [Edit .env values and secrets](/using-deployrr/edit-env-and-secrets/#edit-a-value-with-the-env-editor) and [Edit by hand without Pro](/using-deployrr/edit-env-and-secrets/#edit-by-hand-without-pro).
66+
67+
:::note
68+
Don't run **Environment** again to do this. It warns "If you proceed, you may break previously installed apps", and both **Recreate** and **Reuse** delete files. **Reuse** also removes your apps' compose files.
69+
:::
70+
71+
6. Give the new user the same folders the old user had. Don't run a recursive `chown` on `appdata` or the whole Docker folder. Some apps, such as pgAdmin, Mosquitto and n8n, own their folders with fixed IDs, and you would break them.
72+
73+
```bash
74+
sudo chown NEW_USER:NEW_USER DOCKER_FOLDER DOCKER_FOLDER/appdata
75+
sudo chown -R NEW_USER:NEW_USER DOCKER_FOLDER/compose DOCKER_FOLDER/logs
76+
sudo setfacl -m u:NEW_USER:rwX DOCKER_FOLDER
77+
sudo setfacl -dm u:NEW_USER:rwX DOCKER_FOLDER
78+
sudo setfacl -Rm u:NEW_USER:rwX DOCKER_FOLDER/appdata DOCKER_FOLDER/compose DOCKER_FOLDER/logs
79+
sudo setfacl -Rdm u:NEW_USER:rwX DOCKER_FOLDER/appdata DOCKER_FOLDER/compose DOCKER_FOLDER/logs
80+
```
81+
82+
These commands leave `secrets` and `.env` alone. They stay owned by root and readable only by root.
83+
84+
If your Docker folder is inside the old user's home, for example `/home/OLD_USER/docker`, the new user may not be allowed into that home folder. Check with `sudo -u NEW_USER ls DOCKER_FOLDER`.
85+
86+
7. Run [System Checks again](/getting-started/system-checks-failed/#run-system-checks-again).
87+
8. Recreate your apps so they read the new `.env` values. Use **Tools** > **Stack Manager** > **Recreate** and choose `all` (Basic, Plus or Pro license). Without a license, use the Docker Compose command on that page. See [Which one after which change](/using-deployrr/restart-recreate-reinstall/#which-one-after-which-change). Restart does not pick up the change.
88+
9. Open each app and check that it works. Cloud Commander, Double Commander and VS Code show your files under `/data/NEW_USER` now.
89+
90+
If one app can't write its files after this, give that app's folder to the new user. Replace `APP` with the app's name:
91+
92+
```bash
93+
sudo chown -R NEW_USER:NEW_USER DOCKER_FOLDER/appdata/APP
94+
```
95+
96+
Don't do this for apps that use fixed IDs, such as pgAdmin, Mosquitto and n8n. Restore from your backup if an app breaks.
97+
98+
## Other steps that keep the old user
99+
100+
Redo these only if you use them:
101+
102+
- **Bash Aliases** are in the old user's `~/.bashrc`. With **Username** set to the new user, run **Bash Aliases** again (Basic, Plus or Pro license). It writes to the new user's `~/.bashrc`, whoever you are logged in as. Then open a new session as the new user. See [Turn on the aliases](/using-deployrr/bash-aliases/#turn-on-the-aliases).
103+
- The Rclone mount runs as the old user. Its config is in `appdata/rclone` in your Docker folder. The old user's home only holds a link to it. Remove the mount service and run **Automount** again. See [Change the mount folder, cache or NAS details](/storage/rclone-smb-setup/#change-the-mount-folder-cache-or-nas-details).
104+
- **Mail Relay** maps the old user to your FROM address. Run **System** > **Mail Relay** again. See [Change your SMTP details later](/host/smtp-mail-relay/#change-your-smtp-details-later).
105+
- A Migration Package needs the same user on the new server. See [Move to a new server](/using-deployrr/move-to-new-server/).
106+
107+
## Renaming the user
108+
109+
Deployrr expects the user's home folder to be `/home/USERNAME`. The default Docker folder is inside it, at `/home/USERNAME/docker`. If you rename the user and move the home folder, the Docker folder moves too. Deployrr then looks for it in the wrong place.
110+
111+
If your Docker folder is in the old user's home, don't rename the user. Keep the old user, or create a new user and switch to it with the steps above. The Docker folder stays where it is.
112+
113+
## Check it worked
114+
115+
1. Show the saved values. The file is root-only, so use `sudo`:
116+
117+
```bash
118+
sudo grep -E '^(PUID|PGID|PRIMARY_USERNAME|USERDIR)=' DOCKER_FOLDER/.env
119+
```
120+
121+
They should match the new user.
122+
123+
2. Open **Prerequisites**. The new username shows in green.
124+
3. System Checks shows `DONE`, and your apps start and write their files.
125+
126+
## Remove the old user's access (optional)
127+
128+
When Deployrr created your Docker folder, it gave the old user read and write access to it with ACLs (access control lists). New files and folders inside get the same access. The commands above add access for the new user but don't remove the old user's access. If you are retiring the old account, remove it too.
129+
130+
Do this only after everything works as the new user, including the [other steps](#other-steps-that-keep-the-old-user) you use. Skip it if your Docker folder is in the old user's home and you keep that account.
131+
132+
1. Check the current entries on the Docker folder:
133+
134+
```bash
135+
getfacl DOCKER_FOLDER
136+
```
137+
138+
Look for `user:OLD_USER:rw-` and `default:user:OLD_USER:rw-`.
139+
140+
2. Remove the old user's entries from every file and folder, then the default entries from every folder:
141+
142+
```bash
143+
sudo setfacl -R -x u:OLD_USER DOCKER_FOLDER
144+
sudo find DOCKER_FOLDER -type d -exec setfacl -x d:u:OLD_USER {} +
145+
```
146+
147+
This also clears the old entry from `secrets` and `.env`. It had no effect there, because those stay readable only by root.
148+
149+
3. Run `getfacl DOCKER_FOLDER` again. The `OLD_USER` lines are gone. If you ran step 6 of [After setup](#after-setup), the `NEW_USER` lines are still there.
150+
4. Open a few apps and check that they still work. If one breaks, give the old user access to that app's folder again first. Replace `APP` with the app's folder in `appdata`:
151+
152+
```bash
153+
sudo setfacl -Rm u:OLD_USER:rwX DOCKER_FOLDER/appdata/APP
154+
```
155+
156+
Then restart the app. Restore the folder from your backup only as a last resort: the backup is from before the switch, so anything the app saved since then is lost.

‎docs/src/content/docs/host/gpu-host-prep.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Prepare your server's GPU so Deployrr can use it
33
sidebar:
4-
order: 8
4+
order: 9
55
label: GPU host prep
66
description: Get your server, a Proxmox LXC or a VM to the point where System > GPU reports your Intel, AMD or NVIDIA GPU as Ready, and fix nvidia-smi driver errors.
77
type: how-to

‎docs/src/content/docs/host/shim-task-debian.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Docker fails with "failed to create shim task" in a Proxmox LXC container
33
sidebar:
4-
order: 7
4+
order: 8
55
label: Failed to create shim task (LXC)
66
description: Fix the Docker "failed to create shim task" permission denied error in a Proxmox LXC container by pinning containerd.io or relaxing AppArmor.
77
type: troubleshooting

‎docs/src/content/docs/host/smtp-mail-relay.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ status: current
2828
old_paths: []
2929
sources: []
3030
sidebar:
31-
order: 6
31+
order: 7
3232
---
3333

3434
Use this page to let your server send email. You save your SMTP provider details in Deployrr, then set up Mail Relay. After that, tools on the server such as cron, smartd and fail2ban can email you.

0 commit comments

Comments
 (0)