mirror of
https://github.com/mother-of-all-self-hosting/mash-playbook
synced 2024-11-10 14:24:25 +00:00
Document workaround needed for Adguard Home (#161)
* Update adguard-home.md to document the workaround needed for first time setup Since Adguard Home currently can't perform first time setup without admin, I've documented how to run it with root initially and then revert to using mash * Update adguard-home.md * Update adguard-home.md edit "usage" to the correct URL * Update adguard-home.md formatting * Update adguard-home.md user more precise wording * Update adguard-home.md correct typo * Update adguard-home.md * Simplify Adguard Home troubleshooting instructions a bit --------- Co-authored-by: Slavi Pantaleev <slavi@devture.com>
This commit is contained in:
parent
e21dca756e
commit
b681741ee4
1 changed files with 29 additions and 0 deletions
|
@ -83,3 +83,32 @@ Things you should consider doing later:
|
|||
- enabling caching in the **DNS cache configuration** section in **Settings** -> **DNS Settings**
|
||||
- adding additional blocklists by discovering them on [Firebog](https://firebog.net/) or other sources and importing them from **Filters** -> **DNS blocklists**
|
||||
- reading the AdGuard Home [README](https://github.com/AdguardTeam/AdGuardHome/blob/master/README.md) and [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki)
|
||||
|
||||
|
||||
## Troubleshooting and workaround
|
||||
|
||||
Adguard Home does currently support being setup with a non-root account (see [issue](https://github.com/AdguardTeam/AdGuardHome/issues/4714)). As the playbook uses the user `mash`, meaning you will encounter the following error when it tries to start for the first time:
|
||||
|
||||
```
|
||||
mar 02 19:11:59 $hostname mash-adguard-home[872496]: 2024/03/02 18:11:59.706251 [info] Checking if AdGuard Home has necessary permissions
|
||||
mar 02 19:11:59 $hostname mash-adguard-home[872496]: 2024/03/02 18:11:59.706257 [fatal] This is the first launch of AdGuard Home. You must run it as Administrator.
|
||||
```
|
||||
|
||||
You can get around this issue by using the following workaround which changes the user to root for the first time setup and then changes it back. You will need root to run the commands so unless you're already root, prepend the commands with `sudo` or change to root with `su`.
|
||||
|
||||
1. Edit `/etc/systemd/system/mash-adguard-home.service` and remove or comment out the line starting with `--user` (e.g. `--user=996:3992 \` - the numbers represent the uid/gid of the `mash` user, so your values may be different):
|
||||
|
||||
```
|
||||
ExecStartPre=/usr/bin/env docker create \
|
||||
--rm \
|
||||
--name=mash-adguard-home \
|
||||
--log-driver=none \
|
||||
--user=996:3992 \ <--- remove temporarily
|
||||
```
|
||||
2. Run `systemctl daemon-reload` to reload systemd
|
||||
3. Run `systemctl restart mash-adguard-home` to restart the service
|
||||
4. Perform the first time setup as documented under [usage](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/adguard-home.md#usage)
|
||||
5. Run `systemctl stop mash-adguard-home` to stop the service
|
||||
6. Run `chown -R mash:mash /mash/adguard-home/workdir` to change ownership of the files created during the first time setup from `root` to `mash`. Optionally Use `ls -ll /mash/adguard-home/workdir` check the file ownership before and after running `chown`.
|
||||
7. Run the playbook again to rebuild `/etc/systemd/system/mash-adguard-home.service` and start AdGuard Home again: `just install-service adguard-home`
|
||||
8. If you didn't get any errors, Adguard Home should be running correctly. You can also check on the service with: `journalctl -fu mash-adguard-home`
|
||||
|
|
Loading…
Reference in a new issue