Skip to content

Commit

Permalink
[bugfix/docs] AppArmor profile for SQLite (#1864)
Browse files Browse the repository at this point in the history
Our default configuration places the SQLite DB in /gotosocial/, but the
AppArmor profile doesn't allow us to write there. Instead of making the
whole directory writable, add a writable area in /gotosocial/db/ instead
and advise in the docs to move the DB there.
  • Loading branch information
daenney committed Jun 4, 2023
1 parent 97bc2e7 commit 45773a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/installation_guide/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ line under `[Service]`:
AppArmorProfile=gotosocial
```

If you're using SQLite, the AppArmor profile expects the database in
`/gotosocial/db/` so you'll need to adjust your configuration paths accordingly.

For other deployment methods (e.g. a managed Kubernetes cluster), you should
review your platform's documentation for how to deploy an application with an
AppArmor profile.
Expand Down
1 change: 1 addition & 0 deletions example/apparmor/gotosocial
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ profile gotosocial flags=(attach_disconnected, mediate_deleted) {
/usr/local/bin/gotosocial mrix,

owner /gotosocial/{,**} r,
owner /gotosocial/db/* wk,
owner /gotosocial/storage/** wk,

# Allow GoToSocial to write logs
Expand Down

0 comments on commit 45773a0

Please sign in to comment.