forked from AkkomaGang/akkoma
Docs: More formatting
This commit is contained in:
parent
5efd6abeee
commit
8e761f59d7
12 changed files with 33 additions and 27 deletions
|
@ -200,6 +200,5 @@ Once you have modified the JSON file, you can load it back into the database.
|
||||||
mix pleroma.config load_from_file /tmp/mrf_simple.json
|
mix pleroma.config load_from_file /tmp/mrf_simple.json
|
||||||
```
|
```
|
||||||
|
|
||||||
**NOTE** an instance reboot is needed for many changes to take effect,
|
!!! note
|
||||||
you may want to visit `/api/v1/pleroma/admin/restart` on your instance
|
An instance reboot is needed for many changes to take effect, you may want to visit `/api/v1/pleroma/admin/restart` on your instance to soft-restart the instance.
|
||||||
to soft-restart the instance.
|
|
||||||
|
|
|
@ -18,9 +18,9 @@ You can give all the options directly on the command line, but missing informati
|
||||||
|
|
||||||
Currently, known `<frontend>` values are:
|
Currently, known `<frontend>` values are:
|
||||||
|
|
||||||
- [admin-fe](https://akkoma.dev/AkkomaGang/admin-fe)
|
- [Admin-fe](https://akkoma.dev/AkkomaGang/admin-fe)
|
||||||
- [masto-fe](https://akkoma.dev/AkkomaGang/masto-fe)
|
- [Masto-fe](https://akkoma.dev/AkkomaGang/masto-fe)
|
||||||
- [pleroma-fe](https://akkoma.dev/AkkomaGang/pleroma-fe)
|
- [Pleroma-fe](https://akkoma.dev/AkkomaGang/pleroma-fe)
|
||||||
|
|
||||||
You can still install frontends that are not configured, see below.
|
You can still install frontends that are not configured, see below.
|
||||||
|
|
||||||
|
|
|
@ -1057,7 +1057,8 @@ meaning that only authenticated users will be able to access the corresponding r
|
||||||
|
|
||||||
If you'd like to allow unauthenticated access to specific resources, you can turn these settings to `false`.
|
If you'd like to allow unauthenticated access to specific resources, you can turn these settings to `false`.
|
||||||
|
|
||||||
**Note**: setting `restrict_unauthenticated/timelines/local` to `true` has no practical sense if `restrict_unauthenticated/timelines/federated` is set to `false` (since local public activities will still be delivered to unauthenticated users as part of federated timeline).
|
!!! note
|
||||||
|
Setting `restrict_unauthenticated/timelines/local` to `true` has no practical sense if `restrict_unauthenticated/timelines/federated` is set to `false` (since local public activities will still be delivered to unauthenticated users as part of federated timeline).
|
||||||
|
|
||||||
## Pleroma.Web.ApiSpec.CastAndValidate
|
## Pleroma.Web.ApiSpec.CastAndValidate
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,8 @@ This file will indeed contain a URL template of the form `https://example.org/.w
|
||||||
|
|
||||||
## Configuring your Akkoma instance
|
## Configuring your Akkoma instance
|
||||||
|
|
||||||
**_DO NOT ATTEMPT TO CONFIGURE YOUR INSTANCE THIS WAY IF YOU DID NOT UNDERSTAND THE ABOVE_**
|
!!! danger
|
||||||
|
Do not attempt to configure your instance this way if you did not understand the above
|
||||||
|
|
||||||
### Configuring Akkoma
|
### Configuring Akkoma
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,11 @@ Akkoma's full text search feature is powered by PostgreSQL's native [text search
|
||||||
|
|
||||||
In most cases, you would need an extension installed to support parsing CJK text. Here are a few extensions you may choose from, or you are more than welcome to share additional ones you found working for you with the rest of Akkoma community.
|
In most cases, you would need an extension installed to support parsing CJK text. Here are a few extensions you may choose from, or you are more than welcome to share additional ones you found working for you with the rest of Akkoma community.
|
||||||
|
|
||||||
* [a generic n-gram parser](https://github.com/huangjimmy/pg_cjk_parser) supports Simplified/Traditional Chinese, Japanese, and Korean
|
* [A generic n-gram parser](https://github.com/huangjimmy/pg_cjk_parser) supports Simplified/Traditional Chinese, Japanese, and Korean
|
||||||
* [a Korean parser](https://github.com/i0seph/textsearch_ko) based on mecab
|
* [A Korean parser](https://github.com/i0seph/textsearch_ko) based on mecab
|
||||||
* [a Japanese parser](https://www.amris.co.jp/tsja/index.html) based on mecab
|
* [A Japanese parser](https://www.amris.co.jp/tsja/index.html) based on mecab
|
||||||
* [zhparser](https://github.com/amutu/zhparser/) is a PostgreSQL extension base on the Simple Chinese Word Segmentation(SCWS)
|
* [Ahparser](https://github.com/amutu/zhparser/) is a PostgreSQL extension base on the Simple Chinese Word Segmentation(SCWS)
|
||||||
* [another Chinese parser](https://github.com/jaiminpan/pg_jieba) based on Jieba Chinese Word Segmentation
|
* [Another Chinese parser](https://github.com/jaiminpan/pg_jieba) based on Jieba Chinese Word Segmentation
|
||||||
|
|
||||||
Once you have the new search config, make sure you test it with the `pleroma` user in PostgreSQL (change `YOUR.CONFIG` to your real configuration name)
|
Once you have the new search config, make sure you test it with the `pleroma` user in PostgreSQL (change `YOUR.CONFIG` to your real configuration name)
|
||||||
```
|
```
|
||||||
|
|
|
@ -9,7 +9,7 @@ Akkoma requires some adjustments from the defaults for running the instance loca
|
||||||
* You can use your own fork of the repository and add Akkoma as a remote `git remote add akkoma 'https://akkoma.dev/AkkomaGang/akkoma.git'`
|
* You can use your own fork of the repository and add Akkoma as a remote `git remote add akkoma 'https://akkoma.dev/AkkomaGang/akkoma.git'`
|
||||||
* For domain, you can use `localhost`
|
* For domain, you can use `localhost`
|
||||||
* For the DB, you can still choose a dedicated user. The mix tasks sets it up, so it's no extra work for you
|
* For the DB, you can still choose a dedicated user. The mix tasks sets it up, so it's no extra work for you
|
||||||
* instead of creating a `prod.secret.exs`, create `dev.secret.exs`
|
* Instead of creating a `prod.secret.exs`, create `dev.secret.exs`
|
||||||
* No need to prefix with `MIX_ENV=prod`. We're using dev and that's the default MIX_ENV
|
* No need to prefix with `MIX_ENV=prod`. We're using dev and that's the default MIX_ENV
|
||||||
* You can skip NGINX and systemd
|
* You can skip NGINX and systemd
|
||||||
* For front-end, you'll probably want to install and use the develop branch instead of the stable branch. There's no guarantee that the stable branch of the FE will always work on the develop branch of the BE.
|
* For front-end, you'll probably want to install and use the develop branch instead of the stable branch. There's no guarantee that the stable branch of the FE will always work on the develop branch of the BE.
|
||||||
|
|
|
@ -82,7 +82,8 @@ doas addgroup akkoma
|
||||||
doas adduser -S -s /bin/false -h /opt/akkoma -H -G akkoma akkoma
|
doas adduser -S -s /bin/false -h /opt/akkoma -H -G akkoma akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note**: To execute a single command as the Akkoma system user, use `doas -u akkoma command`. You can also switch to a shell by using `doas -su akkoma`. If you don’t have and want `doas` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
!!! note
|
||||||
|
To execute a single command as the Akkoma system user, use `doas -u akkoma command`. You can also switch to a shell by using `doas -su akkoma`. If you don’t have and want `doas` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
||||||
|
|
||||||
* Git clone the akkoma-be repository from stable-branch and make the Akkoma user the owner of the directory:
|
* Git clone the akkoma-be repository from stable-branch and make the Akkoma user the owner of the directory:
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,8 @@ sudo pacman -S ffmpeg imagemagick perl-image-exiftool
|
||||||
sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
!!! note
|
||||||
|
To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
||||||
|
|
||||||
* Git clone the akkoma-be repository from stable-branch and make the Akkoma user the owner of the directory:
|
* Git clone the akkoma-be repository from stable-branch and make the Akkoma user the owner of the directory:
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,8 @@ sudo apt install imagemagick ffmpeg libimage-exiftool-perl
|
||||||
sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
!!! note
|
||||||
|
To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
||||||
|
|
||||||
* Git clone the akkoma-be repository from stable-branch and make the Akkoma user the owner of the directory:
|
* Git clone the akkoma-be repository from stable-branch and make the Akkoma user the owner of the directory:
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,8 @@ sudo dnf install ImageMagick perl-Image-ExifTool
|
||||||
sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
!!! note
|
||||||
|
To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
||||||
|
|
||||||
* Git clone the akkoma-be repository from stable-branch and make the Akkoma user the owner of the directory:
|
* Git clone the akkoma-be repository from stable-branch and make the Akkoma user the owner of the directory:
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,8 @@ Remove `,wheel` if you do not want this user to be able to use `sudo`, however,
|
||||||
|
|
||||||
Optional: If you are using sudo, review your sudo setup to ensure it works for you. The `/etc/sudoers` file has a lot of options and examples to help you, and [the Gentoo sudo guide](https://wiki.gentoo.org/wiki/Sudo) has more information. Finishing this installation will be somewhat easier if you have a way to sudo from the `akkoma` user, but it might be best to not allow that user to sudo during normal operation, and as such there will be a reminder at the end of this guide to double check if you would like to lock down the `akkoma` user after initial setup.
|
Optional: If you are using sudo, review your sudo setup to ensure it works for you. The `/etc/sudoers` file has a lot of options and examples to help you, and [the Gentoo sudo guide](https://wiki.gentoo.org/wiki/Sudo) has more information. Finishing this installation will be somewhat easier if you have a way to sudo from the `akkoma` user, but it might be best to not allow that user to sudo during normal operation, and as such there will be a reminder at the end of this guide to double check if you would like to lock down the `akkoma` user after initial setup.
|
||||||
|
|
||||||
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don't have or want `sudo` or would like to use the system as the `akkoma` user for instance maintenance tasks, you can simply use `su - akkoma` to switch to the `akkoma` user.
|
!!! note
|
||||||
|
To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don't have or want `sudo` or would like to use the system as the `akkoma` user for instance maintenance tasks, you can simply use `su - akkoma` to switch to the `akkoma` user.
|
||||||
|
|
||||||
* Git clone the akkoma-be repository and make the Akkoma user the owner of the directory:
|
* Git clone the akkoma-be repository and make the Akkoma user the owner of the directory:
|
||||||
|
|
||||||
|
|
|
@ -68,9 +68,9 @@ To check that it started properly and didn't fail right after starting, you can
|
||||||
#### httpd
|
#### httpd
|
||||||
httpd will have three functions:
|
httpd will have three functions:
|
||||||
|
|
||||||
* redirect requests trying to reach the instance over HTTP to the HTTPS URL
|
* Redirect requests trying to reach the instance over HTTP to the HTTPS URL
|
||||||
* serve a robots.txt file
|
* Serve a robots.txt file
|
||||||
* get Let's Encrypt certificates, with acme-client
|
* Get Let's Encrypt certificates, with acme-client
|
||||||
|
|
||||||
Insert the following config in `/etc/httpd.conf`:
|
Insert the following config in `/etc/httpd.conf`:
|
||||||
```
|
```
|
||||||
|
@ -230,11 +230,11 @@ Enter a shell as `_akkoma` (as root `su _akkoma -`) and enter Akkoma's installat
|
||||||
|
|
||||||
Then follow the main installation guide:
|
Then follow the main installation guide:
|
||||||
|
|
||||||
* run `mix deps.get`
|
* Run `mix deps.get`
|
||||||
* run `MIX_ENV=prod mix pleroma.instance gen` and enter your instance's information when asked
|
* Run `MIX_ENV=prod mix pleroma.instance gen` and enter your instance's information when asked
|
||||||
* copy `config/generated_config.exs` to `config/prod.secret.exs`. The default values should be sufficient, but you should edit it and check that everything seems OK.
|
* Copy `config/generated_config.exs` to `config/prod.secret.exs`. The default values should be sufficient, but you should edit it and check that everything seems OK.
|
||||||
* exit your current shell back to a root one and run `psql -U postgres -f /home/_akkoma/akkoma/config/setup_db.psql` to setup the database.
|
* Exit your current shell back to a root one and run `psql -U postgres -f /home/_akkoma/akkoma/config/setup_db.psql` to setup the database.
|
||||||
* return to a `_akkoma` shell into Akkoma's installation directory (`su _akkoma -;cd ~/akkoma`) and run `MIX_ENV=prod mix ecto.migrate`
|
* Return to a `_akkoma` shell into Akkoma's installation directory (`su _akkoma -;cd ~/akkoma`) and run `MIX_ENV=prod mix ecto.migrate`
|
||||||
|
|
||||||
As `_akkoma` in `/home/_akkoma/akkoma`, you can now run `LC_ALL=en_US.UTF-8 MIX_ENV=prod mix phx.server` to start your instance.
|
As `_akkoma` in `/home/_akkoma/akkoma`, you can now run `LC_ALL=en_US.UTF-8 MIX_ENV=prod mix phx.server` to start your instance.
|
||||||
In another SSH session/tmux window, check that it is working properly by running `ftp -MVo - http://127.0.0.1:4000/api/v1/instance`, you should get JSON output. Double-check that *uri*'s value is your instance's domain name.
|
In another SSH session/tmux window, check that it is working properly by running `ftp -MVo - http://127.0.0.1:4000/api/v1/instance`, you should get JSON output. Double-check that *uri*'s value is your instance's domain name.
|
||||||
|
|
Loading…
Reference in a new issue