From 2a296f5b1b3eec0cf3ac3f260fb37d13a7b52fbc Mon Sep 17 00:00:00 2001 From: George Rawlinson Date: Mon, 22 Mar 2021 08:33:48 +1300 Subject: [PATCH] Updated Setup as a systemd service (markdown) --- Setup-as-a-systemd-service.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Setup-as-a-systemd-service.md b/Setup-as-a-systemd-service.md index 2550542..6c06cc9 100644 --- a/Setup-as-a-systemd-service.md +++ b/Setup-as-a-systemd-service.md @@ -125,9 +125,9 @@ $ sudo systemctl daemon-reload ``` before (re-)starting your service. -### Service fails to start in a container +### Service fails to start -If any users are running this in a container (LXC, et al), the systemd service will not start. The line `LimitNPROC=64` in the service file prevents the service from starting, as the following error shows: +The following error shows in the systemd journal (`journalctl -eu bitwarden_rs.service`): ``` Feb 18 05:29:10 staging-bitwarden systemd[1]: Started Bitwarden Server (Rust Edition). @@ -136,7 +136,10 @@ Feb 18 05:29:10 staging-bitwarden systemd[49506]: bitwarden_rs.service: Failed a Feb 18 05:29:10 staging-bitwarden systemd[1]: bitwarden_rs.service: Main process exited, code=exited, status=203/EXEC Feb 18 05:29:10 staging-bitwarden systemd[1]: bitwarden_rs.service: Failed with result 'exit-code'. ``` -Commenting out that particular line results in the service starting correctly. Note: A systemd override file will not work, the line must be commented out/removed. The easiest way to do this is via + +This is known to occur when bitwarden_rs is running inside a container (LXC, et al) or natively. The parameter `LimitNPROC=64` in the service file prevents the service from starting. Commenting out that particular parameter results in the service starting correctly. + +**Note**: A systemd override file will not work, the line must be commented out/removed. The easiest way to do this is via ``` # systemctl edit --full bitwarden_rs.service ```