commit: 79c5ca05c9956a3dbbc4faf4c71054f57622b458
parent a21e11f586676f001bb32d1a5786a8ebf7132ba7
Author: Phantasm <phantasm@centrum.cz>
Date: Sun, 24 Nov 2024 16:42:24 +0100
docs openbsd: inherit default daemon limits and tweak them
su _pleroma commands were also changed in docs to simulate a full login
to apply the custom environment from login.conf
Diffstat:
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/docs/installation/openbsd_en.md b/docs/installation/openbsd_en.md
@@ -57,14 +57,15 @@ To check that PostgreSQL started properly and didn't fail right after starting,
### Configuring Pleroma
-Pleroma will be run by a dedicated \_pleroma user. Before creating it, insert the following lines in /etc/login.conf:
+Pleroma will be run by a dedicated \_pleroma user. Before creating it, insert the following lines in `/etc/login.conf`:
```
pleroma:\
- :datasize-max=1536M:\
- :datasize-cur=1536M:\
+ :datasize=1536M:\
:openfiles-max=4096:\
- :setenv=LC_ALL=en_US.UTF-8
+ :openfiles-cur=1024:\
+ :setenv=LC_ALL=en_US.UTF-8,VIX_COMPILATION_MODE=PLATFORM_PROVIDED_LIBVIPS:\
+ :tc=daemon:
```
This creates a "pleroma" login class and sets higher values than default for datasize and openfiles (see [login.conf(5)](https://man.openbsd.org/login.conf)), this is required to avoid having Pleroma crash some time after starting.
@@ -73,19 +74,17 @@ Create the \_pleroma user, assign it the pleroma login class and create its home
```
# useradd -m -L pleroma _pleroma
-# echo 'export VIX_COMPILATION_MODE=PLATFORM_PROVIDED_LIBVIPS' >> /home/_pleroma/.profile
```
Switch to the _pleroma user:
```
-# su _pleroma
+# su -l _pleroma
```
-Change to the home directory (/home/\_pleroma) and clone the Pleroma repository:
+Clone the Pleroma repository:
```
-$ cd
$ git clone -b stable https://git.pleroma.social/pleroma/pleroma.git
$ cd pleroma
```
@@ -109,8 +108,8 @@ Create the Pleroma database:
Switch back to the \_pleroma user and apply database migrations:
```
-# su _pleroma
-$ cd /home/_pleroma/pleroma
+# su -l _pleroma
+$ cd pleroma
$ MIX_ENV=prod mix ecto.migrate
```