Remove precompiled javascript #55
249 changed files with 7745 additions and 3722 deletions
|
@ -16,7 +16,9 @@ pipeline:
|
||||||
glibc:
|
glibc:
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- push
|
||||||
|
branch:
|
||||||
|
- develop
|
||||||
secrets:
|
secrets:
|
||||||
- SCW_ACCESS_KEY
|
- SCW_ACCESS_KEY
|
||||||
- SCW_SECRET_KEY
|
- SCW_SECRET_KEY
|
||||||
|
@ -25,7 +27,7 @@ pipeline:
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: prod
|
MIX_ENV: prod
|
||||||
commands:
|
commands:
|
||||||
- apt-get update && apt-get install -y cmake libmagic-dev rclone zip
|
- apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev
|
||||||
- wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
|
- wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
|
||||||
- mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
|
- mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
|
||||||
- chmod +x scaleway-cli
|
- chmod +x scaleway-cli
|
||||||
|
@ -44,7 +46,9 @@ pipeline:
|
||||||
musl:
|
musl:
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- push
|
||||||
|
branch:
|
||||||
|
- develop
|
||||||
secrets:
|
secrets:
|
||||||
- SCW_ACCESS_KEY
|
- SCW_ACCESS_KEY
|
||||||
- SCW_SECRET_KEY
|
- SCW_SECRET_KEY
|
||||||
|
@ -54,7 +58,7 @@ pipeline:
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: prod
|
MIX_ENV: prod
|
||||||
commands:
|
commands:
|
||||||
- apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip
|
- apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip imagemagick
|
||||||
- rm -rf release || true
|
- rm -rf release || true
|
||||||
- rm -rf _build || true
|
- rm -rf _build || true
|
||||||
- rm -rf /root/.mix
|
- rm -rf /root/.mix
|
||||||
|
|
|
@ -11,6 +11,7 @@ pipeline:
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
- pull_request
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
commands:
|
commands:
|
||||||
|
@ -25,6 +26,7 @@ pipeline:
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
- pull_request
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
POSTGRES_DB: pleroma_test
|
POSTGRES_DB: pleroma_test
|
||||||
|
|
30
CHANGELOG.md
30
CHANGELOG.md
|
@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Added move account API
|
||||||
|
- Added ability to set instance accent-color via theme-color
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
- SSH frontend, to be potentially re-enabled via a bridge rather than wired into the main system
|
||||||
|
- Gopher frontend, as above
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- ES8 support for bulk indexing activities
|
||||||
|
|
||||||
## 2.5.2
|
## 2.5.2
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -17,6 +28,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
### Fixed
|
### Fixed
|
||||||
- Updated `no_empty` MRF to not error when recieving misskey markdown
|
- Updated `no_empty` MRF to not error when recieving misskey markdown
|
||||||
|
|
||||||
|
### Security
|
||||||
|
- Ensure local-only statuses do not get leaked
|
||||||
|
|
||||||
## 2.5.1
|
## 2.5.1
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -47,6 +61,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Readded mastoFE
|
- Readded mastoFE
|
||||||
- Added support for custom emoji reactions
|
- Added support for custom emoji reactions
|
||||||
- Added `emoji_url` in notifications to allow for custom emoji rendering
|
- Added `emoji_url` in notifications to allow for custom emoji rendering
|
||||||
|
- Make backend-rendered pages translatable. This includes emails. Pages returned as a HTTP response are translated using the language specified in the `userLanguage` cookie, or the `Accept-Language` header. Emails are translated using the `language` field when registering. This language can be changed by `PATCH /api/v1/accounts/update_credentials` with the `language` field.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Subscription(Bell) Notifications: Don't create from Pipeline Ingested replies
|
- Subscription(Bell) Notifications: Don't create from Pipeline Ingested replies
|
||||||
|
@ -64,7 +79,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
## 2.4.1 - 2021-08-29
|
### Security
|
||||||
|
- Private `/objects/` and `/activities/` leaking if cached by authenticated user
|
||||||
|
- SweetXML library DTD bomb
|
||||||
|
|
||||||
|
## 2.4.2 - 2022-01-10
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Federation issues caused by HTTP pool checkout timeouts
|
||||||
|
- Compatibility with Elixir 1.13
|
||||||
|
|
||||||
|
### Upgrade notes
|
||||||
|
|
||||||
|
1. Restart Pleroma
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Make `mix pleroma.database set_text_search_config` run concurrently and indefinitely
|
- Make `mix pleroma.database set_text_search_config` run concurrently and indefinitely
|
||||||
|
@ -97,6 +124,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Improved Twittercard and OpenGraph meta tag generation including thumbnails and image dimension metadata when available.
|
- Improved Twittercard and OpenGraph meta tag generation including thumbnails and image dimension metadata when available.
|
||||||
- AdminAPI: sort users so the newest are at the top.
|
- AdminAPI: sort users so the newest are at the top.
|
||||||
- ActivityPub Client-to-Server(C2S): Limitation on the type of Activity/Object are lifted as they are now passed through ObjectValidators
|
- ActivityPub Client-to-Server(C2S): Limitation on the type of Activity/Object are lifted as they are now passed through ObjectValidators
|
||||||
|
- MRF (`AntiFollowbotPolicy`): Bot accounts are now also considered followbots. Users can still allow bots to follow them by first following the bot.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|
103
README.md
103
README.md
|
@ -2,103 +2,37 @@
|
||||||
|
|
||||||
*a smallish microblogging platform, aka the cooler pleroma*
|
*a smallish microblogging platform, aka the cooler pleroma*
|
||||||
|
|
||||||
### Why though?
|
|
||||||
|
|
||||||
pleroma as a project has stagnated of late. after a spat between
|
|
||||||
developers led to a fork (which died due to chronic lack of direction),
|
|
||||||
nearly nobody seems to _want_ to work on it. this in addition to the
|
|
||||||
BDFL being AWOL whenever needed, means that the entire project is
|
|
||||||
nought but a power vacuum waiting for someone to step in. and with the
|
|
||||||
track record pleroma has, i do not trust that whoever steps in will be
|
|
||||||
good for the project.
|
|
||||||
|
|
||||||
thus, i am striking out on my own. i already had a few modifications
|
|
||||||
on my instance, so it wasn't a particularly large leap to assume direct
|
|
||||||
control.
|
|
||||||
|
|
||||||
### But really, why should I migrate to your thing?
|
|
||||||
|
|
||||||
aside from me actually being responsive? let's lookie here, we've got
|
|
||||||
- custom emoji reactions
|
|
||||||
- misskey markdown (MFM) rendering and posting support
|
|
||||||
- elasticsearch support (because pleroma search is GARBAGE)
|
|
||||||
- latest develop pleroma-fe additions
|
|
||||||
- local-only posting
|
|
||||||
- probably more, this is like 3.5 years of IHBA additions finally compiled
|
|
||||||
|
|
||||||
## Upgrading to Akkoma
|
|
||||||
|
|
||||||
### From source
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git remote set-url origin https://akkoma.dev/AkkomaGang/akkoma.git/
|
|
||||||
git fetch origin
|
|
||||||
git pull -r
|
|
||||||
```
|
|
||||||
|
|
||||||
Then compile, migrate and restart as usual.
|
|
||||||
|
|
||||||
Then if you've done anything fancy to the frontend, you'll want to get the
|
|
||||||
updates for that as well. This won't be the same for any two instances,
|
|
||||||
so `https://akkoma.dev/AkkomaGang/pleroma-fe` is the repo you need.
|
|
||||||
|
|
||||||
### From OTP
|
|
||||||
|
|
||||||
```bash
|
|
||||||
export FLAVOUR=$(arch="$(uname -m)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;fi;echo "$arch$libc_postfix")
|
|
||||||
|
|
||||||
./bin/pleroma_ctl update --zip-url https://akkoma-updates.s3-website.fr-par.scw.cloud/develop/akkoma-$FLAVOUR.zip
|
|
||||||
./bin/pleroma_ctl migrate
|
|
||||||
```
|
|
||||||
|
|
||||||
Then restart. When updating in the future, can just use
|
|
||||||
|
|
||||||
```bash
|
|
||||||
./bin/pleroma_ctl update --branch develop
|
|
||||||
```
|
|
||||||
|
|
||||||
### Old readme follows
|
|
||||||
|
|
||||||
<img src="https://git.pleroma.social/pleroma/pleroma/uploads/8cec84f5a084d887339f57deeb8a293e/pleroma-banner-vector-nopad-notext.svg" width="300px" />
|
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
Pleroma is a microblogging server software that can federate (= exchange messages with) other servers that support ActivityPub. What that means is that you can host a server for yourself or your friends and stay in control of your online identity, but still exchange messages with people on larger servers. Pleroma will federate with all servers that implement ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Peertube, and Pixelfed.
|
This is a fork of Pleroma, which is a microblogging server software that can federate (= exchange messages with) other servers that support ActivityPub. What that means is that you can host a server for yourself or your friends and stay in control of your online identity, but still exchange messages with people on larger servers. Pleroma will federate with all servers that implement ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Peertube, and Pixelfed.
|
||||||
|
|
||||||
Pleroma is written in Elixir and uses PostgresSQL for data storage. It's efficient enough to be ran on low-power devices like Raspberry Pi (though we wouldn't recommend storing the database on the internal SD card ;) but can scale well when ran on more powerful hardware (albeit only single-node for now).
|
Akkoma is written in Elixir and uses PostgresSQL for data storage.
|
||||||
|
|
||||||
For clients it supports the [Mastodon client API](https://docs.joinmastodon.org/api/guidelines/) with Pleroma extensions (see the API section on <https://docs-develop.pleroma.social>).
|
For clients it supports the [Mastodon client API](https://docs.joinmastodon.org/api/guidelines/) with Pleroma extensions (see the API section on <https://docs.akkoma.dev/main/>).
|
||||||
|
|
||||||
- [Client Applications for Pleroma](https://docs-develop.pleroma.social/backend/clients/)
|
- [Client Applications for Pleroma](https://docs.akkoma.dev/main/backend/clients/)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### OTP releases (Recommended)
|
### OTP releases (Recommended)
|
||||||
If you are running Linux (glibc or musl) on x86/arm, the recommended way to install Pleroma is by using OTP releases. OTP releases are as close as you can get to binary releases with Erlang/Elixir. The release is self-contained, and provides everything needed to boot it. The installation instructions are available [here](https://docs-develop.pleroma.social/backend/installation/otp_en/).
|
If you are running Linux (glibc or musl) on x86, the recommended way to install Pleroma is by using OTP releases. OTP releases are as close as you can get to binary releases with Erlang/Elixir. The release is self-contained, and provides everything needed to boot it. The installation instructions are available [here](https://docs.akkoma.dev/main/backend/installation/otp_en/).
|
||||||
|
|
||||||
### From Source
|
### From Source
|
||||||
If your platform is not supported, or you just want to be able to edit the source code easily, you may install Pleroma from source.
|
If your platform is not supported, or you just want to be able to edit the source code easily, you may install Pleroma from source.
|
||||||
|
|
||||||
- [Alpine Linux](https://docs-develop.pleroma.social/backend/installation/alpine_linux_en/)
|
- [Alpine Linux](https://docs.akkoma.dev/main/backend/installation/alpine_linux_en/)
|
||||||
- [Arch Linux](https://docs-develop.pleroma.social/backend/installation/arch_linux_en/)
|
- [Arch Linux](https://docs.akkoma.dev/main/backend/installation/arch_linux_en/)
|
||||||
- [CentOS 7](https://docs-develop.pleroma.social/backend/installation/centos7_en/)
|
- [Debian-based](https://docs.akkoma.dev/main/backend/installation/debian_based_en/)
|
||||||
- [Debian-based](https://docs-develop.pleroma.social/backend/installation/debian_based_en/)
|
- [Debian-based (jp)](https://docs.akkoma.dev/main/backend/installation/debian_based_jp/)
|
||||||
- [Debian-based (jp)](https://docs-develop.pleroma.social/backend/installation/debian_based_jp/)
|
- [FreeBSD](https://docs.akkoma.dev/main/backend/installation/freebsd_en/)
|
||||||
- [FreeBSD](https://docs-develop.pleroma.social/backend/installation/freebsd_en/)
|
- [Gentoo Linux](https://docs.akkoma.dev/main/backend/installation/gentoo_en/)
|
||||||
- [Gentoo Linux](https://docs-develop.pleroma.social/backend/installation/gentoo_en/)
|
- [NetBSD](https://docs.akkoma.dev/main/backend/installation/netbsd_en/)
|
||||||
- [NetBSD](https://docs-develop.pleroma.social/backend/installation/netbsd_en/)
|
- [OpenBSD](https://docs.akkoma.dev/main/backend/installation/openbsd_en/)
|
||||||
- [OpenBSD](https://docs-develop.pleroma.social/backend/installation/openbsd_en/)
|
- [OpenBSD (fi)](https://docs.akkoma.dev/main/backend/installation/openbsd_fi/)
|
||||||
- [OpenBSD (fi)](https://docs-develop.pleroma.social/backend/installation/openbsd_fi/)
|
|
||||||
|
|
||||||
### OS/Distro packages
|
|
||||||
Currently Pleroma is packaged for [YunoHost](https://yunohost.org). If you want to package Pleroma for any OS/Distros, we can guide you through the process on our [community channels](#community-channels). If you want to change default options in your Pleroma package, please **discuss it with us first**.
|
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
While we don’t provide docker files, other people have written very good ones. Take a look at <https://github.com/angristan/docker-pleroma> or <https://glitch.sh/sn0w/pleroma-docker>.
|
While we don’t provide docker files, other people have written very good ones. Take a look at <https://github.com/angristan/docker-pleroma> or <https://glitch.sh/sn0w/pleroma-docker>.
|
||||||
|
|
||||||
### Raspberry Pi
|
|
||||||
Community maintained Raspberry Pi image that you can flash and run Pleroma on your Raspberry Pi. Available here <https://github.com/guysoft/PleromaPi>.
|
|
||||||
|
|
||||||
### Compilation Troubleshooting
|
### Compilation Troubleshooting
|
||||||
If you ever encounter compilation issues during the updating of Pleroma, you can try these commands and see if they fix things:
|
If you ever encounter compilation issues during the updating of Pleroma, you can try these commands and see if they fix things:
|
||||||
|
|
||||||
|
@ -107,12 +41,5 @@ If you ever encounter compilation issues during the updating of Pleroma, you can
|
||||||
- `mix local.hex`
|
- `mix local.hex`
|
||||||
- `rm -r _build`
|
- `rm -r _build`
|
||||||
|
|
||||||
If you are not developing Pleroma, it is better to use the OTP release, which comes with everything precompiled.
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
- Latest Released revision: <https://docs.pleroma.social>
|
- https://docs.akkoma.dev/main
|
||||||
- Latest Git revision: <https://docs-develop.pleroma.social>
|
|
||||||
|
|
||||||
## Community Channels
|
|
||||||
* IRC: **#pleroma** and **#pleroma-dev** on libera.chat, webchat is available at <https://irc.pleroma.social>
|
|
||||||
* Matrix: [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) and [#pleroma-dev:libera.chat](https://matrix.to/#/#pleroma-dev:libera.chat)
|
|
||||||
|
|
|
@ -70,8 +70,6 @@
|
||||||
|
|
||||||
config :pleroma, :http_security, report_uri: "https://endpoint.com"
|
config :pleroma, :http_security, report_uri: "https://endpoint.com"
|
||||||
|
|
||||||
config :pleroma, :http, send_user_agent: false
|
|
||||||
|
|
||||||
rum_enabled = System.get_env("RUM_ENABLED") == "true"
|
rum_enabled = System.get_env("RUM_ENABLED") == "true"
|
||||||
config :pleroma, :database, rum_enabled: rum_enabled
|
config :pleroma, :database, rum_enabled: rum_enabled
|
||||||
IO.puts("RUM enabled: #{rum_enabled}")
|
IO.puts("RUM enabled: #{rum_enabled}")
|
||||||
|
|
|
@ -175,12 +175,11 @@
|
||||||
"application/ld+json" => ["activity+json"]
|
"application/ld+json" => ["activity+json"]
|
||||||
}
|
}
|
||||||
|
|
||||||
config :tesla, adapter: Tesla.Adapter.Hackney
|
config :tesla, :adapter, {Tesla.Adapter.Finch, name: MyFinch}
|
||||||
|
|
||||||
# Configures http settings, upstream proxy etc.
|
# Configures http settings, upstream proxy etc.
|
||||||
config :pleroma, :http,
|
config :pleroma, :http,
|
||||||
proxy_url: nil,
|
proxy_url: nil,
|
||||||
send_user_agent: true,
|
|
||||||
user_agent: :default,
|
user_agent: :default,
|
||||||
adapter: []
|
adapter: []
|
||||||
|
|
||||||
|
@ -363,7 +362,8 @@
|
||||||
follow_handshake_timeout: 500,
|
follow_handshake_timeout: 500,
|
||||||
note_replies_output_limit: 5,
|
note_replies_output_limit: 5,
|
||||||
sign_object_fetches: true,
|
sign_object_fetches: true,
|
||||||
authorized_fetch_mode: false
|
authorized_fetch_mode: false,
|
||||||
|
max_collection_objects: 50
|
||||||
|
|
||||||
config :pleroma, :streamer,
|
config :pleroma, :streamer,
|
||||||
workers: 3,
|
workers: 3,
|
||||||
|
@ -439,11 +439,7 @@
|
||||||
redirect_on_failure: false,
|
redirect_on_failure: false,
|
||||||
max_body_length: 25 * 1_048_576,
|
max_body_length: 25 * 1_048_576,
|
||||||
# Note: max_read_duration defaults to Pleroma.ReverseProxy.max_read_duration_default/1
|
# Note: max_read_duration defaults to Pleroma.ReverseProxy.max_read_duration_default/1
|
||||||
max_read_duration: 30_000,
|
max_read_duration: 30_000
|
||||||
http: [
|
|
||||||
follow_redirect: true,
|
|
||||||
pool: :media
|
|
||||||
]
|
|
||||||
],
|
],
|
||||||
whitelist: []
|
whitelist: []
|
||||||
|
|
||||||
|
@ -474,11 +470,6 @@
|
||||||
|
|
||||||
config :phoenix, :filter_parameters, ["password", "confirm"]
|
config :phoenix, :filter_parameters, ["password", "confirm"]
|
||||||
|
|
||||||
config :pleroma, :gopher,
|
|
||||||
enabled: false,
|
|
||||||
ip: {0, 0, 0, 0},
|
|
||||||
port: 9999
|
|
||||||
|
|
||||||
config :pleroma, Pleroma.Web.Metadata,
|
config :pleroma, Pleroma.Web.Metadata,
|
||||||
providers: [
|
providers: [
|
||||||
Pleroma.Web.Metadata.Providers.OpenGraph,
|
Pleroma.Web.Metadata.Providers.OpenGraph,
|
||||||
|
@ -486,6 +477,8 @@
|
||||||
],
|
],
|
||||||
unfurl_nsfw: false
|
unfurl_nsfw: false
|
||||||
|
|
||||||
|
config :pleroma, Pleroma.Web.Metadata.Providers.Theme, theme_color: "#593196"
|
||||||
|
|
||||||
config :pleroma, Pleroma.Web.Preload,
|
config :pleroma, Pleroma.Web.Preload,
|
||||||
providers: [
|
providers: [
|
||||||
Pleroma.Web.Preload.Providers.Instance
|
Pleroma.Web.Preload.Providers.Instance
|
||||||
|
@ -573,7 +566,8 @@
|
||||||
remote_fetcher: 2,
|
remote_fetcher: 2,
|
||||||
attachments_cleanup: 1,
|
attachments_cleanup: 1,
|
||||||
new_users_digest: 1,
|
new_users_digest: 1,
|
||||||
mute_expire: 5
|
mute_expire: 5,
|
||||||
|
search_indexing: 10
|
||||||
],
|
],
|
||||||
plugins: [Oban.Plugins.Pruner],
|
plugins: [Oban.Plugins.Pruner],
|
||||||
crontab: [
|
crontab: [
|
||||||
|
@ -584,7 +578,8 @@
|
||||||
config :pleroma, :workers,
|
config :pleroma, :workers,
|
||||||
retries: [
|
retries: [
|
||||||
federator_incoming: 5,
|
federator_incoming: 5,
|
||||||
federator_outgoing: 5
|
federator_outgoing: 5,
|
||||||
|
search_indexing: 2
|
||||||
]
|
]
|
||||||
|
|
||||||
config :pleroma, Pleroma.Formatter,
|
config :pleroma, Pleroma.Formatter,
|
||||||
|
@ -607,9 +602,6 @@
|
||||||
base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
|
base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
|
||||||
uid: System.get_env("LDAP_UID") || "cn"
|
uid: System.get_env("LDAP_UID") || "cn"
|
||||||
|
|
||||||
config :esshd,
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
oauth_consumer_strategies =
|
oauth_consumer_strategies =
|
||||||
"OAUTH_CONSUMER_STRATEGIES"
|
"OAUTH_CONSUMER_STRATEGIES"
|
||||||
|> System.get_env()
|
|> System.get_env()
|
||||||
|
@ -774,51 +766,6 @@
|
||||||
parameters: [gin_fuzzy_search_limit: "500"],
|
parameters: [gin_fuzzy_search_limit: "500"],
|
||||||
prepare: :unnamed
|
prepare: :unnamed
|
||||||
|
|
||||||
config :pleroma, :connections_pool,
|
|
||||||
reclaim_multiplier: 0.1,
|
|
||||||
connection_acquisition_wait: 250,
|
|
||||||
connection_acquisition_retries: 5,
|
|
||||||
max_connections: 250,
|
|
||||||
max_idle_time: 30_000,
|
|
||||||
retry: 0,
|
|
||||||
connect_timeout: 5_000
|
|
||||||
|
|
||||||
config :pleroma, :pools,
|
|
||||||
federation: [
|
|
||||||
size: 50,
|
|
||||||
max_waiting: 10,
|
|
||||||
recv_timeout: 10_000
|
|
||||||
],
|
|
||||||
media: [
|
|
||||||
size: 50,
|
|
||||||
max_waiting: 20,
|
|
||||||
recv_timeout: 15_000
|
|
||||||
],
|
|
||||||
upload: [
|
|
||||||
size: 25,
|
|
||||||
max_waiting: 5,
|
|
||||||
recv_timeout: 15_000
|
|
||||||
],
|
|
||||||
default: [
|
|
||||||
size: 10,
|
|
||||||
max_waiting: 2,
|
|
||||||
recv_timeout: 5_000
|
|
||||||
]
|
|
||||||
|
|
||||||
config :pleroma, :hackney_pools,
|
|
||||||
federation: [
|
|
||||||
max_connections: 50,
|
|
||||||
timeout: 150_000
|
|
||||||
],
|
|
||||||
media: [
|
|
||||||
max_connections: 50,
|
|
||||||
timeout: 150_000
|
|
||||||
],
|
|
||||||
upload: [
|
|
||||||
max_connections: 25,
|
|
||||||
timeout: 300_000
|
|
||||||
]
|
|
||||||
|
|
||||||
config :pleroma, :majic_pool, size: 2
|
config :pleroma, :majic_pool, size: 2
|
||||||
|
|
||||||
private_instance? = :if_instance_is_private
|
private_instance? = :if_instance_is_private
|
||||||
|
@ -835,8 +782,6 @@
|
||||||
transparency: true,
|
transparency: true,
|
||||||
transparency_exclusions: []
|
transparency_exclusions: []
|
||||||
|
|
||||||
config :tzdata, :http_client, Pleroma.HTTP.Tzdata
|
|
||||||
|
|
||||||
config :ex_aws, http_client: Pleroma.HTTP.ExAws
|
config :ex_aws, http_client: Pleroma.HTTP.ExAws
|
||||||
|
|
||||||
config :web_push_encryption, http_client: Pleroma.HTTP.WebPush
|
config :web_push_encryption, http_client: Pleroma.HTTP.WebPush
|
||||||
|
@ -854,17 +799,32 @@
|
||||||
|
|
||||||
config :pleroma, ConcurrentLimiter, [
|
config :pleroma, ConcurrentLimiter, [
|
||||||
{Pleroma.Web.RichMedia.Helpers, [max_running: 5, max_waiting: 5]},
|
{Pleroma.Web.RichMedia.Helpers, [max_running: 5, max_waiting: 5]},
|
||||||
{Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, [max_running: 5, max_waiting: 5]}
|
{Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, [max_running: 5, max_waiting: 5]},
|
||||||
|
{Pleroma.Search, [max_running: 30, max_waiting: 50]}
|
||||||
]
|
]
|
||||||
|
|
||||||
config :pleroma, :search, provider: Pleroma.Search.Builtin
|
config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch
|
||||||
|
|
||||||
config :pleroma, :telemetry,
|
config :pleroma, Pleroma.Search.Meilisearch,
|
||||||
slow_queries_logging: [
|
url: "http://127.0.0.1:7700/",
|
||||||
enabled: false,
|
private_key: nil,
|
||||||
min_duration: 500_000,
|
initial_indexing_chunk_size: 100_000
|
||||||
exclude_sources: [nil, "oban_jobs"]
|
|
||||||
]
|
config :pleroma, Pleroma.Search.Elasticsearch.Cluster,
|
||||||
|
url: "http://localhost:9200",
|
||||||
|
username: "elastic",
|
||||||
|
password: "changeme",
|
||||||
|
api: Elasticsearch.API.HTTP,
|
||||||
|
json_library: Jason,
|
||||||
|
indexes: %{
|
||||||
|
activities: %{
|
||||||
|
settings: "priv/es-mappings/activity.json",
|
||||||
|
store: Pleroma.Search.Elasticsearch.Store,
|
||||||
|
sources: [Pleroma.Activity],
|
||||||
|
bulk_page_size: 1000,
|
||||||
|
bulk_wait_interval: 15_000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Import environment specific config. This must remain at the bottom
|
# Import environment specific config. This must remain at the bottom
|
||||||
# of this file so it overrides the configuration defined above.
|
# of this file so it overrides the configuration defined above.
|
||||||
|
|
|
@ -1689,6 +1689,13 @@
|
||||||
type: :integer,
|
type: :integer,
|
||||||
description: "Following handshake timeout",
|
description: "Following handshake timeout",
|
||||||
suggestions: [500]
|
suggestions: [500]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :max_collection_objects,
|
||||||
|
type: :integer,
|
||||||
|
description:
|
||||||
|
"The maximum number of items to fetch from a remote collections. Setting this too low can lead to only getting partial collections, but too high and you can end up fetching far too many objects.",
|
||||||
|
suggestions: [50]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -1972,6 +1979,21 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
%{
|
||||||
|
group: :pleroma,
|
||||||
|
key: Pleroma.Web.Metadata.Providers.Theme,
|
||||||
|
type: :group,
|
||||||
|
description: "Specific provider to hand out themes to instances that scrape index.html",
|
||||||
|
children: [
|
||||||
|
%{
|
||||||
|
key: :theme_color,
|
||||||
|
type: :string,
|
||||||
|
description:
|
||||||
|
"The 'accent color' of the instance, used in places like misskey's instance ticker",
|
||||||
|
suggestions: ["#593196"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
%{
|
%{
|
||||||
group: :pleroma,
|
group: :pleroma,
|
||||||
key: :rich_media,
|
key: :rich_media,
|
||||||
|
@ -2618,10 +2640,6 @@
|
||||||
description: "Proxy URL",
|
description: "Proxy URL",
|
||||||
suggestions: ["localhost:9020", {:socks5, :localhost, 3090}]
|
suggestions: ["localhost:9020", {:socks5, :localhost, 3090}]
|
||||||
},
|
},
|
||||||
%{
|
|
||||||
key: :send_user_agent,
|
|
||||||
type: :boolean
|
|
||||||
},
|
|
||||||
%{
|
%{
|
||||||
key: :user_agent,
|
key: :user_agent,
|
||||||
type: [:string, :atom],
|
type: [:string, :atom],
|
||||||
|
@ -2934,147 +2952,6 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
%{
|
|
||||||
group: :pleroma,
|
|
||||||
key: :connections_pool,
|
|
||||||
type: :group,
|
|
||||||
description: "Advanced settings for `Gun` connections pool",
|
|
||||||
children: [
|
|
||||||
%{
|
|
||||||
key: :connection_acquisition_wait,
|
|
||||||
type: :integer,
|
|
||||||
description:
|
|
||||||
"Timeout to acquire a connection from pool. The total max time is this value multiplied by the number of retries. Default: 250ms.",
|
|
||||||
suggestions: [250]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :connection_acquisition_retries,
|
|
||||||
type: :integer,
|
|
||||||
description:
|
|
||||||
"Number of attempts to acquire the connection from the pool if it is overloaded. Default: 5",
|
|
||||||
suggestions: [5]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :max_connections,
|
|
||||||
type: :integer,
|
|
||||||
description: "Maximum number of connections in the pool. Default: 250 connections.",
|
|
||||||
suggestions: [250]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :connect_timeout,
|
|
||||||
type: :integer,
|
|
||||||
description: "Timeout while `gun` will wait until connection is up. Default: 5000ms.",
|
|
||||||
suggestions: [5000]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :reclaim_multiplier,
|
|
||||||
type: :integer,
|
|
||||||
description:
|
|
||||||
"Multiplier for the number of idle connection to be reclaimed if the pool is full. For example if the pool maxes out at 250 connections and this setting is set to 0.3, the pool will reclaim at most 75 idle connections if it's overloaded. Default: 0.1",
|
|
||||||
suggestions: [0.1]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
group: :pleroma,
|
|
||||||
key: :pools,
|
|
||||||
type: :group,
|
|
||||||
description: "Advanced settings for `Gun` workers pools",
|
|
||||||
children:
|
|
||||||
Enum.map([:federation, :media, :upload, :default], fn pool_name ->
|
|
||||||
%{
|
|
||||||
key: pool_name,
|
|
||||||
type: :keyword,
|
|
||||||
description: "Settings for #{pool_name} pool.",
|
|
||||||
children: [
|
|
||||||
%{
|
|
||||||
key: :size,
|
|
||||||
type: :integer,
|
|
||||||
description: "Maximum number of concurrent requests in the pool.",
|
|
||||||
suggestions: [50]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :max_waiting,
|
|
||||||
type: :integer,
|
|
||||||
description:
|
|
||||||
"Maximum number of requests waiting for other requests to finish. After this number is reached, the pool will start returning errrors when a new request is made",
|
|
||||||
suggestions: [10]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :recv_timeout,
|
|
||||||
type: :integer,
|
|
||||||
description: "Timeout for the pool while gun will wait for response",
|
|
||||||
suggestions: [10_000]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
end)
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
group: :pleroma,
|
|
||||||
key: :hackney_pools,
|
|
||||||
type: :group,
|
|
||||||
description: "Advanced settings for `Hackney` connections pools",
|
|
||||||
children: [
|
|
||||||
%{
|
|
||||||
key: :federation,
|
|
||||||
type: :keyword,
|
|
||||||
description: "Settings for federation pool.",
|
|
||||||
children: [
|
|
||||||
%{
|
|
||||||
key: :max_connections,
|
|
||||||
type: :integer,
|
|
||||||
description: "Number workers in the pool.",
|
|
||||||
suggestions: [50]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :timeout,
|
|
||||||
type: :integer,
|
|
||||||
description: "Timeout while `hackney` will wait for response.",
|
|
||||||
suggestions: [150_000]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :media,
|
|
||||||
type: :keyword,
|
|
||||||
description: "Settings for media pool.",
|
|
||||||
children: [
|
|
||||||
%{
|
|
||||||
key: :max_connections,
|
|
||||||
type: :integer,
|
|
||||||
description: "Number workers in the pool.",
|
|
||||||
suggestions: [50]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :timeout,
|
|
||||||
type: :integer,
|
|
||||||
description: "Timeout while `hackney` will wait for response.",
|
|
||||||
suggestions: [150_000]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :upload,
|
|
||||||
type: :keyword,
|
|
||||||
description: "Settings for upload pool.",
|
|
||||||
children: [
|
|
||||||
%{
|
|
||||||
key: :max_connections,
|
|
||||||
type: :integer,
|
|
||||||
description: "Number workers in the pool.",
|
|
||||||
suggestions: [25]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :timeout,
|
|
||||||
type: :integer,
|
|
||||||
description: "Timeout while `hackney` will wait for response.",
|
|
||||||
suggestions: [300_000]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
%{
|
%{
|
||||||
group: :pleroma,
|
group: :pleroma,
|
||||||
key: :restrict_unauthenticated,
|
key: :restrict_unauthenticated,
|
||||||
|
@ -3358,5 +3235,133 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
group: :pleroma,
|
||||||
|
key: Pleroma.Search,
|
||||||
|
type: :group,
|
||||||
|
description: "General search settings.",
|
||||||
|
children: [
|
||||||
|
%{
|
||||||
|
key: :module,
|
||||||
|
type: :keyword,
|
||||||
|
description: "Selected search module.",
|
||||||
|
suggestion: [Pleroma.Search.DatabaseSearch, Pleroma.Search.Meilisearch]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
group: :pleroma,
|
||||||
|
key: Pleroma.Search.Meilisearch,
|
||||||
|
type: :group,
|
||||||
|
description: "Meilisearch settings.",
|
||||||
|
children: [
|
||||||
|
%{
|
||||||
|
key: :url,
|
||||||
|
type: :string,
|
||||||
|
description: "Meilisearch URL.",
|
||||||
|
suggestion: ["http://127.0.0.1:7700/"]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :private_key,
|
||||||
|
type: :string,
|
||||||
|
description:
|
||||||
|
"Private key for meilisearch authentication, or `nil` to disable private key authentication.",
|
||||||
|
suggestion: [nil]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :initial_indexing_chunk_size,
|
||||||
|
type: :int,
|
||||||
|
description:
|
||||||
|
"Amount of posts in a batch when running the initial indexing operation. Should probably not be more than 100000" <>
|
||||||
|
" since there's a limit on maximum insert size",
|
||||||
|
suggestion: [100_000]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
group: :pleroma,
|
||||||
|
key: Pleroma.Search.Elasticsearch.Cluster,
|
||||||
|
type: :group,
|
||||||
|
description: "Elasticsearch settings.",
|
||||||
|
children: [
|
||||||
|
%{
|
||||||
|
key: :url,
|
||||||
|
type: :string,
|
||||||
|
description: "Elasticsearch URL.",
|
||||||
|
suggestion: ["http://127.0.0.1:9200/"]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :username,
|
||||||
|
type: :string,
|
||||||
|
description: "Username to connect to ES. Set to nil if your cluster is unauthenticated.",
|
||||||
|
suggestion: ["elastic"]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :password,
|
||||||
|
type: :string,
|
||||||
|
description: "Password to connect to ES. Set to nil if your cluster is unauthenticated.",
|
||||||
|
suggestion: ["changeme"]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :api,
|
||||||
|
type: :module,
|
||||||
|
description:
|
||||||
|
"The API module used by Elasticsearch. Should always be Elasticsearch.API.HTTP",
|
||||||
|
suggestion: [Elasticsearch.API.HTTP]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :json_library,
|
||||||
|
type: :module,
|
||||||
|
description:
|
||||||
|
"The JSON module used to encode/decode when communicating with Elasticsearch",
|
||||||
|
suggestion: [Jason]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :indexes,
|
||||||
|
type: :map,
|
||||||
|
description: "The indices to set up in Elasticsearch",
|
||||||
|
children: [
|
||||||
|
%{
|
||||||
|
key: :activities,
|
||||||
|
type: :map,
|
||||||
|
description: "Config for the index to use for activities",
|
||||||
|
children: [
|
||||||
|
%{
|
||||||
|
key: :settings,
|
||||||
|
type: :string,
|
||||||
|
description:
|
||||||
|
"Path to the file containing index settings for the activities index. Should contain a mapping.",
|
||||||
|
suggestion: ["priv/es-mappings/activity.json"]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :store,
|
||||||
|
type: :module,
|
||||||
|
description: "The internal store module",
|
||||||
|
suggestion: [Pleroma.Search.Elasticsearch.Store]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :sources,
|
||||||
|
type: {:list, :module},
|
||||||
|
description: "The internal types to use for this index",
|
||||||
|
suggestion: [[Pleroma.Activity]]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :bulk_page_size,
|
||||||
|
type: :int,
|
||||||
|
description: "Size for bulk put requests, mostly used on building the index",
|
||||||
|
suggestion: [5000]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :bulk_wait_interval,
|
||||||
|
type: :int,
|
||||||
|
description: "Time to wait between bulk put requests (in ms)",
|
||||||
|
suggestion: [15_000]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
adapter: Ecto.Adapters.Postgres,
|
adapter: Ecto.Adapters.Postgres,
|
||||||
username: "postgres",
|
username: "postgres",
|
||||||
password: "postgres",
|
password: "postgres",
|
||||||
database: "pleroma_test",
|
database: "akkoma_test",
|
||||||
hostname: System.get_env("DB_HOST") || "localhost",
|
hostname: System.get_env("DB_HOST") || "localhost",
|
||||||
pool: Ecto.Adapters.SQL.Sandbox,
|
pool: Ecto.Adapters.SQL.Sandbox,
|
||||||
pool_size: 50,
|
pool_size: 50,
|
||||||
|
@ -104,12 +104,8 @@
|
||||||
|
|
||||||
config :joken, default_signer: "yU8uHKq+yyAkZ11Hx//jcdacWc8yQ1bxAAGrplzB0Zwwjkp35v0RK9SO8WTPr6QZ"
|
config :joken, default_signer: "yU8uHKq+yyAkZ11Hx//jcdacWc8yQ1bxAAGrplzB0Zwwjkp35v0RK9SO8WTPr6QZ"
|
||||||
|
|
||||||
config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
|
|
||||||
|
|
||||||
config :pleroma, :modules, runtime_dir: "test/fixtures/modules"
|
config :pleroma, :modules, runtime_dir: "test/fixtures/modules"
|
||||||
|
|
||||||
config :pleroma, Pleroma.Gun, Pleroma.GunMock
|
|
||||||
|
|
||||||
config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: true
|
config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: true
|
||||||
|
|
||||||
config :pleroma, Pleroma.Web.Plugs.RemoteIp, enabled: false
|
config :pleroma, Pleroma.Web.Plugs.RemoteIp, enabled: false
|
||||||
|
@ -134,6 +130,10 @@
|
||||||
ap_streamer: Pleroma.Web.ActivityPub.ActivityPubMock,
|
ap_streamer: Pleroma.Web.ActivityPub.ActivityPubMock,
|
||||||
logger: Pleroma.LoggerMock
|
logger: Pleroma.LoggerMock
|
||||||
|
|
||||||
|
config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch
|
||||||
|
|
||||||
|
config :pleroma, Pleroma.Search.Meilisearch, url: "http://127.0.0.1:7700/", private_key: nil
|
||||||
|
|
||||||
# Reduce recompilation time
|
# Reduce recompilation time
|
||||||
# https://dashbit.co/blog/speeding-up-re-compilation-of-elixir-projects
|
# https://dashbit.co/blog/speeding-up-re-compilation-of-elixir-projects
|
||||||
config :phoenix, :plug_init_mode, :runtime
|
config :phoenix, :plug_init_mode, :runtime
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
- `<path>` - where to save migrated config. E.g. `--path=/tmp`. If file saved into non standart folder, you must manually copy file into directory where Pleroma can read it. For OTP install path will be `PLEROMA_CONFIG_PATH` or `/etc/pleroma`. For installation from source - `config` directory in the pleroma folder.
|
- `<path>` - where to save migrated config. E.g. `--path=/tmp`. If file saved into non standart folder, you must manually copy file into directory where Pleroma can read it. For OTP install path will be `PLEROMA_CONFIG_PATH` or `/etc/akkoma`. For installation from source - `config` directory in the akkoma folder.
|
||||||
- `<env>` - environment, for which is migrated config. By default is `prod`.
|
- `<env>` - environment, for which is migrated config. By default is `prod`.
|
||||||
- To delete transferred settings from database optional flag `-d` can be used
|
- To delete transferred settings from database optional flag `-d` can be used
|
||||||
|
|
||||||
|
|
|
@ -18,10 +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://git.pleroma.social/pleroma/admin-fe)
|
- [admin-fe](https://akkoma.dev/AkkomaGang/admin-fe)
|
||||||
- [kenoma](http://git.pleroma.social/lambadalambda/kenoma)
|
- [mastodon-fe](https://akkoma.dev/AkkomaGang/masto-fe)
|
||||||
- [pleroma-fe](http://git.pleroma.social/pleroma/pleroma-fe)
|
- [pleroma-fe](https://akkoma.dev/AkkomaGang/pleroma-fe)
|
||||||
- [fedi-fe](https://git.pleroma.social/pleroma/fedi-fe)
|
|
||||||
- [soapbox-fe](https://gitlab.com/soapbox-pub/soapbox-fe)
|
- [soapbox-fe](https://gitlab.com/soapbox-pub/soapbox-fe)
|
||||||
|
|
||||||
You can still install frontends that are not configured, see below.
|
You can still install frontends that are not configured, see below.
|
||||||
|
@ -33,29 +32,29 @@ For a frontend configured under the `available` key, it's enough to install it b
|
||||||
=== "OTP"
|
=== "OTP"
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./bin/pleroma_ctl frontend install pleroma
|
./bin/pleroma_ctl frontend install pleroma-fe
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "From Source"
|
=== "From Source"
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mix pleroma.frontend install pleroma
|
mix pleroma.frontend install pleroma-fe
|
||||||
```
|
```
|
||||||
|
|
||||||
This will download the latest build for the pre-configured `ref` and install it. It can then be configured as the one of the served frontends in the config file (see `primary` or `admin`).
|
This will download the latest build for the pre-configured `ref` and install it. It can then be configured as the one of the served frontends in the config file (see `primary` or `admin`).
|
||||||
|
|
||||||
You can override any of the details. To install a pleroma build from a different URL, you could do this:
|
You can override any of the details. To install a Pleroma-FE build from a different URL, you could do this:
|
||||||
|
|
||||||
=== "OTP"
|
=== "OTP"
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./bin/pleroma_ctl frontend install pleroma --ref 2hu_edition --build-url https://example.org/raymoo.zip
|
./bin/pleroma_ctl frontend install pleroma-fe --ref 2hu_edition --build-url https://example.org/raymoo.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "From Source"
|
=== "From Source"
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mix pleroma.frontend install pleroma --ref 2hu_edition --build-url https://example.org/raymoo.zip
|
mix pleroma.frontend install pleroma-fe --ref 2hu_edition --build-url https://example.org/raymoo.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
Similarly, you can also install from a local zip file.
|
Similarly, you can also install from a local zip file.
|
||||||
|
@ -63,13 +62,13 @@ Similarly, you can also install from a local zip file.
|
||||||
=== "OTP"
|
=== "OTP"
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./bin/pleroma_ctl frontend install pleroma --ref mybuild --file ~/Downloads/doomfe.zip
|
./bin/pleroma_ctl frontend install pleroma-fe --ref mybuild --file ~/Downloads/doomfe.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "From Source"
|
=== "From Source"
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mix pleroma.frontend install pleroma --ref mybuild --file ~/Downloads/doomfe.zip
|
mix pleroma.frontend install pleroma-fe --ref mybuild --file ~/Downloads/doomfe.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
The resulting frontend will always be installed into a folder of this template: `${instance_static}/frontends/${name}/${ref}`.
|
The resulting frontend will always be installed into a folder of this template: `${instance_static}/frontends/${name}/${ref}`.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Every command should be ran as the `pleroma` user from it's home directory. For example if you are superuser, you would have to wrap the command in `su pleroma -s $SHELL -lc "$COMMAND"`.
|
Every command should be ran as the `akkoma` user from it's home directory. For example if you are superuser, you would have to wrap the command in `su akkoma -s $SHELL -lc "$COMMAND"`.
|
||||||
|
|
||||||
??? note "From source note about `MIX_ENV`"
|
??? note "From source note about `MIX_ENV`"
|
||||||
|
|
||||||
The `mix` command should be prefixed with the name of environment your Pleroma server is running in, usually it's `MIX_ENV=prod`
|
The `mix` command should be prefixed with the name of environment your Akkoma server is running in, usually it's `MIX_ENV=prod`
|
||||||
|
|
|
@ -2,28 +2,28 @@
|
||||||
|
|
||||||
## Backup
|
## Backup
|
||||||
|
|
||||||
1. Stop the Pleroma service.
|
1. Stop the Akkoma service.
|
||||||
2. Go to the working directory of Pleroma (default is `/opt/pleroma`)
|
2. Go to the working directory of Akkoma (default is `/opt/akkoma`)
|
||||||
3. Run `sudo -Hu postgres pg_dump -d <pleroma_db> --format=custom -f </path/to/backup_location/pleroma.pgdump>` (make sure the postgres user has write access to the destination file)
|
3. Run `sudo -Hu postgres pg_dump -d <akkoma_db> --format=custom -f </path/to/backup_location/akkoma.pgdump>` (make sure the postgres user has write access to the destination file)
|
||||||
4. Copy `pleroma.pgdump`, `config/prod.secret.exs`, `config/setup_db.psql` (if still available) and the `uploads` folder to your backup destination. If you have other modifications, copy those changes too.
|
4. Copy `akkoma.pgdump`, `config/prod.secret.exs`, `config/setup_db.psql` (if still available) and the `uploads` folder to your backup destination. If you have other modifications, copy those changes too.
|
||||||
5. Restart the Pleroma service.
|
5. Restart the Akkoma service.
|
||||||
|
|
||||||
## Restore/Move
|
## Restore/Move
|
||||||
|
|
||||||
1. Optionally reinstall Pleroma (either on the same server or on another server if you want to move servers).
|
1. Optionally reinstall Akkoma (either on the same server or on another server if you want to move servers).
|
||||||
2. Stop the Pleroma service.
|
2. Stop the Akkoma service.
|
||||||
3. Go to the working directory of Pleroma (default is `/opt/pleroma`)
|
3. Go to the working directory of Akkoma (default is `/opt/akkoma`)
|
||||||
4. Copy the above mentioned files back to their original position.
|
4. Copy the above mentioned files back to their original position.
|
||||||
5. Drop the existing database and user if restoring in-place. `sudo -Hu postgres psql -c 'DROP DATABASE <pleroma_db>;';` `sudo -Hu postgres psql -c 'DROP USER <pleroma_db>;'`
|
5. Drop the existing database and user if restoring in-place. `sudo -Hu postgres psql -c 'DROP DATABASE <akkoma_db>;';` `sudo -Hu postgres psql -c 'DROP USER <akkoma_db>;'`
|
||||||
6. Restore the database schema and pleroma postgres role the with the original `setup_db.psql` if you have it: `sudo -Hu postgres psql -f config/setup_db.psql`.
|
6. Restore the database schema and akkoma postgres role the with the original `setup_db.psql` if you have it: `sudo -Hu postgres psql -f config/setup_db.psql`.
|
||||||
|
|
||||||
Alternatively, run the `mix pleroma.instance gen` task again. You can ignore most of the questions, but make the database user, name, and password the same as found in your backup of `config/prod.secret.exs`. Then run the restoration of the pleroma role and schema with of the generated `config/setup_db.psql` as instructed above. You may delete the `config/generated_config.exs` file as it is not needed.
|
Alternatively, run the `mix pleroma.instance gen` task again. You can ignore most of the questions, but make the database user, name, and password the same as found in your backup of `config/prod.secret.exs`. Then run the restoration of the akkoma role and schema with of the generated `config/setup_db.psql` as instructed above. You may delete the `config/generated_config.exs` file as it is not needed.
|
||||||
|
|
||||||
7. Now restore the Pleroma instance's data into the empty database schema: `sudo -Hu postgres pg_restore -d <pleroma_db> -v -1 </path/to/backup_location/pleroma.pgdump>`
|
7. Now restore the Akkoma instance's data into the empty database schema: `sudo -Hu postgres pg_restore -d <akkoma_db> -v -1 </path/to/backup_location/akkoma.pgdump>`
|
||||||
8. If you installed a newer Pleroma version, you should run `mix ecto.migrate`[^1]. This task performs database migrations, if there were any.
|
8. If you installed a newer Akkoma version, you should run `mix ecto.migrate`[^1]. This task performs database migrations, if there were any.
|
||||||
9. Restart the Pleroma service.
|
9. Restart the Akkoma service.
|
||||||
10. Run `sudo -Hu postgres vacuumdb --all --analyze-in-stages`. This will quickly generate the statistics so that postgres can properly plan queries.
|
10. Run `sudo -Hu postgres vacuumdb --all --analyze-in-stages`. This will quickly generate the statistics so that postgres can properly plan queries.
|
||||||
11. If setting up on a new server configure Nginx by using the `installation/pleroma.nginx` config sample or reference the Pleroma installation guide for your OS which contains the Nginx configuration instructions.
|
11. If setting up on a new server configure Nginx by using the `installation/akkoma.nginx` config sample or reference the Akkoma installation guide for your OS which contains the Nginx configuration instructions.
|
||||||
|
|
||||||
[^1]: Prefix with `MIX_ENV=prod` to run it using the production config file.
|
[^1]: Prefix with `MIX_ENV=prod` to run it using the production config file.
|
||||||
|
|
||||||
|
@ -32,10 +32,10 @@
|
||||||
1. Optionally you can remove the users of your instance. This will trigger delete requests for their accounts and posts. Note that this is 'best effort' and doesn't mean that all traces of your instance will be gone from the fediverse.
|
1. Optionally you can remove the users of your instance. This will trigger delete requests for their accounts and posts. Note that this is 'best effort' and doesn't mean that all traces of your instance will be gone from the fediverse.
|
||||||
* You can do this from the admin-FE where you can select all local users and delete the accounts using the *Moderate multiple users* dropdown.
|
* You can do this from the admin-FE where you can select all local users and delete the accounts using the *Moderate multiple users* dropdown.
|
||||||
* You can also list local users and delete them individualy using the CLI tasks for [Managing users](./CLI_tasks/user.md).
|
* You can also list local users and delete them individualy using the CLI tasks for [Managing users](./CLI_tasks/user.md).
|
||||||
2. Stop the Pleroma service `systemctl stop pleroma`
|
2. Stop the Akkoma service `systemctl stop akkoma`
|
||||||
3. Disable pleroma from systemd `systemctl disable pleroma`
|
3. Disable akkoma from systemd `systemctl disable akkoma`
|
||||||
4. Remove the files and folders you created during installation (see installation guide). This includes the pleroma, nginx and systemd files and folders.
|
4. Remove the files and folders you created during installation (see installation guide). This includes the akkoma, nginx and systemd files and folders.
|
||||||
5. Reload nginx now that the configuration is removed `systemctl reload nginx`
|
5. Reload nginx now that the configuration is removed `systemctl reload nginx`
|
||||||
6. Remove the database and database user `sudo -Hu postgres psql -c 'DROP DATABASE <pleroma_db>;';` `sudo -Hu postgres psql -c 'DROP USER <pleroma_db>;'`
|
6. Remove the database and database user `sudo -Hu postgres psql -c 'DROP DATABASE <akkoma_db>;';` `sudo -Hu postgres psql -c 'DROP USER <akkoma_db>;'`
|
||||||
7. Remove the system user `userdel pleroma`
|
7. Remove the system user `userdel akkoma`
|
||||||
8. Remove the dependencies that you don't need anymore (see installation guide). Make sure you don't remove packages that are still needed for other software that you have running!
|
8. Remove the dependencies that you don't need anymore (see installation guide). Make sure you don't remove packages that are still needed for other software that you have running!
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Updating your instance
|
# Updating your instance
|
||||||
|
|
||||||
You should **always check the [release notes/changelog](https://git.pleroma.social/pleroma/pleroma/-/releases)** in case there are config deprecations, special update steps, etc.
|
You should **always check the [release notes/changelog](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/CHANGELOG.md)** in case there are config deprecations, special update steps, etc.
|
||||||
|
|
||||||
Besides that, doing the following is generally enough:
|
Besides that, doing the following is generally enough:
|
||||||
|
|
||||||
|
@ -8,20 +8,20 @@ Besides that, doing the following is generally enough:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Download the new release
|
# Download the new release
|
||||||
su pleroma -s $SHELL -lc "./bin/pleroma_ctl update"
|
su akkoma -s $SHELL -lc "./bin/pleroma_ctl update"
|
||||||
|
|
||||||
# Migrate the database, you are advised to stop the instance before doing that
|
# Migrate the database, you are advised to stop the instance before doing that
|
||||||
su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"
|
su akkoma -s $SHELL -lc "./bin/pleroma_ctl migrate"
|
||||||
```
|
```
|
||||||
|
|
||||||
## For from source installations (using git)
|
## For from source installations (using git)
|
||||||
|
|
||||||
1. Go to the working directory of Pleroma (default is `/opt/pleroma`)
|
1. Go to the working directory of Akkoma (default is `/opt/akkoma`)
|
||||||
2. Run `git pull`. This pulls the latest changes from upstream.
|
2. Run `git pull` [^1]. This pulls the latest changes from upstream.
|
||||||
3. Run `mix deps.get` [^1]. This pulls in any new dependencies.
|
3. Run `mix deps.get` [^1]. This pulls in any new dependencies.
|
||||||
4. Stop the Pleroma service.
|
4. Stop the Akkoma service.
|
||||||
5. Run `mix ecto.migrate` [^1] [^2]. This task performs database migrations, if there were any.
|
5. Run `mix ecto.migrate` [^1] [^2]. This task performs database migrations, if there were any.
|
||||||
6. Start the Pleroma service.
|
6. Start the Akkoma service.
|
||||||
|
|
||||||
[^1]: Depending on which install guide you followed (for example on Debian/Ubuntu), you want to run `mix` tasks as `pleroma` user by adding `sudo -Hu pleroma` before the command.
|
[^1]: Depending on which install guide you followed (for example on Debian/Ubuntu), you want to run `git` and `mix` tasks as `akkoma` user by adding `sudo -Hu akkoma` before the command.
|
||||||
[^2]: Prefix with `MIX_ENV=prod` to run it using the production config file.
|
[^2]: Prefix with `MIX_ENV=prod` to run it using the production config file.
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Configuration Cheat Sheet
|
# Configuration Cheat Sheet
|
||||||
|
|
||||||
This is a cheat sheet for Pleroma configuration file, any setting possible to configure should be listed here.
|
This is a cheat sheet for Akkoma configuration file, any setting possible to configure should be listed here.
|
||||||
|
|
||||||
For OTP installations the configuration is typically stored in `/etc/pleroma/config.exs`.
|
For OTP installations the configuration is typically stored in `/etc/akkoma/config.exs`.
|
||||||
|
|
||||||
For from source installations Pleroma configuration works by first importing the base config `config/config.exs`, then overriding it by the environment config `config/$MIX_ENV.exs` and then overriding it by user config `config/$MIX_ENV.secret.exs`. In from source installations you should always make the changes to the user config and NEVER to the base config to avoid breakages and merge conflicts. So for production you change/add configuration to `config/prod.secret.exs`.
|
For from source installations Akkoma configuration works by first importing the base config `config/config.exs`, then overriding it by the environment config `config/$MIX_ENV.exs` and then overriding it by user config `config/$MIX_ENV.secret.exs`. In from source installations you should always make the changes to the user config and NEVER to the base config to avoid breakages and merge conflicts. So for production you change/add configuration to `config/prod.secret.exs`.
|
||||||
|
|
||||||
To add configuration to your config file, you can copy it from the base config. The latest version of it can be viewed [here](https://git.pleroma.social/pleroma/pleroma/blob/develop/config/config.exs). You can also use this file if you don't know how an option is supposed to be formatted.
|
To add configuration to your config file, you can copy it from the base config. The latest version of it can be viewed [here](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/config/config.exs). You can also use this file if you don't know how an option is supposed to be formatted.
|
||||||
|
|
||||||
## :shout
|
## :shout
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ To add configuration to your config file, you can copy it from the base config.
|
||||||
],
|
],
|
||||||
email: [
|
email: [
|
||||||
enabled: true,
|
enabled: true,
|
||||||
sender: {"Pleroma App", "welcome@pleroma.app"},
|
sender: {"Akkoma App", "welcome@akkoma.app"},
|
||||||
subject: "Welcome to <%= instance_name %>",
|
subject: "Welcome to <%= instance_name %>",
|
||||||
html: "Welcome to <%= instance_name %>",
|
html: "Welcome to <%= instance_name %>",
|
||||||
text: "Welcome to <%= instance_name %>"
|
text: "Welcome to <%= instance_name %>"
|
||||||
|
@ -125,6 +125,8 @@ To add configuration to your config file, you can copy it from the base config.
|
||||||
* `Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy`: Sets a default expiration on all posts made by users of the local instance. Requires `Pleroma.Workers.PurgeExpiredActivity` to be enabled for processing the scheduled delections.
|
* `Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy`: Sets a default expiration on all posts made by users of the local instance. Requires `Pleroma.Workers.PurgeExpiredActivity` to be enabled for processing the scheduled delections.
|
||||||
* `Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicy`: Makes all bot posts to disappear from public timelines.
|
* `Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicy`: Makes all bot posts to disappear from public timelines.
|
||||||
* `Pleroma.Web.ActivityPub.MRF.FollowBotPolicy`: Automatically follows newly discovered users from the specified bot account. Local accounts, locked accounts, and users with "#nobot" in their bio are respected and excluded from being followed.
|
* `Pleroma.Web.ActivityPub.MRF.FollowBotPolicy`: Automatically follows newly discovered users from the specified bot account. Local accounts, locked accounts, and users with "#nobot" in their bio are respected and excluded from being followed.
|
||||||
|
* `Pleroma.Web.ActivityPub.MRF.AntiFollowbotPolicy`: Drops follow requests from followbots. Users can still allow bots to follow them by first following the bot.
|
||||||
|
* `Pleroma.Web.ActivityPub.MRF.KeywordPolicy`: Rejects or removes from the federated timeline or replaces keywords. (See [`:mrf_keyword`](#mrf_keyword)).
|
||||||
* `transparency`: Make the content of your Message Rewrite Facility settings public (via nodeinfo).
|
* `transparency`: Make the content of your Message Rewrite Facility settings public (via nodeinfo).
|
||||||
* `transparency_exclusions`: Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.
|
* `transparency_exclusions`: Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.
|
||||||
|
|
||||||
|
@ -234,6 +236,7 @@ Notes:
|
||||||
* `deny_follow_blocked`: Whether to disallow following an account that has blocked the user in question
|
* `deny_follow_blocked`: Whether to disallow following an account that has blocked the user in question
|
||||||
* `sign_object_fetches`: Sign object fetches with HTTP signatures
|
* `sign_object_fetches`: Sign object fetches with HTTP signatures
|
||||||
* `authorized_fetch_mode`: Require HTTP signatures for AP fetches
|
* `authorized_fetch_mode`: Require HTTP signatures for AP fetches
|
||||||
|
* `max_collection_objects`: The maximum number of objects to fetch from a remote AP collection.
|
||||||
|
|
||||||
## Pleroma.User
|
## Pleroma.User
|
||||||
|
|
||||||
|
@ -252,7 +255,7 @@ This can be used to configure a keyword list that keeps the configuration data f
|
||||||
|
|
||||||
Frontends can access these settings at `/api/v1/pleroma/frontend_configurations`
|
Frontends can access these settings at `/api/v1/pleroma/frontend_configurations`
|
||||||
|
|
||||||
To add your own configuration for PleromaFE, use it like this:
|
To add your own configuration for Pleroma-FE, use it like this:
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
config :pleroma, :frontend_configurations,
|
config :pleroma, :frontend_configurations,
|
||||||
|
@ -396,7 +399,7 @@ config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
|
||||||
!!! note
|
!!! note
|
||||||
`Phoenix` endpoint configuration, all configuration options can be viewed [here](https://hexdocs.pm/phoenix/Phoenix.Endpoint.html#module-dynamic-configuration), only common options are listed here.
|
`Phoenix` endpoint configuration, all configuration options can be viewed [here](https://hexdocs.pm/phoenix/Phoenix.Endpoint.html#module-dynamic-configuration), only common options are listed here.
|
||||||
|
|
||||||
* `http` - a list containing http protocol configuration, all configuration options can be viewed [here](https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html#module-options), only common options are listed here. For deployment using docker, you need to set this to `[ip: {0,0,0,0}, port: 4000]` to make pleroma accessible from other containers (such as your nginx server).
|
* `http` - a list containing http protocol configuration, all configuration options can be viewed [here](https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html#module-options), only common options are listed here. For deployment using docker, you need to set this to `[ip: {0,0,0,0}, port: 4000]` to make akkoma accessible from other containers (such as your nginx server).
|
||||||
- `ip` - a tuple consisting of 4 integers
|
- `ip` - a tuple consisting of 4 integers
|
||||||
- `port`
|
- `port`
|
||||||
* `url` - a list containing the configuration for generating urls, accepts
|
* `url` - a list containing the configuration for generating urls, accepts
|
||||||
|
@ -416,7 +419,7 @@ config :pleroma, Pleroma.Web.Endpoint,
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
This will make Pleroma listen on `127.0.0.1` port `8080` and generate urls starting with `https://example.com:2020`
|
This will make Akkoma listen on `127.0.0.1` port `8080` and generate urls starting with `https://example.com:2020`
|
||||||
|
|
||||||
### :http_security
|
### :http_security
|
||||||
* ``enabled``: Whether the managed content security policy is enabled.
|
* ``enabled``: Whether the managed content security policy is enabled.
|
||||||
|
@ -574,9 +577,9 @@ the source code is here: [kocaptcha](https://github.com/koto-bank/kocaptcha). Th
|
||||||
|
|
||||||
* `uploader`: Which one of the [uploaders](#uploaders) to use.
|
* `uploader`: Which one of the [uploaders](#uploaders) to use.
|
||||||
* `filters`: List of [upload filters](#upload-filters) to use.
|
* `filters`: List of [upload filters](#upload-filters) to use.
|
||||||
* `link_name`: When enabled Pleroma will add a `name` parameter to the url of the upload, for example `https://instance.tld/media/corndog.png?name=corndog.png`. This is needed to provide the correct filename in Content-Disposition headers when using filters like `Pleroma.Upload.Filter.Dedupe`
|
* `link_name`: When enabled Akkoma will add a `name` parameter to the url of the upload, for example `https://instance.tld/media/corndog.png?name=corndog.png`. This is needed to provide the correct filename in Content-Disposition headers when using filters like `Pleroma.Upload.Filter.Dedupe`
|
||||||
* `base_url`: The base URL to access a user-uploaded file. Useful when you want to host the media files via another domain or are using a 3rd party S3 provider.
|
* `base_url`: The base URL to access a user-uploaded file. Useful when you want to host the media files via another domain or are using a 3rd party S3 provider.
|
||||||
* `proxy_remote`: If you're using a remote uploader, Pleroma will proxy media requests instead of redirecting to it.
|
* `proxy_remote`: If you're using a remote uploader, Akkoma will proxy media requests instead of redirecting to it.
|
||||||
* `proxy_opts`: Proxy options, see `Pleroma.ReverseProxy` documentation.
|
* `proxy_opts`: Proxy options, see `Pleroma.ReverseProxy` documentation.
|
||||||
* `filename_display_max_length`: Set max length of a filename to display. 0 = no limit. Default: 30.
|
* `filename_display_max_length`: Set max length of a filename to display. 0 = no limit. Default: 30.
|
||||||
* `default_description`: Sets which default description an image has if none is set explicitly. Options: nil (default) - Don't set a default, :filename - use the filename of the file, a string (e.g. "attachment") - Use this string
|
* `default_description`: Sets which default description an image has if none is set explicitly. Options: nil (default) - Don't set a default, :filename - use the filename of the file, a string (e.g. "attachment") - Use this string
|
||||||
|
@ -681,7 +684,7 @@ Email notifications settings.
|
||||||
|
|
||||||
### Pleroma.Emails.UserEmail
|
### Pleroma.Emails.UserEmail
|
||||||
|
|
||||||
- `:logo` - a path to a custom logo. Set it to `nil` to use the default Pleroma logo.
|
- `:logo` - a path to a custom logo. Set it to `nil` to use the default Akkoma logo.
|
||||||
- `:styling` - a map with color settings for email templates.
|
- `:styling` - a map with color settings for email templates.
|
||||||
|
|
||||||
### Pleroma.Emails.NewUsersDigestEmail
|
### Pleroma.Emails.NewUsersDigestEmail
|
||||||
|
@ -701,7 +704,7 @@ Configuration options described in [Oban readme](https://github.com/sorentwo/oba
|
||||||
* `queues` - job queues (see below)
|
* `queues` - job queues (see below)
|
||||||
* `crontab` - periodic jobs, see [`Oban.Cron`](#obancron)
|
* `crontab` - periodic jobs, see [`Oban.Cron`](#obancron)
|
||||||
|
|
||||||
Pleroma has the following queues:
|
Akkoma has the following queues:
|
||||||
|
|
||||||
* `activity_expiration` - Activity expiration
|
* `activity_expiration` - Activity expiration
|
||||||
* `federator_outgoing` - Outgoing federation
|
* `federator_outgoing` - Outgoing federation
|
||||||
|
@ -713,7 +716,7 @@ Pleroma has the following queues:
|
||||||
|
|
||||||
#### Oban.Cron
|
#### Oban.Cron
|
||||||
|
|
||||||
Pleroma has these periodic job workers:
|
Akkoma has these periodic job workers:
|
||||||
|
|
||||||
* `Pleroma.Workers.Cron.DigestEmailsWorker` - digest emails for users with new mentions and follows
|
* `Pleroma.Workers.Cron.DigestEmailsWorker` - digest emails for users with new mentions and follows
|
||||||
* `Pleroma.Workers.Cron.NewUsersDigestWorker` - digest emails for admins with new registrations
|
* `Pleroma.Workers.Cron.NewUsersDigestWorker` - digest emails for admins with new registrations
|
||||||
|
@ -833,33 +836,6 @@ To enable them, both the `rum_enabled` flag has to be set and the following spec
|
||||||
|
|
||||||
This will probably take a long time.
|
This will probably take a long time.
|
||||||
|
|
||||||
## Alternative client protocols
|
|
||||||
|
|
||||||
### BBS / SSH access
|
|
||||||
|
|
||||||
To enable simple command line interface accessible over ssh, add a setting like this to your configuration file:
|
|
||||||
|
|
||||||
```exs
|
|
||||||
app_dir = File.cwd!
|
|
||||||
priv_dir = Path.join([app_dir, "priv/ssh_keys"])
|
|
||||||
|
|
||||||
config :esshd,
|
|
||||||
enabled: true,
|
|
||||||
priv_dir: priv_dir,
|
|
||||||
handler: "Pleroma.BBS.Handler",
|
|
||||||
port: 10_022,
|
|
||||||
password_authenticator: "Pleroma.BBS.Authenticator"
|
|
||||||
```
|
|
||||||
|
|
||||||
Feel free to adjust the priv_dir and port number. Then you will have to create the key for the keys (in the example `priv/ssh_keys`) and create the host keys with `ssh-keygen -m PEM -N "" -b 2048 -t rsa -f ssh_host_rsa_key`. After restarting, you should be able to connect to your Pleroma instance with `ssh username@server -p $PORT`
|
|
||||||
|
|
||||||
### :gopher
|
|
||||||
* `enabled`: Enables the gopher interface
|
|
||||||
* `ip`: IP address to bind to
|
|
||||||
* `port`: Port to bind to
|
|
||||||
* `dstport`: Port advertised in urls (optional, defaults to `port`)
|
|
||||||
|
|
||||||
|
|
||||||
## Authentication
|
## Authentication
|
||||||
|
|
||||||
### :admin_token
|
### :admin_token
|
||||||
|
@ -899,11 +875,11 @@ Authentication / authorization settings.
|
||||||
|
|
||||||
### :ldap
|
### :ldap
|
||||||
|
|
||||||
Use LDAP for user authentication. When a user logs in to the Pleroma
|
Use LDAP for user authentication. When a user logs in to the Akkoma
|
||||||
instance, the name and password will be verified by trying to authenticate
|
instance, the name and password will be verified by trying to authenticate
|
||||||
(bind) to an LDAP server. If a user exists in the LDAP directory but there
|
(bind) to an LDAP server. If a user exists in the LDAP directory but there
|
||||||
is no account with the same name yet on the Pleroma instance then a new
|
is no account with the same name yet on the Akkoma instance then a new
|
||||||
Pleroma account will be created with the same name as the LDAP user name.
|
Akkoma account will be created with the same name as the LDAP user name.
|
||||||
|
|
||||||
* `enabled`: enables LDAP authentication
|
* `enabled`: enables LDAP authentication
|
||||||
* `host`: LDAP server hostname
|
* `host`: LDAP server hostname
|
||||||
|
@ -918,7 +894,7 @@ Pleroma account will be created with the same name as the LDAP user name.
|
||||||
Note, if your LDAP server is an Active Directory server the correct value is commonly `uid: "cn"`, but if you use an
|
Note, if your LDAP server is an Active Directory server the correct value is commonly `uid: "cn"`, but if you use an
|
||||||
OpenLDAP server the value may be `uid: "uid"`.
|
OpenLDAP server the value may be `uid: "uid"`.
|
||||||
|
|
||||||
### :oauth2 (Pleroma as OAuth 2.0 provider settings)
|
### :oauth2 (Akkoma as OAuth 2.0 provider settings)
|
||||||
|
|
||||||
OAuth 2.0 provider settings:
|
OAuth 2.0 provider settings:
|
||||||
|
|
||||||
|
@ -943,7 +919,7 @@ Implementation is based on Ueberauth; see the list of [available strategies](htt
|
||||||
Each strategy is shipped as a separate dependency; in order to get the strategies, run `OAUTH_CONSUMER_STRATEGIES="..." mix deps.get`, e.g. `OAUTH_CONSUMER_STRATEGIES="twitter facebook google microsoft" mix deps.get`. The server should also be started with `OAUTH_CONSUMER_STRATEGIES="..." mix phx.server` in case you enable any strategies.
|
Each strategy is shipped as a separate dependency; in order to get the strategies, run `OAUTH_CONSUMER_STRATEGIES="..." mix deps.get`, e.g. `OAUTH_CONSUMER_STRATEGIES="twitter facebook google microsoft" mix deps.get`. The server should also be started with `OAUTH_CONSUMER_STRATEGIES="..." mix phx.server` in case you enable any strategies.
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
Each strategy requires separate setup (on external provider side and Pleroma side). Below are the guidelines on setting up most popular strategies.
|
Each strategy requires separate setup (on external provider side and Akkoma side). Below are the guidelines on setting up most popular strategies.
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
Make sure that `"SameSite=Lax"` is set in `extra_cookie_attrs` when you have this feature enabled. OAuth consumer mode will not work with `"SameSite=Strict"`
|
Make sure that `"SameSite=Lax"` is set in `extra_cookie_attrs` when you have this feature enabled. OAuth consumer mode will not work with `"SameSite=Strict"`
|
||||||
|
@ -1013,7 +989,7 @@ config :ueberauth, Ueberauth,
|
||||||
|
|
||||||
### Pleroma.Formatter
|
### Pleroma.Formatter
|
||||||
|
|
||||||
Configuration for Pleroma's link formatter which parses mentions, hashtags, and URLs.
|
Configuration for Akkoma's link formatter which parses mentions, hashtags, and URLs.
|
||||||
|
|
||||||
* `class` - specify the class to be added to the generated link (default: `false`)
|
* `class` - specify the class to be added to the generated link (default: `false`)
|
||||||
* `rel` - specify the rel attribute (default: `ugc`)
|
* `rel` - specify the rel attribute (default: `ugc`)
|
||||||
|
@ -1105,7 +1081,7 @@ Control favicons for instances.
|
||||||
|
|
||||||
* `:purge_after_days` an integer, remove backup achives after N days.
|
* `:purge_after_days` an integer, remove backup achives after N days.
|
||||||
* `:limit_days` an integer, limit user to export not more often than once per N days.
|
* `:limit_days` an integer, limit user to export not more often than once per N days.
|
||||||
* `:dir` a string with a path to backup temporary directory or `nil` to let Pleroma choose temporary directory in the following order:
|
* `:dir` a string with a path to backup temporary directory or `nil` to let Akkoma choose temporary directory in the following order:
|
||||||
1. the directory named by the TMPDIR environment variable
|
1. the directory named by the TMPDIR environment variable
|
||||||
2. the directory named by the TEMP environment variable
|
2. the directory named by the TEMP environment variable
|
||||||
3. the directory named by the TMP environment variable
|
3. the directory named by the TMP environment variable
|
||||||
|
@ -1114,9 +1090,9 @@ Control favicons for instances.
|
||||||
|
|
||||||
## Frontend management
|
## Frontend management
|
||||||
|
|
||||||
Frontends in Pleroma are swappable - you can specify which one to use here.
|
Frontends in Akkoma are swappable - you can specify which one to use here.
|
||||||
|
|
||||||
You can set a frontends for the key `primary` and `admin` and the options of `name` and `ref`. This will then make Pleroma serve the frontend from a folder constructed by concatenating the instance static path, `frontends` and the name and ref.
|
You can set a frontends for the key `primary` and `admin` and the options of `name` and `ref`. This will then make Akkoma serve the frontend from a folder constructed by concatenating the instance static path, `frontends` and the name and ref.
|
||||||
|
|
||||||
The key `primary` refers to the frontend that will be served by default for general requests. The key `admin` refers to the frontend that will be served at the `/pleroma/admin` path.
|
The key `primary` refers to the frontend that will be served by default for general requests. The key `admin` refers to the frontend that will be served at the `/pleroma/admin` path.
|
||||||
|
|
||||||
|
@ -1138,6 +1114,18 @@ config :pleroma, :frontends,
|
||||||
|
|
||||||
This would serve the frontend from the the folder at `$instance_static/frontends/pleroma/stable`. You have to copy the frontend into this folder yourself. You can choose the name and ref any way you like, but they will be used by mix tasks to automate installation in the future, the name referring to the project and the ref referring to a commit.
|
This would serve the frontend from the the folder at `$instance_static/frontends/pleroma/stable`. You have to copy the frontend into this folder yourself. You can choose the name and ref any way you like, but they will be used by mix tasks to automate installation in the future, the name referring to the project and the ref referring to a commit.
|
||||||
|
|
||||||
|
### Theme settings
|
||||||
|
|
||||||
|
Settings to change theme as exposed to the outside world, for software
|
||||||
|
that scans `index.html` (mainly misskey)
|
||||||
|
|
||||||
|
```
|
||||||
|
config :pleroma, Pleroma.Web.Metadata.Providers.Theme, theme_color: "#593196"
|
||||||
|
```
|
||||||
|
|
||||||
|
This sets the `theme-color` meta tag on `index.html`, and is basically
|
||||||
|
a hack to make misskey find the right thing.
|
||||||
|
|
||||||
## Ephemeral activities (Pleroma.Workers.PurgeExpiredActivity)
|
## Ephemeral activities (Pleroma.Workers.PurgeExpiredActivity)
|
||||||
|
|
||||||
Settings to enable and configure expiration for ephemeral activities
|
Settings to enable and configure expiration for ephemeral activities
|
||||||
|
|
|
@ -13,7 +13,7 @@ To add custom emoji:
|
||||||
file in that directory and specify a custom shortcode using the following format:
|
file in that directory and specify a custom shortcode using the following format:
|
||||||
`shortcode, file-path, tag1, tag2, etc`. One emoji per line. Note that if you do so,
|
`shortcode, file-path, tag1, tag2, etc`. One emoji per line. Note that if you do so,
|
||||||
you'll have to list all other emojis in the pack too.
|
you'll have to list all other emojis in the pack too.
|
||||||
* Either restart pleroma or connect to the iex session pleroma's running and
|
* Either restart Akkoma or connect to the iex session Akkoma's running and
|
||||||
run `Pleroma.Emoji.reload/0` in it.
|
run `Pleroma.Emoji.reload/0` in it.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Hardening your instance
|
# Hardening your instance
|
||||||
Here are some suggestions which improve the security of parts of your Pleroma instance.
|
Here are some suggestions which improve the security of parts of your Akkoma instance.
|
||||||
|
|
||||||
## Configuration file
|
## Configuration file
|
||||||
|
|
||||||
|
@ -9,13 +9,13 @@ These changes should go into `prod.secret.exs` or `dev.secret.exs`, depending on
|
||||||
|
|
||||||
> Recommended value: `[ip: {127, 0, 0, 1}]`
|
> Recommended value: `[ip: {127, 0, 0, 1}]`
|
||||||
|
|
||||||
This sets the Pleroma application server to only listen to the localhost interface. This way, you can only reach your server over the Internet by going through the reverse proxy. By default, Pleroma listens on all interfaces.
|
This sets the Akkoma application server to only listen to the localhost interface. This way, you can only reach your server over the Internet by going through the reverse proxy. By default, Akkoma listens on all interfaces.
|
||||||
|
|
||||||
### `secure_cookie_flag`
|
### `secure_cookie_flag`
|
||||||
|
|
||||||
> Recommended value: `true`
|
> Recommended value: `true`
|
||||||
|
|
||||||
This sets the `secure` flag on Pleroma’s session cookie. This makes sure, that the cookie is only accepted over encrypted HTTPs connections. This implicitly renames the cookie from `pleroma_key` to `__Host-pleroma-key` which enforces some restrictions. (see [cookie prefixes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#Cookie_prefixes))
|
This sets the `secure` flag on Akkoma’s session cookie. This makes sure, that the cookie is only accepted over encrypted HTTPs connections. This implicitly renames the cookie from `pleroma_key` to `__Host-pleroma-key` which enforces some restrictions. (see [cookie prefixes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#Cookie_prefixes))
|
||||||
|
|
||||||
### `:http_security`
|
### `:http_security`
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ Use private `/tmp` and `/var/tmp` folders inside a new file system namespace, wh
|
||||||
|
|
||||||
> Recommended value: `true`
|
> Recommended value: `true`
|
||||||
|
|
||||||
The `/home`, `/root`, and `/run/user` folders can not be accessed by this service anymore. If your Pleroma user has its home folder in one of the restricted places, or use one of these folders as its working directory, you have to set this to `false`.
|
The `/home`, `/root`, and `/run/user` folders can not be accessed by this service anymore. If your Akkoma user has its home folder in one of the restricted places, or use one of these folders as its working directory, you have to set this to `false`.
|
||||||
|
|
||||||
### ProtectSystem
|
### ProtectSystem
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# How to activate Pleroma in-database configuration
|
# How to activate Akkoma in-database configuration
|
||||||
## Explanation
|
## Explanation
|
||||||
|
|
||||||
The configuration of Pleroma has traditionally been managed with a config file, e.g. `config/prod.secret.exs`. This method requires a restart of the application for any configuration changes to take effect. We have made it possible to control most settings in the AdminFE interface after running a migration script.
|
The configuration of Akkoma (and Pleroma) has traditionally been managed with a config file, e.g. `config/prod.secret.exs`. This method requires a restart of the application for any configuration changes to take effect. We have made it possible to control most settings in the AdminFE interface after running a migration script.
|
||||||
|
|
||||||
## Migration to database config
|
## Migration to database config
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ The configuration of Pleroma has traditionally been managed with a config file,
|
||||||
|
|
||||||
**OTP:**
|
**OTP:**
|
||||||
|
|
||||||
*Note: OTP users need Pleroma to be running for `pleroma_ctl` commands to work*
|
*Note: OTP users need Akkoma to be running for `pleroma_ctl` commands to work*
|
||||||
|
|
||||||
```
|
```
|
||||||
$ ./bin/pleroma_ctl config migrate_to_db
|
$ ./bin/pleroma_ctl config migrate_to_db
|
||||||
|
@ -36,7 +36,7 @@ The configuration of Pleroma has traditionally been managed with a config file,
|
||||||
cp config/dev.secret.exs config/dev.secret.exs.orig
|
cp config/dev.secret.exs config/dev.secret.exs.orig
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Edit your Pleroma config to enable database configuration:
|
3. Edit your Akkoma config to enable database configuration:
|
||||||
|
|
||||||
```
|
```
|
||||||
config :pleroma, configurable_from_database: true
|
config :pleroma, configurable_from_database: true
|
||||||
|
@ -66,9 +66,9 @@ The configuration of Pleroma has traditionally been managed with a config file,
|
||||||
|
|
||||||
config :pleroma, Pleroma.Repo,
|
config :pleroma, Pleroma.Repo,
|
||||||
adapter: Ecto.Adapters.Postgres,
|
adapter: Ecto.Adapters.Postgres,
|
||||||
username: "pleroma",
|
username: "akkoma",
|
||||||
password: "MySecretPassword",
|
password: "MySecretPassword",
|
||||||
database: "pleroma_prod",
|
database: "akkoma_prod",
|
||||||
hostname: "localhost"
|
hostname: "localhost"
|
||||||
|
|
||||||
config :pleroma, configurable_from_database: true
|
config :pleroma, configurable_from_database: true
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
# Configuring Ejabberd (XMPP Server) to use Pleroma for authentication
|
# Configuring Ejabberd (XMPP Server) to use Akkoma for authentication
|
||||||
|
|
||||||
If you want to give your Pleroma users an XMPP (chat) account, you can configure [Ejabberd](https://github.com/processone/ejabberd) to use your Pleroma server for user authentication, automatically giving every local user an XMPP account.
|
If you want to give your Akkoma users an XMPP (chat) account, you can configure [Ejabberd](https://github.com/processone/ejabberd) to use your Akkoma server for user authentication, automatically giving every local user an XMPP account.
|
||||||
|
|
||||||
In general, you just have to follow the configuration described at [https://docs.ejabberd.im/admin/configuration/authentication/#external-script](https://docs.ejabberd.im/admin/configuration/authentication/#external-script). Please read this section carefully.
|
In general, you just have to follow the configuration described at [https://docs.ejabberd.im/admin/configuration/authentication/#external-script](https://docs.ejabberd.im/admin/configuration/authentication/#external-script). Please read this section carefully.
|
||||||
|
|
||||||
Copy the script below to suitable path on your system and set owner and permissions. Also do not forget adjusting `PLEROMA_HOST` and `PLEROMA_PORT`, if necessary.
|
Copy the script below to suitable path on your system and set owner and permissions. Also do not forget adjusting `AKKOMA_HOST` and `AKKOMA_PORT`, if necessary.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp pleroma_ejabberd_auth.py /etc/ejabberd/pleroma_ejabberd_auth.py
|
cp akkoma_ejabberd_auth.py /etc/ejabberd/akkoma_ejabberd_auth.py
|
||||||
chown ejabberd /etc/ejabberd/pleroma_ejabberd_auth.py
|
chown ejabberd /etc/ejabberd/akkoma_ejabberd_auth.py
|
||||||
chmod 700 /etc/ejabberd/pleroma_ejabberd_auth.py
|
chmod 700 /etc/ejabberd/akkoma_ejabberd_auth.py
|
||||||
```
|
```
|
||||||
|
|
||||||
Set external auth params in ejabberd.yaml file:
|
Set external auth params in ejabberd.yaml file:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
auth_method: [external]
|
auth_method: [external]
|
||||||
extauth_program: "python3 /etc/ejabberd/pleroma_ejabberd_auth.py"
|
extauth_program: "python3 /etc/ejabberd/akkoma_ejabberd_auth.py"
|
||||||
extauth_instances: 3
|
extauth_instances: 3
|
||||||
auth_use_cache: false
|
auth_use_cache: false
|
||||||
```
|
```
|
||||||
|
|
||||||
Restart / reload your ejabberd service.
|
Restart / reload your ejabberd service.
|
||||||
|
|
||||||
After restarting your Ejabberd server, your users should now be able to connect with their Pleroma credentials.
|
After restarting your Ejabberd server, your users should now be able to connect with their Akkoma credentials.
|
||||||
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
@ -34,18 +34,18 @@ from base64 import b64encode
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
|
||||||
PLEROMA_HOST = "127.0.0.1"
|
AKKOMA_HOST = "127.0.0.1"
|
||||||
PLEROMA_PORT = "4000"
|
AKKOMA_PORT = "4000"
|
||||||
AUTH_ENDPOINT = "/api/v1/accounts/verify_credentials"
|
AUTH_ENDPOINT = "/api/v1/accounts/verify_credentials"
|
||||||
USER_ENDPOINT = "/api/v1/accounts"
|
USER_ENDPOINT = "/api/v1/accounts"
|
||||||
LOGFILE = "/var/log/ejabberd/pleroma_auth.log"
|
LOGFILE = "/var/log/ejabberd/akkoma_auth.log"
|
||||||
|
|
||||||
logging.basicConfig(filename=LOGFILE, level=logging.INFO)
|
logging.basicConfig(filename=LOGFILE, level=logging.INFO)
|
||||||
|
|
||||||
|
|
||||||
# Pleroma functions
|
# Akkoma functions
|
||||||
def create_connection():
|
def create_connection():
|
||||||
return http.client.HTTPConnection(PLEROMA_HOST, PLEROMA_PORT)
|
return http.client.HTTPConnection(AKKOMA_HOST, AKKOMA_PORT)
|
||||||
|
|
||||||
|
|
||||||
def verify_credentials(user: str, password: str) -> bool:
|
def verify_credentials(user: str, password: str) -> bool:
|
||||||
|
@ -124,7 +124,7 @@ def write(result):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
logging.info("Starting pleroma ejabberd auth daemon...")
|
logging.info("Starting akkoma ejabberd auth daemon...")
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
read()
|
read()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# How to activate mediaproxy
|
# How to activate mediaproxy
|
||||||
## Explanation
|
## Explanation
|
||||||
|
|
||||||
Without the `mediaproxy` function, Pleroma doesn't store any remote content like pictures, video etc. locally. So every time you open Pleroma, the content is loaded from the source server, from where the post is coming. This can result in slowly loading content or/and increased bandwidth usage on the source server.
|
Without the `mediaproxy` function, Akkoma doesn't store any remote content like pictures, video etc. locally. So every time you open Akkoma, the content is loaded from the source server, from where the post is coming. This can result in slowly loading content or/and increased bandwidth usage on the source server.
|
||||||
With the `mediaproxy` function you can use nginx to cache this content, so users can access it faster, because it's loaded from your server.
|
With the `mediaproxy` function you can use nginx to cache this content, so users can access it faster, because it's loaded from your server.
|
||||||
|
|
||||||
## Activate it
|
## Activate it
|
||||||
|
@ -9,16 +9,16 @@ With the `mediaproxy` function you can use nginx to cache this content, so users
|
||||||
* Edit your nginx config and add the following location:
|
* Edit your nginx config and add the following location:
|
||||||
```
|
```
|
||||||
location /proxy {
|
location /proxy {
|
||||||
proxy_cache pleroma_media_cache;
|
proxy_cache akkoma_media_cache;
|
||||||
proxy_cache_lock on;
|
proxy_cache_lock on;
|
||||||
proxy_pass http://localhost:4000;
|
proxy_pass http://localhost:4000;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
Also add the following on top of the configuration, outside of the `server` block:
|
Also add the following on top of the configuration, outside of the `server` block:
|
||||||
```
|
```
|
||||||
proxy_cache_path /tmp/pleroma-media-cache levels=1:2 keys_zone=pleroma_media_cache:10m max_size=10g inactive=720m use_temp_path=off;
|
proxy_cache_path /tmp/akkoma-media-cache levels=1:2 keys_zone=akkoma_media_cache:10m max_size=10g inactive=720m use_temp_path=off;
|
||||||
```
|
```
|
||||||
If you came here from one of the installation guides, take a look at the example configuration `/installation/pleroma.nginx`, where this part is already included.
|
If you came here from one of the installation guides, take a look at the example configuration `/installation/nginx/akkoma.nginx`, where this part is already included.
|
||||||
|
|
||||||
* Append the following to your `prod.secret.exs` or `dev.secret.exs` (depends on which mode your instance is running):
|
* Append the following to your `prod.secret.exs` or `dev.secret.exs` (depends on which mode your instance is running):
|
||||||
```
|
```
|
||||||
|
@ -27,8 +27,8 @@ config :pleroma, :media_proxy,
|
||||||
proxy_opts: [
|
proxy_opts: [
|
||||||
redirect_on_failure: true
|
redirect_on_failure: true
|
||||||
]
|
]
|
||||||
#base_url: "https://cache.pleroma.social"
|
#base_url: "https://cache.akkoma.social"
|
||||||
```
|
```
|
||||||
If you want to use a subdomain to serve the files, uncomment `base_url`, change the url and add a comma after `true` in the previous line.
|
If you want to use a subdomain to serve the files, uncomment `base_url`, change the url and add a comma after `true` in the previous line.
|
||||||
|
|
||||||
* Restart nginx and Pleroma
|
* Restart nginx and Akkoma
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# Configuring MongooseIM (XMPP Server) to use Pleroma for authentication
|
# Configuring MongooseIM (XMPP Server) to use Akkoma for authentication
|
||||||
|
|
||||||
If you want to give your Pleroma users an XMPP (chat) account, you can configure [MongooseIM](https://github.com/esl/MongooseIM) to use your Pleroma server for user authentication, automatically giving every local user an XMPP account.
|
If you want to give your Akkoma users an XMPP (chat) account, you can configure [MongooseIM](https://github.com/esl/MongooseIM) to use your Akkoma server for user authentication, automatically giving every local user an XMPP account.
|
||||||
|
|
||||||
In general, you just have to follow the configuration described at [https://mongooseim.readthedocs.io/en/latest/authentication-backends/HTTP-authentication-module/](https://mongooseim.readthedocs.io/en/latest/authentication-backends/HTTP-authentication-module/) and do these changes to your mongooseim.cfg.
|
In general, you just have to follow the configuration described at [https://mongooseim.readthedocs.io/en/latest/authentication-backends/HTTP-authentication-module/](https://mongooseim.readthedocs.io/en/latest/authentication-backends/HTTP-authentication-module/) and do these changes to your mongooseim.cfg.
|
||||||
|
|
||||||
1. Set the auth_method to `{auth_method, http}`.
|
1. Set the auth_method to `{auth_method, http}`.
|
||||||
2. Add the http auth pool like this: `{http, global, auth, [{workers, 50}], [{server, "https://yourpleromainstance.com"}]}`
|
2. Add the http auth pool like this: `{http, global, auth, [{workers, 50}], [{server, "https://yourakkomainstance.com"}]}`
|
||||||
|
|
||||||
Restart your MongooseIM server, your users should now be able to connect with their Pleroma credentials.
|
Restart your MongooseIM server, your users should now be able to connect with their Akkoma credentials.
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# How to configure upstream proxy for federation
|
# How to configure upstream proxy for federation
|
||||||
If you want to proxify all http requests (e.g. for TOR) that pleroma makes to an upstream proxy server, edit you config file (`dev.secret.exs` or `prod.secret.exs`) and add the following:
|
If you want to proxify all http requests (e.g. for TOR) that Akkoma makes to an upstream proxy server, edit your config file (`dev.secret.exs` or `prod.secret.exs`) and add the following:
|
||||||
|
|
||||||
```
|
```
|
||||||
config :pleroma, :http,
|
config :pleroma, :http,
|
||||||
proxy_url: "127.0.0.1:8123"
|
proxy_url: "127.0.0.1:8123"
|
||||||
```
|
```
|
||||||
|
|
||||||
The other way to do it, for example, with Tor you would most likely add something like this:
|
The other way to do it, for example, with Tor can be done like so:
|
||||||
```
|
```
|
||||||
config :pleroma, :http, proxy_url: {:socks5, :localhost, 9050}
|
config :pleroma, :http, proxy_url: {:socks5, :localhost, 9050}
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
# How to enable text search for Chinese, Japanese and Korean
|
# How to enable text search for Chinese, Japanese and Korean
|
||||||
|
|
||||||
Pleroma's full text search feature is powered by PostgreSQL's native [text search](https://www.postgresql.org/docs/current/textsearch.html), it works well out of box for most of languages, but needs extra configurations for some asian languages like Chinese, Japanese and Korean (CJK).
|
Akkoma's full text search feature is powered by PostgreSQL's native [text search](https://www.postgresql.org/docs/current/textsearch.html), it works well out of box for most of languages, but needs extra configurations for some asian languages like Chinese, Japanese and Korean (CJK).
|
||||||
|
|
||||||
|
|
||||||
## Setup and test the new search config
|
## Setup and test the new search config
|
||||||
|
|
||||||
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 Pleroma 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 Simplifed/Traditional Chinese, Japanese, and Korean
|
* [a generic n-gram parser](https://github.com/huangjimmy/pg_cjk_parser) supports Simplifed/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
|
||||||
|
@ -37,6 +37,6 @@ Check output of the query, and see if it matches your expectation.
|
||||||
Note: index update may take a while, and it can be done while the instance is up and running, so you may restart db connection as soon as you see `Recreate index` in task output.
|
Note: index update may take a while, and it can be done while the instance is up and running, so you may restart db connection as soon as you see `Recreate index` in task output.
|
||||||
|
|
||||||
## Restart database connection
|
## Restart database connection
|
||||||
Since some changes above will only apply with a new database connection, you will have to restart either Pleroma or PostgreSQL process, or use `pg_terminate_backend` SQL command without restarting either.
|
Since some changes above will only apply with a new database connection, you will have to restart either Akkoma or PostgreSQL process, or use `pg_terminate_backend` SQL command without restarting either.
|
||||||
|
|
||||||
Now the search results of statuses should be much more friendly for your language of choice, the results for searching users and tags were not changed, as the default parsing/matching should work for most cases.
|
Now the search results of statuses should be much more friendly for your language of choice, the results for searching users and tags were not changed, as the default parsing/matching should work for most cases.
|
||||||
|
|
|
@ -43,11 +43,11 @@ Example of `styles.json` where we add our own `my-awesome-theme.json`
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Now you'll already be able to select the theme in Pleroma FE from the drop-down. You don't need to restart Pleroma because we only changed static served files. You may need to refresh the page in your browser. You'll notice however that the theme doesn't have a name, it's just an empty entry in the drop-down.
|
Now you'll already be able to select the theme in Pleroma FE from the drop-down. You don't need to restart Akkoma because we only changed static served files. You may need to refresh the page in your browser. You'll notice however that the theme doesn't have a name, it's just an empty entry in the drop-down.
|
||||||
|
|
||||||
### Give the theme a name
|
### Give the theme a name
|
||||||
|
|
||||||
When you open one of the themes that ship with Pleroma, you'll notice that the json has a `"name"` key. Add a key-value pair to your theme where the key name is `"name"` and the value the name you want to give your theme. After this you can refresh te page in your browser and the name should be visible in the drop-down.
|
When you open one of the themes that ship with Akkoma, you'll notice that the json has a `"name"` key. Add a key-value pair to your theme where the key name is `"name"` and the value the name you want to give your theme. After this you can refresh te page in your browser and the name should be visible in the drop-down.
|
||||||
|
|
||||||
Example of `my-awesome-theme.json` where we add the name "My Awesome Theme"
|
Example of `my-awesome-theme.json` where we add the name "My Awesome Theme"
|
||||||
```json
|
```json
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# I2P Federation and Accessability
|
# I2P Federation and Accessability
|
||||||
|
|
||||||
This guide is going to focus on the Pleroma federation aspect. The actual installation is neatly explained in the official documentation, and more likely to remain up-to-date.
|
This guide is going to focus on the Akkoma federation aspect. The actual installation is neatly explained in the official documentation, and more likely to remain up-to-date.
|
||||||
It might be added to this guide if there will be a need for that.
|
It might be added to this guide if there will be a need for that.
|
||||||
|
|
||||||
We're going to use I2PD for its lightweightness over the official client.
|
We're going to use I2PD for its lightweightness over the official client.
|
||||||
|
@ -17,13 +17,13 @@ One using the config, and one using external software (fedproxy). The external s
|
||||||
|
|
||||||
**Warning:** So far, everytime I followed this way of federating using I2P, the rest of my federation stopped working. I'm leaving this here in case it will help with making it work.
|
**Warning:** So far, everytime I followed this way of federating using I2P, the rest of my federation stopped working. I'm leaving this here in case it will help with making it work.
|
||||||
|
|
||||||
Assuming you're running in prod, cd to your Pleroma folder and append the following to `config/prod.secret.exs`:
|
Assuming you're running in prod, cd to your Akkoma folder and append the following to `config/prod.secret.exs`:
|
||||||
```
|
```
|
||||||
config :pleroma, :http, proxy_url: {:socks5, :localhost, 4447}
|
config :pleroma, :http, proxy_url: {:socks5, :localhost, 4447}
|
||||||
```
|
```
|
||||||
And then run the following:
|
And then run the following:
|
||||||
```
|
```
|
||||||
su pleroma
|
su akkoma
|
||||||
MIX_ENV=prod mix deps.get
|
MIX_ENV=prod mix deps.get
|
||||||
MIX_ENV=prod mix ecto.migrate
|
MIX_ENV=prod mix ecto.migrate
|
||||||
exit
|
exit
|
||||||
|
@ -45,7 +45,7 @@ To use [fedproxy](https://github.com/majestrate/fedproxy) you'll need to install
|
||||||
```
|
```
|
||||||
apt install golang
|
apt install golang
|
||||||
```
|
```
|
||||||
Use a different user than pleroma or root. Run the following to add the Gopath to your ~/.bashrc.
|
Use a different user than akkoma or root. Run the following to add the Gopath to your ~/.bashrc.
|
||||||
```
|
```
|
||||||
echo "export GOPATH=/home/ren/.go" >> ~/.bashrc
|
echo "export GOPATH=/home/ren/.go" >> ~/.bashrc
|
||||||
```
|
```
|
||||||
|
@ -60,15 +60,15 @@ And then the following to start it for I2P only.
|
||||||
fedproxy 127.0.0.1:2000 127.0.0.1:4447
|
fedproxy 127.0.0.1:2000 127.0.0.1:4447
|
||||||
```
|
```
|
||||||
If you want to also use it for Tor, add `127.0.0.1:9050` to that command.
|
If you want to also use it for Tor, add `127.0.0.1:9050` to that command.
|
||||||
You'll also need to modify your Pleroma config.
|
You'll also need to modify your Akkoma config.
|
||||||
|
|
||||||
Assuming you're running in prod, cd to your Pleroma folder and append the following to `config/prod.secret.exs`:
|
Assuming you're running in prod, cd to your Akkoma folder and append the following to `config/prod.secret.exs`:
|
||||||
```
|
```
|
||||||
config :pleroma, :http, proxy_url: {:socks5, :localhost, 2000}
|
config :pleroma, :http, proxy_url: {:socks5, :localhost, 2000}
|
||||||
```
|
```
|
||||||
And then run the following:
|
And then run the following:
|
||||||
```
|
```
|
||||||
su pleroma
|
su akkoma
|
||||||
MIX_ENV=prod mix deps.get
|
MIX_ENV=prod mix deps.get
|
||||||
MIX_ENV=prod mix ecto.migrate
|
MIX_ENV=prod mix ecto.migrate
|
||||||
exit
|
exit
|
||||||
|
@ -89,11 +89,11 @@ Make your instance accessible using I2P.
|
||||||
|
|
||||||
Add the following to your I2PD config `/etc/i2pd/tunnels.conf`:
|
Add the following to your I2PD config `/etc/i2pd/tunnels.conf`:
|
||||||
```
|
```
|
||||||
[pleroma]
|
[akkoma]
|
||||||
type = http
|
type = http
|
||||||
host = 127.0.0.1
|
host = 127.0.0.1
|
||||||
port = 14447
|
port = 14447
|
||||||
keys = pleroma.dat
|
keys = akkoma.dat
|
||||||
```
|
```
|
||||||
Restart I2PD:
|
Restart I2PD:
|
||||||
```
|
```
|
||||||
|
@ -108,7 +108,7 @@ Or you'll need to access your web-console on localhost:7070.
|
||||||
If you don't have a GUI, you'll have to SSH tunnel into it like this:
|
If you don't have a GUI, you'll have to SSH tunnel into it like this:
|
||||||
`ssh -L 7070:127.0.0.1:7070 user@ip -p port`.
|
`ssh -L 7070:127.0.0.1:7070 user@ip -p port`.
|
||||||
Now you can access it at localhost:7070.
|
Now you can access it at localhost:7070.
|
||||||
Go to I2P tunnels page. Look for Server tunnels and you will see an address that ends with `.b32.i2p` next to "pleroma".
|
Go to I2P tunnels page. Look for Server tunnels and you will see an address that ends with `.b32.i2p` next to "akkoma".
|
||||||
This is your site's address.
|
This is your site's address.
|
||||||
|
|
||||||
### I2P-only Instance
|
### I2P-only Instance
|
||||||
|
@ -121,10 +121,10 @@ In addition to that, replace the existing nginx config's contents with the examp
|
||||||
|
|
||||||
### Existing Instance (Clearnet Instance)
|
### Existing Instance (Clearnet Instance)
|
||||||
|
|
||||||
If not an I2P-only instance, add the nginx config below to your existing config at `/etc/nginx/sites-enabled/pleroma.nginx`.
|
If not an I2P-only instance, add the nginx config below to your existing config at `/etc/nginx/sites-enabled/akkoma.nginx`.
|
||||||
|
|
||||||
And for both cases, disable CSP in Pleroma's config (STS is disabled by default) so you can define those yourself separately from the clearnet (if your instance is also on the clearnet).
|
And for both cases, disable CSP in Akkoma's config (STS is disabled by default) so you can define those yourself separately from the clearnet (if your instance is also on the clearnet).
|
||||||
Copy the following into the `config/prod.secret.exs` in your Pleroma folder (/home/pleroma/pleroma/):
|
Copy the following into the `config/prod.secret.exs` in your Akkoma folder (/home/akkoma/akkoma/):
|
||||||
```
|
```
|
||||||
config :pleroma, :http_security,
|
config :pleroma, :http_security,
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@ -132,7 +132,7 @@ config :pleroma, :http_security,
|
||||||
|
|
||||||
Use this as the Nginx config:
|
Use this as the Nginx config:
|
||||||
```
|
```
|
||||||
proxy_cache_path /tmp/pleroma-media-cache levels=1:2 keys_zone=pleroma_media_cache:10m max_size=10g inactive=720m use_temp_path=off;
|
proxy_cache_path /tmp/akkoma-media-cache levels=1:2 keys_zone=akkoma_media_cache:10m max_size=10g inactive=720m use_temp_path=off;
|
||||||
# The above already exists in a clearnet instance's config.
|
# The above already exists in a clearnet instance's config.
|
||||||
# If not, add it.
|
# If not, add it.
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location /proxy {
|
location /proxy {
|
||||||
proxy_cache pleroma_media_cache;
|
proxy_cache akkoma_media_cache;
|
||||||
proxy_cache_lock on;
|
proxy_cache_lock on;
|
||||||
proxy_ignore_client_abort on;
|
proxy_ignore_client_abort on;
|
||||||
proxy_pass http://localhost:4000;
|
proxy_pass http://localhost:4000;
|
||||||
|
|
|
@ -11,7 +11,7 @@ Possible uses include:
|
||||||
* removing media from messages
|
* removing media from messages
|
||||||
* sending only public messages to a specific instance
|
* sending only public messages to a specific instance
|
||||||
|
|
||||||
The MRF provides user-configurable policies. The default policy is `NoOpPolicy`, which disables the MRF functionality. Pleroma also includes an easy to use policy called `SimplePolicy` which maps messages matching certain pre-defined criterion to actions built into the policy module.
|
The MRF provides user-configurable policies. The default policy is `NoOpPolicy`, which disables the MRF functionality. Akkoma also includes an easy to use policy called `SimplePolicy` which maps messages matching certain pre-defined criterion to actions built into the policy module.
|
||||||
|
|
||||||
It is possible to use multiple, active MRF policies at the same time.
|
It is possible to use multiple, active MRF policies at the same time.
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.RewritePolicy do
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
If you save this file as `lib/pleroma/web/activity_pub/mrf/rewrite_policy.ex`, it will be included when you next rebuild Pleroma. You can enable it in the configuration like so:
|
If you save this file as `lib/pleroma/web/activity_pub/mrf/rewrite_policy.ex`, it will be included when you next rebuild Akkoma. You can enable it in the configuration like so:
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
config :pleroma, :mrf,
|
config :pleroma, :mrf,
|
||||||
|
@ -132,7 +132,7 @@ config :pleroma, :mrf,
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
Please note that the Pleroma developers consider custom MRF policy modules to fall under the purview of the AGPL. As such, you are obligated to release the sources to your custom MRF policy modules upon request.
|
Please note that the Akkoma developers consider custom MRF policy modules to fall under the purview of the AGPL. As such, you are obligated to release the sources to your custom MRF policy modules upon request.
|
||||||
|
|
||||||
### MRF policies descriptions
|
### MRF policies descriptions
|
||||||
|
|
||||||
|
|
|
@ -1,31 +1,22 @@
|
||||||
# Easy Onion Federation (Tor)
|
# Easy Onion Federation (Tor)
|
||||||
Tor can free people from the necessity of a domain, in addition to helping protect their privacy. As Pleroma's goal is to empower the people and let as many as possible host an instance with as little resources as possible, the ability to host an instance with a small, cheap computer like a RaspberryPi along with Tor, would be a great way to achieve that.
|
Tor can free people from the necessity of a domain, in addition to helping protect their privacy. As Akkoma's goal is to empower the people and let as many as possible host an instance with as little resources as possible, the ability to host an instance with a small, cheap computer like a Raspberry Pi along with Tor, would be a great way to achieve that.
|
||||||
In addition, federating with such instances will also help furthering that goal.
|
In addition, federating with such instances will also help furthering that goal.
|
||||||
|
|
||||||
This is a guide to show you how it can be easily done.
|
This is a guide to show you how it can be easily done.
|
||||||
|
|
||||||
This guide assumes you already got Pleroma working, and that it's running on the default port 4000.
|
This guide assumes you already got Akkoma working, and that it's running on the default port 4000.
|
||||||
Currently only has an Nginx example.
|
This guide also assumes you're using Nginx as the reverse proxy.
|
||||||
|
|
||||||
To install Tor on Debian / Ubuntu:
|
To install Tor on Debian / Ubuntu:
|
||||||
```
|
```
|
||||||
apt -yq install tor
|
apt -yq install tor
|
||||||
```
|
```
|
||||||
If using an old server version (older than Debian Stretch or Ubuntu 18.04), install from backports or PPA.
|
|
||||||
I recommend using a newer server version instead.
|
|
||||||
|
|
||||||
To have the newest, V3 onion addresses (which I recommend) in Debian, install Tor from backports.
|
|
||||||
If you do not have backports, uncomment the stretch-backports links at the end of `/etc/apt/sources.list`.
|
|
||||||
Then install:
|
|
||||||
```
|
|
||||||
apt update
|
|
||||||
apt -t stretch-backports -yq install tor
|
|
||||||
```
|
|
||||||
**WARNING:** Onion instances not using a Tor version supporting V3 addresses will not be able to federate with you.
|
**WARNING:** Onion instances not using a Tor version supporting V3 addresses will not be able to federate with you.
|
||||||
|
|
||||||
Create the hidden service for your Pleroma instance in `/etc/tor/torrc`:
|
Create the hidden service for your Akkoma instance in `/etc/tor/torrc`:
|
||||||
```
|
```
|
||||||
HiddenServiceDir /var/lib/tor/pleroma_hidden_service/
|
HiddenServiceDir /var/lib/tor/akkoma_hidden_service/
|
||||||
HiddenServicePort 80 127.0.0.1:8099
|
HiddenServicePort 80 127.0.0.1:8099
|
||||||
HiddenServiceVersion 3 # Remove if Tor version is below 0.3 ( tor --version )
|
HiddenServiceVersion 3 # Remove if Tor version is below 0.3 ( tor --version )
|
||||||
```
|
```
|
||||||
|
@ -35,28 +26,28 @@ systemctl restart tor@default.service
|
||||||
```
|
```
|
||||||
Get the address:
|
Get the address:
|
||||||
```
|
```
|
||||||
cat /var/lib/tor/pleroma_hidden_service/hostname
|
cat /var/lib/tor/akkoma_hidden_service/hostname
|
||||||
```
|
```
|
||||||
|
|
||||||
# Federation
|
# Federation
|
||||||
|
|
||||||
Next, edit your Pleroma config.
|
Next, edit your Akkoma config.
|
||||||
If running in prod, cd to your Pleroma directory, edit `config/prod.secret.exs`
|
If running in prod, navigate to your Akkoma directory, edit `config/prod.secret.exs`
|
||||||
and append this line:
|
and append this line:
|
||||||
```
|
```
|
||||||
config :pleroma, :http, proxy_url: {:socks5, :localhost, 9050}
|
config :pleroma, :http, proxy_url: {:socks5, :localhost, 9050}
|
||||||
```
|
```
|
||||||
In your Pleroma directory, assuming you're running prod,
|
In your Akkoma directory, assuming you're running prod,
|
||||||
run the following:
|
run the following:
|
||||||
```
|
```
|
||||||
su pleroma
|
su akkoma
|
||||||
MIX_ENV=prod mix deps.get
|
MIX_ENV=prod mix deps.get
|
||||||
MIX_ENV=prod mix ecto.migrate
|
MIX_ENV=prod mix ecto.migrate
|
||||||
exit
|
exit
|
||||||
```
|
```
|
||||||
restart Pleroma (if using systemd):
|
restart Akkoma (if using systemd):
|
||||||
```
|
```
|
||||||
systemctl restart pleroma
|
systemctl restart akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
# Tor Instance Access
|
# Tor Instance Access
|
||||||
|
@ -64,7 +55,7 @@ systemctl restart pleroma
|
||||||
Make your instance accessible using Tor.
|
Make your instance accessible using Tor.
|
||||||
|
|
||||||
## Tor-only Instance
|
## Tor-only Instance
|
||||||
If creating a Tor-only instance, open `config/prod.secret.exs` and under "config :pleroma, Pleroma.Web.Endpoint," edit "https" and "port: 443" to the following:
|
If creating a Tor-only instance, open `config/prod.secret.exs` and under "config :pleroma, Akkoma.Web.Endpoint," edit "https" and "port: 443" to the following:
|
||||||
```
|
```
|
||||||
url: [host: "onionaddress", scheme: "http", port: 80],
|
url: [host: "onionaddress", scheme: "http", port: 80],
|
||||||
```
|
```
|
||||||
|
@ -72,11 +63,11 @@ In addition to that, replace the existing nginx config's contents with the examp
|
||||||
|
|
||||||
## Existing Instance (Clearnet Instance)
|
## Existing Instance (Clearnet Instance)
|
||||||
If not a Tor-only instance,
|
If not a Tor-only instance,
|
||||||
add the nginx config below to your existing config at `/etc/nginx/sites-enabled/pleroma.nginx`.
|
add the nginx config below to your existing config at `/etc/nginx/sites-enabled/akkoma.nginx`.
|
||||||
|
|
||||||
---
|
---
|
||||||
For both cases, disable CSP in Pleroma's config (STS is disabled by default) so you can define those yourself separately from the clearnet (if your instance is also on the clearnet).
|
For both cases, disable CSP in Akkoma's config (STS is disabled by default) so you can define those yourself separately from the clearnet (if your instance is also on the clearnet).
|
||||||
Copy the following into the `config/prod.secret.exs` in your Pleroma folder (/home/pleroma/pleroma/):
|
Copy the following into the `config/prod.secret.exs` in your Akkoma folder (/home/akkoma/akkoma/):
|
||||||
```
|
```
|
||||||
config :pleroma, :http_security,
|
config :pleroma, :http_security,
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@ -84,7 +75,7 @@ config :pleroma, :http_security,
|
||||||
|
|
||||||
Use this as the Nginx config:
|
Use this as the Nginx config:
|
||||||
```
|
```
|
||||||
proxy_cache_path /tmp/pleroma-media-cache levels=1:2 keys_zone=pleroma_media_cache:10m max_size=10g inactive=720m use_temp_path=off;
|
proxy_cache_path /tmp/akkoma-media-cache levels=1:2 keys_zone=akkoma_media_cache:10m max_size=10g inactive=720m use_temp_path=off;
|
||||||
# The above already exists in a clearnet instance's config.
|
# The above already exists in a clearnet instance's config.
|
||||||
# If not, add it.
|
# If not, add it.
|
||||||
|
|
||||||
|
@ -125,7 +116,7 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location /proxy {
|
location /proxy {
|
||||||
proxy_cache pleroma_media_cache;
|
proxy_cache akkoma_media_cache;
|
||||||
proxy_cache_lock on;
|
proxy_cache_lock on;
|
||||||
proxy_ignore_client_abort on;
|
proxy_ignore_client_abort on;
|
||||||
proxy_pass http://localhost:4000;
|
proxy_pass http://localhost:4000;
|
||||||
|
@ -143,17 +134,17 @@ You should now be able to both access your instance using Tor and federate with
|
||||||
|
|
||||||
### Possible Issues
|
### Possible Issues
|
||||||
|
|
||||||
* In Debian, make sure your hidden service folder `/var/lib/tor/pleroma_hidden_service/` and its contents, has debian-tor as both owner and group by using
|
* In Debian, make sure your hidden service folder `/var/lib/tor/akkoma_hidden_service/` and its contents, has debian-tor as both owner and group by using
|
||||||
```
|
```
|
||||||
ls -la /var/lib/tor/
|
ls -la /var/lib/tor/
|
||||||
```
|
```
|
||||||
If it's not, run:
|
If it's not, run:
|
||||||
```
|
```
|
||||||
chown -R debian-tor:debian-tor /var/lib/tor/pleroma_hidden_service/
|
chown -R debian-tor:debian-tor /var/lib/tor/akkoma_hidden_service/
|
||||||
```
|
```
|
||||||
* Make sure *only* the owner has *only* read and write permissions.
|
* Make sure *only* the owner has *only* read and write permissions.
|
||||||
If not, run:
|
If not, run:
|
||||||
```
|
```
|
||||||
chmod -R 600 /var/lib/tor/pleroma_hidden_service/
|
chmod -R 600 /var/lib/tor/akkoma_hidden_service/
|
||||||
```
|
```
|
||||||
* If you have trouble logging in to the Mastodon Frontend when using Tor, use the Tor Browser Bundle.
|
* If you have trouble logging in to the Mastodon Frontend when using Tor, use the Tor Browser Bundle.
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# Optimizing the BEAM
|
# Optimizing the BEAM
|
||||||
|
|
||||||
Pleroma is built upon the Erlang/OTP VM known as BEAM. The BEAM VM is highly optimized for latency, but this has drawbacks in environments without dedicated hardware. One of the tricks used by the BEAM VM is [busy waiting](https://en.wikipedia.org/wiki/Busy_waiting). This allows the application to pretend to be busy working so the OS kernel does not pause the application process and switch to another process waiting for the CPU to execute its workload. It does this by spinning for a period of time which inflates the apparent CPU usage of the application so it is immediately ready to execute another task. This can be observed with utilities like **top(1)** which will show consistently high CPU usage for the process. Switching between procesess is a rather expensive operation and also clears CPU caches further affecting latency and performance. The goal of busy waiting is to avoid this penalty.
|
Akkoma is built upon the Erlang/OTP VM known as BEAM. The BEAM VM is highly optimized for latency, but this has drawbacks in environments without dedicated hardware. One of the tricks used by the BEAM VM is [busy waiting](https://en.wikipedia.org/wiki/Busy_waiting). This allows the application to pretend to be busy working so the OS kernel does not pause the application process and switch to another process waiting for the CPU to execute its workload. It does this by spinning for a period of time which inflates the apparent CPU usage of the application so it is immediately ready to execute another task. This can be observed with utilities like **top(1)** which will show consistently high CPU usage for the process. Switching between procesess is a rather expensive operation and also clears CPU caches further affecting latency and performance. The goal of busy waiting is to avoid this penalty.
|
||||||
|
|
||||||
This strategy is very successful in making a performant and responsive application, but is not desirable on Virtual Machines or hardware with few CPU cores. Pleroma instances are often deployed on the same server as the required PostgreSQL database which can lead to situations where the Pleroma application is holding the CPU in a busy-wait loop and as a result the database cannot process requests in a timely manner. The fewer CPUs available, the more this problem is exacerbated. The latency is further amplified by the OS being installed on a Virtual Machine as the Hypervisor uses CPU time-slicing to pause the entire OS and switch between other tasks.
|
This strategy is very successful in making a performant and responsive application, but is not desirable on Virtual Machines or hardware with few CPU cores. Akkoma instances are often deployed on the same server as the required PostgreSQL database which can lead to situations where the Akkoma application is holding the CPU in a busy-wait loop and as a result the database cannot process requests in a timely manner. The fewer CPUs available, the more this problem is exacerbated. The latency is further amplified by the OS being installed on a Virtual Machine as the Hypervisor uses CPU time-slicing to pause the entire OS and switch between other tasks.
|
||||||
|
|
||||||
More adventurous admins can be creative with CPU affinity (e.g., *taskset* for Linux and *cpuset* on FreeBSD) to pin processes to specific CPUs and eliminate much of this contention. The most important advice is to run as few processes as possible on your server to achieve the best performance. Even idle background processes can occasionally create [software interrupts](https://en.wikipedia.org/wiki/Interrupt) and take attention away from the executing process creating latency spikes and invalidation of the CPU caches as they must be cleared when switching between processes for security.
|
More adventurous admins can be creative with CPU affinity (e.g., *taskset* for Linux and *cpuset* on FreeBSD) to pin processes to specific CPUs and eliminate much of this contention. The most important advice is to run as few processes as possible on your server to achieve the best performance. Even idle background processes can occasionally create [software interrupts](https://en.wikipedia.org/wiki/Interrupt) and take attention away from the executing process creating latency spikes and invalidation of the CPU caches as they must be cleared when switching between processes for security.
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ Please only change these settings if you are experiencing issues or really know
|
||||||
|
|
||||||
Tuning the BEAM requires you provide a config file normally called [vm.args](http://erlang.org/doc/man/erl.html#emulator-flags). If you are using systemd to manage the service you can modify the unit file as such:
|
Tuning the BEAM requires you provide a config file normally called [vm.args](http://erlang.org/doc/man/erl.html#emulator-flags). If you are using systemd to manage the service you can modify the unit file as such:
|
||||||
|
|
||||||
`ExecStart=/usr/bin/elixir --erl '-args_file /opt/pleroma/config/vm.args' -S /usr/bin/mix phx.server`
|
`ExecStart=/usr/bin/elixir --erl '-args_file /opt/akkoma/config/vm.args' -S /usr/bin/mix phx.server`
|
||||||
|
|
||||||
Check your OS documentation to adopt a similar strategy on other platforms.
|
Check your OS documentation to adopt a similar strategy on other platforms.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Optimizing PostgreSQL performance
|
# Optimizing PostgreSQL performance
|
||||||
|
|
||||||
Pleroma performance is largely dependent on performance of the underlying database. Better performance can be achieved by adjusting a few settings.
|
Akkoma performance is largely dependent on performance of the underlying database. Better performance can be achieved by adjusting a few settings.
|
||||||
|
|
||||||
## PGTune
|
## PGTune
|
||||||
|
|
||||||
|
@ -10,10 +10,10 @@ Pleroma performance is largely dependent on performance of the underlying databa
|
||||||
|
|
||||||
When PostgreSQL receives a query, it decides on a strategy for searching the requested data, this is called a query plan. The query planner has two modes: generic and custom. Generic makes a plan for all queries of the same shape, ignoring the parameters, which is then cached and reused. Custom, on the contrary, generates a unique query plan based on query parameters.
|
When PostgreSQL receives a query, it decides on a strategy for searching the requested data, this is called a query plan. The query planner has two modes: generic and custom. Generic makes a plan for all queries of the same shape, ignoring the parameters, which is then cached and reused. Custom, on the contrary, generates a unique query plan based on query parameters.
|
||||||
|
|
||||||
By default PostgreSQL has an algorithm to decide which mode is more efficient for particular query, however this algorithm has been observed to be wrong on some of the queries Pleroma sends, leading to serious performance loss. Therefore, it is recommended to disable generic mode.
|
By default PostgreSQL has an algorithm to decide which mode is more efficient for particular query, however this algorithm has been observed to be wrong on some of the queries Akkoma sends, leading to serious performance loss. Therefore, it is recommended to disable generic mode.
|
||||||
|
|
||||||
|
|
||||||
Pleroma already avoids generic query plans by default, however the method it uses is not the most efficient because it needs to be compatible with all supported PostgreSQL versions. For PostgreSQL 12 and higher additional performance can be gained by adding the following to Pleroma configuration:
|
Akkoma already avoids generic query plans by default, however the method it uses is not the most efficient because it needs to be compatible with all supported PostgreSQL versions. For PostgreSQL 12 and higher additional performance can be gained by adding the following to Akkoma configuration:
|
||||||
```elixir
|
```elixir
|
||||||
config :pleroma, Pleroma.Repo,
|
config :pleroma, Pleroma.Repo,
|
||||||
prepare: :named,
|
prepare: :named,
|
||||||
|
|
165
docs/configuration/search.md
Normal file
165
docs/configuration/search.md
Normal file
|
@ -0,0 +1,165 @@
|
||||||
|
# Configuring search
|
||||||
|
|
||||||
|
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
|
||||||
|
|
||||||
|
## Built-in search
|
||||||
|
|
||||||
|
To use built-in search that has no external dependencies, set the search module to `Pleroma.Activity`:
|
||||||
|
|
||||||
|
> config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch
|
||||||
|
|
||||||
|
While it has no external dependencies, it has problems with performance and relevancy.
|
||||||
|
|
||||||
|
## Meilisearch
|
||||||
|
|
||||||
|
Note that it's quite a bit more memory hungry than PostgreSQL (around 4-5G for ~1.2 million
|
||||||
|
posts while idle and up to 7G while indexing initially). The disk usage for this additional index is also
|
||||||
|
around 4 gigabytes. Like [RUM](./cheatsheet.md#rum-indexing-for-full-text-search) indexes, it offers considerably
|
||||||
|
higher performance and ordering by timestamp in a reasonable amount of time.
|
||||||
|
Additionally, the search results seem to be more accurate.
|
||||||
|
|
||||||
|
Due to high memory usage, it may be best to set it up on a different machine, if running pleroma on a low-resource
|
||||||
|
computer, and use private key authentication to secure the remote search instance.
|
||||||
|
|
||||||
|
To use [meilisearch](https://www.meilisearch.com/), set the search module to `Pleroma.Search.Meilisearch`:
|
||||||
|
|
||||||
|
> config :pleroma, Pleroma.Search, module: Pleroma.Search.Meilisearch
|
||||||
|
|
||||||
|
You then need to set the address of the meilisearch instance, and optionally the private key for authentication. You might
|
||||||
|
also want to change the `initial_indexing_chunk_size` to be smaller if you're server is not very powerful, but not higher than `100_000`,
|
||||||
|
because meilisearch will refuse to process it if it's too big. However, in general you want this to be as big as possible, because meilisearch
|
||||||
|
indexes faster when it can process many posts in a single batch.
|
||||||
|
|
||||||
|
> config :pleroma, Pleroma.Search.Meilisearch,
|
||||||
|
> url: "http://127.0.0.1:7700/",
|
||||||
|
> private_key: "private key",
|
||||||
|
> initial_indexing_chunk_size: 100_000
|
||||||
|
|
||||||
|
Information about setting up meilisearch can be found in the
|
||||||
|
[official documentation](https://docs.meilisearch.com/learn/getting_started/installation.html).
|
||||||
|
You probably want to start it with `MEILI_NO_ANALYTICS=true` environment variable to disable analytics.
|
||||||
|
At least version 0.25.0 is required, but you are strongly adviced to use at least 0.26.0, as it introduces
|
||||||
|
the `--enable-auto-batching` option which drastically improves performance. Without this option, the search
|
||||||
|
is hardly usable on a somewhat big instance.
|
||||||
|
|
||||||
|
### Private key authentication (optional)
|
||||||
|
|
||||||
|
To set the private key, use the `MEILI_MASTER_KEY` environment variable when starting. After setting the _master key_,
|
||||||
|
you have to get the _private key_, which is actually used for authentication.
|
||||||
|
|
||||||
|
=== "OTP"
|
||||||
|
```sh
|
||||||
|
./bin/pleroma_ctl search.meilisearch show-keys <your master key here>
|
||||||
|
```
|
||||||
|
|
||||||
|
=== "From Source"
|
||||||
|
```sh
|
||||||
|
mix pleroma.search.meilisearch show-keys <your master key here>
|
||||||
|
```
|
||||||
|
|
||||||
|
You will see a "Default Admin API Key", this is the key you actually put into your configuration file.
|
||||||
|
|
||||||
|
### Initial indexing
|
||||||
|
|
||||||
|
After setting up the configuration, you'll want to index all of your already existsing posts. Only public posts are indexed. You'll only
|
||||||
|
have to do it one time, but it might take a while, depending on the amount of posts your instance has seen. This is also a fairly RAM
|
||||||
|
consuming process for `meilisearch`, and it will take a lot of RAM when running if you have a lot of posts (seems to be around 5G for ~1.2
|
||||||
|
million posts while idle and up to 7G while indexing initially, but your experience may be different).
|
||||||
|
|
||||||
|
The sequence of actions is as follows:
|
||||||
|
|
||||||
|
1. First, change the configuration to use `Pleroma.Search.Meilisearch` as the search backend
|
||||||
|
2. Restart your instance, at this point it can be used while the search indexing is running, though search won't return anything
|
||||||
|
3. Start the initial indexing process (as described below with `index`),
|
||||||
|
and wait until the task says it sent everything from the database to index
|
||||||
|
4. Wait until everything is actually indexed (by checking with `stats` as described below),
|
||||||
|
at this point you don't have to do anything, just wait a while.
|
||||||
|
|
||||||
|
To start the initial indexing, run the `index` command:
|
||||||
|
|
||||||
|
=== "OTP"
|
||||||
|
```sh
|
||||||
|
./bin/pleroma_ctl search.meilisearch index
|
||||||
|
```
|
||||||
|
|
||||||
|
=== "From Source"
|
||||||
|
```sh
|
||||||
|
mix pleroma.search.meilisearch index
|
||||||
|
```
|
||||||
|
|
||||||
|
This will show you the total amount of posts to index, and then show you the amount of posts indexed currently, until the numbers eventually
|
||||||
|
become the same. The posts are indexed in big batches and meilisearch will take some time to actually index them, even after you have
|
||||||
|
inserted all the posts into it. Depending on the amount of posts, this may be as long as several hours. To get information about the status
|
||||||
|
of indexing and how many posts have actually been indexed, use the `stats` command:
|
||||||
|
|
||||||
|
=== "OTP"
|
||||||
|
```sh
|
||||||
|
./bin/pleroma_ctl search.meilisearch stats
|
||||||
|
```
|
||||||
|
|
||||||
|
=== "From Source"
|
||||||
|
```sh
|
||||||
|
mix pleroma.search.meilisearch stats
|
||||||
|
```
|
||||||
|
|
||||||
|
### Clearing the index
|
||||||
|
|
||||||
|
In case you need to clear the index (for example, to re-index from scratch, if that needs to happen for some reason), you can
|
||||||
|
use the `clear` command:
|
||||||
|
|
||||||
|
=== "OTP"
|
||||||
|
```sh
|
||||||
|
./bin/pleroma_ctl search.meilisearch clear
|
||||||
|
```
|
||||||
|
|
||||||
|
=== "From Source"
|
||||||
|
```sh
|
||||||
|
mix pleroma.search.meilisearch clear
|
||||||
|
```
|
||||||
|
|
||||||
|
This will clear **all** the posts from the search index. Note, that deleted posts are also removed from index by the instance itself, so
|
||||||
|
there is no need to actually clear the whole index, unless you want **all** of it gone. That said, the index does not hold any information
|
||||||
|
that cannot be re-created from the database, it should also generally be a lot smaller than the size of your database. Still, the size
|
||||||
|
depends on the amount of text in posts.
|
||||||
|
|
||||||
|
## Elasticsearch
|
||||||
|
|
||||||
|
**Note: This requires at least ElasticSearch 7**
|
||||||
|
|
||||||
|
As with meilisearch, this can be rather memory-hungry, but it is very good at what it does.
|
||||||
|
|
||||||
|
To use [elasticsearch](https://www.elastic.co/), set the search module to `Pleroma.Search.Elasticsearch`:
|
||||||
|
|
||||||
|
> config :pleroma, Pleroma.Search, module: Pleroma.Search.Elasticsearch
|
||||||
|
|
||||||
|
You then need to set the URL and authentication credentials if relevant.
|
||||||
|
|
||||||
|
> config :pleroma, Pleroma.Search.Elasticsearch.Cluster,
|
||||||
|
> url: "http://127.0.0.1:9200/",
|
||||||
|
> username: "elastic",
|
||||||
|
> password: "changeme",
|
||||||
|
|
||||||
|
### Initial indexing
|
||||||
|
|
||||||
|
After setting up the configuration, you'll want to index all of your already existsing posts. Only public posts are indexed. You'll only
|
||||||
|
have to do it one time, but it might take a while, depending on the amount of posts your instance has seen.
|
||||||
|
|
||||||
|
The sequence of actions is as follows:
|
||||||
|
|
||||||
|
1. First, change the configuration to use `Pleroma.Search.Elasticsearch` as the search backend
|
||||||
|
2. Restart your instance, at this point it can be used while the search indexing is running, though search won't return anything
|
||||||
|
3. Start the initial indexing process (as described below with `index`),
|
||||||
|
and wait until the task says it sent everything from the database to index
|
||||||
|
4. Wait until the index tasks exits
|
||||||
|
|
||||||
|
To start the initial indexing, run the `build` command:
|
||||||
|
|
||||||
|
=== "OTP"
|
||||||
|
```sh
|
||||||
|
./bin/pleroma_ctl search import activities
|
||||||
|
```
|
||||||
|
|
||||||
|
=== "From Source"
|
||||||
|
```sh
|
||||||
|
mix pleroma.search import activities
|
||||||
|
```
|
|
@ -1,6 +1,6 @@
|
||||||
# Static Directory
|
# Static Directory
|
||||||
|
|
||||||
Static frontend files are shipped with pleroma. If you want to overwrite or update these without problems during upgrades, you can write your custom versions to the static directory.
|
Static frontend files are shipped with Akkoma. If you want to overwrite or update these without problems during upgrades, you can write your custom versions to the static directory.
|
||||||
|
|
||||||
You can find the location of the static directory in the [configuration](../cheatsheet/#instance).
|
You can find the location of the static directory in the [configuration](../cheatsheet/#instance).
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ You can find the location of the static directory in the [configuration](../chea
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
config :pleroma, :instance,
|
config :pleroma, :instance,
|
||||||
static_dir: "/var/lib/pleroma/static/"
|
static_dir: "/var/lib/akkoma/static/"
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "From Source"
|
=== "From Source"
|
||||||
|
@ -53,7 +53,7 @@ Create and Edit your file at `$static_dir/instance/panel.html`.
|
||||||
|
|
||||||
## Background
|
## Background
|
||||||
|
|
||||||
You can change the background of your Pleroma instance by uploading it to `$static_dir/`, and then changing `background` in [your configuration](../cheatsheet/#frontend_configurations) accordingly.
|
You can change the background of your Akkoma instance by uploading it to `$static_dir/`, and then changing `background` in [your configuration](../cheatsheet/#frontend_configurations) accordingly.
|
||||||
|
|
||||||
E.g. if you put `$static_dir/images/background.jpg`
|
E.g. if you put `$static_dir/images/background.jpg`
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
# Storing Remote Media
|
# Storing Remote Media
|
||||||
|
|
||||||
Pleroma does not store remote/federated media by default. The best way to achieve this is to change Nginx to keep its reverse proxy cache
|
Akkoma does not store remote/federated media by default. The best way to achieve this is to change Nginx to keep its reverse proxy cache
|
||||||
for a year and to activate the `MediaProxyWarmingPolicy` MRF policy in Pleroma which will automatically fetch all media through the proxy
|
for a year and to activate the `MediaProxyWarmingPolicy` MRF policy in Akkoma which will automatically fetch all media through the proxy
|
||||||
as soon as the post is received by your instance.
|
as soon as the post is received by your instance.
|
||||||
|
|
||||||
## Nginx
|
## Nginx
|
||||||
|
|
||||||
```
|
```
|
||||||
proxy_cache_path /long/term/storage/path/pleroma-media-cache levels=1:2
|
proxy_cache_path /long/term/storage/path/akkoma-media-cache levels=1:2
|
||||||
keys_zone=pleroma_media_cache:10m inactive=1y use_temp_path=off;
|
keys_zone=akkoma_media_cache:10m inactive=1y use_temp_path=off;
|
||||||
|
|
||||||
location ~ ^/(media|proxy) {
|
location ~ ^/(media|proxy) {
|
||||||
proxy_cache pleroma_media_cache;
|
proxy_cache akkoma_media_cache;
|
||||||
slice 1m;
|
slice 1m;
|
||||||
proxy_cache_key $host$uri$is_args$args$slice_range;
|
proxy_cache_key $host$uri$is_args$args$slice_range;
|
||||||
proxy_set_header Range $slice_range;
|
proxy_set_header Range $slice_range;
|
||||||
|
@ -28,7 +28,7 @@ as soon as the post is received by your instance.
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Pleroma
|
## Akkoma
|
||||||
|
|
||||||
Add to your `prod.secret.exs`:
|
Add to your `prod.secret.exs`:
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ This is an awkward setup for a few reasons:
|
||||||
- The standard `Status` format of implicit addressing also leads to rather ugly results if you try to display the messages as a chat, because all the recipients are always mentioned by name in the message.
|
- The standard `Status` format of implicit addressing also leads to rather ugly results if you try to display the messages as a chat, because all the recipients are always mentioned by name in the message.
|
||||||
- As direct messages are posted with the same api call (and usually same frontend component) as public messages, accidentally making a public message private or vice versa can happen easily. Client bugs can also lead to this, accidentally making private messages public.
|
- As direct messages are posted with the same api call (and usually same frontend component) as public messages, accidentally making a public message private or vice versa can happen easily. Client bugs can also lead to this, accidentally making private messages public.
|
||||||
|
|
||||||
As a measure to improve this situation, the `Conversation` concept and related Pleroma extensions were introduced. While it made it possible to work around a few of the issues, many of the problems remained and it didn't see much adoption because it was too complicated to use correctly.
|
As a measure to improve this situation, the `Conversation` concept and related Akkoma extensions were introduced. While it made it possible to work around a few of the issues, many of the problems remained and it didn't see much adoption because it was too complicated to use correctly.
|
||||||
|
|
||||||
## Chats explained
|
## Chats explained
|
||||||
For this reasons, Chats are a new and different entity, both in the API as well as in ActivityPub. A quick overview:
|
For this reasons, Chats are a new and different entity, both in the API as well as in ActivityPub. A quick overview:
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# Differences in Mastodon API responses from vanilla Mastodon
|
# Differences in Mastodon API responses from vanilla Mastodon
|
||||||
|
|
||||||
A Pleroma instance can be identified by "<Mastodon version> (compatible; Pleroma <version>)" present in `version` field in response from `/api/v1/instance`
|
A Akkoma instance can be identified by "<Mastodon version> (compatible; Pleroma <version>)" present in `version` field in response from `/api/v1/instance`
|
||||||
|
|
||||||
## Flake IDs
|
## Flake IDs
|
||||||
|
|
||||||
Pleroma uses 128-bit ids as opposed to Mastodon's 64 bits. However, just like Mastodon's ids, they are lexically sortable strings
|
Akkoma uses 128-bit ids as opposed to Mastodon's 64 bits. However, just like Mastodon's ids, they are lexically sortable strings
|
||||||
|
|
||||||
## Timelines
|
## Timelines
|
||||||
|
|
||||||
|
@ -54,11 +54,11 @@ Has these additional fields under the `pleroma` object:
|
||||||
|
|
||||||
### Attachment cap
|
### Attachment cap
|
||||||
|
|
||||||
Some apps operate under the assumption that no more than 4 attachments can be returned or uploaded. Pleroma however does not enforce any limits on attachment count neither when returning the status object nor when posting.
|
Some apps operate under the assumption that no more than 4 attachments can be returned or uploaded. Akkoma however does not enforce any limits on attachment count neither when returning the status object nor when posting.
|
||||||
|
|
||||||
### Limitations
|
### Limitations
|
||||||
|
|
||||||
Pleroma does not process remote images and therefore cannot include fields such as `meta` and `blurhash`. It does not support focal points or aspect ratios. The frontend is expected to handle it.
|
Akkoma does not process remote images and therefore cannot include fields such as `meta` and `blurhash`. It does not support focal points or aspect ratios. The frontend is expected to handle it.
|
||||||
|
|
||||||
## Accounts
|
## Accounts
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ Has these additional fields under the `pleroma` object:
|
||||||
- `hide_followers_count`: boolean, true when the user has follower stat hiding enabled
|
- `hide_followers_count`: boolean, true when the user has follower stat hiding enabled
|
||||||
- `hide_follows_count`: boolean, true when the user has follow stat hiding enabled
|
- `hide_follows_count`: boolean, true when the user has follow stat hiding enabled
|
||||||
- `settings_store`: A generic map of settings for frontends. Opaque to the backend. Only returned in `/api/v1/accounts/verify_credentials` and `/api/v1/accounts/update_credentials`
|
- `settings_store`: A generic map of settings for frontends. Opaque to the backend. Only returned in `/api/v1/accounts/verify_credentials` and `/api/v1/accounts/update_credentials`
|
||||||
- `chat_token`: The token needed for Pleroma shoutbox. Only returned in `/api/v1/accounts/verify_credentials`
|
- `chat_token`: The token needed for Akkoma shoutbox. Only returned in `/api/v1/accounts/verify_credentials`
|
||||||
- `deactivated`: boolean, true when the user is deactivated
|
- `deactivated`: boolean, true when the user is deactivated
|
||||||
- `allow_following_move`: boolean, true when the user allows automatically follow moved following accounts
|
- `allow_following_move`: boolean, true when the user allows automatically follow moved following accounts
|
||||||
- `unread_conversation_count`: The count of unread conversations. Only returned to the account owner.
|
- `unread_conversation_count`: The count of unread conversations. Only returned to the account owner.
|
||||||
|
@ -241,12 +241,13 @@ Additional parameters can be added to the JSON body/Form data:
|
||||||
- `discoverable` - if true, external services (search bots) etc. are allowed to index / list the account (regardless of this setting, user will still appear in regular search results).
|
- `discoverable` - if true, external services (search bots) etc. are allowed to index / list the account (regardless of this setting, user will still appear in regular search results).
|
||||||
- `actor_type` - the type of this account.
|
- `actor_type` - the type of this account.
|
||||||
- `accepts_chat_messages` - if false, this account will reject all chat messages.
|
- `accepts_chat_messages` - if false, this account will reject all chat messages.
|
||||||
|
- `language` - user's preferred language for receiving emails (digest, confirmation, etc.)
|
||||||
|
|
||||||
All images (avatar, banner and background) can be reset to the default by sending an empty string ("") instead of a file.
|
All images (avatar, banner and background) can be reset to the default by sending an empty string ("") instead of a file.
|
||||||
|
|
||||||
### Pleroma Settings Store
|
### Akkoma Settings Store
|
||||||
|
|
||||||
Pleroma has mechanism that allows frontends to save blobs of json for each user on the backend. This can be used to save frontend-specific settings for a user that the backend does not need to know about.
|
Akkoma has mechanism that allows frontends to save blobs of json for each user on the backend. This can be used to save frontend-specific settings for a user that the backend does not need to know about.
|
||||||
|
|
||||||
The parameter should have a form of `{frontend_name: {...}}`, with `frontend_name` identifying your type of client, e.g. `pleroma_fe`. It will overwrite everything under this property, but will not overwrite other frontend's settings.
|
The parameter should have a form of `{frontend_name: {...}}`, with `frontend_name` identifying your type of client, e.g. `pleroma_fe`. It will overwrite everything under this property, but will not overwrite other frontend's settings.
|
||||||
|
|
||||||
|
@ -254,7 +255,7 @@ This information is returned in the `/api/v1/accounts/verify_credentials` endpoi
|
||||||
|
|
||||||
## Authentication
|
## Authentication
|
||||||
|
|
||||||
*Pleroma supports refreshing tokens.*
|
*Akkoma supports refreshing tokens.*
|
||||||
|
|
||||||
### POST `/oauth/token`
|
### POST `/oauth/token`
|
||||||
|
|
||||||
|
@ -277,14 +278,14 @@ To obtain a token from a user's password, pass `grant_type=password` with the fo
|
||||||
|
|
||||||
Additional fields are returned in the response:
|
Additional fields are returned in the response:
|
||||||
|
|
||||||
- `id`: The primary key of this token in Pleroma's database.
|
- `id`: The primary key of this token in Akkoma's database.
|
||||||
- `me` (user tokens only): The ActivityPub ID of the user who owns the token.
|
- `me` (user tokens only): The ActivityPub ID of the user who owns the token.
|
||||||
|
|
||||||
## Account Registration
|
## Account Registration
|
||||||
|
|
||||||
`POST /api/v1/accounts`
|
`POST /api/v1/accounts`
|
||||||
|
|
||||||
Has these additional parameters (which are the same as in Pleroma-API):
|
Has these additional parameters (which are the same as in Akkoma-API):
|
||||||
|
|
||||||
- `fullname`: optional
|
- `fullname`: optional
|
||||||
- `bio`: optional
|
- `bio`: optional
|
||||||
|
@ -292,6 +293,7 @@ Has these additional parameters (which are the same as in Pleroma-API):
|
||||||
- `captcha_token`: optional, contains provider-specific captcha token
|
- `captcha_token`: optional, contains provider-specific captcha token
|
||||||
- `captcha_answer_data`: optional, contains provider-specific captcha data
|
- `captcha_answer_data`: optional, contains provider-specific captcha data
|
||||||
- `token`: invite token required when the registrations aren't public.
|
- `token`: invite token required when the registrations aren't public.
|
||||||
|
- `language`: optional, user's preferred language for receiving emails (digest, confirmation, etc.), default to the language set in the `userLanguage` cookies or `Accept-Language` header.
|
||||||
|
|
||||||
## Instance
|
## Instance
|
||||||
|
|
||||||
|
@ -340,7 +342,7 @@ For viewing remote server timelines, there are `public:remote` and `public:remot
|
||||||
|
|
||||||
### Follow relationships updates
|
### Follow relationships updates
|
||||||
|
|
||||||
Pleroma streams follow relationships updates as `pleroma:follow_relationships_update` events to the `user` stream.
|
Akkoma streams follow relationships updates as `pleroma:follow_relationships_update` events to the `user` stream.
|
||||||
|
|
||||||
The message payload consist of:
|
The message payload consist of:
|
||||||
|
|
||||||
|
@ -357,7 +359,7 @@ Both user muting and thread muting can be done for only a certain time by adding
|
||||||
|
|
||||||
## Not implemented
|
## Not implemented
|
||||||
|
|
||||||
Pleroma is generally compatible with the Mastodon 2.7.2 API, but some newer features and non-essential features are omitted. These features usually return an HTTP 200 status code, but with an empty response. While they may be added in the future, they are considered low priority.
|
Akkoma is generally compatible with the Mastodon 2.7.2 API, but some newer features and non-essential features are omitted. These features usually return an HTTP 200 status code, but with an empty response. While they may be added in the future, they are considered low priority.
|
||||||
|
|
||||||
### Suggestions
|
### Suggestions
|
||||||
|
|
||||||
|
|
|
@ -330,8 +330,8 @@ See also [the Nodeinfo standard](https://nodeinfo.diaspora.software/).
|
||||||
},
|
},
|
||||||
"software":{
|
"software":{
|
||||||
"name":"pleroma",
|
"name":"pleroma",
|
||||||
"repository":"https://git.pleroma.social/pleroma/pleroma",
|
"repository":"https://akkoma.dev/AkkomaGang/akkoma",
|
||||||
"version":"2.4.1"
|
"version":"2.5.2"
|
||||||
},
|
},
|
||||||
"usage":{
|
"usage":{
|
||||||
"localPosts":27,
|
"localPosts":27,
|
||||||
|
|
|
@ -342,6 +342,36 @@ See [Admin-API](admin_api.md)
|
||||||
* Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
|
* Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
|
||||||
* Note: Currently, Mastodon has no API for changing email. If they add it in future it might be incompatible with Pleroma.
|
* Note: Currently, Mastodon has no API for changing email. If they add it in future it might be incompatible with Pleroma.
|
||||||
|
|
||||||
|
## `/api/pleroma/move_account`
|
||||||
|
### Move account
|
||||||
|
* Method `POST`
|
||||||
|
* Authentication: required
|
||||||
|
* Params:
|
||||||
|
* `password`: user's password
|
||||||
|
* `target_account`: the nickname of the target account (e.g. `foo@example.org`)
|
||||||
|
* Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
|
||||||
|
* Note: This endpoint emits a `Move` activity to all followers of the current account. Some remote servers will automatically unfollow the current account and follow the target account upon seeing this, but this depends on the remote server implementation and cannot be guaranteed. For local followers , they will automatically unfollow and follow if and only if they have set the `allow_following_move` preference ("Allow auto-follow when following account moves").
|
||||||
|
|
||||||
|
## `/api/pleroma/aliases`
|
||||||
|
### Get aliases of the current account
|
||||||
|
* Method `GET`
|
||||||
|
* Authentication: required
|
||||||
|
* Response: JSON. Returns `{"aliases": [alias, ...]}`, where `alias` is the nickname of an alias, e.g. `foo@example.org`.
|
||||||
|
|
||||||
|
### Add alias to the current account
|
||||||
|
* Method `PUT`
|
||||||
|
* Authentication: required
|
||||||
|
* Params:
|
||||||
|
* `alias`: the nickname of the alias to add, e.g. `foo@example.org`.
|
||||||
|
* Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
|
||||||
|
|
||||||
|
### Delete alias from the current account
|
||||||
|
* Method `DELETE`
|
||||||
|
* Authentication: required
|
||||||
|
* Params:
|
||||||
|
* `alias`: the nickname of the alias to delete, e.g. `foo@example.org`.
|
||||||
|
* Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
|
||||||
|
|
||||||
# Pleroma Conversations
|
# Pleroma Conversations
|
||||||
|
|
||||||
Pleroma Conversations have the same general structure that Mastodon Conversations have. The behavior differs in the following ways when using these endpoints:
|
Pleroma Conversations have the same general structure that Mastodon Conversations have. The behavior differs in the following ways when using these endpoints:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Prometheus Metrics
|
# Prometheus Metrics
|
||||||
|
|
||||||
Pleroma includes support for exporting metrics via the [prometheus_ex](https://github.com/deadtrickster/prometheus.ex) library.
|
Akkoma includes support for exporting metrics via the [prometheus_ex](https://github.com/deadtrickster/prometheus.ex) library.
|
||||||
|
|
||||||
Config example:
|
Config example:
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ config :prometheus, Pleroma.Web.Endpoint.MetricsExporter,
|
||||||
format: :text
|
format: :text
|
||||||
```
|
```
|
||||||
|
|
||||||
* `enabled` (Pleroma extension) enables the endpoint
|
* `enabled` (Akkoma extension) enables the endpoint
|
||||||
* `ip_whitelist` (Pleroma extension) could be used to restrict access only to specified IPs
|
* `ip_whitelist` (Akkoma extension) could be used to restrict access only to specified IPs
|
||||||
* `auth` sets the authentication (`false` for no auth; configurable to HTTP Basic Auth, see [prometheus-plugs](https://github.com/deadtrickster/prometheus-plugs#exporting) documentation)
|
* `auth` sets the authentication (`false` for no auth; configurable to HTTP Basic Auth, see [prometheus-plugs](https://github.com/deadtrickster/prometheus-plugs#exporting) documentation)
|
||||||
* `format` sets the output format (`:text` or `:protobuf`)
|
* `format` sets the output format (`:text` or `:protobuf`)
|
||||||
* `path` sets the path to app metrics page
|
* `path` sets the path to app metrics page
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## OAuth token-based authentication & authorization
|
## OAuth token-based authentication & authorization
|
||||||
|
|
||||||
* Pleroma supports hierarchical OAuth scopes, just like Mastodon but with added granularity of admin scopes. For a reference, see [Mastodon OAuth scopes](https://docs.joinmastodon.org/api/oauth-scopes/).
|
* Akkoma supports hierarchical OAuth scopes, just like Mastodon but with added granularity of admin scopes. For a reference, see [Mastodon OAuth scopes](https://docs.joinmastodon.org/api/oauth-scopes/).
|
||||||
|
|
||||||
* It is important to either define OAuth scope restrictions or explicitly mark OAuth scope check as skipped, for every controller action. To define scopes, call `plug(Pleroma.Web.Plugs.OAuthScopesPlug, %{scopes: [...]})`. To explicitly set OAuth scopes check skipped, call `plug(:skip_plug, Pleroma.Web.Plugs.OAuthScopesPlug <when ...>)`.
|
* It is important to either define OAuth scope restrictions or explicitly mark OAuth scope check as skipped, for every controller action. To define scopes, call `plug(Pleroma.Web.Plugs.OAuthScopesPlug, %{scopes: [...]})`. To explicitly set OAuth scopes check skipped, call `plug(:skip_plug, Pleroma.Web.Plugs.OAuthScopesPlug <when ...>)`.
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
# Setting up a Pleroma development environment
|
# Setting up a Akkoma development environment
|
||||||
|
|
||||||
Pleroma requires some adjustments from the defaults for running the instance locally. The following should help you to get started.
|
Akkoma requires some adjustments from the defaults for running the instance locally. The following should help you to get started.
|
||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|
||||||
1. Install Pleroma as explained in [the docs](../installation/debian_based_en.md), with some exceptions:
|
1. Install Akkoma as explained in [the docs](../installation/debian_based_en.md), with some exceptions:
|
||||||
* You can use your own fork of the repository and add pleroma as a remote `git remote add pleroma 'https://git.pleroma.social/pleroma/pleroma'`
|
* 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 skip systemd and nginx and all that stuff
|
* You can skip systemd and nginx and all that stuff
|
||||||
* No need to create a dedicated pleroma user, it's easier to just use your own user
|
* No need to create a dedicated akkoma user, it's easier to just use your own user
|
||||||
* For the DB you can still choose a dedicated user, the mix tasks set it up for you so it's no extra work for you
|
* For the DB you can still choose a dedicated user, the mix tasks set it up for you so it's no extra work for you
|
||||||
* For domain you can use `localhost`
|
* For domain you can use `localhost`
|
||||||
* instead of creating a `prod.secret.exs`, create `dev.secret.exs`
|
* instead of creating a `prod.secret.exs`, create `dev.secret.exs`
|
||||||
|
@ -40,13 +40,13 @@ config :logger, :console,
|
||||||
|
|
||||||
1. Create a `test.secret.exs` file with the content as shown below
|
1. Create a `test.secret.exs` file with the content as shown below
|
||||||
2. Create the database user and test database.
|
2. Create the database user and test database.
|
||||||
1. You can use the `config/setup_db.psql` as a template. Copy the file if you want and change the database name, user and password to the values for the test-database (e.g. 'pleroma_local_test' for database and user). Then run this file like you did during installation.
|
1. You can use the `config/setup_db.psql` as a template. Copy the file if you want and change the database name, user and password to the values for the test-database (e.g. 'akkoma_local_test' for database and user). Then run this file like you did during installation.
|
||||||
2. The tests will try to create the Database, so we'll have to allow our test-database user to create databases, `sudo -Hu postgres psql -c "ALTER USER pleroma_local_test WITH CREATEDB;"`
|
2. The tests will try to create the Database, so we'll have to allow our test-database user to create databases, `sudo -Hu postgres psql -c "ALTER USER akkoma_local_test WITH CREATEDB;"`
|
||||||
3. Run the tests with `mix test`. The tests should succeed.
|
3. Run the tests with `mix test`. The tests should succeed.
|
||||||
|
|
||||||
Example content for the `test.secret.exs` file. Feel free to use another user, database name or password, just make sure the database is dedicated for the testing environment.
|
Example content for the `test.secret.exs` file. Feel free to use another user, database name or password, just make sure the database is dedicated for the testing environment.
|
||||||
```elixir
|
```elixir
|
||||||
# Pleroma test configuration
|
# Akkoma test configuration
|
||||||
|
|
||||||
# NOTE: This file should not be committed to a repo or otherwise made public
|
# NOTE: This file should not be committed to a repo or otherwise made public
|
||||||
# without removing sensitive information.
|
# without removing sensitive information.
|
||||||
|
@ -54,17 +54,17 @@ Example content for the `test.secret.exs` file. Feel free to use another user, d
|
||||||
import Config
|
import Config
|
||||||
|
|
||||||
config :pleroma, Pleroma.Repo,
|
config :pleroma, Pleroma.Repo,
|
||||||
username: "pleroma_local_test",
|
username: "akkoma_local_test",
|
||||||
password: "mysuperduperpassword",
|
password: "mysuperduperpassword",
|
||||||
database: "pleroma_local_test",
|
database: "akkoma_local_test",
|
||||||
hostname: "localhost"
|
hostname: "localhost"
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Updating
|
## Updating
|
||||||
|
|
||||||
Update Pleroma as explained in [the docs](../administration/updating.md). Just make sure you pull from upstream and not from your own fork.
|
Update Akkoma as explained in [the docs](../administration/updating.md). Just make sure you pull from upstream and not from your own fork.
|
||||||
|
|
||||||
## Working on multiple branches
|
## Working on multiple branches
|
||||||
|
|
||||||
If you develop on a separate branch, it's possible you did migrations that aren't merged into another branch you're working on. If you have multiple things you're working on, it's probably best to set up multiple pleroma's each with their own database. If you finished with a branch and want to switch back to develop to start a new branch from there, you can drop the database and recreate the database (e.g. by using `config/setup_db.psql`). The commands to drop and recreate the database can be found in [the docs](../administration/backup.md).
|
If you develop on a separate branch, it's possible you did migrations that aren't merged into another branch you're working on. If you have multiple things you're working on, it's probably best to set up multiple Akkoma instances each with their own database. If you finished with a branch and want to switch back to develop to start a new branch from there, you can drop the database and recreate the database (e.g. by using `config/setup_db.psql`). The commands to drop and recreate the database can be found in [the docs](../administration/backup.md).
|
|
@ -1,26 +1,28 @@
|
||||||
# Introduction to Pleroma
|
**Note:** Akkoma documentation is still being updated, so you may still see references to Pleroma in many places.
|
||||||
## What is Pleroma?
|
|
||||||
Pleroma is a federated social networking platform, compatible with Mastodon and other ActivityPub implementations. It is free software licensed under the AGPLv3.
|
# Introduction to Akkoma
|
||||||
It actually consists of two components: a backend, named simply Pleroma, and a user-facing frontend, named Pleroma-FE. It also includes the Mastodon frontend, if that's your thing.
|
## What is Akkoma?
|
||||||
|
Akkoma is a federated social networking platform, compatible with Mastodon and other ActivityPub implementations. It is free software licensed under the AGPLv3.
|
||||||
|
It actually consists of two components: a backend, named simply Akkoma, and a user-facing frontend, named Pleroma-FE. It also includes the Mastodon frontend, if that's your thing.
|
||||||
It's part of what we call the fediverse, a federated network of instances which speak common protocols and can communicate with each other.
|
It's part of what we call the fediverse, a federated network of instances which speak common protocols and can communicate with each other.
|
||||||
One account on an instance is enough to talk to the entire fediverse!
|
One account on an instance is enough to talk to the entire fediverse!
|
||||||
|
|
||||||
## How can I use it?
|
## How can I use it?
|
||||||
|
|
||||||
Pleroma instances are already widely deployed, a list can be found at <https://the-federation.info/pleroma> and <https://fediverse.network/pleroma>.
|
Akkoma instances are already widely deployed, a list can be found at <https://the-federation.info/pleroma> and <https://fediverse.network/pleroma>.
|
||||||
|
|
||||||
If you don't feel like joining an existing instance, but instead prefer to deploy your own instance, that's easy too!
|
If you don't feel like joining an existing instance, but instead prefer to deploy your own instance, that's easy too!
|
||||||
Installation instructions can be found in the installation section of these docs.
|
Installation instructions can be found in the installation section of these docs.
|
||||||
|
|
||||||
## I got an account, now what?
|
## I got an account, now what?
|
||||||
Great! Now you can explore the fediverse! Open the login page for your Pleroma instance (e.g. <https://pleroma.soykaf.com>) and login with your username and password. (If you don't have an account yet, click on Register)
|
Great! Now you can explore the fediverse! Open the login page for your Akkoma instance (e.g. <https://pleroma.soykaf.com>) and login with your username and password. (If you don't have an account yet, click on Register)
|
||||||
|
|
||||||
### Pleroma-FE
|
### Pleroma-FE
|
||||||
The default front-end used by Pleroma is Pleroma-FE. You can find more information on what it is and how to use it in the [Introduction to Pleroma-FE](../frontend).
|
The default front-end used by Akkoma is Pleroma-FE. You can find more information on what it is and how to use it in the [Introduction to Pleroma-FE](../frontend).
|
||||||
|
|
||||||
### Mastodon interface
|
### Mastodon interface
|
||||||
If the Pleroma interface isn't your thing, or you're just trying something new but you want to keep using the familiar Mastodon interface, we got that too!
|
If the Pleroma-FE interface isn't your thing, or you're just trying something new but you want to keep using the familiar Mastodon interface, we got that too!
|
||||||
Just add a "/web" after your instance url (e.g. <https://pleroma.soykaf.com/web>) and you'll end on the Mastodon web interface, but with a Pleroma backend! MAGIC!
|
Just add a "/web" after your instance url (e.g. <https://pleroma.soykaf.com/web>) and you'll end on the Mastodon web interface, but with a Akkoma backend! MAGIC!
|
||||||
The Mastodon interface is from the Glitch-soc fork. For more information on the Mastodon interface you can check the [Mastodon](https://docs.joinmastodon.org/) and [Glitch-soc](https://glitch-soc.github.io/docs/) documentation.
|
The Mastodon interface is from the Glitch-soc fork. For more information on the Mastodon interface you can check the [Mastodon](https://docs.joinmastodon.org/) and [Glitch-soc](https://glitch-soc.github.io/docs/) documentation.
|
||||||
|
|
||||||
Remember, what you see is only the frontend part of Mastodon, the backend is still Pleroma.
|
Remember, what you see is only the frontend part of Mastodon, the backend is still Akkoma.
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
This guide is a step-by-step installation guide for Alpine Linux. The instructions were verified against Alpine v3.10 standard image. You might miss additional dependencies if you use `netboot` instead.
|
This guide is a step-by-step installation guide for Alpine Linux. The instructions were verified against Alpine v3.10 standard image. You might miss additional dependencies if you use `netboot` instead.
|
||||||
|
|
||||||
It assumes that you have administrative rights, either as root or a user with [sudo permissions](https://www.linode.com/docs/tools-reference/custom-kernels-distros/install-alpine-linux-on-your-linode/#configuration). If you want to run this guide with root, ignore the `sudo` at the beginning of the lines, unless it calls a user like `sudo -Hu pleroma`; in this case, use `su -l <username> -s $SHELL -c 'command'` instead.
|
It assumes that you have administrative rights, either as root or a user with [sudo permissions](https://www.linode.com/docs/tools-reference/custom-kernels-distros/install-alpine-linux-on-your-linode/#configuration). If you want to run this guide with root, ignore the `sudo` at the beginning of the lines, unless it calls a user like `sudo -Hu akkoma`; in this case, use `su -l <username> -s $SHELL -c 'command'` instead.
|
||||||
|
|
||||||
{! backend/installation/generic_dependencies.include !}
|
{! backend/installation/generic_dependencies.include !}
|
||||||
|
|
||||||
|
@ -71,46 +71,46 @@ sudo rc-update add postgresql
|
||||||
sudo apk add ffmpeg imagemagick exiftool
|
sudo apk add ffmpeg imagemagick exiftool
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install PleromaBE
|
### Install AkkomaBE
|
||||||
|
|
||||||
* Add a new system user for the Pleroma service:
|
* Add a new system user for the Akkoma service:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo addgroup pleroma
|
sudo addgroup akkoma
|
||||||
sudo adduser -S -s /bin/false -h /opt/pleroma -H -G pleroma pleroma
|
sudo adduser -S -s /bin/false -h /opt/akkoma -H -G akkoma akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note**: To execute a single command as the Pleroma system user, use `sudo -Hu pleroma command`. You can also switch to a shell by using `sudo -Hu pleroma $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 pleroma -s $SHELL -c 'command'` and `su -l pleroma -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 PleromaBE repository and make the Pleroma user the owner of the directory:
|
* Git clone the AkkomaBE repository and make the Akkoma user the owner of the directory:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo mkdir -p /opt/pleroma
|
sudo mkdir -p /opt/akkoma
|
||||||
sudo chown -R pleroma:pleroma /opt/pleroma
|
sudo chown -R akkoma:akkoma /opt/akkoma
|
||||||
sudo -Hu pleroma git clone -b stable https://git.pleroma.social/pleroma/pleroma /opt/pleroma
|
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git /opt/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
* Change to the new directory:
|
* Change to the new directory:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd /opt/pleroma
|
cd /opt/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
* Install the dependencies for Pleroma and answer with `yes` if it asks you to install `Hex`:
|
* Install the dependencies for Akkoma and answer with `yes` if it asks you to install `Hex`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma mix deps.get
|
sudo -Hu akkoma mix deps.get
|
||||||
```
|
```
|
||||||
|
|
||||||
* Generate the configuration: `sudo -Hu pleroma MIX_ENV=prod mix pleroma.instance gen`
|
* Generate the configuration: `sudo -Hu akkoma MIX_ENV=prod mix pleroma.instance gen`
|
||||||
* Answer with `yes` if it asks you to install `rebar3`.
|
* Answer with `yes` if it asks you to install `rebar3`.
|
||||||
* This may take some time, because parts of pleroma get compiled first.
|
* This may take some time, because parts of akkoma get compiled first.
|
||||||
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
||||||
|
|
||||||
* Check the configuration and if all looks right, rename it, so Pleroma will load it (`prod.secret.exs` for productive instance, `dev.secret.exs` for development instances):
|
* Check the configuration and if all looks right, rename it, so Akkoma will load it (`prod.secret.exs` for productive instance, `dev.secret.exs` for development instances):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma mv config/{generated_config.exs,prod.secret.exs}
|
sudo -Hu akkoma mv config/{generated_config.exs,prod.secret.exs}
|
||||||
```
|
```
|
||||||
|
|
||||||
* The previous command creates also the file `config/setup_db.psql`, with which you can create the database:
|
* The previous command creates also the file `config/setup_db.psql`, with which you can create the database:
|
||||||
|
@ -122,18 +122,18 @@ sudo -Hu postgres psql -f config/setup_db.psql
|
||||||
* Now run the database migration:
|
* Now run the database migration:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix ecto.migrate
|
sudo -Hu akkoma MIX_ENV=prod mix ecto.migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
* Now you can start Pleroma already
|
* Now you can start Akkoma already
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix phx.server
|
sudo -Hu akkoma MIX_ENV=prod mix phx.server
|
||||||
```
|
```
|
||||||
|
|
||||||
### Finalize installation
|
### Finalize installation
|
||||||
|
|
||||||
If you want to open your newly installed instance to the world, you should run nginx or some other webserver/proxy in front of Pleroma and you should consider to create an OpenRC service file for Pleroma.
|
If you want to open your newly installed instance to the world, you should run nginx or some other webserver/proxy in front of Akkoma and you should consider to create an OpenRC service file for Akkoma.
|
||||||
|
|
||||||
#### Nginx
|
#### Nginx
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ If that doesn’t work, make sure, that nginx is not already running. If it stil
|
||||||
* Copy the example nginx configuration to the nginx folder
|
* Copy the example nginx configuration to the nginx folder
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/conf.d/pleroma.conf
|
sudo cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/conf.d/akkoma.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
* Before starting nginx edit the configuration and change it to your needs. You must change change `server_name` and the paths to the certificates. You can use `nano` (install with `apk add nano` if missing).
|
* Before starting nginx edit the configuration and change it to your needs. You must change change `server_name` and the paths to the certificates. You can use `nano` (install with `apk add nano` if missing).
|
||||||
|
@ -202,13 +202,13 @@ sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --webroot -w /
|
||||||
* Copy example service file:
|
* Copy example service file:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo cp /opt/pleroma/installation/init.d/pleroma /etc/init.d/pleroma
|
sudo cp /opt/akkoma/installation/init.d/akkoma /etc/init.d/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
* Make sure to start it during the boot
|
* Make sure to start it during the boot
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo rc-update add pleroma
|
sudo rc-update add akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Create your first user
|
#### Create your first user
|
||||||
|
@ -216,13 +216,12 @@ sudo rc-update add pleroma
|
||||||
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
sudo -Hu akkoma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Further reading
|
#### Further reading
|
||||||
|
|
||||||
{! backend/installation/further_reading.include !}
|
{! backend/installation/further_reading.include !}
|
||||||
|
|
||||||
## Questions
|
## Questions
|
||||||
|
|
||||||
Questions about the installation or didn’t it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC.
|
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
This guide will assume that you have administrative rights, either as root or a user with [sudo permissions](https://wiki.archlinux.org/index.php/Sudo). If you want to run this guide with root, ignore the `sudo` at the beginning of the lines, unless it calls a user like `sudo -Hu pleroma`; in this case, use `su <username> -s $SHELL -c 'command'` instead.
|
This guide will assume that you have administrative rights, either as root or a user with [sudo permissions](https://wiki.archlinux.org/index.php/Sudo). If you want to run this guide with root, ignore the `sudo` at the beginning of the lines, unless it calls a user like `sudo -Hu akkoma`; in this case, use `su <username> -s $SHELL -c 'command'` instead.
|
||||||
|
|
||||||
### Required packages
|
### Required packages
|
||||||
|
|
||||||
|
@ -65,45 +65,45 @@ sudo systemctl enable --now postgresql.service
|
||||||
sudo pacman -S ffmpeg imagemagick perl-image-exiftool
|
sudo pacman -S ffmpeg imagemagick perl-image-exiftool
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install PleromaBE
|
### Install AkkomaBE
|
||||||
|
|
||||||
* Add a new system user for the Pleroma service:
|
* Add a new system user for the Akkoma service:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo useradd -r -s /bin/false -m -d /var/lib/pleroma -U pleroma
|
sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note**: To execute a single command as the Pleroma system user, use `sudo -Hu pleroma command`. You can also switch to a shell by using `sudo -Hu pleroma $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 pleroma -s $SHELL -c 'command'` and `su -l pleroma -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 PleromaBE repository and make the Pleroma user the owner of the directory:
|
* Git clone the AkkomaBE repository and make the Akkoma user the owner of the directory:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo mkdir -p /opt/pleroma
|
sudo mkdir -p /opt/akkoma
|
||||||
sudo chown -R pleroma:pleroma /opt/pleroma
|
sudo chown -R akkoma:akkoma /opt/akkoma
|
||||||
sudo -Hu pleroma git clone -b stable https://git.pleroma.social/pleroma/pleroma /opt/pleroma
|
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git /opt/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
* Change to the new directory:
|
* Change to the new directory:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd /opt/pleroma
|
cd /opt/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
* Install the dependencies for Pleroma and answer with `yes` if it asks you to install `Hex`:
|
* Install the dependencies for Akkoma and answer with `yes` if it asks you to install `Hex`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma mix deps.get
|
sudo -Hu akkoma mix deps.get
|
||||||
```
|
```
|
||||||
|
|
||||||
* Generate the configuration: `sudo -Hu pleroma MIX_ENV=prod mix pleroma.instance gen`
|
* Generate the configuration: `sudo -Hu akkoma MIX_ENV=prod mix pleroma.instance gen`
|
||||||
* Answer with `yes` if it asks you to install `rebar3`.
|
* Answer with `yes` if it asks you to install `rebar3`.
|
||||||
* This may take some time, because parts of pleroma get compiled first.
|
* This may take some time, because parts of akkoma get compiled first.
|
||||||
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
||||||
|
|
||||||
* Check the configuration and if all looks right, rename it, so Pleroma will load it (`prod.secret.exs` for productive instance, `dev.secret.exs` for development instances):
|
* Check the configuration and if all looks right, rename it, so Akkoma will load it (`prod.secret.exs` for productive instance, `dev.secret.exs` for development instances):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma mv config/{generated_config.exs,prod.secret.exs}
|
sudo -Hu akkoma mv config/{generated_config.exs,prod.secret.exs}
|
||||||
```
|
```
|
||||||
|
|
||||||
* The previous command creates also the file `config/setup_db.psql`, with which you can create the database:
|
* The previous command creates also the file `config/setup_db.psql`, with which you can create the database:
|
||||||
|
@ -115,18 +115,18 @@ sudo -Hu postgres psql -f config/setup_db.psql
|
||||||
* Now run the database migration:
|
* Now run the database migration:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix ecto.migrate
|
sudo -Hu akkoma MIX_ENV=prod mix ecto.migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
* Now you can start Pleroma already
|
* Now you can start Akkoma already
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix phx.server
|
sudo -Hu akkoma MIX_ENV=prod mix phx.server
|
||||||
```
|
```
|
||||||
|
|
||||||
### Finalize installation
|
### Finalize installation
|
||||||
|
|
||||||
If you want to open your newly installed instance to the world, you should run nginx or some other webserver/proxy in front of Pleroma and you should consider to create a systemd service file for Pleroma.
|
If you want to open your newly installed instance to the world, you should run nginx or some other webserver/proxy in front of Akkoma and you should consider to create a systemd service file for Akkoma.
|
||||||
|
|
||||||
#### Nginx
|
#### Nginx
|
||||||
|
|
||||||
|
@ -168,8 +168,8 @@ If that doesn’t work, make sure, that nginx is not already running. If it stil
|
||||||
* Copy the example nginx configuration and activate it:
|
* Copy the example nginx configuration and activate it:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.nginx
|
sudo cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/sites-available/akkoma.nginx
|
||||||
sudo ln -s /etc/nginx/sites-available/pleroma.nginx /etc/nginx/sites-enabled/pleroma.nginx
|
sudo ln -s /etc/nginx/sites-available/akkoma.nginx /etc/nginx/sites-enabled/akkoma.nginx
|
||||||
```
|
```
|
||||||
|
|
||||||
* Before starting nginx edit the configuration and change it to your needs (e.g. change servername, change cert paths)
|
* Before starting nginx edit the configuration and change it to your needs (e.g. change servername, change cert paths)
|
||||||
|
@ -187,21 +187,21 @@ sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --webroot -w /
|
||||||
|
|
||||||
#### Other webserver/proxies
|
#### Other webserver/proxies
|
||||||
|
|
||||||
You can find example configurations for them in `/opt/pleroma/installation/`.
|
You can find example configurations for them in `/opt/akkoma/installation/`.
|
||||||
|
|
||||||
#### Systemd service
|
#### Systemd service
|
||||||
|
|
||||||
* Copy example service file
|
* Copy example service file
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
|
sudo cp /opt/akkoma/installation/akkoma.service /etc/systemd/system/akkoma.service
|
||||||
```
|
```
|
||||||
|
|
||||||
* Edit the service file and make sure that all paths fit your installation
|
* Edit the service file and make sure that all paths fit your installation
|
||||||
* Enable and start `pleroma.service`:
|
* Enable and start `akkoma.service`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo systemctl enable --now pleroma.service
|
sudo systemctl enable --now akkoma.service
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Create your first user
|
#### Create your first user
|
||||||
|
@ -209,13 +209,12 @@ sudo systemctl enable --now pleroma.service
|
||||||
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
sudo -Hu akkoma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Further reading
|
#### Further reading
|
||||||
|
|
||||||
{! backend/installation/further_reading.include !}
|
{! backend/installation/further_reading.include !}
|
||||||
|
|
||||||
## Questions
|
## Questions
|
||||||
|
|
||||||
Questions about the installation or didn’t it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC.
|
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
This guide will assume you are on Debian 11 (“bullseye”) or later. This guide should also work with Ubuntu 18.04 (“Bionic Beaver”) and later. It also assumes that you have administrative rights, either as root or a user with [sudo permissions](https://www.digitalocean.com/community/tutorials/how-to-add-delete-and-grant-sudo-privileges-to-users-on-a-debian-vps). If you want to run this guide with root, ignore the `sudo` at the beginning of the lines, unless it calls a user like `sudo -Hu pleroma`; in this case, use `su <username> -s $SHELL -c 'command'` instead.
|
This guide will assume you are on Debian 11 (“bullseye”) or later. This guide should also work with Ubuntu 18.04 (“Bionic Beaver”) and later. It also assumes that you have administrative rights, either as root or a user with [sudo permissions](https://www.digitalocean.com/community/tutorials/how-to-add-delete-and-grant-sudo-privileges-to-users-on-a-debian-vps). If you want to run this guide with root, ignore the `sudo` at the beginning of the lines, unless it calls a user like `sudo -Hu akkoma`; in this case, use `su <username> -s $SHELL -c 'command'` instead.
|
||||||
|
|
||||||
{! backend/installation/generic_dependencies.include !}
|
{! backend/installation/generic_dependencies.include !}
|
||||||
|
|
||||||
|
@ -39,45 +39,45 @@ sudo apt install elixir erlang-dev erlang-nox
|
||||||
sudo apt install imagemagick ffmpeg libimage-exiftool-perl
|
sudo apt install imagemagick ffmpeg libimage-exiftool-perl
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install PleromaBE
|
### Install AkkomaBE
|
||||||
|
|
||||||
* Add a new system user for the Pleroma service:
|
* Add a new system user for the Akkoma service:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo useradd -r -s /bin/false -m -d /var/lib/pleroma -U pleroma
|
sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note**: To execute a single command as the Pleroma system user, use `sudo -Hu pleroma command`. You can also switch to a shell by using `sudo -Hu pleroma $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 pleroma -s $SHELL -c 'command'` and `su -l pleroma -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 PleromaBE repository and make the Pleroma user the owner of the directory:
|
* Git clone the AkkomaBE repository and make the Akkoma user the owner of the directory:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo mkdir -p /opt/pleroma
|
sudo mkdir -p /opt/akkoma
|
||||||
sudo chown -R pleroma:pleroma /opt/pleroma
|
sudo chown -R akkoma:akkoma /opt/akkoma
|
||||||
sudo -Hu pleroma git clone -b stable https://git.pleroma.social/pleroma/pleroma /opt/pleroma
|
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git /opt/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
* Change to the new directory:
|
* Change to the new directory:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd /opt/pleroma
|
cd /opt/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
* Install the dependencies for Pleroma and answer with `yes` if it asks you to install `Hex`:
|
* Install the dependencies for Akkoma and answer with `yes` if it asks you to install `Hex`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma mix deps.get
|
sudo -Hu akkoma mix deps.get
|
||||||
```
|
```
|
||||||
|
|
||||||
* Generate the configuration: `sudo -Hu pleroma MIX_ENV=prod mix pleroma.instance gen`
|
* Generate the configuration: `sudo -Hu akkoma MIX_ENV=prod mix pleroma.instance gen`
|
||||||
* Answer with `yes` if it asks you to install `rebar3`.
|
* Answer with `yes` if it asks you to install `rebar3`.
|
||||||
* This may take some time, because parts of pleroma get compiled first.
|
* This may take some time, because parts of akkoma get compiled first.
|
||||||
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
||||||
|
|
||||||
* Check the configuration and if all looks right, rename it, so Pleroma will load it (`prod.secret.exs` for productive instance, `dev.secret.exs` for development instances):
|
* Check the configuration and if all looks right, rename it, so Akkoma will load it (`prod.secret.exs` for productive instance, `dev.secret.exs` for development instances):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma mv config/{generated_config.exs,prod.secret.exs}
|
sudo -Hu akkoma mv config/{generated_config.exs,prod.secret.exs}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,18 +90,18 @@ sudo -Hu postgres psql -f config/setup_db.psql
|
||||||
* Now run the database migration:
|
* Now run the database migration:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix ecto.migrate
|
sudo -Hu akkoma MIX_ENV=prod mix ecto.migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
* Now you can start Pleroma already
|
* Now you can start Akkoma already
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix phx.server
|
sudo -Hu akkoma MIX_ENV=prod mix phx.server
|
||||||
```
|
```
|
||||||
|
|
||||||
### Finalize installation
|
### Finalize installation
|
||||||
|
|
||||||
If you want to open your newly installed instance to the world, you should run nginx or some other webserver/proxy in front of Pleroma and you should consider to create a systemd service file for Pleroma.
|
If you want to open your newly installed instance to the world, you should run nginx or some other webserver/proxy in front of Akkoma and you should consider to create a systemd service file for Akkoma.
|
||||||
|
|
||||||
#### Nginx
|
#### Nginx
|
||||||
|
|
||||||
|
@ -131,8 +131,8 @@ If that doesn’t work, make sure, that nginx is not already running. If it stil
|
||||||
* Copy the example nginx configuration and activate it:
|
* Copy the example nginx configuration and activate it:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.nginx
|
sudo cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/sites-available/akkoma.nginx
|
||||||
sudo ln -s /etc/nginx/sites-available/pleroma.nginx /etc/nginx/sites-enabled/pleroma.nginx
|
sudo ln -s /etc/nginx/sites-available/akkoma.nginx /etc/nginx/sites-enabled/akkoma.nginx
|
||||||
```
|
```
|
||||||
|
|
||||||
* Before starting nginx edit the configuration and change it to your needs (e.g. change servername, change cert paths)
|
* Before starting nginx edit the configuration and change it to your needs (e.g. change servername, change cert paths)
|
||||||
|
@ -150,21 +150,21 @@ sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --webroot -w /
|
||||||
|
|
||||||
#### Other webserver/proxies
|
#### Other webserver/proxies
|
||||||
|
|
||||||
You can find example configurations for them in `/opt/pleroma/installation/`.
|
You can find example configurations for them in `/opt/akkoma/installation/`.
|
||||||
|
|
||||||
#### Systemd service
|
#### Systemd service
|
||||||
|
|
||||||
* Copy example service file
|
* Copy example service file
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
|
sudo cp /opt/akkoma/installation/akkoma.service /etc/systemd/system/akkoma.service
|
||||||
```
|
```
|
||||||
|
|
||||||
* Edit the service file and make sure that all paths fit your installation
|
* Edit the service file and make sure that all paths fit your installation
|
||||||
* Enable and start `pleroma.service`:
|
* Enable and start `akkoma.service`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo systemctl enable --now pleroma.service
|
sudo systemctl enable --now akkoma.service
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Create your first user
|
#### Create your first user
|
||||||
|
@ -172,13 +172,12 @@ sudo systemctl enable --now pleroma.service
|
||||||
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
sudo -Hu akkoma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Further reading
|
#### Further reading
|
||||||
|
|
||||||
{! backend/installation/further_reading.include !}
|
{! backend/installation/further_reading.include !}
|
||||||
|
|
||||||
## Questions
|
## Questions
|
||||||
|
|
||||||
Questions about the installation or didn’t it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC.
|
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
# Pleromaの入れ方
|
# Akkomaの入れ方
|
||||||
## 日本語訳について
|
## 日本語訳について
|
||||||
|
|
||||||
この記事は [Installing on Debian based distributions](Installing on Debian based distributions) の日本語訳です。何かがおかしいと思ったら、原文を見てください。
|
この記事は [Installing on Debian based distributions](Installing on Debian based distributions) の日本語訳です。何かがおかしいと思ったら、原文を見てください。
|
||||||
|
|
||||||
## インストール
|
## インストール
|
||||||
|
|
||||||
このガイドはDebian Stretchを利用することを想定しています。Ubuntu 16.04や18.04でもおそらく動作します。また、ユーザはrootもしくはsudoにより管理者権限を持っていることを前提とします。もし、以下の操作をrootユーザで行う場合は、 `sudo` を無視してください。ただし、`sudo -Hu pleroma` のようにユーザを指定している場合には `su <username> -s $SHELL -c 'command'` を代わりに使ってください。
|
このガイドはDebian Stretchを利用することを想定しています。Ubuntu 16.04や18.04でもおそらく動作します。また、ユーザはrootもしくはsudoにより管理者権限を持っていることを前提とします。もし、以下の操作をrootユーザで行う場合は、 `sudo` を無視してください。ただし、`sudo -Hu akkoma` のようにユーザを指定している場合には `su <username> -s $SHELL -c 'command'` を代わりに使ってください。
|
||||||
|
|
||||||
### 必要なソフトウェア
|
### 必要なソフトウェア
|
||||||
|
|
||||||
- PostgreSQL 9.6以上 (Ubuntu16.04では9.5しか提供されていないので,[](https://www.postgresql.org/download/linux/ubuntu/)こちらから新しいバージョンを入手してください)
|
- PostgreSQL 9.6以上 (Ubuntu16.04では9.5しか提供されていないので,[](https://www.postgresql.org/download/linux/ubuntu/)こちらから新しいバージョンを入手してください)
|
||||||
- `postgresql-contrib` 9.6以上 (同上)
|
- `postgresql-contrib` 9.6以上 (同上)
|
||||||
- Elixir 1.8 以上 ([Debianのリポジトリからインストールしないこと!!! ここからインストールすること!](https://elixir-lang.org/install.html#unix-and-unix-like)。または [asdf](https://github.com/asdf-vm/asdf) をpleromaユーザーでインストールしてください)
|
- Elixir 1.8 以上 ([Debianのリポジトリからインストールしないこと!!! ここからインストールすること!](https://elixir-lang.org/install.html#unix-and-unix-like)。または [asdf](https://github.com/asdf-vm/asdf) をakkomaユーザーでインストールしてください)
|
||||||
- `erlang-dev`
|
- `erlang-dev`
|
||||||
- `erlang-nox`
|
- `erlang-nox`
|
||||||
- `git`
|
- `git`
|
||||||
|
@ -60,65 +60,65 @@ sudo apt install elixir erlang-dev erlang-nox
|
||||||
sudo apt install imagemagick ffmpeg libimage-exiftool-perl
|
sudo apt install imagemagick ffmpeg libimage-exiftool-perl
|
||||||
```
|
```
|
||||||
|
|
||||||
### Pleroma BE (バックエンド) をインストールします
|
### Akkoma BE (バックエンド) をインストールします
|
||||||
|
|
||||||
* Pleroma用に新しいユーザーを作ります。
|
* Akkoma用に新しいユーザーを作ります。
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo useradd -r -s /bin/false -m -d /var/lib/pleroma -U pleroma
|
sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
**注意**: Pleromaユーザとして単発のコマンドを実行したい場合はは、`sudo -Hu pleroma command` を使ってください。シェルを使いたい場合は `sudo -Hu pleroma $SHELL`です。もし `sudo` を使わない場合は、rootユーザで `su -l pleroma -s $SHELL -c 'command'` とすることでコマンドを、`su -l pleroma -s $SHELL` とすることでシェルを開始できます。
|
**注意**: Akkomaユーザとして単発のコマンドを実行したい場合はは、`sudo -Hu akkoma command` を使ってください。シェルを使いたい場合は `sudo -Hu akkoma $SHELL`です。もし `sudo` を使わない場合は、rootユーザで `su -l akkoma -s $SHELL -c 'command'` とすることでコマンドを、`su -l akkoma -s $SHELL` とすることでシェルを開始できます。
|
||||||
|
|
||||||
* Gitリポジトリをクローンします。
|
* Gitリポジトリをクローンします。
|
||||||
```
|
```
|
||||||
sudo mkdir -p /opt/pleroma
|
sudo mkdir -p /opt/akkoma
|
||||||
sudo chown -R pleroma:pleroma /opt/pleroma
|
sudo chown -R akkoma:akkoma /opt/akkoma
|
||||||
sudo -Hu pleroma git clone -b stable https://git.pleroma.social/pleroma/pleroma /opt/pleroma
|
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git /opt/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
* 新しいディレクトリに移動します。
|
* 新しいディレクトリに移動します。
|
||||||
```
|
```
|
||||||
cd /opt/pleroma
|
cd /opt/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
* Pleromaが依存するパッケージをインストールします。Hexをインストールしてもよいか聞かれたら、yesを入力してください。
|
* Akkomaが依存するパッケージをインストールします。Hexをインストールしてもよいか聞かれたら、yesを入力してください。
|
||||||
```
|
```
|
||||||
sudo -Hu pleroma mix deps.get
|
sudo -Hu akkoma mix deps.get
|
||||||
```
|
```
|
||||||
|
|
||||||
* コンフィギュレーションを生成します。
|
* コンフィギュレーションを生成します。
|
||||||
```
|
```
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix pleroma.instance gen
|
sudo -Hu akkoma MIX_ENV=prod mix pleroma.instance gen
|
||||||
```
|
```
|
||||||
* rebar3をインストールしてもよいか聞かれたら、yesを入力してください。
|
* rebar3をインストールしてもよいか聞かれたら、yesを入力してください。
|
||||||
* このときにpleromaの一部がコンパイルされるため、この処理には時間がかかります。
|
* このときにakkomaの一部がコンパイルされるため、この処理には時間がかかります。
|
||||||
* あなたのインスタンスについて、いくつかの質問されます。この質問により `config/generated_config.exs` という設定ファイルが生成されます。
|
* あなたのインスタンスについて、いくつかの質問されます。この質問により `config/generated_config.exs` という設定ファイルが生成されます。
|
||||||
|
|
||||||
|
|
||||||
* コンフィギュレーションを確認して、もし問題なければ、ファイル名を変更してください。
|
* コンフィギュレーションを確認して、もし問題なければ、ファイル名を変更してください。
|
||||||
```
|
```
|
||||||
sudo -Hu pleroma mv config/{generated_config.exs,prod.secret.exs}
|
sudo -Hu akkoma mv config/{generated_config.exs,prod.secret.exs}
|
||||||
```
|
```
|
||||||
|
|
||||||
* 先程のコマンドで、すでに `config/setup_db.psql` というファイルが作られています。このファイルをもとに、データベースを作成します。
|
* 先程のコマンドで、すでに `config/setup_db.psql` というファイルが作られています。このファイルをもとに、データベースを作成します。
|
||||||
```
|
```
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix pleroma.instance gen
|
sudo -Hu akkoma MIX_ENV=prod mix pleroma.instance gen
|
||||||
```
|
```
|
||||||
|
|
||||||
* そして、データベースのマイグレーションを実行します。
|
* そして、データベースのマイグレーションを実行します。
|
||||||
```
|
```
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix ecto.migrate
|
sudo -Hu akkoma MIX_ENV=prod mix ecto.migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
* これでPleromaを起動できるようになりました。
|
* これでAkkomaを起動できるようになりました。
|
||||||
```
|
```
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix phx.server
|
sudo -Hu akkoma MIX_ENV=prod mix phx.server
|
||||||
```
|
```
|
||||||
|
|
||||||
### インストールの最終段階
|
### インストールの最終段階
|
||||||
|
|
||||||
あなたの新しいインスタンスを世界に向けて公開するには、nginx等のWebサーバやプロキシサーバをPleromaの前段に使用する必要があります。また、Pleroma のためにシステムサービスファイルを作成する必要があります。
|
あなたの新しいインスタンスを世界に向けて公開するには、nginx等のWebサーバやプロキシサーバをAkkomaの前段に使用する必要があります。また、Akkoma のためにシステムサービスファイルを作成する必要があります。
|
||||||
|
|
||||||
#### Nginx
|
#### Nginx
|
||||||
|
|
||||||
|
@ -143,8 +143,8 @@ sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --standalone
|
||||||
|
|
||||||
* nginxの設定ファイルサンプルをnginxフォルダーにコピーします。
|
* nginxの設定ファイルサンプルをnginxフォルダーにコピーします。
|
||||||
```
|
```
|
||||||
sudo cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.nginx
|
sudo cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/sites-available/akkoma.nginx
|
||||||
sudo ln -s /etc/nginx/sites-available/pleroma.nginx /etc/nginx/sites-enabled/pleroma.nginx
|
sudo ln -s /etc/nginx/sites-available/akkoma.nginx /etc/nginx/sites-enabled/akkoma.nginx
|
||||||
```
|
```
|
||||||
|
|
||||||
* nginxを起動する前に、設定ファイルを編集してください。例えば、サーバー名、証明書のパスなどを変更する必要があります。
|
* nginxを起動する前に、設定ファイルを編集してください。例えば、サーバー名、証明書のパスなどを変更する必要があります。
|
||||||
|
@ -160,19 +160,19 @@ sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --webroot -w /
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 他のWebサーバやプロキシ
|
#### 他のWebサーバやプロキシ
|
||||||
これに関してはサンプルが `/opt/pleroma/installation/` にあるので、探してみてください。
|
これに関してはサンプルが `/opt/akkoma/installation/` にあるので、探してみてください。
|
||||||
|
|
||||||
#### Systemd サービス
|
#### Systemd サービス
|
||||||
|
|
||||||
* サービスファイルのサンプルをコピーします。
|
* サービスファイルのサンプルをコピーします。
|
||||||
```
|
```
|
||||||
sudo cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
|
sudo cp /opt/akkoma/installation/akkoma.service /etc/systemd/system/akkoma.service
|
||||||
```
|
```
|
||||||
|
|
||||||
* サービスファイルを変更します。すべてのパスが正しいことを確認してください
|
* サービスファイルを変更します。すべてのパスが正しいことを確認してください
|
||||||
* サービスを有効化し `pleroma.service` を開始してください
|
* サービスを有効化し `akkoma.service` を開始してください
|
||||||
```
|
```
|
||||||
sudo systemctl enable --now pleroma.service
|
sudo systemctl enable --now akkoma.service
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 初期ユーザの作成
|
#### 初期ユーザの作成
|
||||||
|
@ -180,16 +180,9 @@ sudo systemctl enable --now pleroma.service
|
||||||
新たにインスタンスを作成したら、以下のコマンドにより管理者権限を持った初期ユーザを作成できます。
|
新たにインスタンスを作成したら、以下のコマンドにより管理者権限を持った初期ユーザを作成できます。
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
sudo -Hu akkoma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||||
```
|
```
|
||||||
|
|
||||||
#### その他の設定とカスタマイズ
|
#### その他の設定とカスタマイズ
|
||||||
|
|
||||||
{! backend/installation/further_reading.include !}
|
{! backend/installation/further_reading.include !}
|
||||||
|
|
||||||
## 質問ある?
|
|
||||||
|
|
||||||
インストールについて質問がある、もしくは、うまくいかないときは、以下のところで質問できます。
|
|
||||||
|
|
||||||
* [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat)
|
|
||||||
* **libera.chat** の **#pleroma** IRCチャンネル
|
|
||||||
|
|
|
@ -34,27 +34,27 @@ Setup the required services to automatically start at boot, using `sysrc(8)`.
|
||||||
# pkg install imagemagick ffmpeg p5-Image-ExifTool
|
# pkg install imagemagick ffmpeg p5-Image-ExifTool
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuring Pleroma
|
## Configuring Akkoma
|
||||||
|
|
||||||
Create a user for Pleroma:
|
Create a user for Akkoma:
|
||||||
|
|
||||||
```
|
```
|
||||||
# pw add user pleroma -m
|
# pw add user akkoma -m
|
||||||
# echo 'export LC_ALL="en_US.UTF-8"' >> /home/pleroma/.profile
|
# echo 'export LC_ALL="en_US.UTF-8"' >> /home/akkoma/.profile
|
||||||
# su -l pleroma
|
# su -l akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
Clone the repository:
|
Clone the repository:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd $HOME # Should be the same as /home/pleroma
|
$ cd $HOME # Should be the same as /home/akkoma
|
||||||
$ git clone -b stable https://git.pleroma.social/pleroma/pleroma.git
|
$ git clone https://akkoma.dev/AkkomaGang/akkoma.git
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure Pleroma. Note that you need a domain name at this point:
|
Configure Akkoma. Note that you need a domain name at this point:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd /home/pleroma/pleroma
|
$ cd /home/akkoma/akkoma
|
||||||
$ mix deps.get # Enter "y" when asked to install Hex
|
$ mix deps.get # Enter "y" when asked to install Hex
|
||||||
$ MIX_ENV=prod mix pleroma.instance gen # You will be asked a few questions here.
|
$ MIX_ENV=prod mix pleroma.instance gen # You will be asked a few questions here.
|
||||||
$ cp config/generated_config.exs config/prod.secret.exs
|
$ cp config/generated_config.exs config/prod.secret.exs
|
||||||
|
@ -66,7 +66,7 @@ now be a file in `config/setup_db.psql` that makes this easier. Edit it, and
|
||||||
it'll be protecting your database. As root, you can now initialize the database:
|
it'll be protecting your database. As root, you can now initialize the database:
|
||||||
|
|
||||||
```
|
```
|
||||||
# cd /home/pleroma/pleroma
|
# cd /home/akkoma/akkoma
|
||||||
# sudo -Hu postgres -g postgres psql -f config/setup_db.psql
|
# sudo -Hu postgres -g postgres psql -f config/setup_db.psql
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -81,11 +81,11 @@ Once this is done, restart Postgres with:
|
||||||
|
|
||||||
Run the database migrations.
|
Run the database migrations.
|
||||||
|
|
||||||
Back as the pleroma user, run the following to implement any database migrations.
|
Back as the akkoma user, run the following to implement any database migrations.
|
||||||
|
|
||||||
```
|
```
|
||||||
# su -l pleroma
|
# su -l akkoma
|
||||||
$ cd /home/pleroma/pleroma
|
$ cd /home/akkoma/akkoma
|
||||||
$ MIX_ENV=prod mix ecto.migrate
|
$ MIX_ENV=prod mix ecto.migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -163,40 +163,40 @@ http {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
As root, copy `/home/pleroma/pleroma/installation/pleroma.nginx` to
|
As root, copy `/home/akkoma/akkoma/installation/nginx/akkoma.nginx` to
|
||||||
`/usr/local/etc/nginx/sites-available/pleroma.nginx`.
|
`/usr/local/etc/nginx/sites-available/akkoma.nginx`.
|
||||||
|
|
||||||
Edit the defaults of `/usr/local/etc/nginx/sites-available/pleroma.nginx`:
|
Edit the defaults of `/usr/local/etc/nginx/sites-available/akkoma.nginx`:
|
||||||
|
|
||||||
* Change `ssl_trusted_certificate` to `/var/db/acme/certs/example.tld/example.tld.cer`.
|
* Change `ssl_trusted_certificate` to `/var/db/acme/certs/example.tld/example.tld.cer`.
|
||||||
* Change `ssl_certificate` to `/var/db/acme/certs/example.tld/fullchain.cer`.
|
* Change `ssl_certificate` to `/var/db/acme/certs/example.tld/fullchain.cer`.
|
||||||
* Change `ssl_certificate_key` to `/var/db/acme/certs/example.tld/example.tld.key`.
|
* Change `ssl_certificate_key` to `/var/db/acme/certs/example.tld/example.tld.key`.
|
||||||
* Change all references of `example.tld` to your instance's domain name.
|
* Change all references of `example.tld` to your instance's domain name.
|
||||||
|
|
||||||
## Creating a startup script for Pleroma
|
## Creating a startup script for Akkoma
|
||||||
|
|
||||||
Pleroma will need to compile when it initially starts, which typically takes a longer
|
Akkoma will need to compile when it initially starts, which typically takes a longer
|
||||||
period of time. Therefore, it is good practice to initially run pleroma from the
|
period of time. Therefore, it is good practice to initially run akkoma from the
|
||||||
command-line before utilizing the rc.d script. That is done as follows:
|
command-line before utilizing the rc.d script. That is done as follows:
|
||||||
|
|
||||||
```
|
```
|
||||||
# su -l pleroma
|
# su -l akkoma
|
||||||
$ cd $HOME/pleroma
|
$ cd $HOME/akkoma
|
||||||
$ MIX_ENV=prod mix phx.server
|
$ MIX_ENV=prod mix phx.server
|
||||||
```
|
```
|
||||||
|
|
||||||
Copy the startup script to the correct location and make sure it's executable:
|
Copy the startup script to the correct location and make sure it's executable:
|
||||||
|
|
||||||
```
|
```
|
||||||
# cp /home/pleroma/pleroma/installation/freebsd/rc.d/pleroma /usr/local/etc/rc.d/pleroma
|
# cp /home/akkoma/akkoma/installation/freebsd/rc.d/akkoma /usr/local/etc/rc.d/akkoma
|
||||||
# chmod +x /usr/local/etc/rc.d/pleroma
|
# chmod +x /usr/local/etc/rc.d/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
Update the `/etc/rc.conf` and start pleroma with the following commands:
|
Update the `/etc/rc.conf` and start akkoma with the following commands:
|
||||||
|
|
||||||
```
|
```
|
||||||
# sysrc pleroma_enable=YES
|
# sysrc akkoma_enable=YES
|
||||||
# service pleroma start
|
# service akkoma start
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Create your first user
|
#### Create your first user
|
||||||
|
@ -204,7 +204,7 @@ Update the `/etc/rc.conf` and start pleroma with the following commands:
|
||||||
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu pleroma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
sudo -Hu akkoma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||||
```
|
```
|
||||||
## Conclusion
|
## Conclusion
|
||||||
|
|
||||||
|
@ -212,7 +212,6 @@ Restart nginx with `# service nginx restart` and you should be up and running.
|
||||||
|
|
||||||
Make sure your time is in sync, or other instances will receive your posts with
|
Make sure your time is in sync, or other instances will receive your posts with
|
||||||
incorrect timestamps. You should have ntpd running.
|
incorrect timestamps. You should have ntpd running.
|
||||||
|
|
||||||
## Questions
|
## Questions
|
||||||
|
|
||||||
Questions about the installation or didn’t it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC.
|
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
This guide will assume that you have administrative rights, either as root or a user with [sudo permissions](https://wiki.gentoo.org/wiki/Sudo). Lines that begin with `#` indicate that they should be run as the superuser. Lines using `$` should be run as the indicated user, e.g. `pleroma$` should be run as the `pleroma` user.
|
This guide will assume that you have administrative rights, either as root or a user with [sudo permissions](https://wiki.gentoo.org/wiki/Sudo). Lines that begin with `#` indicate that they should be run as the superuser. Lines using `$` should be run as the indicated user, e.g. `akkoma$` should be run as the `akkoma` user.
|
||||||
|
|
||||||
{! backend/installation/generic_dependencies.include !}
|
{! backend/installation/generic_dependencies.include !}
|
||||||
|
|
||||||
### Your make.conf, package.use, and USE flags
|
### Your make.conf, package.use, and USE flags
|
||||||
|
|
||||||
The only specific USE flag you should need is the `uuid` flag for `dev-db/postgresql`. Add the following line to any new file in `/etc/portage/package.use`. If you would like a suggested name for the file, either `postgresql` or `pleroma` would do fine, depending on how you like to arrange your package.use flags.
|
The only specific USE flag you should need is the `uuid` flag for `dev-db/postgresql`. Add the following line to any new file in `/etc/portage/package.use`. If you would like a suggested name for the file, either `postgresql` or `akkoma` would do fine, depending on how you like to arrange your package.use flags.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
dev-db/postgresql uuid
|
dev-db/postgresql uuid
|
||||||
|
@ -88,9 +88,9 @@ The output from emerging postgresql should give you a command for initializing t
|
||||||
|
|
||||||
### A note on licenses, the AGPL, and deployment procedures
|
### A note on licenses, the AGPL, and deployment procedures
|
||||||
|
|
||||||
If you do not plan to make any modifications to your Pleroma instance, cloning directly from the main repo will get you what you need. However, if you plan on doing any contributions to upstream development, making changes or modifications to your instance, making custom themes, or want to play around--and let's be honest here, if you're using Gentoo that is most likely you--you will save yourself a lot of headache later if you take the time right now to fork the Pleroma repo and use that in the following section.
|
If you do not plan to make any modifications to your Akkoma instance, cloning directly from the main repo will get you what you need. However, if you plan on doing any contributions to upstream development, making changes or modifications to your instance, making custom themes, or want to play around--and let's be honest here, if you're using Gentoo that is most likely you--you will save yourself a lot of headache later if you take the time right now to fork the Akkoma repo and use that in the following section.
|
||||||
|
|
||||||
Not only does this make it much easier to deploy changes you make, as you can commit and pull from upstream and all that good stuff from the comfort of your local machine then simply `git pull` on your instance server when you're ready to deploy, it also ensures you are compliant with the Affero General Public Licence that Pleroma is licenced under, which stipulates that all network services provided with modified AGPL code must publish their changes on a publicly available internet service and for free. It also makes it much easier to ask for help from and provide help to your fellow Pleroma admins if your public repo always reflects what you are running because it is part of your deployment procedure.
|
Not only does this make it much easier to deploy changes you make, as you can commit and pull from upstream and all that good stuff from the comfort of your local machine then simply `git pull` on your instance server when you're ready to deploy, it also ensures you are compliant with the Affero General Public Licence that Akkoma is licenced under, which stipulates that all network services provided with modified AGPL code must publish their changes on a publicly available internet service and for free. It also makes it much easier to ask for help from and provide help to your fellow Akkoma admins if your public repo always reflects what you are running because it is part of your deployment procedure.
|
||||||
|
|
||||||
### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](docs/installation/optional/media_graphics_packages.md))
|
### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](docs/installation/optional/media_graphics_packages.md))
|
||||||
|
|
||||||
|
@ -98,82 +98,82 @@ Not only does this make it much easier to deploy changes you make, as you can co
|
||||||
# emerge --ask media-video/ffmpeg media-gfx/imagemagick media-libs/exiftool
|
# emerge --ask media-video/ffmpeg media-gfx/imagemagick media-libs/exiftool
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install PleromaBE
|
### Install AkkomaBE
|
||||||
|
|
||||||
* Add a new system user for the Pleroma service and set up default directories:
|
* Add a new system user for the Akkoma service and set up default directories:
|
||||||
|
|
||||||
Remove `,wheel` if you do not want this user to be able to use `sudo`, however note that being able to `sudo` as the `pleroma` user will make finishing the insallation and common maintenence tasks somewhat easier:
|
Remove `,wheel` if you do not want this user to be able to use `sudo`, however note that being able to `sudo` as the `akkoma` user will make finishing the insallation and common maintenence tasks somewhat easier:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# useradd -m -G users,wheel -s /bin/bash pleroma
|
# useradd -m -G users,wheel -s /bin/bash akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
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 `pleroma` 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 `pleroma` 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 Pleroma system user, use `sudo -Hu pleroma command`. You can also switch to a shell by using `sudo -Hu pleroma $SHELL`. If you don't have or want `sudo` or would like to use the system as the `pleroma` user for instance maintenance tasks, you can simply use `su - pleroma` to switch to the `pleroma` 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 PleromaBE repository and make the Pleroma user the owner of the directory:
|
* Git clone the AkkomaBE repository and make the Akkoma user the owner of the directory:
|
||||||
|
|
||||||
It is highly recommended you use your own fork for the `https://path/to/repo` part below, however if you foolishly decide to forego using your own fork, the primary repo `https://git.pleroma.social/pleroma/pleroma` will work here.
|
It is highly recommended you use your own fork for the `https://path/to/repo` part below, however if you foolishly decide to forego using your own fork, the primary repo `https://akkoma.dev/AkkomaGang/akkoma.git` will work here.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pleroma$ cd ~
|
akkoma$ cd ~
|
||||||
pleroma$ git clone -b stable https://path/to/repo
|
akkoma$ git clone -b stable https://path/to/repo
|
||||||
```
|
```
|
||||||
|
|
||||||
* Change to the new directory:
|
* Change to the new directory:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pleroma$ cd ~/pleroma
|
akkoma$ cd ~/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
* Install the dependencies for Pleroma and answer with `yes` if it asks you to install `Hex`:
|
* Install the dependencies for Akkoma and answer with `yes` if it asks you to install `Hex`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pleroma$ mix deps.get
|
akkoma$ mix deps.get
|
||||||
```
|
```
|
||||||
|
|
||||||
* Generate the configuration:
|
* Generate the configuration:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pleroma$ MIX_ENV=prod mix pleroma.instance gen
|
akkoma$ MIX_ENV=prod mix pleroma.instance gen
|
||||||
```
|
```
|
||||||
|
|
||||||
* Answer with `yes` if it asks you to install `rebar3`.
|
* Answer with `yes` if it asks you to install `rebar3`.
|
||||||
|
|
||||||
* This part precompiles some parts of Pleroma, so it might take a few moments
|
* This part precompiles some parts of Akkoma, so it might take a few moments
|
||||||
|
|
||||||
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
||||||
|
|
||||||
* Spend some time with `generated_config.exs` to ensure that everything is in order. If you plan on using an S3-compatible service to store your local media, that can be done here. You will likely mostly be using `prod.secret.exs` for a production instance, however if you would like to set up a development environment, make a copy to `dev.secret.exs` and adjust settings as needed as well.
|
* Spend some time with `generated_config.exs` to ensure that everything is in order. If you plan on using an S3-compatible service to store your local media, that can be done here. You will likely mostly be using `prod.secret.exs` for a production instance, however if you would like to set up a development environment, make a copy to `dev.secret.exs` and adjust settings as needed as well.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pleroma$ mv config/generated_config.exs config/prod.secret.exs
|
akkoma$ mv config/generated_config.exs config/prod.secret.exs
|
||||||
```
|
```
|
||||||
|
|
||||||
* The previous command creates also the file `config/setup_db.psql`, with which you can create the database. Ensure that it is using the correct database name on the `CREATE DATABASE` and the `\c` lines, then run the postgres script:
|
* The previous command creates also the file `config/setup_db.psql`, with which you can create the database. Ensure that it is using the correct database name on the `CREATE DATABASE` and the `\c` lines, then run the postgres script:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pleroma$ sudo -Hu postgres psql -f config/setup_db.psql
|
akkoma$ sudo -Hu postgres psql -f config/setup_db.psql
|
||||||
```
|
```
|
||||||
|
|
||||||
* Now run the database migration:
|
* Now run the database migration:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pleroma$ MIX_ENV=prod mix ecto.migrate
|
akkoma$ MIX_ENV=prod mix ecto.migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
* Now you can start Pleroma already
|
* Now you can start Akkoma already
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pleroma$ MIX_ENV=prod mix phx.server
|
akkoma$ MIX_ENV=prod mix phx.server
|
||||||
```
|
```
|
||||||
|
|
||||||
It probably won't work over the public internet quite yet, however, as we still need to set up a web servere to proxy to the pleroma application, as well as configure SSL.
|
It probably won't work over the public internet quite yet, however, as we still need to set up a web servere to proxy to the akkoma application, as well as configure SSL.
|
||||||
|
|
||||||
### Finalize installation
|
### Finalize installation
|
||||||
|
|
||||||
Assuming you want to open your newly installed federated social network to, well, the federation, you should run nginx or some other webserver/proxy in front of Pleroma. It is also a good idea to set up Pleroma to run as a system service.
|
Assuming you want to open your newly installed federated social network to, well, the federation, you should run nginx or some other webserver/proxy in front of Akkoma. It is also a good idea to set up Akkoma to run as a system service.
|
||||||
|
|
||||||
#### Nginx
|
#### Nginx
|
||||||
|
|
||||||
|
@ -217,13 +217,13 @@ If you are using any additional subdomains, such as for a media proxy, you can r
|
||||||
* Copy the example nginx configuration and activate it:
|
* Copy the example nginx configuration and activate it:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# cp /home/pleroma/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/
|
# cp /home/akkoma/akkoma/installation/nginx/akkoma.nginx /etc/nginx/sites-available/
|
||||||
# ln -s /etc/nginx/sites-available/pleroma.nginx /etc/nginx/sites-enabled/pleroma.nginx
|
# ln -s /etc/nginx/sites-available/akkoma.nginx /etc/nginx/sites-enabled/akkoma.nginx
|
||||||
```
|
```
|
||||||
|
|
||||||
* Take some time to ensure that your nginx config is correct
|
* Take some time to ensure that your nginx config is correct
|
||||||
|
|
||||||
Replace all instances of `example.tld` with your instance's public URL. If for whatever reason you made changes to the port that your pleroma app runs on, be sure that is reflected in your configuration.
|
Replace all instances of `example.tld` with your instance's public URL. If for whatever reason you made changes to the port that your akkoma app runs on, be sure that is reflected in your configuration.
|
||||||
|
|
||||||
Pay special attention to the line that begins with `ssl_ecdh_curve`. It is stongly advised to comment that line out so that OpenSSL will use its full capabilities, and it is also possible you are running OpenSSL 1.0.2 necessitating that you do this.
|
Pay special attention to the line that begins with `ssl_ecdh_curve`. It is stongly advised to comment that line out so that OpenSSL will use its full capabilities, and it is also possible you are running OpenSSL 1.0.2 necessitating that you do this.
|
||||||
|
|
||||||
|
@ -254,14 +254,14 @@ This will run certbot on the first of the month at midnight. If you'd rather run
|
||||||
|
|
||||||
#### Other webserver/proxies
|
#### Other webserver/proxies
|
||||||
|
|
||||||
If you would like to use other webservers or proxies, there are example configurations for some popular alternatives in `/home/pleroma/pleroma/installation/`. You can, of course, check out [the Gentoo wiki](https://wiki.gentoo.org) for more information on installing and configuring said alternatives.
|
If you would like to use other webservers or proxies, there are example configurations for some popular alternatives in `/home/akkoma/akkoma/installation/`. You can, of course, check out [the Gentoo wiki](https://wiki.gentoo.org) for more information on installing and configuring said alternatives.
|
||||||
|
|
||||||
#### Create the uploads folder
|
#### Create the uploads folder
|
||||||
|
|
||||||
Even if you are using S3, Pleroma needs someplace to store media posted on your instance. If you are using the `/home/pleroma/pleroma` root folder suggested by this guide, simply:
|
Even if you are using S3, Akkoma needs someplace to store media posted on your instance. If you are using the `/home/akkoma/akkoma` root folder suggested by this guide, simply:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pleroma$ mkdir -p ~/pleroma/uploads
|
akkoma$ mkdir -p ~/akkoma/uploads
|
||||||
```
|
```
|
||||||
|
|
||||||
#### init.d service
|
#### init.d service
|
||||||
|
@ -269,16 +269,16 @@ Even if you are using S3, Pleroma needs someplace to store media posted on your
|
||||||
* Copy example service file
|
* Copy example service file
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# cp /home/pleroma/pleroma/installation/init.d/pleroma /etc/init.d/
|
# cp /home/akkoma/akkoma/installation/init.d/akkoma /etc/init.d/
|
||||||
```
|
```
|
||||||
|
|
||||||
* Be sure to take a look at this service file and make sure that all paths fit your installation
|
* Be sure to take a look at this service file and make sure that all paths fit your installation
|
||||||
|
|
||||||
* Enable and start `pleroma`:
|
* Enable and start `akkoma`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# rc-update add pleroma default
|
# rc-update add akkoma default
|
||||||
# /etc/init.d/pleroma start
|
# /etc/init.d/akkoma start
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Create your first user
|
#### Create your first user
|
||||||
|
@ -286,17 +286,16 @@ Even if you are using S3, Pleroma needs someplace to store media posted on your
|
||||||
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pleroma$ MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
akkoma$ MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Privilege cleanup
|
#### Privilege cleanup
|
||||||
|
|
||||||
If you opted to allow sudo for the `pleroma` user but would like to remove the ability for greater security, now might be a good time to edit `/etc/sudoers` and/or change the groups the `pleroma` user belongs to. Be sure to restart the pleroma service afterwards to ensure it picks up on the changes.
|
If you opted to allow sudo for the `akkoma` user but would like to remove the ability for greater security, now might be a good time to edit `/etc/sudoers` and/or change the groups the `akkoma` user belongs to. Be sure to restart the akkoma service afterwards to ensure it picks up on the changes.
|
||||||
|
|
||||||
#### Further reading
|
#### Further reading
|
||||||
|
|
||||||
{! backend/installation/further_reading.include !}
|
{! backend/installation/further_reading.include !}
|
||||||
|
|
||||||
## Questions
|
## Questions
|
||||||
|
|
||||||
Questions about the installation or didn’t it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC.
|
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||||
|
|
|
@ -20,65 +20,65 @@ The system needs to have `curl` and `unzip` installed for downloading and unpack
|
||||||
```
|
```
|
||||||
|
|
||||||
## Moving content out of the application directory
|
## Moving content out of the application directory
|
||||||
When using OTP releases the application directory changes with every version so it would be a bother to keep content there (and also dangerous unless `--no-rm` option is used when updating). Fortunately almost all paths in Pleroma are configurable, so it is possible to move them out of there.
|
When using OTP releases the application directory changes with every version so it would be a bother to keep content there (and also dangerous unless `--no-rm` option is used when updating). Fortunately almost all paths in Akkoma are configurable, so it is possible to move them out of there.
|
||||||
|
|
||||||
Pleroma should be stopped before proceeding.
|
Akkoma should be stopped before proceeding.
|
||||||
|
|
||||||
### Moving uploads/custom public files directory
|
### Moving uploads/custom public files directory
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Create uploads directory and set proper permissions (skip if using a remote uploader)
|
# Create uploads directory and set proper permissions (skip if using a remote uploader)
|
||||||
# Note: It does not have to be `/var/lib/pleroma/uploads`, you can configure it to be something else later
|
# Note: It does not have to be `/var/lib/akkoma/uploads`, you can configure it to be something else later
|
||||||
mkdir -p /var/lib/pleroma/uploads
|
mkdir -p /var/lib/akkoma/uploads
|
||||||
chown -R pleroma /var/lib/pleroma
|
chown -R akkoma /var/lib/akkoma
|
||||||
|
|
||||||
# Create custom public files directory
|
# Create custom public files directory
|
||||||
# Note: It does not have to be `/var/lib/pleroma/static`, you can configure it to be something else later
|
# Note: It does not have to be `/var/lib/akkoma/static`, you can configure it to be something else later
|
||||||
mkdir -p /var/lib/pleroma/static
|
mkdir -p /var/lib/akkoma/static
|
||||||
chown -R pleroma /var/lib/pleroma
|
chown -R akkoma /var/lib/akkoma
|
||||||
|
|
||||||
# If you use the local uploader with default settings your uploads should be located in `~pleroma/uploads`
|
# If you use the local uploader with default settings your uploads should be located in `~akkoma/uploads`
|
||||||
mv ~pleroma/uploads/* /var/lib/pleroma/uploads
|
mv ~akkoma/uploads/* /var/lib/akkoma/uploads
|
||||||
|
|
||||||
# If you have created the custom public files directory with default settings it should be located in `~pleroma/instance/static`
|
# If you have created the custom public files directory with default settings it should be located in `~akkoma/instance/static`
|
||||||
mv ~pleroma/instance/static /var/lib/pleroma/static
|
mv ~akkoma/instance/static /var/lib/akkoma/static
|
||||||
```
|
```
|
||||||
|
|
||||||
### Moving emoji
|
### Moving emoji
|
||||||
Assuming you have all emojis in subdirectories of `priv/static/emoji` moving them can be done with
|
Assuming you have all emojis in subdirectories of `priv/static/emoji` moving them can be done with
|
||||||
```sh
|
```sh
|
||||||
mkdir /var/lib/pleroma/static/emoji
|
mkdir /var/lib/akkoma/static/emoji
|
||||||
ls -d ~pleroma/priv/static/emoji/*/ | xargs -i sh -c 'mv "{}" "/var/lib/pleroma/static/emoji/$(basename {})"'
|
ls -d ~akkoma/priv/static/emoji/*/ | xargs -i sh -c 'mv "{}" "/var/lib/akkoma/static/emoji/$(basename {})"'
|
||||||
```
|
```
|
||||||
|
|
||||||
But, if for some reason you have custom emojis in the root directory you should copy the whole directory instead.
|
But, if for some reason you have custom emojis in the root directory you should copy the whole directory instead.
|
||||||
```sh
|
```sh
|
||||||
mv ~pleroma/priv/static/emoji /var/lib/pleroma/static/emoji
|
mv ~akkoma/priv/static/emoji /var/lib/akkoma/static/emoji
|
||||||
```
|
```
|
||||||
and then copy custom emojis to `/var/lib/pleroma/static/emoji/custom`.
|
and then copy custom emojis to `/var/lib/akkoma/static/emoji/custom`.
|
||||||
|
|
||||||
This is needed because storing custom emojis in the root directory is deprecated, but if you just move them to `/var/lib/pleroma/static/emoji/custom` it will break emoji urls on old posts.
|
This is needed because storing custom emojis in the root directory is deprecated, but if you just move them to `/var/lib/akkoma/static/emoji/custom` it will break emoji urls on old posts.
|
||||||
|
|
||||||
Note that globs have been replaced with `pack_extensions`, so if your emojis are not in png/gif you should [modify the default value](../configuration/cheatsheet.md#emoji).
|
Note that globs have been replaced with `pack_extensions`, so if your emojis are not in png/gif you should [modify the default value](../configuration/cheatsheet.md#emoji).
|
||||||
|
|
||||||
### Moving the config
|
### Moving the config
|
||||||
```sh
|
```sh
|
||||||
# Create the config directory
|
# Create the config directory
|
||||||
# The default path for Pleroma config is /etc/pleroma/config.exs
|
# The default path for Akkoma config is /etc/akkoma/config.exs
|
||||||
# but it can be set via PLEROMA_CONFIG_PATH environment variable
|
# but it can be set via PLEROMA_CONFIG_PATH environment variable
|
||||||
mkdir -p /etc/pleroma
|
mkdir -p /etc/akkoma
|
||||||
|
|
||||||
# Move the config file
|
# Move the config file
|
||||||
mv ~pleroma/config/prod.secret.exs /etc/pleroma/config.exs
|
mv ~akkoma/config/prod.secret.exs /etc/akkoma/config.exs
|
||||||
|
|
||||||
# Change `use Mix.Config` at the top to `import Config`
|
# Change `use Mix.Config` at the top to `import Config`
|
||||||
$EDITOR /etc/pleroma/config.exs
|
$EDITOR /etc/akkoma/config.exs
|
||||||
```
|
```
|
||||||
## Installing the release
|
## Installing the release
|
||||||
Before proceeding, get the flavour from [Detecting flavour](otp_en.md#detecting-flavour) section in OTP installation guide.
|
Before proceeding, get the flavour from [Detecting flavour](otp_en.md#detecting-flavour) section in OTP installation guide.
|
||||||
```sh
|
```sh
|
||||||
# Delete all files in pleroma user's directory
|
# Delete all files in akkoma user's directory
|
||||||
rm -r ~pleroma/*
|
rm -r ~akkoma/*
|
||||||
|
|
||||||
# Set the flavour environment variable to the string you got in Detecting flavour section.
|
# Set the flavour environment variable to the string you got in Detecting flavour section.
|
||||||
# For example if the flavour is `amd64-musl` the command will be
|
# For example if the flavour is `amd64-musl` the command will be
|
||||||
|
@ -86,58 +86,61 @@ export FLAVOUR="amd64-musl"
|
||||||
|
|
||||||
# Clone the release build into a temporary directory and unpack it
|
# Clone the release build into a temporary directory and unpack it
|
||||||
# Replace `stable` with `unstable` if you want to run the unstable branch
|
# Replace `stable` with `unstable` if you want to run the unstable branch
|
||||||
su pleroma -s $SHELL -lc "
|
su akkoma -s $SHELL -lc "
|
||||||
curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=$FLAVOUR' -o /tmp/pleroma.zip
|
curl 'https://akkoma-updates.s3-website.fr-par.scw.cloud/develop/akkoma-$FLAVOUR.zip' -o /tmp/akkoma.zip
|
||||||
unzip /tmp/pleroma.zip -d /tmp/
|
unzip /tmp/akkoma.zip -d /tmp/
|
||||||
"
|
"
|
||||||
|
|
||||||
# Move the release to the home directory and delete temporary files
|
# Move the release to the home directory and delete temporary files
|
||||||
su pleroma -s $SHELL -lc "
|
su akkoma -s $SHELL -lc "
|
||||||
mv /tmp/release/* ~pleroma/
|
mv /tmp/release/* ~akkoma/
|
||||||
rmdir /tmp/release
|
rmdir /tmp/release
|
||||||
rm /tmp/pleroma.zip
|
rm /tmp/akkoma.zip
|
||||||
"
|
"
|
||||||
|
|
||||||
# Start the instance to verify that everything is working as expected
|
# Start the instance to verify that everything is working as expected
|
||||||
su pleroma -s $SHELL -lc "./bin/pleroma daemon"
|
su akkoma -s $SHELL -lc "./bin/pleroma daemon"
|
||||||
|
|
||||||
# Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly
|
# Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly
|
||||||
sleep 20 && curl http://localhost:4000/api/v1/instance
|
sleep 20 && curl http://localhost:4000/api/v1/instance
|
||||||
|
|
||||||
# Stop the instance
|
# Stop the instance
|
||||||
su pleroma -s $SHELL -lc "./bin/pleroma stop"
|
su akkoma -s $SHELL -lc "./bin/pleroma stop"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Setting up a system service
|
## Setting up a system service
|
||||||
OTP releases have different service files than from-source installs so they need to be copied over again.
|
OTP releases have different service files than from-source installs so they need to be copied over again.
|
||||||
|
|
||||||
**Warning:** The service files assume pleroma user's home directory is `/opt/pleroma`, please make sure all paths fit your installation.
|
**Warning:** The service files assume akkoma user's home directory is `/opt/akkoma`, please make sure all paths fit your installation.
|
||||||
|
|
||||||
=== "Alpine"
|
=== "Alpine"
|
||||||
```sh
|
```sh
|
||||||
# Copy the service into a proper directory
|
# Copy the service into a proper directory
|
||||||
cp -f ~pleroma/installation/init.d/pleroma /etc/init.d/pleroma
|
cp -f ~akkoma/installation/init.d/akkoma /etc/init.d/akkoma
|
||||||
|
|
||||||
# Start pleroma
|
# Start akkoma
|
||||||
rc-service pleroma start
|
rc-service akkoma start
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Debian/Ubuntu"
|
=== "Debian/Ubuntu"
|
||||||
```sh
|
```sh
|
||||||
# Copy the service into a proper directory
|
# Copy the service into a proper directory
|
||||||
cp ~pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
|
cp ~akkoma/installation/akkoma.service /etc/systemd/system/akkoma.service
|
||||||
|
|
||||||
# Reload service files
|
# Reload service files
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
# Reenable pleroma to start on boot
|
# Reenable akkoma to start on boot
|
||||||
systemctl reenable pleroma
|
systemctl reenable akkoma
|
||||||
|
|
||||||
# Start pleroma
|
# Start akkoma
|
||||||
systemctl start pleroma
|
systemctl start akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running mix tasks
|
## Running mix tasks
|
||||||
Refer to [Running mix tasks](otp_en.md#running-mix-tasks) section from OTP release installation guide.
|
Refer to [Running mix tasks](otp_en.md#running-mix-tasks) section from OTP release installation guide.
|
||||||
## Updating
|
## Updating
|
||||||
Refer to [Updating](otp_en.md#updating) section from OTP release installation guide.
|
Refer to [Updating](otp_en.md#updating) section from OTP release installation guide.
|
||||||
|
## Questions
|
||||||
|
|
||||||
|
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||||
|
|
80
docs/installation/migrating_to_akkoma.md
Normal file
80
docs/installation/migrating_to_akkoma.md
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
# Migrating to Akkoma
|
||||||
|
|
||||||
|
**Akkoma does not currently have a stable release, until 3.0, all builds should be considered "develop"**
|
||||||
|
|
||||||
|
## Why should you migrate?
|
||||||
|
|
||||||
|
aside from actually responsive maintainer(s)? let's lookie here, we've got:
|
||||||
|
|
||||||
|
- custom emoji reactions
|
||||||
|
- misskey markdown (MFM) rendering and posting support
|
||||||
|
- elasticsearch support (because pleroma search is GARBAGE)
|
||||||
|
- latest develop pleroma-fe additions
|
||||||
|
- local-only posting
|
||||||
|
- probably more, this is like 3.5 years of IHBA additions finally compiled
|
||||||
|
|
||||||
|
## Actually migrating
|
||||||
|
|
||||||
|
Let's say you're very cool and have decided to move to the cooler
|
||||||
|
fork of Akkoma - luckily this isn't very hard.
|
||||||
|
|
||||||
|
You'll need to update the backend, then possibly the frontend, depending
|
||||||
|
on your setup.
|
||||||
|
|
||||||
|
## From Source
|
||||||
|
|
||||||
|
If you're running the source Akkoma install, you'll need to set the
|
||||||
|
upstream git URL then just rebuild - that'll be:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git remote set-url origin https://akkoma.dev/AkkomaGang/akkoma.git/
|
||||||
|
git fetch origin
|
||||||
|
git pull -r
|
||||||
|
```
|
||||||
|
|
||||||
|
Then compile, migrate and restart as usual.
|
||||||
|
|
||||||
|
## From OTP
|
||||||
|
|
||||||
|
This will just be setting the update URL -
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export FLAVOUR=$(arch="$(uname -m)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;fi;echo "$arch$libc_postfix")
|
||||||
|
|
||||||
|
./bin/pleroma_ctl update --zip-url https://akkoma-updates.s3-website.fr-par.scw.cloud/develop/akkoma-$FLAVOUR.zip
|
||||||
|
./bin/pleroma_ctl migrate
|
||||||
|
```
|
||||||
|
|
||||||
|
Then restart. When updating in the future, you canjust use
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./bin/pleroma_ctl update --branch develop
|
||||||
|
```
|
||||||
|
|
||||||
|
## Frontend changes
|
||||||
|
|
||||||
|
Akkoma comes with a few frontend changes as well as backend ones,
|
||||||
|
your upgrade path here depends on your setup
|
||||||
|
|
||||||
|
### I just run with the built-in frontend
|
||||||
|
|
||||||
|
You'll need to run a single command,
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# From source
|
||||||
|
mix pleroma.frontend install pleroma-fe
|
||||||
|
# OTP
|
||||||
|
./bin/pleroma_ctl frontend install pleroma-fe
|
||||||
|
```
|
||||||
|
|
||||||
|
### I've run the mix task to install a frontend
|
||||||
|
|
||||||
|
Hooray, just run it again to update the frontend to the latest build.
|
||||||
|
See above for that command.
|
||||||
|
|
||||||
|
### I compile the JS from source
|
||||||
|
|
||||||
|
Your situation will likely be unique - you'll need the changes in the
|
||||||
|
[forked pleroma-fe repository](https://akkoma.dev/AkkomaGang/pleroma-fe),
|
||||||
|
and either merge or cherry-pick from there depending on how you've got
|
||||||
|
things.
|
|
@ -8,7 +8,7 @@ pkgin should have been installed by the NetBSD installer if you selected
|
||||||
the right options. If it isn't installed, install it using pkg_add.
|
the right options. If it isn't installed, install it using pkg_add.
|
||||||
|
|
||||||
Note that `postgresql11-contrib` is needed for the Postgres extensions
|
Note that `postgresql11-contrib` is needed for the Postgres extensions
|
||||||
Pleroma uses.
|
Akkoma uses.
|
||||||
|
|
||||||
The `mksh` shell is needed to run the Elixir `mix` script.
|
The `mksh` shell is needed to run the Elixir `mix` script.
|
||||||
|
|
||||||
|
@ -50,28 +50,28 @@ First, run `# /etc/rc.d/pgsql start`. Then, `$ sudo -Hu pgsql -g pgsql createdb`
|
||||||
|
|
||||||
`# pkgin install ImageMagick ffmpeg4 p5-Image-ExifTool`
|
`# pkgin install ImageMagick ffmpeg4 p5-Image-ExifTool`
|
||||||
|
|
||||||
## Configuring Pleroma
|
## Configuring Akkoma
|
||||||
|
|
||||||
Create a user for Pleroma:
|
Create a user for Akkoma:
|
||||||
|
|
||||||
```
|
```
|
||||||
# groupadd pleroma
|
# groupadd akkoma
|
||||||
# useradd -d /home/pleroma -m -g pleroma -s /usr/pkg/bin/mksh pleroma
|
# useradd -d /home/akkoma -m -g akkoma -s /usr/pkg/bin/mksh akkoma
|
||||||
# echo 'export LC_ALL="en_GB.UTF-8"' >> /home/pleroma/.profile
|
# echo 'export LC_ALL="en_GB.UTF-8"' >> /home/akkoma/.profile
|
||||||
# su -l pleroma -c $SHELL
|
# su -l akkoma -c $SHELL
|
||||||
```
|
```
|
||||||
|
|
||||||
Clone the repository:
|
Clone the repository:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd /home/pleroma
|
$ cd /home/akkoma
|
||||||
$ git clone -b stable https://git.pleroma.social/pleroma/pleroma.git
|
$ git clone https://akkoma.dev/AkkomaGang/akkoma.git
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure Pleroma. Note that you need a domain name at this point:
|
Configure Akkoma. Note that you need a domain name at this point:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd /home/pleroma/pleroma
|
$ cd /home/akkoma/akkoma
|
||||||
$ mix deps.get
|
$ mix deps.get
|
||||||
$ MIX_ENV=prod mix pleroma.instance gen # You will be asked a few questions here.
|
$ MIX_ENV=prod mix pleroma.instance gen # You will be asked a few questions here.
|
||||||
```
|
```
|
||||||
|
@ -101,7 +101,7 @@ $ MIX_ENV=prod mix ecto.migrate
|
||||||
## Configuring nginx
|
## Configuring nginx
|
||||||
|
|
||||||
Install the example configuration file
|
Install the example configuration file
|
||||||
`/home/pleroma/pleroma/installation/pleroma.nginx` to
|
`/home/akkoma/akkoma/installation/nginx/akkoma.nginx` to
|
||||||
`/usr/pkg/etc/nginx.conf`.
|
`/usr/pkg/etc/nginx.conf`.
|
||||||
|
|
||||||
Note that it will need to be wrapped in a `http {}` block. You should add
|
Note that it will need to be wrapped in a `http {}` block. You should add
|
||||||
|
@ -172,24 +172,24 @@ Let's add auto-renewal to `/etc/daily.local`
|
||||||
--stateless
|
--stateless
|
||||||
```
|
```
|
||||||
|
|
||||||
## Creating a startup script for Pleroma
|
## Creating a startup script for Akkoma
|
||||||
|
|
||||||
Copy the startup script to the correct location and make sure it's executable:
|
Copy the startup script to the correct location and make sure it's executable:
|
||||||
|
|
||||||
```
|
```
|
||||||
# cp /home/pleroma/pleroma/installation/netbsd/rc.d/pleroma /etc/rc.d/pleroma
|
# cp /home/akkoma/akkoma/installation/netbsd/rc.d/akkoma /etc/rc.d/akkoma
|
||||||
# chmod +x /etc/rc.d/pleroma
|
# chmod +x /etc/rc.d/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
Add the following to `/etc/rc.conf`:
|
Add the following to `/etc/rc.conf`:
|
||||||
|
|
||||||
```
|
```
|
||||||
pleroma=YES
|
akkoma=YES
|
||||||
pleroma_home="/home/pleroma"
|
akkoma_home="/home/akkoma"
|
||||||
pleroma_user="pleroma"
|
akkoma_user="akkoma"
|
||||||
```
|
```
|
||||||
|
|
||||||
Run `# /etc/rc.d/pleroma start` to start Pleroma.
|
Run `# /etc/rc.d/akkoma start` to start Akkoma.
|
||||||
|
|
||||||
## Conclusion
|
## Conclusion
|
||||||
|
|
||||||
|
@ -209,3 +209,6 @@ incorrect timestamps. You should have ntpd running.
|
||||||
## Questions
|
## Questions
|
||||||
|
|
||||||
Questions about the installation or didn’t it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC.
|
Questions about the installation or didn’t it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC.
|
||||||
|
## Questions
|
||||||
|
|
||||||
|
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Installing on OpenBSD
|
# Installing on OpenBSD
|
||||||
|
|
||||||
This guide describes the installation and configuration of pleroma (and the required software to run it) on a single OpenBSD 6.6 server.
|
This guide describes the installation and configuration of akkoma (and the required software to run it) on a single OpenBSD 6.6 server.
|
||||||
|
|
||||||
For any additional information regarding commands and configuration files mentioned here, check the man pages [online](https://man.openbsd.org/) or directly on your server with the man command.
|
For any additional information regarding commands and configuration files mentioned here, check the man pages [online](https://man.openbsd.org/) or directly on your server with the man command.
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ To install them, run the following command (with doas or as root):
|
||||||
pkg_add elixir gmake git postgresql-server postgresql-contrib cmake ffmpeg ImageMagick
|
pkg_add elixir gmake git postgresql-server postgresql-contrib cmake ffmpeg ImageMagick
|
||||||
```
|
```
|
||||||
|
|
||||||
Pleroma requires a reverse proxy, OpenBSD has relayd in base (and is used in this guide) and packages/ports are available for nginx (www/nginx) and apache (www/apache-httpd). Independently of the reverse proxy, [acme-client(1)](https://man.openbsd.org/acme-client) can be used to get a certificate from Let's Encrypt.
|
Akkoma requires a reverse proxy, OpenBSD has relayd in base (and is used in this guide) and packages/ports are available for nginx (www/nginx) and apache (www/apache-httpd). Independently of the reverse proxy, [acme-client(1)](https://man.openbsd.org/acme-client) can be used to get a certificate from Let's Encrypt.
|
||||||
|
|
||||||
#### Optional software
|
#### Optional software
|
||||||
|
|
||||||
|
@ -30,20 +30,20 @@ To install the above:
|
||||||
pkg_add ImageMagick ffmpeg p5-Image-ExifTool
|
pkg_add ImageMagick ffmpeg p5-Image-ExifTool
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Creating the pleroma user
|
#### Creating the akkoma user
|
||||||
Pleroma will be run by a dedicated user, \_pleroma. Before creating it, insert the following lines in login.conf:
|
Akkoma will be run by a dedicated user, \_akkoma. Before creating it, insert the following lines in login.conf:
|
||||||
```
|
```
|
||||||
pleroma:\
|
akkoma:\
|
||||||
:datasize-max=1536M:\
|
:datasize-max=1536M:\
|
||||||
:datasize-cur=1536M:\
|
:datasize-cur=1536M:\
|
||||||
:openfiles-max=4096
|
:openfiles-max=4096
|
||||||
```
|
```
|
||||||
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.
|
This creates a "akkoma" 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 akkoma crash some time after starting.
|
||||||
|
|
||||||
Create the \_pleroma user, assign it the pleroma login class and create its home directory (/home/\_pleroma/): `useradd -m -L pleroma _pleroma`
|
Create the \_akkoma user, assign it the akkoma login class and create its home directory (/home/\_akkoma/): `useradd -m -L akkoma _akkoma`
|
||||||
|
|
||||||
#### Clone pleroma's directory
|
#### Clone akkoma's directory
|
||||||
Enter a shell as the \_pleroma user. As root, run `su _pleroma -;cd`. Then clone the repository with `git clone -b stable https://git.pleroma.social/pleroma/pleroma.git`. Pleroma is now installed in /home/\_pleroma/pleroma/, it will be configured and started at the end of this guide.
|
Enter a shell as the \_akkoma user. As root, run `su _akkoma -;cd`. Then clone the repository with `git clone https://akkoma.dev/AkkomaGang/akkoma.git`. Akkoma is now installed in /home/\_akkoma/akkoma/, it will be configured and started at the end of this guide.
|
||||||
|
|
||||||
#### PostgreSQL
|
#### PostgreSQL
|
||||||
Start a shell as the \_postgresql user (as root run `su _postgresql -` then run the `initdb` command to initialize postgresql:
|
Start a shell as the \_postgresql user (as root run `su _postgresql -` then run the `initdb` command to initialize postgresql:
|
||||||
|
@ -137,7 +137,7 @@ ln -s /etc/ssl/private/<domain name>.key /etc/ssl/private/<IP address>.key
|
||||||
This will have to be done for each IPv4 and IPv6 address relayd listens on.
|
This will have to be done for each IPv4 and IPv6 address relayd listens on.
|
||||||
|
|
||||||
#### relayd
|
#### relayd
|
||||||
relayd will be used as the reverse proxy sitting in front of pleroma.
|
relayd will be used as the reverse proxy sitting in front of akkoma.
|
||||||
Insert the following configuration in /etc/relayd.conf:
|
Insert the following configuration in /etc/relayd.conf:
|
||||||
```
|
```
|
||||||
# $OpenBSD: relayd.conf,v 1.4 2018/03/23 09:55:06 claudio Exp $
|
# $OpenBSD: relayd.conf,v 1.4 2018/03/23 09:55:06 claudio Exp $
|
||||||
|
@ -145,19 +145,19 @@ Insert the following configuration in /etc/relayd.conf:
|
||||||
ext_inet="<IPv4 address>"
|
ext_inet="<IPv4 address>"
|
||||||
ext_inet6="<IPv6 address>"
|
ext_inet6="<IPv6 address>"
|
||||||
|
|
||||||
table <pleroma_server> { 127.0.0.1 }
|
table <akkoma_server> { 127.0.0.1 }
|
||||||
table <httpd_server> { 127.0.0.1 }
|
table <httpd_server> { 127.0.0.1 }
|
||||||
|
|
||||||
http protocol plerup { # Protocol for upstream pleroma server
|
http protocol plerup { # Protocol for upstream akkoma server
|
||||||
#tcp { nodelay, sack, socket buffer 65536, backlog 128 } # Uncomment and adjust as you see fit
|
#tcp { nodelay, sack, socket buffer 65536, backlog 128 } # Uncomment and adjust as you see fit
|
||||||
tls ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305"
|
tls ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305"
|
||||||
tls ecdhe secp384r1
|
tls ecdhe secp384r1
|
||||||
|
|
||||||
# Forward some paths to the local server (as pleroma won't respond to them as you might want)
|
# Forward some paths to the local server (as akkoma won't respond to them as you might want)
|
||||||
pass request quick path "/robots.txt" forward to <httpd_server>
|
pass request quick path "/robots.txt" forward to <httpd_server>
|
||||||
|
|
||||||
# Append a bunch of headers
|
# Append a bunch of headers
|
||||||
match request header append "X-Forwarded-For" value "$REMOTE_ADDR" # This two header and the next one are not strictly required by pleroma but adding them won't hurt
|
match request header append "X-Forwarded-For" value "$REMOTE_ADDR" # This two header and the next one are not strictly required by akkoma but adding them won't hurt
|
||||||
match request header append "X-Forwarded-By" value "$SERVER_ADDR:$SERVER_PORT"
|
match request header append "X-Forwarded-By" value "$SERVER_ADDR:$SERVER_PORT"
|
||||||
|
|
||||||
match response header append "X-XSS-Protection" value "1; mode=block"
|
match response header append "X-XSS-Protection" value "1; mode=block"
|
||||||
|
@ -170,7 +170,7 @@ http protocol plerup { # Protocol for upstream pleroma server
|
||||||
match request header append "Connection" value "upgrade"
|
match request header append "Connection" value "upgrade"
|
||||||
#match response header append "Strict-Transport-Security" value "max-age=31536000; includeSubDomains" # Uncomment this only after you get HTTPS working.
|
#match response header append "Strict-Transport-Security" value "max-age=31536000; includeSubDomains" # Uncomment this only after you get HTTPS working.
|
||||||
|
|
||||||
# If you do not want remote frontends to be able to access your Pleroma backend server, comment these lines
|
# If you do not want remote frontends to be able to access your Akkoma backend server, comment these lines
|
||||||
match response header append "Access-Control-Allow-Origin" value "*"
|
match response header append "Access-Control-Allow-Origin" value "*"
|
||||||
match response header append "Access-Control-Allow-Methods" value "POST, PUT, DELETE, GET, PATCH, OPTIONS"
|
match response header append "Access-Control-Allow-Methods" value "POST, PUT, DELETE, GET, PATCH, OPTIONS"
|
||||||
match response header append "Access-Control-Allow-Headers" value "Authorization, Content-Type, Idempotency-Key"
|
match response header append "Access-Control-Allow-Headers" value "Authorization, Content-Type, Idempotency-Key"
|
||||||
|
@ -184,7 +184,7 @@ relay wwwtls {
|
||||||
|
|
||||||
protocol plerup
|
protocol plerup
|
||||||
|
|
||||||
forward to <pleroma_server> port 4000 check http "/" code 200
|
forward to <akkoma_server> port 4000 check http "/" code 200
|
||||||
forward to <httpd_server> port 80 check http "/robots.txt" code 200
|
forward to <httpd_server> port 80 check http "/robots.txt" code 200
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -225,27 +225,27 @@ Replace *<network interface\>* by your server's network interface name (which yo
|
||||||
|
|
||||||
Check pf's configuration by running `pfctl -nf /etc/pf.conf`, load it with `pfctl -f /etc/pf.conf` and enable pf at boot with `rcctl enable pf`.
|
Check pf's configuration by running `pfctl -nf /etc/pf.conf`, load it with `pfctl -f /etc/pf.conf` and enable pf at boot with `rcctl enable pf`.
|
||||||
|
|
||||||
#### Configure and start pleroma
|
#### Configure and start akkoma
|
||||||
Enter a shell as \_pleroma (as root `su _pleroma -`) and enter pleroma's installation directory (`cd ~/pleroma/`).
|
Enter a shell as \_akkoma (as root `su _akkoma -`) and enter akkoma's installation directory (`cd ~/akkoma/`).
|
||||||
|
|
||||||
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/_pleroma/pleroma/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 \_pleroma shell into pleroma's installation directory (`su _pleroma -;cd ~/pleroma`) 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 \_pleroma in /home/\_pleroma/pleroma, 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.
|
||||||
|
|
||||||
##### Starting pleroma at boot
|
##### Starting akkoma at boot
|
||||||
An rc script to automatically start pleroma at boot hasn't been written yet, it can be run in a tmux session (tmux is in base).
|
An rc script to automatically start akkoma at boot hasn't been written yet, it can be run in a tmux session (tmux is in base).
|
||||||
|
|
||||||
|
|
||||||
#### Create administrative user
|
#### Create administrative user
|
||||||
|
|
||||||
If your instance is up and running, you can create your first user with administrative rights with the following command as the \_pleroma user.
|
If your instance is up and running, you can create your first user with administrative rights with the following command as the \_akkoma user.
|
||||||
```
|
```
|
||||||
LC_ALL=en_US.UTF-8 MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
LC_ALL=en_US.UTF-8 MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||||
```
|
```
|
||||||
|
@ -256,4 +256,4 @@ LC_ALL=en_US.UTF-8 MIX_ENV=prod mix pleroma.user new <username> <your@emailaddre
|
||||||
|
|
||||||
## Questions
|
## Questions
|
||||||
|
|
||||||
Questions about the installation or didn’t it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC.
|
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Pleroman asennus OpenBSD:llä
|
# Akkoman asennus OpenBSD:llä
|
||||||
|
|
||||||
Tarvitset:
|
Tarvitset:
|
||||||
* Oman domainin
|
* Oman domainin
|
||||||
|
@ -45,19 +45,19 @@ Käynnistä tietokanta ja aseta se käynnistymään automaattisesti.
|
||||||
|
|
||||||
`# rcctl enable postgresql`
|
`# rcctl enable postgresql`
|
||||||
|
|
||||||
Luo käyttäjä pleromaa varten (kysyy muutaman kysymyksen):
|
Luo käyttäjä akkomaa varten (kysyy muutaman kysymyksen):
|
||||||
|
|
||||||
`# adduser pleroma`
|
`# adduser akkoma`
|
||||||
|
|
||||||
Vaihda pleroma-käyttäjään ja mene kotihakemistoosi:
|
Vaihda akkoma-käyttäjään ja mene kotihakemistoosi:
|
||||||
|
|
||||||
`# su - pleroma`
|
`# su - akkoma`
|
||||||
|
|
||||||
Lataa pleroman lähdekoodi:
|
Lataa akkoman lähdekoodi:
|
||||||
|
|
||||||
`$ git clone -b stable https://git.pleroma.social/pleroma/pleroma.git`
|
`$ git clone https://akkoma.dev/AkkomaGang/akkoma.git`
|
||||||
|
|
||||||
`$ cd pleroma`
|
`$ cd akkoma`
|
||||||
|
|
||||||
Asenna tarvittavat elixir-kirjastot:
|
Asenna tarvittavat elixir-kirjastot:
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ Aja luodut tietokantakomennot:
|
||||||
|
|
||||||
`$ MIX_ENV=prod mix ecto.migrate`
|
`$ MIX_ENV=prod mix ecto.migrate`
|
||||||
|
|
||||||
Käynnistä pleroma-prosessi:
|
Käynnistä akkoma-prosessi:
|
||||||
|
|
||||||
`$ MIX_ENV=prod mix compile`
|
`$ MIX_ENV=prod mix compile`
|
||||||
|
|
||||||
|
@ -90,18 +90,18 @@ että kohta "uri" on "https://esimerkki.com".
|
||||||
Huom! Muista varmistaa että muuttuja MIX_ENV on "prod" mix-komentoja ajaessasi.
|
Huom! Muista varmistaa että muuttuja MIX_ENV on "prod" mix-komentoja ajaessasi.
|
||||||
Mix lukee oikean konfiguraatiotiedoston sen mukaisesti.
|
Mix lukee oikean konfiguraatiotiedoston sen mukaisesti.
|
||||||
|
|
||||||
Ohessa enimmäkseen toimivaksi todettu rc.d-skripti pleroman käynnistämiseen.
|
Ohessa enimmäkseen toimivaksi todettu rc.d-skripti akkoman käynnistämiseen.
|
||||||
Kirjoita se tiedostoon /etc/rc.d/pleroma. Tämän jälkeen aja
|
Kirjoita se tiedostoon /etc/rc.d/akkoma. Tämän jälkeen aja
|
||||||
`# chmod +x /etc/rc.d/pleroma`, ja voit käynnistää pleroman komennolla
|
`# chmod +x /etc/rc.d/akkoma`, ja voit käynnistää akkoman komennolla
|
||||||
`# /etc/rc.d/pleroma start`.
|
`# /etc/rc.d/akkoma start`.
|
||||||
|
|
||||||
```
|
```
|
||||||
#!/bin/ksh
|
#!/bin/ksh
|
||||||
#/etc/rc.d/pleroma
|
#/etc/rc.d/akkoma
|
||||||
|
|
||||||
daemon="cd /home/pleroma/pleroma;MIX_ENV=prod /usr/local/bin/elixir"
|
daemon="cd /home/akkoma/akkoma;MIX_ENV=prod /usr/local/bin/elixir"
|
||||||
daemon_flags="--detached /usr/local/bin/mix phx.server"
|
daemon_flags="--detached /usr/local/bin/mix phx.server"
|
||||||
daemon_user="pleroma"
|
daemon_user="akkoma"
|
||||||
rc_reload="NO"
|
rc_reload="NO"
|
||||||
rc_bg="YES"
|
rc_bg="YES"
|
||||||
|
|
||||||
|
@ -112,8 +112,8 @@ pexp="beam"
|
||||||
rc_cmd $1
|
rc_cmd $1
|
||||||
```
|
```
|
||||||
|
|
||||||
Tämän jälkeen tarvitset enää HTTP-serverin välittämään kutsut pleroma-prosessille.
|
Tämän jälkeen tarvitset enää HTTP-serverin välittämään kutsut akkoma-prosessille.
|
||||||
Tiedostosta `install/pleroma.nginx` löytyy esimerkkikonfiguraatio, ja TLS-sertifikaatit
|
Tiedostosta `install/akkoma.nginx` löytyy esimerkkikonfiguraatio, ja TLS-sertifikaatit
|
||||||
saat ilmaiseksi esimerkiksi [letsencryptiltä](https://certbot.eff.org/lets-encrypt/opbsd-nginx.html).
|
saat ilmaiseksi esimerkiksi [letsencryptiltä](https://certbot.eff.org/lets-encrypt/opbsd-nginx.html).
|
||||||
Nginx asentuu yksinkertaisesti komennolla `# pkg_add nginx`.
|
Nginx asentuu yksinkertaisesti komennolla `# pkg_add nginx`.
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{! backend/installation/otp_vs_from_source.include !}
|
{! backend/installation/otp_vs_from_source.include !}
|
||||||
|
|
||||||
This guide covers a installation using an OTP release. To install Pleroma from source, please check out the corresponding guide for your distro.
|
This guide covers a installation using an OTP release. To install Akkoma from source, please check out the corresponding guide for your distro.
|
||||||
|
|
||||||
## Pre-requisites
|
## Pre-requisites
|
||||||
* A machine running Linux with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPU, you have root access to. If you are not sure if it's compatible see [Detecting flavour section](#detecting-flavour) below
|
* A machine running Linux with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPU, you have root access to. If you are not sure if it's compatible see [Detecting flavour section](#detecting-flavour) below
|
||||||
|
@ -23,7 +23,7 @@ If your platform is supported the output will contain the flavour string, you wi
|
||||||
|
|
||||||
### Installing the required packages
|
### Installing the required packages
|
||||||
|
|
||||||
Other than things bundled in the OTP release Pleroma depends on:
|
Other than things bundled in the OTP release Akkoma depends on:
|
||||||
|
|
||||||
* curl (to download the release build)
|
* curl (to download the release build)
|
||||||
* unzip (needed to unpack release builds)
|
* unzip (needed to unpack release builds)
|
||||||
|
@ -104,62 +104,62 @@ Restart PostgreSQL to apply configuration changes:
|
||||||
systemctl restart postgresql
|
systemctl restart postgresql
|
||||||
```
|
```
|
||||||
|
|
||||||
### Installing Pleroma
|
### Installing Akkoma
|
||||||
```sh
|
```sh
|
||||||
# Create a Pleroma user
|
# Create a Akkoma user
|
||||||
adduser --system --shell /bin/false --home /opt/pleroma pleroma
|
adduser --system --shell /bin/false --home /opt/akkoma akkoma
|
||||||
|
|
||||||
# Set the flavour environment variable to the string you got in Detecting flavour section.
|
# Set the flavour environment variable to the string you got in Detecting flavour section.
|
||||||
# For example if the flavour is `amd64-musl` the command will be
|
# For example if the flavour is `amd64-musl` the command will be
|
||||||
export FLAVOUR="amd64-musl"
|
export FLAVOUR="amd64-musl"
|
||||||
|
|
||||||
# Clone the release build into a temporary directory and unpack it
|
# Clone the release build into a temporary directory and unpack it
|
||||||
su pleroma -s $SHELL -lc "
|
su akkoma -s $SHELL -lc "
|
||||||
curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=$FLAVOUR' -o /tmp/pleroma.zip
|
curl 'https://akkoma-updates.s3-website.fr-par.scw.cloud/develop/akkoma-$FLAVOUR.zip' -o /tmp/akkoma.zip
|
||||||
unzip /tmp/pleroma.zip -d /tmp/
|
unzip /tmp/akkoma.zip -d /tmp/
|
||||||
"
|
"
|
||||||
|
|
||||||
# Move the release to the home directory and delete temporary files
|
# Move the release to the home directory and delete temporary files
|
||||||
su pleroma -s $SHELL -lc "
|
su akkoma -s $SHELL -lc "
|
||||||
mv /tmp/release/* /opt/pleroma
|
mv /tmp/release/* /opt/akkoma
|
||||||
rmdir /tmp/release
|
rmdir /tmp/release
|
||||||
rm /tmp/pleroma.zip
|
rm /tmp/akkoma.zip
|
||||||
"
|
"
|
||||||
# Create uploads directory and set proper permissions (skip if planning to use a remote uploader)
|
# Create uploads directory and set proper permissions (skip if planning to use a remote uploader)
|
||||||
# Note: It does not have to be `/var/lib/pleroma/uploads`, the config generator will ask about the upload directory later
|
# Note: It does not have to be `/var/lib/akkoma/uploads`, the config generator will ask about the upload directory later
|
||||||
|
|
||||||
mkdir -p /var/lib/pleroma/uploads
|
mkdir -p /var/lib/akkoma/uploads
|
||||||
chown -R pleroma /var/lib/pleroma
|
chown -R akkoma /var/lib/akkoma
|
||||||
|
|
||||||
# Create custom public files directory (custom emojis, frontend bundle overrides, robots.txt, etc.)
|
# Create custom public files directory (custom emojis, frontend bundle overrides, robots.txt, etc.)
|
||||||
# Note: It does not have to be `/var/lib/pleroma/static`, the config generator will ask about the custom public files directory later
|
# Note: It does not have to be `/var/lib/akkoma/static`, the config generator will ask about the custom public files directory later
|
||||||
mkdir -p /var/lib/pleroma/static
|
mkdir -p /var/lib/akkoma/static
|
||||||
chown -R pleroma /var/lib/pleroma
|
chown -R akkoma /var/lib/akkoma
|
||||||
|
|
||||||
# Create a config directory
|
# Create a config directory
|
||||||
mkdir -p /etc/pleroma
|
mkdir -p /etc/akkoma
|
||||||
chown -R pleroma /etc/pleroma
|
chown -R akkoma /etc/akkoma
|
||||||
|
|
||||||
# Run the config generator
|
# Run the config generator
|
||||||
su pleroma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql"
|
su akkoma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/akkoma/config.exs --output-psql /tmp/setup_db.psql"
|
||||||
|
|
||||||
# Create the postgres database
|
# Create the postgres database
|
||||||
su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql"
|
su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql"
|
||||||
|
|
||||||
# Create the database schema
|
# Create the database schema
|
||||||
su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"
|
su akkoma -s $SHELL -lc "./bin/pleroma_ctl migrate"
|
||||||
|
|
||||||
# If you have installed RUM indexes uncommend and run
|
# If you have installed RUM indexes uncommend and run
|
||||||
# su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/"
|
# su akkoma -s $SHELL -lc "./bin/pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/"
|
||||||
|
|
||||||
# Start the instance to verify that everything is working as expected
|
# Start the instance to verify that everything is working as expected
|
||||||
su pleroma -s $SHELL -lc "./bin/pleroma daemon"
|
su akkoma -s $SHELL -lc "./bin/pleroma daemon"
|
||||||
|
|
||||||
# Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly
|
# Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly
|
||||||
sleep 20 && curl http://localhost:4000/api/v1/instance
|
sleep 20 && curl http://localhost:4000/api/v1/instance
|
||||||
|
|
||||||
# Stop the instance
|
# Stop the instance
|
||||||
su pleroma -s $SHELL -lc "./bin/pleroma stop"
|
su akkoma -s $SHELL -lc "./bin/pleroma stop"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Setting up nginx and getting Let's Encrypt SSL certificaties
|
### Setting up nginx and getting Let's Encrypt SSL certificaties
|
||||||
|
@ -169,24 +169,24 @@ su pleroma -s $SHELL -lc "./bin/pleroma stop"
|
||||||
certbot certonly --standalone --preferred-challenges http -d yourinstance.tld
|
certbot certonly --standalone --preferred-challenges http -d yourinstance.tld
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Copy Pleroma nginx configuration to the nginx folder
|
#### Copy Akkoma nginx configuration to the nginx folder
|
||||||
|
|
||||||
The location of nginx configs is dependent on the distro
|
The location of nginx configs is dependent on the distro
|
||||||
|
|
||||||
=== "Alpine"
|
=== "Alpine"
|
||||||
```
|
```
|
||||||
cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/conf.d/pleroma.conf
|
cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/conf.d/akkoma.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Debian/Ubuntu"
|
=== "Debian/Ubuntu"
|
||||||
```
|
```
|
||||||
cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.conf
|
cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/sites-available/akkoma.conf
|
||||||
ln -s /etc/nginx/sites-available/pleroma.conf /etc/nginx/sites-enabled/pleroma.conf
|
ln -s /etc/nginx/sites-available/akkoma.conf /etc/nginx/sites-enabled/akkoma.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
If your distro does not have either of those you can append `include /etc/nginx/pleroma.conf` to the end of the http section in /etc/nginx/nginx.conf and
|
If your distro does not have either of those you can append `include /etc/nginx/akkoma.conf` to the end of the http section in /etc/nginx/nginx.conf and
|
||||||
```sh
|
```sh
|
||||||
cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/pleroma.conf
|
cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/akkoma.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Edit the nginx config
|
#### Edit the nginx config
|
||||||
|
@ -209,33 +209,33 @@ nginx -t
|
||||||
systemctl start nginx
|
systemctl start nginx
|
||||||
```
|
```
|
||||||
|
|
||||||
At this point if you open your (sub)domain in a browser you should see a 502 error, that's because Pleroma is not started yet.
|
At this point if you open your (sub)domain in a browser you should see a 502 error, that's because Akkoma is not started yet.
|
||||||
|
|
||||||
### Setting up a system service
|
### Setting up a system service
|
||||||
|
|
||||||
=== "Alpine"
|
=== "Alpine"
|
||||||
```
|
```
|
||||||
# Copy the service into a proper directory
|
# Copy the service into a proper directory
|
||||||
cp /opt/pleroma/installation/init.d/pleroma /etc/init.d/pleroma
|
cp /opt/akkoma/installation/init.d/akkoma /etc/init.d/akkoma
|
||||||
|
|
||||||
# Start pleroma and enable it on boot
|
# Start akkoma and enable it on boot
|
||||||
rc-service pleroma start
|
rc-service akkoma start
|
||||||
rc-update add pleroma
|
rc-update add akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Debian/Ubuntu"
|
=== "Debian/Ubuntu"
|
||||||
```
|
```
|
||||||
# Copy the service into a proper directory
|
# Copy the service into a proper directory
|
||||||
cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
|
cp /opt/akkoma/installation/akkoma.service /etc/systemd/system/akkoma.service
|
||||||
|
|
||||||
# Start pleroma and enable it on boot
|
# Start akkoma and enable it on boot
|
||||||
systemctl start pleroma
|
systemctl start akkoma
|
||||||
systemctl enable pleroma
|
systemctl enable akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
If everything worked, you should see Pleroma-FE when visiting your domain. If that didn't happen, try reviewing the installation steps, starting Pleroma in the foreground and seeing if there are any errrors.
|
If everything worked, you should see Akkoma-FE when visiting your domain. If that didn't happen, try reviewing the installation steps, starting Akkoma in the foreground and seeing if there are any errrors.
|
||||||
|
|
||||||
Questions about the installation or didn’t it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC, you can also [file an issue on our Gitlab](https://git.pleroma.social/pleroma/pleroma-support/issues/new).
|
Questions about the installation or didn’t it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC, you can also [file an issue on our Gitea](https://akkoma.dev/AkkomaGang/akkoma/issues).
|
||||||
|
|
||||||
## Post installation
|
## Post installation
|
||||||
|
|
||||||
|
@ -266,10 +266,10 @@ nginx -t
|
||||||
# Add it to the daily cron
|
# Add it to the daily cron
|
||||||
echo '#!/bin/sh
|
echo '#!/bin/sh
|
||||||
certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --post-hook "rc-service nginx reload"
|
certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --post-hook "rc-service nginx reload"
|
||||||
' > /etc/periodic/daily/renew-pleroma-cert
|
' > /etc/periodic/daily/renew-akkoma-cert
|
||||||
chmod +x /etc/periodic/daily/renew-pleroma-cert
|
chmod +x /etc/periodic/daily/renew-akkoma-cert
|
||||||
|
|
||||||
# If everything worked the output should contain /etc/cron.daily/renew-pleroma-cert
|
# If everything worked the output should contain /etc/cron.daily/renew-akkoma-cert
|
||||||
run-parts --test /etc/periodic/daily
|
run-parts --test /etc/periodic/daily
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -284,17 +284,17 @@ nginx -t
|
||||||
# Add it to the daily cron
|
# Add it to the daily cron
|
||||||
echo '#!/bin/sh
|
echo '#!/bin/sh
|
||||||
certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --post-hook "systemctl reload nginx"
|
certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --post-hook "systemctl reload nginx"
|
||||||
' > /etc/cron.daily/renew-pleroma-cert
|
' > /etc/cron.daily/renew-akkoma-cert
|
||||||
chmod +x /etc/cron.daily/renew-pleroma-cert
|
chmod +x /etc/cron.daily/renew-akkoma-cert
|
||||||
|
|
||||||
# If everything worked the output should contain /etc/cron.daily/renew-pleroma-cert
|
# If everything worked the output should contain /etc/cron.daily/renew-akkoma-cert
|
||||||
run-parts --test /etc/cron.daily
|
run-parts --test /etc/cron.daily
|
||||||
```
|
```
|
||||||
|
|
||||||
## Create your first user and set as admin
|
## Create your first user and set as admin
|
||||||
```sh
|
```sh
|
||||||
cd /opt/pleroma
|
cd /opt/akkoma
|
||||||
su pleroma -s $SHELL -lc "./bin/pleroma_ctl user new joeuser joeuser@sld.tld --admin"
|
su akkoma -s $SHELL -lc "./bin/pleroma_ctl user new joeuser joeuser@sld.tld --admin"
|
||||||
```
|
```
|
||||||
This will create an account withe the username of 'joeuser' with the email address of joeuser@sld.tld, and set that user's account as an admin. This will result in a link that you can paste into the browser, which logs you in and enables you to set the password.
|
This will create an account withe the username of 'joeuser' with the email address of joeuser@sld.tld, and set that user's account as an admin. This will result in a link that you can paste into the browser, which logs you in and enables you to set the password.
|
||||||
|
|
||||||
|
@ -304,4 +304,4 @@ This will create an account withe the username of 'joeuser' with the email addre
|
||||||
|
|
||||||
## Questions
|
## Questions
|
||||||
|
|
||||||
Questions about the installation or didn’t it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC, you can also [file an issue on our Gitlab](https://git.pleroma.social/pleroma/pleroma-support/issues/new).
|
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
## OTP releases vs from-source installations
|
## OTP releases vs from-source installations
|
||||||
|
|
||||||
There are two ways to install Pleroma. You can use OTP releases or do a from-source installation. OTP releases are as close as you can get to binary releases with Erlang/Elixir. The release is self-contained, and provides everything needed to boot it, it is easily administered via the provided shell script to open up a remote console, start/stop/restart the release, start in the background, send remote commands, and more. With from source installations you install Pleroma from source, meaning you have to install certain dependencies like Erlang+Elixir and compile Pleroma yourself.
|
There are two ways to install Akkoma. You can use OTP releases or do a from-source installation. OTP releases are as close as you can get to binary releases with Erlang/Elixir. The release is self-contained, and provides everything needed to boot it, it is easily administered via the provided shell script to open up a remote console, start/stop/restart the release, start in the background, send remote commands, and more. With from source installations you install Akkoma from source, meaning you have to install certain dependencies like Erlang+Elixir and compile Akkoma yourself.
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
# Installing on Yunohost
|
|
||||||
|
|
||||||
[YunoHost](https://yunohost.org) is a server operating system aimed at self-hosting. The YunoHost community maintains a package of Pleroma which allows you to install Pleroma on YunoHost. You can install it via the normal way through the admin web interface, or through the CLI. More information can be found at [the repo of the package](https://github.com/YunoHost-Apps/pleroma_ynh).
|
|
||||||
|
|
||||||
## Questions
|
|
||||||
|
|
||||||
Questions and problems related to the YunoHost parts can be done through the [regular YunoHost channels](https://yunohost.org/en/help).
|
|
||||||
|
|
||||||
For questions about Pleroma, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC.
|
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Pleroma social network
|
Description=Akkoma social network
|
||||||
After=network.target postgresql.service
|
After=network.target postgresql.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
@ -7,23 +7,23 @@ ExecReload=/bin/kill $MAINPID
|
||||||
KillMode=process
|
KillMode=process
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
; Name of the user that runs the Pleroma service.
|
; Name of the user that runs the Akkoma service.
|
||||||
User=pleroma
|
User=akkoma
|
||||||
; Declares that Pleroma runs in production mode.
|
; Declares that Akkoma runs in production mode.
|
||||||
Environment="MIX_ENV=prod"
|
Environment="MIX_ENV=prod"
|
||||||
|
|
||||||
; Make sure that all paths fit your installation.
|
; Make sure that all paths fit your installation.
|
||||||
; Path to the home directory of the user running the Pleroma service.
|
; Path to the home directory of the user running the Akkoma service.
|
||||||
Environment="HOME=/var/lib/pleroma"
|
Environment="HOME=/var/lib/akkoma"
|
||||||
; Path to the folder containing the Pleroma installation.
|
; Path to the folder containing the Akkoma installation.
|
||||||
WorkingDirectory=/opt/pleroma
|
WorkingDirectory=/opt/akkoma
|
||||||
; Path to the Mix binary.
|
; Path to the Mix binary.
|
||||||
ExecStart=/usr/bin/mix phx.server
|
ExecStart=/usr/bin/mix phx.server
|
||||||
|
|
||||||
; Some security directives.
|
; Some security directives.
|
||||||
; Use private /tmp and /var/tmp folders inside a new file system namespace, which are discarded after the process stops.
|
; Use private /tmp and /var/tmp folders inside a new file system namespace, which are discarded after the process stops.
|
||||||
PrivateTmp=true
|
PrivateTmp=true
|
||||||
; The /home, /root, and /run/user folders can not be accessed by this service anymore. If your Pleroma user has its home folder in one of the restricted places, or use one of these folders as its working directory, you have to set this to false.
|
; The /home, /root, and /run/user folders can not be accessed by this service anymore. If your Akkoma user has its home folder in one of the restricted places, or use one of these folders as its working directory, you have to set this to false.
|
||||||
ProtectHome=true
|
ProtectHome=true
|
||||||
; Mount /usr, /boot, and /etc as read-only for processes invoked by this service.
|
; Mount /usr, /boot, and /etc as read-only for processes invoked by this service.
|
||||||
ProtectSystem=full
|
ProtectSystem=full
|
21
installation/akkoma.supervisord
Normal file
21
installation/akkoma.supervisord
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
; Assumes akkoma is installed in /home/akkoma/akkoma and running as the akkoma user
|
||||||
|
; Also assumes mix is in /usr/bin, this might differ on BSDs or niche Linux distros
|
||||||
|
; Logs into /home/akkoma/logs
|
||||||
|
[program:akkoma]
|
||||||
|
command=/usr/bin/mix phx.server
|
||||||
|
directory=/home/akkoma/akkoma
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
user=akkoma
|
||||||
|
environment =
|
||||||
|
MIX_ENV=prod,
|
||||||
|
HOME=/home/akkoma,
|
||||||
|
USER=akkoma,
|
||||||
|
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/akkoma/bin:%(ENV_PATH)s",
|
||||||
|
PWD=/home/akkoma/akkoma
|
||||||
|
stdout_logfile=/home/akkoma/logs/stdout.log
|
||||||
|
stdout_logfile_maxbytes=50MB
|
||||||
|
stdout_logfile_backups=10
|
||||||
|
stderr_logfile=/home/akkoma/logs/stderr.log
|
||||||
|
stderr_logfile_maxbytes=50MB
|
||||||
|
stderr_logfile_backups=10
|
|
@ -1,14 +1,14 @@
|
||||||
# Sample Apache config for Pleroma
|
# Sample Apache config for Akkoma
|
||||||
#
|
#
|
||||||
# Simple installation instructions:
|
# Simple installation instructions:
|
||||||
# 1. Install your TLS certificate. We recommend using Let's Encrypt via Certbot
|
# 1. Install your TLS certificate. We recommend using Let's Encrypt via Certbot
|
||||||
# 2. Replace 'example.tld' with your instance's domain.
|
# 2. Replace 'example.tld' with your instance's domain.
|
||||||
# 3. This assumes a Debian-style Apache config. Copy this file to
|
# 3. This assumes a Debian-style Apache config. Copy this file to
|
||||||
# /etc/apache2/sites-available/ and then activate the site by running
|
# /etc/apache2/sites-available/ and then activate the site by running
|
||||||
# 'a2ensite pleroma-apache.conf', then restart Apache.
|
# 'a2ensite akkoma-apache.conf', then restart Apache.
|
||||||
#
|
#
|
||||||
# Optional: enable disk-based caching for the media proxy
|
# Optional: enable disk-based caching for the media proxy
|
||||||
# For details, see https://git.pleroma.social/pleroma/pleroma/wikis/How%20to%20activate%20mediaproxy
|
# For details, see https://docs.akkoma.dev/main/backend/configuration/howto_mediaproxy/
|
||||||
#
|
#
|
||||||
# 1. Create a directory as shown below for the CacheRoot and make sure
|
# 1. Create a directory as shown below for the CacheRoot and make sure
|
||||||
# the Apache user can write to it.
|
# the Apache user can write to it.
|
||||||
|
@ -42,9 +42,9 @@ Define servername example.tld
|
||||||
ServerName ${servername}
|
ServerName ${servername}
|
||||||
ServerTokens Prod
|
ServerTokens Prod
|
||||||
|
|
||||||
# If you want Pleroma-specific logs
|
# If you want Akkoma-specific logs
|
||||||
#ErrorLog /var/log/httpd-pleroma-error.log
|
#ErrorLog /var/log/httpd-akkoma-error.log
|
||||||
#CustomLog /var/log/httpd-pleroma-access.log combined
|
#CustomLog /var/log/httpd-akkoma-access.log combined
|
||||||
|
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
|
@ -60,7 +60,7 @@ ServerTokens Prod
|
||||||
Include /etc/letsencrypt/options-ssl-apache.conf
|
Include /etc/letsencrypt/options-ssl-apache.conf
|
||||||
|
|
||||||
# Uncomment the following to enable MediaProxy caching on disk
|
# Uncomment the following to enable MediaProxy caching on disk
|
||||||
#CacheRoot /tmp/pleroma-media-cache/
|
#CacheRoot /tmp/akkoma-media-cache/
|
||||||
#CacheDirLevels 1
|
#CacheDirLevels 1
|
||||||
#CacheDirLength 2
|
#CacheDirLength 2
|
||||||
#CacheEnable disk /proxy
|
#CacheEnable disk /proxy
|
|
@ -4,7 +4,7 @@
|
||||||
# You will likely need to setup a sudo rule like the following:
|
# You will likely need to setup a sudo rule like the following:
|
||||||
#
|
#
|
||||||
# Cmnd_Alias HTCACHECLEAN = /usr/local/sbin/htcacheclean
|
# Cmnd_Alias HTCACHECLEAN = /usr/local/sbin/htcacheclean
|
||||||
# pleroma ALL=HTCACHECLEAN, NOPASSWD: HTCACHECLEAN
|
# akkoma ALL=HTCACHECLEAN, NOPASSWD: HTCACHECLEAN
|
||||||
#
|
#
|
||||||
# Please also ensure you have enabled:
|
# Please also ensure you have enabled:
|
||||||
#
|
#
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
SCRIPTNAME=${0##*/}
|
SCRIPTNAME=${0##*/}
|
||||||
|
|
||||||
# mod_disk_cache directory
|
# mod_disk_cache directory
|
||||||
CACHE_DIRECTORY="/tmp/pleroma-media-cache"
|
CACHE_DIRECTORY="/tmp/akkoma-media-cache"
|
||||||
|
|
||||||
## Removes an item via the htcacheclean utility
|
## Removes an item via the htcacheclean utility
|
||||||
## $1 - the filename, can be a pattern .
|
## $1 - the filename, can be a pattern .
|
17
installation/caddy/Caddyfile
Normal file
17
installation/caddy/Caddyfile
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# default Caddyfile config for Akkoma
|
||||||
|
#
|
||||||
|
# Simple installation instructions:
|
||||||
|
# 1. Replace 'example.tld' with your instance's domain wherever it appears.
|
||||||
|
# 2. Copy this section into your Caddyfile and restart Caddy.
|
||||||
|
|
||||||
|
example.tld {
|
||||||
|
log {
|
||||||
|
output file /var/log/caddy/akkoma.log
|
||||||
|
}
|
||||||
|
|
||||||
|
encode gzip
|
||||||
|
|
||||||
|
# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only
|
||||||
|
# and `localhost.` resolves to [::0] on some systems: see issue #930
|
||||||
|
reverse_proxy 127.0.0.1:4000
|
||||||
|
}
|
|
@ -1,38 +0,0 @@
|
||||||
# default Caddyfile config for Pleroma
|
|
||||||
#
|
|
||||||
# Simple installation instructions:
|
|
||||||
# 1. Replace 'example.tld' with your instance's domain wherever it appears.
|
|
||||||
# 2. Copy this section into your Caddyfile and restart Caddy.
|
|
||||||
|
|
||||||
example.tld {
|
|
||||||
log /var/log/caddy/pleroma_access.log
|
|
||||||
errors /var/log/caddy/pleroma_error.log
|
|
||||||
|
|
||||||
gzip
|
|
||||||
|
|
||||||
# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only
|
|
||||||
# and `localhost.` resolves to [::0] on some systems: see issue #930
|
|
||||||
proxy / 127.0.0.1:4000 {
|
|
||||||
websocket
|
|
||||||
transparent
|
|
||||||
}
|
|
||||||
|
|
||||||
tls {
|
|
||||||
# Remove the rest of the lines in here, if you want to support older devices
|
|
||||||
key_type p256
|
|
||||||
ciphers ECDHE-ECDSA-WITH-CHACHA20-POLY1305 ECDHE-RSA-WITH-CHACHA20-POLY1305 ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-ECDSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-GCM-SHA256
|
|
||||||
}
|
|
||||||
|
|
||||||
# If you do not want to use the mediaproxy function, remove these lines.
|
|
||||||
# To use this directive, you need the http.cache plugin for Caddy.
|
|
||||||
cache {
|
|
||||||
match_path /media
|
|
||||||
default_max_age 720m
|
|
||||||
}
|
|
||||||
|
|
||||||
cache {
|
|
||||||
match_path /proxy
|
|
||||||
default_max_age 720m
|
|
||||||
}
|
|
||||||
# Stop removing lines here.
|
|
||||||
}
|
|
27
installation/freebsd/rc.d/akkoma
Executable file
27
installation/freebsd/rc.d/akkoma
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# $FreeBSD$
|
||||||
|
# PROVIDE: akkoma
|
||||||
|
# REQUIRE: DAEMON postgresql
|
||||||
|
# KEYWORD: shutdown
|
||||||
|
|
||||||
|
# sudo -u akkoma MIX_ENV=prod elixir --erl \"-detached\" -S mix phx.server
|
||||||
|
|
||||||
|
. /etc/rc.subr
|
||||||
|
|
||||||
|
name=akkoma
|
||||||
|
rcvar=akkoma_enable
|
||||||
|
|
||||||
|
desc="Akkoma Social Media Platform"
|
||||||
|
|
||||||
|
load_rc_config ${name}
|
||||||
|
|
||||||
|
: ${akkoma_user:=akkoma}
|
||||||
|
: ${akkoma_home:=$(getent passwd ${akkoma_user} | awk -F: '{print $6}')}
|
||||||
|
: ${akkoma_chdir:="${akkoma_home}/akkoma"}
|
||||||
|
: ${akkoma_env:="HOME=${akkoma_home} MIX_ENV=prod"}
|
||||||
|
|
||||||
|
command=/usr/local/bin/elixir
|
||||||
|
command_args="--erl \"-detached\" -S /usr/local/bin/mix phx.server"
|
||||||
|
procname="*beam.smp"
|
||||||
|
|
||||||
|
run_rc_command "$1"
|
|
@ -1,27 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# $FreeBSD$
|
|
||||||
# PROVIDE: pleroma
|
|
||||||
# REQUIRE: DAEMON postgresql
|
|
||||||
# KEYWORD: shutdown
|
|
||||||
|
|
||||||
# sudo -u pleroma MIX_ENV=prod elixir --erl \"-detached\" -S mix phx.server
|
|
||||||
|
|
||||||
. /etc/rc.subr
|
|
||||||
|
|
||||||
name=pleroma
|
|
||||||
rcvar=pleroma_enable
|
|
||||||
|
|
||||||
desc="Pleroma Social Media Platform"
|
|
||||||
|
|
||||||
load_rc_config ${name}
|
|
||||||
|
|
||||||
: ${pleroma_user:=pleroma}
|
|
||||||
: ${pleroma_home:=$(getent passwd ${pleroma_user} | awk -F: '{print $6}')}
|
|
||||||
: ${pleroma_chdir:="${pleroma_home}/pleroma"}
|
|
||||||
: ${pleroma_env:="HOME=${pleroma_home} MIX_ENV=prod"}
|
|
||||||
|
|
||||||
command=/usr/local/bin/elixir
|
|
||||||
command_args="--erl \"-detached\" -S /usr/local/bin/mix phx.server"
|
|
||||||
procname="*beam.smp"
|
|
||||||
|
|
||||||
run_rc_command "$1"
|
|
45
installation/init.d/akkoma
Executable file
45
installation/init.d/akkoma
Executable file
|
@ -0,0 +1,45 @@
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
supervisor=supervise-daemon
|
||||||
|
command_user=akkoma:akkoma
|
||||||
|
command_background=1
|
||||||
|
# Ask process to terminate within 30 seconds, otherwise kill it
|
||||||
|
retry="SIGTERM/30/SIGKILL/5"
|
||||||
|
pidfile="/var/run/akkoma.pid"
|
||||||
|
directory=/opt/akkoma
|
||||||
|
healthcheck_delay=60
|
||||||
|
healthcheck_timer=30
|
||||||
|
|
||||||
|
: ${akkoma_port:-4000}
|
||||||
|
|
||||||
|
# Needs OpenRC >= 0.42
|
||||||
|
#respawn_max=0
|
||||||
|
#respawn_delay=5
|
||||||
|
|
||||||
|
# put akkoma_console=YES in /etc/conf.d/akkoma if you want to be able to
|
||||||
|
# connect to akkoma via an elixir console
|
||||||
|
if yesno "${akkoma_console}"; then
|
||||||
|
command=elixir
|
||||||
|
command_args="--name akkoma@127.0.0.1 --erl '-kernel inet_dist_listen_min 9001 inet_dist_listen_max 9001 inet_dist_use_interface {127,0,0,1}' -S mix phx.server"
|
||||||
|
|
||||||
|
start_post() {
|
||||||
|
einfo "You can get a console by using this command as akkoma's user:"
|
||||||
|
einfo "iex --name console@127.0.0.1 --remsh akkoma@127.0.0.1"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
command=/usr/bin/mix
|
||||||
|
command_args="phx.server"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export MIX_ENV=prod
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need nginx postgresql
|
||||||
|
}
|
||||||
|
|
||||||
|
healthcheck() {
|
||||||
|
# put akkoma_health=YES in /etc/conf.d/akkoma if you want healthchecking
|
||||||
|
# and make sure you have curl installed
|
||||||
|
yesno "$akkoma_health" || return 0
|
||||||
|
|
||||||
|
curl -q "localhost:${akkoma_port}/api/akkoma/healthcheck"
|
||||||
|
}
|
|
@ -1,45 +0,0 @@
|
||||||
#!/sbin/openrc-run
|
|
||||||
supervisor=supervise-daemon
|
|
||||||
command_user=pleroma:pleroma
|
|
||||||
command_background=1
|
|
||||||
# Ask process to terminate within 30 seconds, otherwise kill it
|
|
||||||
retry="SIGTERM/30/SIGKILL/5"
|
|
||||||
pidfile="/var/run/pleroma.pid"
|
|
||||||
directory=/opt/pleroma
|
|
||||||
healthcheck_delay=60
|
|
||||||
healthcheck_timer=30
|
|
||||||
|
|
||||||
: ${pleroma_port:-4000}
|
|
||||||
|
|
||||||
# Needs OpenRC >= 0.42
|
|
||||||
#respawn_max=0
|
|
||||||
#respawn_delay=5
|
|
||||||
|
|
||||||
# put pleroma_console=YES in /etc/conf.d/pleroma if you want to be able to
|
|
||||||
# connect to pleroma via an elixir console
|
|
||||||
if yesno "${pleroma_console}"; then
|
|
||||||
command=elixir
|
|
||||||
command_args="--name pleroma@127.0.0.1 --erl '-kernel inet_dist_listen_min 9001 inet_dist_listen_max 9001 inet_dist_use_interface {127,0,0,1}' -S mix phx.server"
|
|
||||||
|
|
||||||
start_post() {
|
|
||||||
einfo "You can get a console by using this command as pleroma's user:"
|
|
||||||
einfo "iex --name console@127.0.0.1 --remsh pleroma@127.0.0.1"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
command=/usr/bin/mix
|
|
||||||
command_args="phx.server"
|
|
||||||
fi
|
|
||||||
|
|
||||||
export MIX_ENV=prod
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
need nginx postgresql
|
|
||||||
}
|
|
||||||
|
|
||||||
healthcheck() {
|
|
||||||
# put pleroma_health=YES in /etc/conf.d/pleroma if you want healthchecking
|
|
||||||
# and make sure you have curl installed
|
|
||||||
yesno "$pleroma_health" || return 0
|
|
||||||
|
|
||||||
curl -q "localhost:${pleroma_port}/api/pleroma/healthcheck"
|
|
||||||
}
|
|
|
@ -1,24 +1,24 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# PROVIDE: pleroma
|
# PROVIDE: akkoma
|
||||||
# REQUIRE: DAEMON pgsql
|
# REQUIRE: DAEMON pgsql
|
||||||
|
|
||||||
if [ -f /etc/rc.subr ]; then
|
if [ -f /etc/rc.subr ]; then
|
||||||
. /etc/rc.subr
|
. /etc/rc.subr
|
||||||
fi
|
fi
|
||||||
|
|
||||||
name="pleroma"
|
name="akkoma"
|
||||||
rcvar=${name}
|
rcvar=${name}
|
||||||
command="/usr/pkg/bin/elixir"
|
command="/usr/pkg/bin/elixir"
|
||||||
command_args="--detached -S /usr/pkg/bin/mix phx.server"
|
command_args="--detached -S /usr/pkg/bin/mix phx.server"
|
||||||
start_precmd="ulimit -n unlimited"
|
start_precmd="ulimit -n unlimited"
|
||||||
pidfile="/dev/null"
|
pidfile="/dev/null"
|
||||||
|
|
||||||
pleroma_chdir="${pleroma_home}/pleroma"
|
akkoma_chdir="${akkoma_home}/akkoma"
|
||||||
pleroma_env="HOME=${pleroma_home} MIX_ENV=prod"
|
akkoma_env="HOME=${akkoma_home} MIX_ENV=prod"
|
||||||
|
|
||||||
check_pidfile()
|
check_pidfile()
|
||||||
{
|
{
|
||||||
pid=$(pgrep -U "${pleroma_user}" /bin/beam.smp$)
|
pid=$(pgrep -U "${akkoma_user}" /bin/beam.smp$)
|
||||||
echo -n "${pid}"
|
echo -n "${pid}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# default nginx site config for Pleroma
|
# default nginx site config for Akkoma
|
||||||
#
|
#
|
||||||
# Simple installation instructions:
|
# Simple installation instructions:
|
||||||
# 1. Install your TLS certificate, possibly using Let's Encrypt.
|
# 1. Install your TLS certificate, possibly using Let's Encrypt.
|
||||||
|
@ -6,7 +6,7 @@
|
||||||
# 3. Copy this file to /etc/nginx/sites-available/ and then add a symlink to it
|
# 3. Copy this file to /etc/nginx/sites-available/ and then add a symlink to it
|
||||||
# in /etc/nginx/sites-enabled/ and run 'nginx -s reload' or restart nginx.
|
# in /etc/nginx/sites-enabled/ and run 'nginx -s reload' or restart nginx.
|
||||||
|
|
||||||
proxy_cache_path /tmp/pleroma-media-cache levels=1:2 keys_zone=pleroma_media_cache:10m max_size=10g
|
proxy_cache_path /tmp/akkoma-media-cache levels=1:2 keys_zone=akkoma_media_cache:10m max_size=10g
|
||||||
inactive=720m use_temp_path=off;
|
inactive=720m use_temp_path=off;
|
||||||
|
|
||||||
# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only
|
# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only
|
||||||
|
@ -82,7 +82,7 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^/(media|proxy) {
|
location ~ ^/(media|proxy) {
|
||||||
proxy_cache pleroma_media_cache;
|
proxy_cache akkoma_media_cache;
|
||||||
slice 1m;
|
slice 1m;
|
||||||
proxy_cache_key $host$uri$is_args$args$slice_range;
|
proxy_cache_key $host$uri$is_args$args$slice_range;
|
||||||
proxy_set_header Range $slice_range;
|
proxy_set_header Range $slice_range;
|
|
@ -5,7 +5,7 @@
|
||||||
SCRIPTNAME=${0##*/}
|
SCRIPTNAME=${0##*/}
|
||||||
|
|
||||||
# NGINX cache directory
|
# NGINX cache directory
|
||||||
CACHE_DIRECTORY="/tmp/pleroma-media-cache"
|
CACHE_DIRECTORY="/tmp/akkoma-media-cache"
|
||||||
|
|
||||||
## Return the files where the items are cached.
|
## Return the files where the items are cached.
|
||||||
## $1 - the filename, can be a pattern .
|
## $1 - the filename, can be a pattern .
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Default httpd.conf file for Pleroma on OpenBSD
|
# Default httpd.conf file for Akkoma on OpenBSD
|
||||||
# Simple installation instructions
|
# Simple installation instructions
|
||||||
# 1. Place file in /etc
|
# 1. Place file in /etc
|
||||||
# 2. Replace <IPv4 address> with your public IP address
|
# 2. Replace <IPv4 address> with your public IP address
|
||||||
|
|
34
installation/openbsd/rc.d/akkomad
Executable file
34
installation/openbsd/rc.d/akkomad
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/ksh
|
||||||
|
#
|
||||||
|
# Default init file for Akkoma on OpenBSD
|
||||||
|
#
|
||||||
|
# Simple installation instructions:
|
||||||
|
# 1. Install Akkoma per wiki instructions
|
||||||
|
# 2. Place this akkomad file in /etc/rc.d
|
||||||
|
# 3. Enable and start Akkoma
|
||||||
|
# # doas rcctl enable akkomad
|
||||||
|
# # doas rcctl start akkomad
|
||||||
|
#
|
||||||
|
|
||||||
|
daemon="/usr/local/bin/elixir"
|
||||||
|
daemon_flags="--detached -S /usr/local/bin/mix phx.server"
|
||||||
|
daemon_user="_akkoma"
|
||||||
|
|
||||||
|
. /etc/rc.d/rc.subr
|
||||||
|
|
||||||
|
rc_reload=NO
|
||||||
|
pexp="phx.server"
|
||||||
|
|
||||||
|
rc_check() {
|
||||||
|
pgrep -q -U _akkoma -f "phx.server"
|
||||||
|
}
|
||||||
|
|
||||||
|
rc_start() {
|
||||||
|
${rcexec} "cd akkoma; ${daemon} ${daemon_flags}"
|
||||||
|
}
|
||||||
|
|
||||||
|
rc_stop() {
|
||||||
|
pkill -q -U _akkoma -f "phx.server"
|
||||||
|
}
|
||||||
|
|
||||||
|
rc_cmd $1
|
|
@ -1,34 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# Default init file for Pleroma on OpenBSD
|
|
||||||
#
|
|
||||||
# Simple installation instructions:
|
|
||||||
# 1. Install Pleroma per wiki instructions
|
|
||||||
# 2. Place this pleromad file in /etc/rc.d
|
|
||||||
# 3. Enable and start Pleroma
|
|
||||||
# # doas rcctl enable pleromad
|
|
||||||
# # doas rcctl start pleromad
|
|
||||||
#
|
|
||||||
|
|
||||||
daemon="/usr/local/bin/elixir"
|
|
||||||
daemon_flags="--detached -S /usr/local/bin/mix phx.server"
|
|
||||||
daemon_user="_pleroma"
|
|
||||||
|
|
||||||
. /etc/rc.d/rc.subr
|
|
||||||
|
|
||||||
rc_reload=NO
|
|
||||||
pexp="phx.server"
|
|
||||||
|
|
||||||
rc_check() {
|
|
||||||
pgrep -q -U _pleroma -f "phx.server"
|
|
||||||
}
|
|
||||||
|
|
||||||
rc_start() {
|
|
||||||
${rcexec} "cd pleroma; ${daemon} ${daemon_flags}"
|
|
||||||
}
|
|
||||||
|
|
||||||
rc_stop() {
|
|
||||||
pkill -q -U _pleroma -f "phx.server"
|
|
||||||
}
|
|
||||||
|
|
||||||
rc_cmd $1
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Default relayd.conf file for Pleroma on OpenBSD
|
# Default relayd.conf file for Akkoma on OpenBSD
|
||||||
# Simple installation instructions:
|
# Simple installation instructions:
|
||||||
# 1. Place in /etc
|
# 1. Place in /etc
|
||||||
# 2. Replace <ipaddr> with your public IPv4 address
|
# 2. Replace <ipaddr> with your public IPv4 address
|
||||||
|
@ -13,19 +13,19 @@
|
||||||
ext_inet="<ipaddr>"
|
ext_inet="<ipaddr>"
|
||||||
#ext_inet6="<ip6addr>"
|
#ext_inet6="<ip6addr>"
|
||||||
|
|
||||||
table <pleroma_server> { 127.0.0.1 }
|
table <akkoma_server> { 127.0.0.1 }
|
||||||
table <httpd_server> { 127.0.0.1 }
|
table <httpd_server> { 127.0.0.1 }
|
||||||
|
|
||||||
http protocol plerup { # Protocol for upstream pleroma server
|
http protocol plerup { # Protocol for upstream akkoma server
|
||||||
#tcp { nodelay, sack, socket buffer 65536, backlog 128 } # Uncomment and adjust as you see fit
|
#tcp { nodelay, sack, socket buffer 65536, backlog 128 } # Uncomment and adjust as you see fit
|
||||||
tls ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA0-POLY1305"
|
tls ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA0-POLY1305"
|
||||||
tls ecdhe secp384r1
|
tls ecdhe secp384r1
|
||||||
|
|
||||||
# Forward some paths to the local server (as pleroma won't respond to them as you might want)
|
# Forward some paths to the local server (as akkoma won't respond to them as you might want)
|
||||||
pass request quick path "/robots.txt" forward to <httpd_server>
|
pass request quick path "/robots.txt" forward to <httpd_server>
|
||||||
|
|
||||||
# Append a bunch of headers
|
# Append a bunch of headers
|
||||||
match request header append "X-Forwarded-For" value "$REMOTE_ADDR" # This two header and the next one are not strictl required by pleroma but adding them won't hurt
|
match request header append "X-Forwarded-For" value "$REMOTE_ADDR" # This two header and the next one are not strictly required by akkoma but adding them won't hurt
|
||||||
match request header append "X-Forwarded-By" value "$SERVER_ADDR:$SERVER_PORT"
|
match request header append "X-Forwarded-By" value "$SERVER_ADDR:$SERVER_PORT"
|
||||||
|
|
||||||
match request header append "Connection" value "upgrade"
|
match request header append "Connection" value "upgrade"
|
||||||
|
@ -38,7 +38,7 @@ relay wwwtls {
|
||||||
|
|
||||||
protocol plerup
|
protocol plerup
|
||||||
|
|
||||||
forward to <pleroma_server> port 4000 check http "/" code 200
|
forward to <akkoma_server> port 4000 check http "/" code 200
|
||||||
forward to <httpd_server> port 80 check http "/robots.txt" code 200
|
forward to <httpd_server> port 80 check http "/robots.txt" code 200
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
; Assumes pleroma is installed in /home/pleroma/pleroma and running as the pleroma user
|
|
||||||
; Also assumes mix is in /usr/bin, this might differ on BSDs or niche Linux distros
|
|
||||||
; Logs into /home/pleroma/logs
|
|
||||||
[program:pleroma]
|
|
||||||
command=/usr/bin/mix phx.server
|
|
||||||
directory=/home/pleroma/pleroma
|
|
||||||
autostart=true
|
|
||||||
autorestart=true
|
|
||||||
user=pleroma
|
|
||||||
environment =
|
|
||||||
MIX_ENV=prod,
|
|
||||||
HOME=/home/pleroma,
|
|
||||||
USER=pleroma,
|
|
||||||
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/pleroma/bin:%(ENV_PATH)s",
|
|
||||||
PWD=/home/pleroma/pleroma
|
|
||||||
stdout_logfile=/home/pleroma/logs/stdout.log
|
|
||||||
stdout_logfile_maxbytes=50MB
|
|
||||||
stdout_logfile_backups=10
|
|
||||||
stderr_logfile=/home/pleroma/logs/stderr.log
|
|
||||||
stderr_logfile_maxbytes=50MB
|
|
||||||
stderr_logfile_backups=10
|
|
|
@ -23,21 +23,13 @@ def start_pleroma do
|
||||||
Pleroma.Config.Oban.warn()
|
Pleroma.Config.Oban.warn()
|
||||||
Pleroma.Application.limiters_setup()
|
Pleroma.Application.limiters_setup()
|
||||||
Application.put_env(:phoenix, :serve_endpoints, false, persistent: true)
|
Application.put_env(:phoenix, :serve_endpoints, false, persistent: true)
|
||||||
|
Finch.start_link(name: MyFinch)
|
||||||
|
|
||||||
unless System.get_env("DEBUG") do
|
unless System.get_env("DEBUG") do
|
||||||
Logger.remove_backend(:console)
|
Logger.remove_backend(:console)
|
||||||
end
|
end
|
||||||
|
|
||||||
adapter = Application.get_env(:tesla, :adapter)
|
Enum.each(@apps, &Application.ensure_all_started/1)
|
||||||
|
|
||||||
apps =
|
|
||||||
if adapter == Tesla.Adapter.Gun do
|
|
||||||
[:gun | @apps]
|
|
||||||
else
|
|
||||||
[:hackney | @apps]
|
|
||||||
end
|
|
||||||
|
|
||||||
Enum.each(apps, &Application.ensure_all_started/1)
|
|
||||||
|
|
||||||
oban_config = [
|
oban_config = [
|
||||||
crontab: [],
|
crontab: [],
|
||||||
|
@ -57,7 +49,7 @@ def start_pleroma do
|
||||||
{Majic.Pool,
|
{Majic.Pool,
|
||||||
[name: Pleroma.MajicPool, pool_size: Pleroma.Config.get([:majic_pool, :size], 2)]}
|
[name: Pleroma.MajicPool, pool_size: Pleroma.Config.get([:majic_pool, :size], 2)]}
|
||||||
] ++
|
] ++
|
||||||
http_children(adapter)
|
elasticsearch_children()
|
||||||
|
|
||||||
cachex_children = Enum.map(@cachex_children, &Pleroma.Application.build_cachex(&1, []))
|
cachex_children = Enum.map(@cachex_children, &Pleroma.Application.build_cachex(&1, []))
|
||||||
|
|
||||||
|
@ -130,10 +122,13 @@ def escape_sh_path(path) do
|
||||||
~S(') <> String.replace(path, ~S('), ~S(\')) <> ~S(')
|
~S(') <> String.replace(path, ~S('), ~S(\')) <> ~S(')
|
||||||
end
|
end
|
||||||
|
|
||||||
defp http_children(Tesla.Adapter.Gun) do
|
def elasticsearch_children do
|
||||||
Pleroma.Gun.ConnectionPool.children() ++
|
config = Pleroma.Config.get([Pleroma.Search, :module])
|
||||||
[{Task, &Pleroma.HTTP.AdapterHelper.Gun.limiter_setup/0}]
|
|
||||||
end
|
|
||||||
|
|
||||||
defp http_children(_), do: []
|
if config == Pleroma.Search.Elasticsearch do
|
||||||
|
[Pleroma.Search.Elasticsearch.Cluster]
|
||||||
|
else
|
||||||
|
[]
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -74,40 +74,4 @@ def run(["render_timeline", nickname | _] = args) do
|
||||||
inputs: inputs
|
inputs: inputs
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def run(["adapters"]) do
|
|
||||||
start_pleroma()
|
|
||||||
|
|
||||||
:ok =
|
|
||||||
Pleroma.Gun.Conn.open(
|
|
||||||
"https://httpbin.org/stream-bytes/1500",
|
|
||||||
:gun_connections
|
|
||||||
)
|
|
||||||
|
|
||||||
Process.sleep(1_500)
|
|
||||||
|
|
||||||
Benchee.run(
|
|
||||||
%{
|
|
||||||
"Without conn and without pool" => fn ->
|
|
||||||
{:ok, %Tesla.Env{}} =
|
|
||||||
Pleroma.HTTP.get("https://httpbin.org/stream-bytes/1500", [],
|
|
||||||
pool: :no_pool,
|
|
||||||
receive_conn: false
|
|
||||||
)
|
|
||||||
end,
|
|
||||||
"Without conn and with pool" => fn ->
|
|
||||||
{:ok, %Tesla.Env{}} =
|
|
||||||
Pleroma.HTTP.get("https://httpbin.org/stream-bytes/1500", [], receive_conn: false)
|
|
||||||
end,
|
|
||||||
"With reused conn and without pool" => fn ->
|
|
||||||
{:ok, %Tesla.Env{}} =
|
|
||||||
Pleroma.HTTP.get("https://httpbin.org/stream-bytes/1500", [], pool: :no_pool)
|
|
||||||
end,
|
|
||||||
"With reused conn and with pool" => fn ->
|
|
||||||
{:ok, %Tesla.Env{}} = Pleroma.HTTP.get("https://httpbin.org/stream-bytes/1500")
|
|
||||||
end
|
|
||||||
},
|
|
||||||
parallel: 10
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,60 +5,19 @@
|
||||||
defmodule Mix.Tasks.Pleroma.Search do
|
defmodule Mix.Tasks.Pleroma.Search do
|
||||||
use Mix.Task
|
use Mix.Task
|
||||||
import Mix.Pleroma
|
import Mix.Pleroma
|
||||||
import Ecto.Query
|
|
||||||
alias Pleroma.Activity
|
|
||||||
alias Pleroma.Pagination
|
|
||||||
alias Pleroma.User
|
|
||||||
alias Pleroma.Hashtag
|
|
||||||
|
|
||||||
@shortdoc "Manages elasticsearch"
|
@shortdoc "Manages elasticsearch"
|
||||||
|
|
||||||
def run(["import", "activities" | _rest]) do
|
def run(["import", "activities" | _rest]) do
|
||||||
start_pleroma()
|
start_pleroma()
|
||||||
|
IO.inspect(Pleroma.Config.get([Pleroma.Search.Elasticsearch.Cluster, :indexes, :activities]))
|
||||||
|
|
||||||
from(a in Activity, where: not ilike(a.actor, "%/relay"))
|
IO.inspect(
|
||||||
|> where([a], fragment("(? ->> 'type'::text) = 'Create'", a.data))
|
Elasticsearch.Index.Bulk.upload(
|
||||||
|> Activity.with_preloaded_object()
|
Pleroma.Search.Elasticsearch.Cluster,
|
||||||
|> Activity.with_preloaded_user_actor()
|
"activities",
|
||||||
|> get_all(:activities)
|
Pleroma.Config.get([Pleroma.Search.Elasticsearch.Cluster, :indexes, :activities])
|
||||||
end
|
)
|
||||||
|
)
|
||||||
def run(["import", "users" | _rest]) do
|
|
||||||
start_pleroma()
|
|
||||||
|
|
||||||
from(u in User, where: u.nickname not in ["internal.fetch", "relay"])
|
|
||||||
|> get_all(:users)
|
|
||||||
end
|
|
||||||
|
|
||||||
def run(["import", "hashtags" | _rest]) do
|
|
||||||
start_pleroma()
|
|
||||||
|
|
||||||
from(h in Hashtag)
|
|
||||||
|> Pleroma.Repo.all()
|
|
||||||
|> Pleroma.Elasticsearch.bulk_post(:hashtags)
|
|
||||||
end
|
|
||||||
|
|
||||||
defp get_all(query, index, max_id \\ nil) do
|
|
||||||
params = %{limit: 1000}
|
|
||||||
|
|
||||||
params =
|
|
||||||
if max_id == nil do
|
|
||||||
params
|
|
||||||
else
|
|
||||||
Map.put(params, :max_id, max_id)
|
|
||||||
end
|
|
||||||
|
|
||||||
res =
|
|
||||||
query
|
|
||||||
|> Pagination.fetch_paginated(params)
|
|
||||||
|
|
||||||
if res == [] do
|
|
||||||
:ok
|
|
||||||
else
|
|
||||||
res
|
|
||||||
|> Pleroma.Elasticsearch.bulk_post(index)
|
|
||||||
|
|
||||||
get_all(query, index, List.last(res).id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
144
lib/mix/tasks/pleroma/search/meilisearch.ex
Normal file
144
lib/mix/tasks/pleroma/search/meilisearch.ex
Normal file
|
@ -0,0 +1,144 @@
|
||||||
|
# Pleroma: A lightweight social networking server
|
||||||
|
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
|
defmodule Mix.Tasks.Pleroma.Search.Meilisearch do
|
||||||
|
require Pleroma.Constants
|
||||||
|
|
||||||
|
import Mix.Pleroma
|
||||||
|
import Ecto.Query
|
||||||
|
|
||||||
|
import Pleroma.Search.Meilisearch,
|
||||||
|
only: [meili_post: 2, meili_put: 2, meili_get: 1, meili_delete!: 1]
|
||||||
|
|
||||||
|
def run(["index"]) do
|
||||||
|
start_pleroma()
|
||||||
|
|
||||||
|
meili_version =
|
||||||
|
(
|
||||||
|
{:ok, result} = meili_get("/version")
|
||||||
|
|
||||||
|
result["pkgVersion"]
|
||||||
|
)
|
||||||
|
|
||||||
|
# The ranking rule syntax was changed but nothing about that is mentioned in the changelog
|
||||||
|
if not Version.match?(meili_version, ">= 0.25.0") do
|
||||||
|
raise "Meilisearch <0.24.0 not supported"
|
||||||
|
end
|
||||||
|
|
||||||
|
{:ok, _} =
|
||||||
|
meili_post(
|
||||||
|
"/indexes/objects/settings/ranking-rules",
|
||||||
|
[
|
||||||
|
"published:desc",
|
||||||
|
"words",
|
||||||
|
"exactness",
|
||||||
|
"proximity",
|
||||||
|
"typo",
|
||||||
|
"attribute",
|
||||||
|
"sort"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
{:ok, _} =
|
||||||
|
meili_post(
|
||||||
|
"/indexes/objects/settings/searchable-attributes",
|
||||||
|
[
|
||||||
|
"content"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
IO.puts("Created indices. Starting to insert posts.")
|
||||||
|
|
||||||
|
chunk_size = Pleroma.Config.get([Pleroma.Search.Meilisearch, :initial_indexing_chunk_size])
|
||||||
|
|
||||||
|
Pleroma.Repo.transaction(
|
||||||
|
fn ->
|
||||||
|
query =
|
||||||
|
from(Pleroma.Object,
|
||||||
|
# Only index public and unlisted posts which are notes and have some text
|
||||||
|
where:
|
||||||
|
fragment("data->>'type' = 'Note'") and
|
||||||
|
(fragment("data->'to' \\? ?", ^Pleroma.Constants.as_public()) or
|
||||||
|
fragment("data->'cc' \\? ?", ^Pleroma.Constants.as_public())),
|
||||||
|
order_by: [desc: fragment("data->'published'")]
|
||||||
|
)
|
||||||
|
|
||||||
|
count = query |> Pleroma.Repo.aggregate(:count, :data)
|
||||||
|
IO.puts("Entries to index: #{count}")
|
||||||
|
|
||||||
|
Pleroma.Repo.stream(
|
||||||
|
query,
|
||||||
|
timeout: :infinity
|
||||||
|
)
|
||||||
|
|> Stream.map(&Pleroma.Search.Meilisearch.object_to_search_data/1)
|
||||||
|
|> Stream.filter(fn o -> not is_nil(o) end)
|
||||||
|
|> Stream.chunk_every(chunk_size)
|
||||||
|
|> Stream.transform(0, fn objects, acc ->
|
||||||
|
new_acc = acc + Enum.count(objects)
|
||||||
|
|
||||||
|
# Reset to the beginning of the line and rewrite it
|
||||||
|
IO.write("\r")
|
||||||
|
IO.write("Indexed #{new_acc} entries")
|
||||||
|
|
||||||
|
{[objects], new_acc}
|
||||||
|
end)
|
||||||
|
|> Stream.each(fn objects ->
|
||||||
|
result =
|
||||||
|
meili_put(
|
||||||
|
"/indexes/objects/documents",
|
||||||
|
objects
|
||||||
|
)
|
||||||
|
|
||||||
|
with {:ok, res} <- result do
|
||||||
|
if not Map.has_key?(res, "uid") do
|
||||||
|
IO.puts("\nFailed to index: #{inspect(result)}")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
e -> IO.puts("\nFailed to index due to network error: #{inspect(e)}")
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|> Stream.run()
|
||||||
|
end,
|
||||||
|
timeout: :infinity
|
||||||
|
)
|
||||||
|
|
||||||
|
IO.write("\n")
|
||||||
|
end
|
||||||
|
|
||||||
|
def run(["clear"]) do
|
||||||
|
start_pleroma()
|
||||||
|
|
||||||
|
meili_delete!("/indexes/objects/documents")
|
||||||
|
end
|
||||||
|
|
||||||
|
def run(["show-keys", master_key]) do
|
||||||
|
start_pleroma()
|
||||||
|
|
||||||
|
endpoint = Pleroma.Config.get([Pleroma.Search.Meilisearch, :url])
|
||||||
|
|
||||||
|
{:ok, result} =
|
||||||
|
Pleroma.HTTP.get(
|
||||||
|
Path.join(endpoint, "/keys"),
|
||||||
|
[{"Authorization", "Bearer #{master_key}"}]
|
||||||
|
)
|
||||||
|
|
||||||
|
decoded = Jason.decode!(result.body)
|
||||||
|
|
||||||
|
if decoded["results"] do
|
||||||
|
Enum.each(decoded["results"], fn %{"description" => desc, "key" => key} ->
|
||||||
|
IO.puts("#{desc}: #{key}")
|
||||||
|
end)
|
||||||
|
else
|
||||||
|
IO.puts("Error fetching the keys, check the master key is correct: #{inspect(decoded)}")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def run(["stats"]) do
|
||||||
|
start_pleroma()
|
||||||
|
|
||||||
|
{:ok, result} = meili_get("/indexes/objects/stats")
|
||||||
|
IO.puts("Number of entries: #{result["numberOfDocuments"]}")
|
||||||
|
IO.puts("Indexing? #{result["isIndexing"]}")
|
||||||
|
end
|
||||||
|
end
|
|
@ -367,7 +367,7 @@ def restrict_deactivated_users(query) do
|
||||||
from(activity in query, where: activity.actor not in subquery(deactivated_users_query))
|
from(activity in query, where: activity.actor not in subquery(deactivated_users_query))
|
||||||
end
|
end
|
||||||
|
|
||||||
defdelegate search(user, query, options \\ []), to: Pleroma.Activity.Search
|
defdelegate search(user, query, options \\ []), to: Pleroma.Search.DatabaseSearch
|
||||||
|
|
||||||
def direct_conversation_id(activity, for_user) do
|
def direct_conversation_id(activity, for_user) do
|
||||||
alias Pleroma.Conversation.Participation
|
alias Pleroma.Conversation.Participation
|
||||||
|
|
|
@ -47,7 +47,6 @@ def start(_type, _args) do
|
||||||
# Disable warnings_as_errors at runtime, it breaks Phoenix live reload
|
# Disable warnings_as_errors at runtime, it breaks Phoenix live reload
|
||||||
# due to protocol consolidation warnings
|
# due to protocol consolidation warnings
|
||||||
Code.compiler_options(warnings_as_errors: false)
|
Code.compiler_options(warnings_as_errors: false)
|
||||||
Pleroma.Telemetry.Logger.attach()
|
|
||||||
Config.Holder.save_default()
|
Config.Holder.save_default()
|
||||||
Pleroma.HTML.compile_scrubbers()
|
Pleroma.HTML.compile_scrubbers()
|
||||||
Pleroma.Config.Oban.warn()
|
Pleroma.Config.Oban.warn()
|
||||||
|
@ -59,34 +58,8 @@ def start(_type, _args) do
|
||||||
Pleroma.Docs.JSON.compile()
|
Pleroma.Docs.JSON.compile()
|
||||||
limiters_setup()
|
limiters_setup()
|
||||||
|
|
||||||
adapter = Application.get_env(:tesla, :adapter)
|
Logger.info("Starting Finch")
|
||||||
|
Finch.start_link(name: MyFinch)
|
||||||
if match?({Tesla.Adapter.Finch, _}, adapter) do
|
|
||||||
Logger.info("Starting Finch")
|
|
||||||
Finch.start_link(name: MyFinch)
|
|
||||||
end
|
|
||||||
|
|
||||||
if adapter == Tesla.Adapter.Gun do
|
|
||||||
if version = Pleroma.OTPVersion.version() do
|
|
||||||
[major, minor] =
|
|
||||||
version
|
|
||||||
|> String.split(".")
|
|
||||||
|> Enum.map(&String.to_integer/1)
|
|
||||||
|> Enum.take(2)
|
|
||||||
|
|
||||||
if (major == 22 and minor < 2) or major < 22 do
|
|
||||||
raise "
|
|
||||||
!!!OTP VERSION WARNING!!!
|
|
||||||
You are using gun adapter with OTP version #{version}, which doesn't support correct handling of unordered certificates chains. Please update your Erlang/OTP to at least 22.2.
|
|
||||||
"
|
|
||||||
end
|
|
||||||
else
|
|
||||||
raise "
|
|
||||||
!!!OTP VERSION WARNING!!!
|
|
||||||
To support correct handling of unordered certificates chains - OTP version must be > 22.2.
|
|
||||||
"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Define workers and child supervisors to be supervised
|
# Define workers and child supervisors to be supervised
|
||||||
children =
|
children =
|
||||||
|
@ -97,7 +70,6 @@ def start(_type, _args) do
|
||||||
Pleroma.Web.Plugs.RateLimiter.Supervisor
|
Pleroma.Web.Plugs.RateLimiter.Supervisor
|
||||||
] ++
|
] ++
|
||||||
cachex_children() ++
|
cachex_children() ++
|
||||||
http_children(adapter, @mix_env) ++
|
|
||||||
[
|
[
|
||||||
Pleroma.Stats,
|
Pleroma.Stats,
|
||||||
Pleroma.JobQueueMonitor,
|
Pleroma.JobQueueMonitor,
|
||||||
|
@ -105,10 +77,10 @@ def start(_type, _args) do
|
||||||
{Oban, Config.get(Oban)},
|
{Oban, Config.get(Oban)},
|
||||||
Pleroma.Web.Endpoint
|
Pleroma.Web.Endpoint
|
||||||
] ++
|
] ++
|
||||||
|
elasticsearch_children() ++
|
||||||
task_children(@mix_env) ++
|
task_children(@mix_env) ++
|
||||||
dont_run_in_test(@mix_env) ++
|
dont_run_in_test(@mix_env) ++
|
||||||
shout_child(shout_enabled?()) ++
|
shout_child(shout_enabled?())
|
||||||
[Pleroma.Gopher.Server]
|
|
||||||
|
|
||||||
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
|
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
|
||||||
# for other strategies and supported options
|
# for other strategies and supported options
|
||||||
|
@ -276,39 +248,25 @@ defp task_children(_) do
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
# start hackney and gun pools in tests
|
def elasticsearch_children do
|
||||||
defp http_children(_, :test) do
|
config = Config.get([Pleroma.Search, :module])
|
||||||
http_children(Tesla.Adapter.Hackney, nil) ++ http_children(Tesla.Adapter.Gun, nil)
|
|
||||||
end
|
|
||||||
|
|
||||||
defp http_children(Tesla.Adapter.Hackney, _) do
|
if config == Pleroma.Search.Elasticsearch do
|
||||||
pools = [:federation, :media]
|
[Pleroma.Search.Elasticsearch.Cluster]
|
||||||
|
else
|
||||||
pools =
|
[]
|
||||||
if Config.get([Pleroma.Upload, :proxy_remote]) do
|
|
||||||
[:upload | pools]
|
|
||||||
else
|
|
||||||
pools
|
|
||||||
end
|
|
||||||
|
|
||||||
for pool <- pools do
|
|
||||||
options = Config.get([:hackney_pools, pool])
|
|
||||||
:hackney_pool.child_spec(pool, options)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
defp http_children(Tesla.Adapter.Gun, _) do
|
|
||||||
Pleroma.Gun.ConnectionPool.children() ++
|
|
||||||
[{Task, &Pleroma.HTTP.AdapterHelper.Gun.limiter_setup/0}]
|
|
||||||
end
|
|
||||||
|
|
||||||
defp http_children(_, _), do: []
|
|
||||||
|
|
||||||
@spec limiters_setup() :: :ok
|
@spec limiters_setup() :: :ok
|
||||||
def limiters_setup do
|
def limiters_setup do
|
||||||
config = Config.get(ConcurrentLimiter, [])
|
config = Config.get(ConcurrentLimiter, [])
|
||||||
|
|
||||||
[Pleroma.Web.RichMedia.Helpers, Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy]
|
[
|
||||||
|
Pleroma.Web.RichMedia.Helpers,
|
||||||
|
Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy,
|
||||||
|
Pleroma.Search
|
||||||
|
]
|
||||||
|> Enum.each(fn module ->
|
|> Enum.each(fn module ->
|
||||||
mod_config = Keyword.get(config, module, [])
|
mod_config = Keyword.get(config, module, [])
|
||||||
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
# Pleroma: A lightweight social networking server
|
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
|
|
||||||
defmodule Pleroma.BBS.Authenticator do
|
|
||||||
use Sshd.PasswordAuthenticator
|
|
||||||
alias Pleroma.User
|
|
||||||
alias Pleroma.Web.Plugs.AuthenticationPlug
|
|
||||||
|
|
||||||
def authenticate(username, password) do
|
|
||||||
username = to_string(username)
|
|
||||||
password = to_string(password)
|
|
||||||
|
|
||||||
with %User{} = user <- User.get_by_nickname(username) do
|
|
||||||
AuthenticationPlug.checkpw(password, user.password_hash)
|
|
||||||
else
|
|
||||||
_e -> false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,149 +0,0 @@
|
||||||
# Pleroma: A lightweight social networking server
|
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
|
|
||||||
defmodule Pleroma.BBS.Handler do
|
|
||||||
use Sshd.ShellHandler
|
|
||||||
alias Pleroma.Activity
|
|
||||||
alias Pleroma.HTML
|
|
||||||
alias Pleroma.Web.ActivityPub.ActivityPub
|
|
||||||
alias Pleroma.Web.CommonAPI
|
|
||||||
|
|
||||||
def on_shell(username, _pubkey, _ip, _port) do
|
|
||||||
:ok = IO.puts("Welcome to #{Pleroma.Config.get([:instance, :name])}!")
|
|
||||||
user = Pleroma.User.get_cached_by_nickname(to_string(username))
|
|
||||||
Logger.debug("#{inspect(user)}")
|
|
||||||
loop(run_state(user: user))
|
|
||||||
end
|
|
||||||
|
|
||||||
def on_connect(username, ip, port, method) do
|
|
||||||
Logger.debug(fn ->
|
|
||||||
"""
|
|
||||||
Incoming SSH shell #{inspect(self())} requested for #{username} from #{inspect(ip)}:#{inspect(port)} using #{inspect(method)}
|
|
||||||
"""
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
def on_disconnect(username, ip, port) do
|
|
||||||
Logger.debug(fn ->
|
|
||||||
"Disconnecting SSH shell for #{username} from #{inspect(ip)}:#{inspect(port)}"
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
defp loop(state) do
|
|
||||||
self_pid = self()
|
|
||||||
counter = state.counter
|
|
||||||
prefix = state.prefix
|
|
||||||
user = state.user
|
|
||||||
|
|
||||||
input = spawn(fn -> io_get(self_pid, prefix, counter, user.nickname) end)
|
|
||||||
wait_input(state, input)
|
|
||||||
end
|
|
||||||
|
|
||||||
def puts_activity(activity) do
|
|
||||||
status = Pleroma.Web.MastodonAPI.StatusView.render("show.json", %{activity: activity})
|
|
||||||
IO.puts("-- #{status.id} by #{status.account.display_name} (#{status.account.acct})")
|
|
||||||
IO.puts(HTML.strip_tags(status.content))
|
|
||||||
IO.puts("")
|
|
||||||
end
|
|
||||||
|
|
||||||
def handle_command(state, "help") do
|
|
||||||
IO.puts("Available commands:")
|
|
||||||
IO.puts("help - This help")
|
|
||||||
IO.puts("home - Show the home timeline")
|
|
||||||
IO.puts("p <text> - Post the given text")
|
|
||||||
IO.puts("r <id> <text> - Reply to the post with the given id")
|
|
||||||
IO.puts("quit - Quit")
|
|
||||||
|
|
||||||
state
|
|
||||||
end
|
|
||||||
|
|
||||||
def handle_command(%{user: user} = state, "r " <> text) do
|
|
||||||
text = String.trim(text)
|
|
||||||
[activity_id, rest] = String.split(text, " ", parts: 2)
|
|
||||||
|
|
||||||
with %Activity{} <- Activity.get_by_id(activity_id),
|
|
||||||
{:ok, _activity} <-
|
|
||||||
CommonAPI.post(user, %{status: rest, in_reply_to_status_id: activity_id}) do
|
|
||||||
IO.puts("Replied!")
|
|
||||||
else
|
|
||||||
_e -> IO.puts("Could not reply...")
|
|
||||||
end
|
|
||||||
|
|
||||||
state
|
|
||||||
end
|
|
||||||
|
|
||||||
def handle_command(%{user: user} = state, "p " <> text) do
|
|
||||||
text = String.trim(text)
|
|
||||||
|
|
||||||
with {:ok, _activity} <- CommonAPI.post(user, %{status: text}) do
|
|
||||||
IO.puts("Posted!")
|
|
||||||
else
|
|
||||||
_e -> IO.puts("Could not post...")
|
|
||||||
end
|
|
||||||
|
|
||||||
state
|
|
||||||
end
|
|
||||||
|
|
||||||
def handle_command(state, "home") do
|
|
||||||
user = state.user
|
|
||||||
|
|
||||||
params =
|
|
||||||
%{}
|
|
||||||
|> Map.put(:type, ["Create"])
|
|
||||||
|> Map.put(:blocking_user, user)
|
|
||||||
|> Map.put(:muting_user, user)
|
|
||||||
|> Map.put(:user, user)
|
|
||||||
|
|
||||||
activities =
|
|
||||||
[user.ap_id | Pleroma.User.following(user)]
|
|
||||||
|> ActivityPub.fetch_activities(params)
|
|
||||||
|
|
||||||
Enum.each(activities, fn activity ->
|
|
||||||
puts_activity(activity)
|
|
||||||
end)
|
|
||||||
|
|
||||||
state
|
|
||||||
end
|
|
||||||
|
|
||||||
def handle_command(state, command) do
|
|
||||||
IO.puts("Unknown command '#{command}'")
|
|
||||||
state
|
|
||||||
end
|
|
||||||
|
|
||||||
defp wait_input(state, input) do
|
|
||||||
receive do
|
|
||||||
{:input, ^input, "quit\n"} ->
|
|
||||||
IO.puts("Exiting...")
|
|
||||||
|
|
||||||
{:input, ^input, code} when is_binary(code) ->
|
|
||||||
code = String.trim(code)
|
|
||||||
|
|
||||||
state = handle_command(state, code)
|
|
||||||
|
|
||||||
loop(%{state | counter: state.counter + 1})
|
|
||||||
|
|
||||||
{:error, :interrupted} ->
|
|
||||||
IO.puts("Caught Ctrl+C...")
|
|
||||||
loop(%{state | counter: state.counter + 1})
|
|
||||||
|
|
||||||
{:input, ^input, msg} ->
|
|
||||||
:ok = Logger.warn("received unknown message: #{inspect(msg)}")
|
|
||||||
loop(%{state | counter: state.counter + 1})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
defp run_state(opts) do
|
|
||||||
%{prefix: "pleroma", counter: 1, user: opts[:user]}
|
|
||||||
end
|
|
||||||
|
|
||||||
defp io_get(pid, prefix, counter, username) do
|
|
||||||
prompt = prompt(prefix, counter, username)
|
|
||||||
send(pid, {:input, self(), IO.gets(:stdio, prompt)})
|
|
||||||
end
|
|
||||||
|
|
||||||
defp prompt(prefix, counter, username) do
|
|
||||||
prompt = "#{username}@#{prefix}:#{counter}>"
|
|
||||||
prompt <> " "
|
|
||||||
end
|
|
||||||
end
|
|
78
lib/pleroma/collections/fetcher.ex
Normal file
78
lib/pleroma/collections/fetcher.ex
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
# Akkoma: The cooler fediverse server
|
||||||
|
# Copyright © 2022- Akkoma Authors <https://akkoma.dev/>
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
|
defmodule Akkoma.Collections.Fetcher do
|
||||||
|
@moduledoc """
|
||||||
|
Activitypub Collections fetching functions
|
||||||
|
see: https://www.w3.org/TR/activitystreams-core/#paging
|
||||||
|
"""
|
||||||
|
alias Pleroma.Object.Fetcher
|
||||||
|
alias Pleroma.Config
|
||||||
|
require Logger
|
||||||
|
|
||||||
|
def fetch_collection_by_ap_id(ap_id) when is_binary(ap_id) do
|
||||||
|
fetch_collection(ap_id)
|
||||||
|
end
|
||||||
|
|
||||||
|
def fetch_collection(ap_id) when is_binary(ap_id) do
|
||||||
|
with {:ok, page} <- Fetcher.fetch_and_contain_remote_object_from_id(ap_id) do
|
||||||
|
{:ok, objects_from_collection(page)}
|
||||||
|
else
|
||||||
|
e ->
|
||||||
|
Logger.error("Could not fetch collection #{ap_id} - #{inspect(e)}")
|
||||||
|
e
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def fetch_collection(%{"type" => type} = page)
|
||||||
|
when type in ["Collection", "OrderedCollection"] do
|
||||||
|
{:ok, objects_from_collection(page)}
|
||||||
|
end
|
||||||
|
|
||||||
|
defp items_in_page(%{"type" => type, "orderedItems" => items})
|
||||||
|
when is_list(items) and type in ["OrderedCollection", "OrderedCollectionPage"],
|
||||||
|
do: items
|
||||||
|
|
||||||
|
defp items_in_page(%{"type" => type, "items" => items})
|
||||||
|
when is_list(items) and type in ["Collection", "CollectionPage"],
|
||||||
|
do: items
|
||||||
|
|
||||||
|
defp objects_from_collection(%{"type" => "OrderedCollection", "orderedItems" => items})
|
||||||
|
when is_list(items),
|
||||||
|
do: items
|
||||||
|
|
||||||
|
defp objects_from_collection(%{"type" => "Collection", "items" => items}) when is_list(items),
|
||||||
|
do: items
|
||||||
|
|
||||||
|
defp objects_from_collection(%{"type" => type, "first" => first})
|
||||||
|
when is_binary(first) and type in ["Collection", "OrderedCollection"] do
|
||||||
|
fetch_page_items(first)
|
||||||
|
end
|
||||||
|
|
||||||
|
defp objects_from_collection(%{"type" => type, "first" => %{"id" => id}})
|
||||||
|
when is_binary(id) and type in ["Collection", "OrderedCollection"] do
|
||||||
|
fetch_page_items(id)
|
||||||
|
end
|
||||||
|
|
||||||
|
defp fetch_page_items(id, items \\ []) do
|
||||||
|
if Enum.count(items) >= Config.get([:activitypub, :max_collection_objects]) do
|
||||||
|
items
|
||||||
|
else
|
||||||
|
{:ok, page} = Fetcher.fetch_and_contain_remote_object_from_id(id)
|
||||||
|
objects = items_in_page(page)
|
||||||
|
|
||||||
|
if Enum.count(objects) > 0 do
|
||||||
|
maybe_next_page(page, items ++ objects)
|
||||||
|
else
|
||||||
|
items
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
defp maybe_next_page(%{"next" => id}, items) when is_binary(id) do
|
||||||
|
fetch_page_items(id, items)
|
||||||
|
end
|
||||||
|
|
||||||
|
defp maybe_next_page(_, items), do: items
|
||||||
|
end
|
|
@ -173,7 +173,6 @@ def warn do
|
||||||
check_old_mrf_config(),
|
check_old_mrf_config(),
|
||||||
check_media_proxy_whitelist_config(),
|
check_media_proxy_whitelist_config(),
|
||||||
check_welcome_message_config(),
|
check_welcome_message_config(),
|
||||||
check_gun_pool_options(),
|
|
||||||
check_activity_expiration_config(),
|
check_activity_expiration_config(),
|
||||||
check_remote_ip_plug_name(),
|
check_remote_ip_plug_name(),
|
||||||
check_uploders_s3_public_endpoint(),
|
check_uploders_s3_public_endpoint(),
|
||||||
|
@ -257,51 +256,6 @@ def check_media_proxy_whitelist_config do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_gun_pool_options do
|
|
||||||
pool_config = Config.get(:connections_pool)
|
|
||||||
|
|
||||||
if timeout = pool_config[:await_up_timeout] do
|
|
||||||
Logger.warn("""
|
|
||||||
!!!DEPRECATION WARNING!!!
|
|
||||||
Your config is using old setting `config :pleroma, :connections_pool, await_up_timeout`. Please change to `config :pleroma, :connections_pool, connect_timeout` to ensure compatibility with future releases.
|
|
||||||
""")
|
|
||||||
|
|
||||||
Config.put(:connections_pool, Keyword.put_new(pool_config, :connect_timeout, timeout))
|
|
||||||
end
|
|
||||||
|
|
||||||
pools_configs = Config.get(:pools)
|
|
||||||
|
|
||||||
warning_preface = """
|
|
||||||
!!!DEPRECATION WARNING!!!
|
|
||||||
Your config is using old setting name `timeout` instead of `recv_timeout` in pool settings. Setting should work for now, but you are advised to change format to scheme with port to prevent possible issues later.
|
|
||||||
"""
|
|
||||||
|
|
||||||
updated_config =
|
|
||||||
Enum.reduce(pools_configs, [], fn {pool_name, config}, acc ->
|
|
||||||
if timeout = config[:timeout] do
|
|
||||||
Keyword.put(acc, pool_name, Keyword.put_new(config, :recv_timeout, timeout))
|
|
||||||
else
|
|
||||||
acc
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
if updated_config != [] do
|
|
||||||
pool_warnings =
|
|
||||||
updated_config
|
|
||||||
|> Keyword.keys()
|
|
||||||
|> Enum.map(fn pool_name ->
|
|
||||||
"\n* `:timeout` options in #{pool_name} pool is now `:recv_timeout`"
|
|
||||||
end)
|
|
||||||
|
|
||||||
Logger.warn(Enum.join([warning_preface | pool_warnings]))
|
|
||||||
|
|
||||||
Config.put(:pools, updated_config)
|
|
||||||
:error
|
|
||||||
else
|
|
||||||
:ok
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
@spec check_activity_expiration_config() :: :ok | nil
|
@spec check_activity_expiration_config() :: :ok | nil
|
||||||
def check_activity_expiration_config do
|
def check_activity_expiration_config do
|
||||||
warning_preface = """
|
warning_preface = """
|
||||||
|
|
|
@ -12,7 +12,13 @@ def load(config, opts) do
|
||||||
with_defaults = Config.Reader.merge(config, Pleroma.Config.Holder.release_defaults())
|
with_defaults = Config.Reader.merge(config, Pleroma.Config.Holder.release_defaults())
|
||||||
|
|
||||||
config_path =
|
config_path =
|
||||||
opts[:config_path] || System.get_env("PLEROMA_CONFIG_PATH") || "/etc/pleroma/config.exs"
|
cond do
|
||||||
|
opts[:config_path] -> opts[:config_path]
|
||||||
|
System.get_env("PLEROMA_CONFIG_PATH") -> System.get_env("PLEROMA_CONFIG_PATH")
|
||||||
|
System.get_env("AKKOMA_CONFIG_PATH") -> System.get_env("AKKOMA_CONFIG_PATH")
|
||||||
|
File.exists?("/etc/akkoma/config.exs") -> "/etc/akkoma/config.exs"
|
||||||
|
true -> "/etc/pleroma/config.exs"
|
||||||
|
end
|
||||||
|
|
||||||
with_runtime_config =
|
with_runtime_config =
|
||||||
if File.exists?(config_path) do
|
if File.exists?(config_path) do
|
||||||
|
|
|
@ -15,22 +15,18 @@ defmodule Pleroma.Config.TransferTask do
|
||||||
|
|
||||||
defp reboot_time_keys,
|
defp reboot_time_keys,
|
||||||
do: [
|
do: [
|
||||||
{:pleroma, :hackney_pools},
|
|
||||||
{:pleroma, :shout},
|
{:pleroma, :shout},
|
||||||
{:pleroma, Oban},
|
{:pleroma, Oban},
|
||||||
{:pleroma, :rate_limit},
|
{:pleroma, :rate_limit},
|
||||||
{:pleroma, :markup},
|
{:pleroma, :markup},
|
||||||
{:pleroma, :streamer},
|
{:pleroma, :streamer}
|
||||||
{:pleroma, :pools},
|
|
||||||
{:pleroma, :connections_pool}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
defp reboot_time_subkeys,
|
defp reboot_time_subkeys,
|
||||||
do: [
|
do: [
|
||||||
{:pleroma, Pleroma.Captcha, [:seconds_valid]},
|
{:pleroma, Pleroma.Captcha, [:seconds_valid]},
|
||||||
{:pleroma, Pleroma.Upload, [:proxy_remote]},
|
{:pleroma, Pleroma.Upload, [:proxy_remote]},
|
||||||
{:pleroma, :instance, [:upload_limit]},
|
{:pleroma, :instance, [:upload_limit]}
|
||||||
{:pleroma, :gopher, [:enabled]}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
def start_link(restart_pleroma? \\ true) do
|
def start_link(restart_pleroma? \\ true) do
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
# Akkoma: A lightweight social networking server
|
|
||||||
# Copyright © 2022-2022 Akkoma Authors <https://git.ihatebeinga.live/IHBAGang/akkoma/>
|
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
|
|
||||||
defmodule Pleroma.Elasticsearch.DocumentMappings.Activity do
|
|
||||||
alias Pleroma.Object
|
|
||||||
|
|
||||||
def id(obj), do: obj.id
|
|
||||||
|
|
||||||
def encode(%{object: %{data: %{"type" => "Note"}}} = activity) do
|
|
||||||
%{
|
|
||||||
_timestamp: activity.inserted_at,
|
|
||||||
user: activity.user_actor.nickname,
|
|
||||||
content: activity.object.data["content"],
|
|
||||||
instance: URI.parse(activity.user_actor.ap_id).host,
|
|
||||||
hashtags: Object.hashtags(activity.object)
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,21 +0,0 @@
|
||||||
# Akkoma: A lightweight social networking server
|
|
||||||
# Copyright © 2022-2022 Akkoma Authors <https://git.ihatebeinga.live/IHBAGang/akkoma/>
|
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
|
|
||||||
defmodule Pleroma.Elasticsearch.DocumentMappings.Hashtag do
|
|
||||||
def id(obj), do: obj.id
|
|
||||||
|
|
||||||
def encode(%{timestamp: _} = hashtag) do
|
|
||||||
%{
|
|
||||||
hashtag: hashtag.name,
|
|
||||||
timestamp: hashtag.timestamp
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
def encode(hashtag) do
|
|
||||||
%{
|
|
||||||
hashtag: hashtag.name,
|
|
||||||
timestamp: hashtag.inserted_at
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,17 +0,0 @@
|
||||||
# Akkoma: A lightweight social networking server
|
|
||||||
# Copyright © 2022-2022 Akkoma Authors <https://git.ihatebeinga.live/IHBAGang/akkoma/>
|
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
|
|
||||||
defmodule Pleroma.Elasticsearch.DocumentMappings.User do
|
|
||||||
def id(obj), do: obj.id
|
|
||||||
|
|
||||||
def encode(%{actor_type: "Person"} = user) do
|
|
||||||
%{
|
|
||||||
timestamp: user.inserted_at,
|
|
||||||
instance: URI.parse(user.ap_id).host,
|
|
||||||
nickname: user.nickname,
|
|
||||||
bio: user.bio,
|
|
||||||
display_name: user.name
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,256 +0,0 @@
|
||||||
# Akkoma: A lightweight social networking server
|
|
||||||
# Copyright © 2022-2022 Akkoma Authors <https://git.ihatebeinga.live/IHBAGang/akkoma/>
|
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
|
|
||||||
defmodule Pleroma.Elasticsearch do
|
|
||||||
alias Pleroma.Activity
|
|
||||||
alias Pleroma.User
|
|
||||||
alias Pleroma.Object
|
|
||||||
alias Pleroma.Elasticsearch.DocumentMappings
|
|
||||||
alias Pleroma.Config
|
|
||||||
require Logger
|
|
||||||
|
|
||||||
defp url do
|
|
||||||
Config.get([:elasticsearch, :url])
|
|
||||||
end
|
|
||||||
|
|
||||||
defp enabled? do
|
|
||||||
Config.get([:search, :provider]) == Pleroma.Search.Elasticsearch
|
|
||||||
end
|
|
||||||
|
|
||||||
def delete_by_id(:activity, id) do
|
|
||||||
if enabled?() do
|
|
||||||
Elastix.Document.delete(url(), "activities", "activity", id)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def put_by_id(:activity, id) do
|
|
||||||
id
|
|
||||||
|> Activity.get_by_id_with_object()
|
|
||||||
|> maybe_put_into_elasticsearch()
|
|
||||||
end
|
|
||||||
|
|
||||||
def maybe_put_into_elasticsearch({:ok, item}) do
|
|
||||||
maybe_put_into_elasticsearch(item)
|
|
||||||
end
|
|
||||||
|
|
||||||
def maybe_put_into_elasticsearch(
|
|
||||||
%{data: %{"type" => "Create"}, object: %{data: %{"type" => "Note"}}} = activity
|
|
||||||
) do
|
|
||||||
if enabled?() do
|
|
||||||
actor = Pleroma.Activity.user_actor(activity)
|
|
||||||
|
|
||||||
activity
|
|
||||||
|> Map.put(:user_actor, actor)
|
|
||||||
|> put()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def maybe_put_into_elasticsearch(%User{actor_type: "Person"} = user) do
|
|
||||||
if enabled?() do
|
|
||||||
put(user)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def maybe_put_into_elasticsearch(_) do
|
|
||||||
{:ok, :skipped}
|
|
||||||
end
|
|
||||||
|
|
||||||
def maybe_bulk_post(data, type) do
|
|
||||||
if enabled?() do
|
|
||||||
bulk_post(data, type)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def put(%Activity{} = activity) do
|
|
||||||
with {:ok, _} <-
|
|
||||||
Elastix.Document.index(
|
|
||||||
url(),
|
|
||||||
"activities",
|
|
||||||
"activity",
|
|
||||||
DocumentMappings.Activity.id(activity),
|
|
||||||
DocumentMappings.Activity.encode(activity)
|
|
||||||
) do
|
|
||||||
activity
|
|
||||||
|> Map.get(:object)
|
|
||||||
|> Object.hashtags()
|
|
||||||
|> Enum.map(fn x ->
|
|
||||||
%{id: x, name: x, timestamp: DateTime.to_iso8601(DateTime.utc_now())}
|
|
||||||
end)
|
|
||||||
|> bulk_post(:hashtags)
|
|
||||||
else
|
|
||||||
{:error, %{reason: err}} ->
|
|
||||||
Logger.error("Could not put activity: #{err}")
|
|
||||||
:skipped
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def put(%User{} = user) do
|
|
||||||
with {:ok, _} <-
|
|
||||||
Elastix.Document.index(
|
|
||||||
url(),
|
|
||||||
"users",
|
|
||||||
"user",
|
|
||||||
DocumentMappings.User.id(user),
|
|
||||||
DocumentMappings.User.encode(user)
|
|
||||||
) do
|
|
||||||
:ok
|
|
||||||
else
|
|
||||||
{:error, %{reason: err}} ->
|
|
||||||
Logger.error("Could not put user: #{err}")
|
|
||||||
:skipped
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def bulk_post(data, :activities) do
|
|
||||||
d =
|
|
||||||
data
|
|
||||||
|> Enum.filter(fn x ->
|
|
||||||
t =
|
|
||||||
x.object
|
|
||||||
|> Map.get(:data, %{})
|
|
||||||
|> Map.get("type", "")
|
|
||||||
|
|
||||||
t == "Note"
|
|
||||||
end)
|
|
||||||
|> Enum.map(fn d ->
|
|
||||||
[
|
|
||||||
%{index: %{_id: DocumentMappings.Activity.id(d)}},
|
|
||||||
DocumentMappings.Activity.encode(d)
|
|
||||||
]
|
|
||||||
end)
|
|
||||||
|> List.flatten()
|
|
||||||
|
|
||||||
with {:ok, %{body: %{"errors" => false}}} <-
|
|
||||||
Elastix.Bulk.post(
|
|
||||||
url(),
|
|
||||||
d,
|
|
||||||
index: "activities",
|
|
||||||
type: "activity"
|
|
||||||
) do
|
|
||||||
:ok
|
|
||||||
else
|
|
||||||
{:error, %{reason: err}} ->
|
|
||||||
Logger.error("Could not bulk put activity: #{err}")
|
|
||||||
:skipped
|
|
||||||
|
|
||||||
{:ok, %{body: _}} ->
|
|
||||||
:skipped
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def bulk_post(data, :users) do
|
|
||||||
d =
|
|
||||||
data
|
|
||||||
|> Enum.filter(fn x -> x.actor_type == "Person" end)
|
|
||||||
|> Enum.map(fn d ->
|
|
||||||
[
|
|
||||||
%{index: %{_id: DocumentMappings.User.id(d)}},
|
|
||||||
DocumentMappings.User.encode(d)
|
|
||||||
]
|
|
||||||
end)
|
|
||||||
|> List.flatten()
|
|
||||||
|
|
||||||
with {:ok, %{body: %{"errors" => false}}} <-
|
|
||||||
Elastix.Bulk.post(
|
|
||||||
url(),
|
|
||||||
d,
|
|
||||||
index: "users",
|
|
||||||
type: "user"
|
|
||||||
) do
|
|
||||||
:ok
|
|
||||||
else
|
|
||||||
{:error, %{reason: err}} ->
|
|
||||||
Logger.error("Could not bulk put users: #{err}")
|
|
||||||
:skipped
|
|
||||||
|
|
||||||
{:ok, %{body: _}} ->
|
|
||||||
:skipped
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def bulk_post(data, :hashtags) when is_list(data) do
|
|
||||||
d =
|
|
||||||
data
|
|
||||||
|> Enum.map(fn d ->
|
|
||||||
[
|
|
||||||
%{index: %{_id: DocumentMappings.Hashtag.id(d)}},
|
|
||||||
DocumentMappings.Hashtag.encode(d)
|
|
||||||
]
|
|
||||||
end)
|
|
||||||
|> List.flatten()
|
|
||||||
|
|
||||||
with {:ok, %{body: %{"errors" => false}}} <-
|
|
||||||
Elastix.Bulk.post(
|
|
||||||
url(),
|
|
||||||
d,
|
|
||||||
index: "hashtags",
|
|
||||||
type: "hashtag"
|
|
||||||
) do
|
|
||||||
:ok
|
|
||||||
else
|
|
||||||
{:error, %{reason: err}} ->
|
|
||||||
Logger.error("Could not bulk put hashtags: #{err}")
|
|
||||||
:skipped
|
|
||||||
|
|
||||||
{:ok, %{body: _}} ->
|
|
||||||
:skipped
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def bulk_post(_, :hashtags), do: {:ok, nil}
|
|
||||||
|
|
||||||
def search(_, _, _, :skip), do: []
|
|
||||||
|
|
||||||
def search(:raw, index, type, q) do
|
|
||||||
with {:ok, raw_results} <- Elastix.Search.search(url(), index, [type], q) do
|
|
||||||
results =
|
|
||||||
raw_results
|
|
||||||
|> Map.get(:body, %{})
|
|
||||||
|> Map.get("hits", %{})
|
|
||||||
|> Map.get("hits", [])
|
|
||||||
|
|
||||||
{:ok, results}
|
|
||||||
else
|
|
||||||
{:error, e} ->
|
|
||||||
Logger.error(e)
|
|
||||||
{:error, e}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def search(:activities, q) do
|
|
||||||
with {:ok, results} <- search(:raw, "activities", "activity", q) do
|
|
||||||
results
|
|
||||||
|> Enum.map(fn result -> result["_id"] end)
|
|
||||||
|> Pleroma.Activity.all_by_ids_with_object()
|
|
||||||
|> Enum.sort(&(&1.inserted_at >= &2.inserted_at))
|
|
||||||
else
|
|
||||||
e ->
|
|
||||||
Logger.error(e)
|
|
||||||
[]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def search(:users, q) do
|
|
||||||
with {:ok, results} <- search(:raw, "users", "user", q) do
|
|
||||||
results
|
|
||||||
|> Enum.map(fn result -> result["_id"] end)
|
|
||||||
|> Pleroma.User.get_all_by_ids()
|
|
||||||
else
|
|
||||||
e ->
|
|
||||||
Logger.error(e)
|
|
||||||
[]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def search(:hashtags, q) do
|
|
||||||
with {:ok, results} <- search(:raw, "hashtags", "hashtag", q) do
|
|
||||||
results
|
|
||||||
|> Enum.map(fn result -> result["_source"]["hashtag"] end)
|
|
||||||
else
|
|
||||||
e ->
|
|
||||||
Logger.error(e)
|
|
||||||
[]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -5,9 +5,12 @@
|
||||||
defmodule Pleroma.Emails.UserEmail do
|
defmodule Pleroma.Emails.UserEmail do
|
||||||
@moduledoc "User emails"
|
@moduledoc "User emails"
|
||||||
|
|
||||||
|
require Pleroma.Web.Gettext
|
||||||
|
|
||||||
alias Pleroma.Config
|
alias Pleroma.Config
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
alias Pleroma.Web.Endpoint
|
alias Pleroma.Web.Endpoint
|
||||||
|
alias Pleroma.Web.Gettext
|
||||||
alias Pleroma.Web.Router
|
alias Pleroma.Web.Router
|
||||||
|
|
||||||
import Swoosh.Email
|
import Swoosh.Email
|
||||||
|
@ -27,29 +30,75 @@ defp recipient(%User{} = user), do: recipient(user.email, user.name)
|
||||||
|
|
||||||
@spec welcome(User.t(), map()) :: Swoosh.Email.t()
|
@spec welcome(User.t(), map()) :: Swoosh.Email.t()
|
||||||
def welcome(user, opts \\ %{}) do
|
def welcome(user, opts \\ %{}) do
|
||||||
new()
|
Gettext.with_locale_or_default user.language do
|
||||||
|> to(recipient(user))
|
new()
|
||||||
|> from(Map.get(opts, :sender, sender()))
|
|> to(recipient(user))
|
||||||
|> subject(Map.get(opts, :subject, "Welcome to #{instance_name()}!"))
|
|> from(Map.get(opts, :sender, sender()))
|
||||||
|> html_body(Map.get(opts, :html, "Welcome to #{instance_name()}!"))
|
|> subject(
|
||||||
|> text_body(Map.get(opts, :text, "Welcome to #{instance_name()}!"))
|
Map.get(
|
||||||
|
opts,
|
||||||
|
:subject,
|
||||||
|
Gettext.dpgettext(
|
||||||
|
"static_pages",
|
||||||
|
"welcome email subject",
|
||||||
|
"Welcome to %{instance_name}!",
|
||||||
|
instance_name: instance_name()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|> html_body(
|
||||||
|
Map.get(
|
||||||
|
opts,
|
||||||
|
:html,
|
||||||
|
Gettext.dpgettext(
|
||||||
|
"static_pages",
|
||||||
|
"welcome email html body",
|
||||||
|
"Welcome to %{instance_name}!",
|
||||||
|
instance_name: instance_name()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|> text_body(
|
||||||
|
Map.get(
|
||||||
|
opts,
|
||||||
|
:text,
|
||||||
|
Gettext.dpgettext(
|
||||||
|
"static_pages",
|
||||||
|
"welcome email text body",
|
||||||
|
"Welcome to %{instance_name}!",
|
||||||
|
instance_name: instance_name()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def password_reset_email(user, token) when is_binary(token) do
|
def password_reset_email(user, token) when is_binary(token) do
|
||||||
password_reset_url = Router.Helpers.reset_password_url(Endpoint, :reset, token)
|
Gettext.with_locale_or_default user.language do
|
||||||
|
password_reset_url = Router.Helpers.reset_password_url(Endpoint, :reset, token)
|
||||||
|
|
||||||
html_body = """
|
html_body =
|
||||||
<h3>Reset your password at #{instance_name()}</h3>
|
Gettext.dpgettext(
|
||||||
<p>Someone has requested password change for your account at #{instance_name()}.</p>
|
"static_pages",
|
||||||
<p>If it was you, visit the following link to proceed: <a href="#{password_reset_url}">reset password</a>.</p>
|
"password reset email body",
|
||||||
<p>If it was someone else, nothing to worry about: your data is secure and your password has not been changed.</p>
|
"""
|
||||||
"""
|
<h3>Reset your password at %{instance_name}</h3>
|
||||||
|
<p>Someone has requested password change for your account at %{instance_name}.</p>
|
||||||
|
<p>If it was you, visit the following link to proceed: <a href="%{password_reset_url}">reset password</a>.</p>
|
||||||
|
<p>If it was someone else, nothing to worry about: your data is secure and your password has not been changed.</p>
|
||||||
|
""",
|
||||||
|
instance_name: instance_name(),
|
||||||
|
password_reset_url: password_reset_url
|
||||||
|
)
|
||||||
|
|
||||||
new()
|
new()
|
||||||
|> to(recipient(user))
|
|> to(recipient(user))
|
||||||
|> from(sender())
|
|> from(sender())
|
||||||
|> subject("Password reset")
|
|> subject(
|
||||||
|> html_body(html_body)
|
Gettext.dpgettext("static_pages", "password reset email subject", "Password reset")
|
||||||
|
)
|
||||||
|
|> html_body(html_body)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_invitation_email(
|
def user_invitation_email(
|
||||||
|
@ -58,73 +107,136 @@ def user_invitation_email(
|
||||||
to_email,
|
to_email,
|
||||||
to_name \\ nil
|
to_name \\ nil
|
||||||
) do
|
) do
|
||||||
registration_url =
|
Gettext.with_locale_or_default user.language do
|
||||||
Router.Helpers.redirect_url(
|
registration_url =
|
||||||
Endpoint,
|
Router.Helpers.redirect_url(
|
||||||
:registration_page,
|
Endpoint,
|
||||||
user_invite_token.token
|
:registration_page,
|
||||||
|
user_invite_token.token
|
||||||
|
)
|
||||||
|
|
||||||
|
html_body =
|
||||||
|
Gettext.dpgettext(
|
||||||
|
"static_pages",
|
||||||
|
"user invitation email body",
|
||||||
|
"""
|
||||||
|
<h3>You are invited to %{instance_name}</h3>
|
||||||
|
<p>%{inviter_name} invites you to join %{instance_name}, an instance of Pleroma federated social networking platform.</p>
|
||||||
|
<p>Click the following link to register: <a href="%{registration_url}">accept invitation</a>.</p>
|
||||||
|
""",
|
||||||
|
instance_name: instance_name(),
|
||||||
|
inviter_name: user.name,
|
||||||
|
registration_url: registration_url
|
||||||
|
)
|
||||||
|
|
||||||
|
new()
|
||||||
|
|> to(recipient(to_email, to_name))
|
||||||
|
|> from(sender())
|
||||||
|
|> subject(
|
||||||
|
Gettext.dpgettext(
|
||||||
|
"static_pages",
|
||||||
|
"user invitation email subject",
|
||||||
|
"Invitation to %{instance_name}",
|
||||||
|
instance_name: instance_name()
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|> html_body(html_body)
|
||||||
html_body = """
|
end
|
||||||
<h3>You are invited to #{instance_name()}</h3>
|
|
||||||
<p>#{user.name} invites you to join #{instance_name()}, an instance of Pleroma federated social networking platform.</p>
|
|
||||||
<p>Click the following link to register: <a href="#{registration_url}">accept invitation</a>.</p>
|
|
||||||
"""
|
|
||||||
|
|
||||||
new()
|
|
||||||
|> to(recipient(to_email, to_name))
|
|
||||||
|> from(sender())
|
|
||||||
|> subject("Invitation to #{instance_name()}")
|
|
||||||
|> html_body(html_body)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def account_confirmation_email(user) do
|
def account_confirmation_email(user) do
|
||||||
confirmation_url =
|
Gettext.with_locale_or_default user.language do
|
||||||
Router.Helpers.confirm_email_url(
|
confirmation_url =
|
||||||
Endpoint,
|
Router.Helpers.confirm_email_url(
|
||||||
:confirm_email,
|
Endpoint,
|
||||||
user.id,
|
:confirm_email,
|
||||||
to_string(user.confirmation_token)
|
user.id,
|
||||||
|
to_string(user.confirmation_token)
|
||||||
|
)
|
||||||
|
|
||||||
|
html_body =
|
||||||
|
Gettext.dpgettext(
|
||||||
|
"static_pages",
|
||||||
|
"confirmation email body",
|
||||||
|
"""
|
||||||
|
<h3>Thank you for registering on %{instance_name}</h3>
|
||||||
|
<p>Email confirmation is required to activate the account.</p>
|
||||||
|
<p>Please click the following link to <a href="%{confirmation_url}">activate your account</a>.</p>
|
||||||
|
""",
|
||||||
|
instance_name: instance_name(),
|
||||||
|
confirmation_url: confirmation_url
|
||||||
|
)
|
||||||
|
|
||||||
|
new()
|
||||||
|
|> to(recipient(user))
|
||||||
|
|> from(sender())
|
||||||
|
|> subject(
|
||||||
|
Gettext.dpgettext(
|
||||||
|
"static_pages",
|
||||||
|
"confirmation email subject",
|
||||||
|
"%{instance_name} account confirmation",
|
||||||
|
instance_name: instance_name()
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|> html_body(html_body)
|
||||||
html_body = """
|
end
|
||||||
<h3>Thank you for registering on #{instance_name()}</h3>
|
|
||||||
<p>Email confirmation is required to activate the account.</p>
|
|
||||||
<p>Please click the following link to <a href="#{confirmation_url}">activate your account</a>.</p>
|
|
||||||
"""
|
|
||||||
|
|
||||||
new()
|
|
||||||
|> to(recipient(user))
|
|
||||||
|> from(sender())
|
|
||||||
|> subject("#{instance_name()} account confirmation")
|
|
||||||
|> html_body(html_body)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def approval_pending_email(user) do
|
def approval_pending_email(user) do
|
||||||
html_body = """
|
Gettext.with_locale_or_default user.language do
|
||||||
<h3>Awaiting Approval</h3>
|
html_body =
|
||||||
<p>Your account at #{instance_name()} is being reviewed by staff. You will receive another email once your account is approved.</p>
|
Gettext.dpgettext(
|
||||||
"""
|
"static_pages",
|
||||||
|
"approval pending email body",
|
||||||
|
"""
|
||||||
|
<h3>Awaiting Approval</h3>
|
||||||
|
<p>Your account at %{instance_name} is being reviewed by staff. You will receive another email once your account is approved.</p>
|
||||||
|
""",
|
||||||
|
instance_name: instance_name()
|
||||||
|
)
|
||||||
|
|
||||||
new()
|
new()
|
||||||
|> to(recipient(user))
|
|> to(recipient(user))
|
||||||
|> from(sender())
|
|> from(sender())
|
||||||
|> subject("Your account is awaiting approval")
|
|> subject(
|
||||||
|> html_body(html_body)
|
Gettext.dpgettext(
|
||||||
|
"static_pages",
|
||||||
|
"approval pending email subject",
|
||||||
|
"Your account is awaiting approval"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|> html_body(html_body)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def successful_registration_email(user) do
|
def successful_registration_email(user) do
|
||||||
html_body = """
|
Gettext.with_locale_or_default user.language do
|
||||||
<h3>Hello @#{user.nickname},</h3>
|
html_body =
|
||||||
<p>Your account at #{instance_name()} has been registered successfully.</p>
|
Gettext.dpgettext(
|
||||||
<p>No further action is required to activate your account.</p>
|
"static_pages",
|
||||||
"""
|
"successful registration email body",
|
||||||
|
"""
|
||||||
|
<h3>Hello @%{nickname},</h3>
|
||||||
|
<p>Your account at %{instance_name} has been registered successfully.</p>
|
||||||
|
<p>No further action is required to activate your account.</p>
|
||||||
|
""",
|
||||||
|
nickname: user.nickname,
|
||||||
|
instance_name: instance_name()
|
||||||
|
)
|
||||||
|
|
||||||
new()
|
new()
|
||||||
|> to(recipient(user))
|
|> to(recipient(user))
|
||||||
|> from(sender())
|
|> from(sender())
|
||||||
|> subject("Account registered on #{instance_name()}")
|
|> subject(
|
||||||
|> html_body(html_body)
|
Gettext.dpgettext(
|
||||||
|
"static_pages",
|
||||||
|
"successful registration email subject",
|
||||||
|
"Account registered on %{instance_name}",
|
||||||
|
instance_name: instance_name()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|> html_body(html_body)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
|
@ -134,69 +246,78 @@ def successful_registration_email(user) do
|
||||||
"""
|
"""
|
||||||
@spec digest_email(User.t()) :: Swoosh.Email.t() | nil
|
@spec digest_email(User.t()) :: Swoosh.Email.t() | nil
|
||||||
def digest_email(user) do
|
def digest_email(user) do
|
||||||
notifications = Pleroma.Notification.for_user_since(user, user.last_digest_emailed_at)
|
Gettext.with_locale_or_default user.language do
|
||||||
|
notifications = Pleroma.Notification.for_user_since(user, user.last_digest_emailed_at)
|
||||||
|
|
||||||
mentions =
|
mentions =
|
||||||
notifications
|
notifications
|
||||||
|> Enum.filter(&(&1.activity.data["type"] == "Create"))
|
|> Enum.filter(&(&1.activity.data["type"] == "Create"))
|
||||||
|> Enum.map(fn notification ->
|
|> Enum.map(fn notification ->
|
||||||
object = Pleroma.Object.normalize(notification.activity, fetch: false)
|
object = Pleroma.Object.normalize(notification.activity, fetch: false)
|
||||||
|
|
||||||
if not is_nil(object) do
|
if not is_nil(object) do
|
||||||
object = update_in(object.data["content"], &format_links/1)
|
object = update_in(object.data["content"], &format_links/1)
|
||||||
|
|
||||||
%{
|
%{
|
||||||
data: notification,
|
data: notification,
|
||||||
object: object,
|
object: object,
|
||||||
from: User.get_by_ap_id(notification.activity.actor)
|
from: User.get_by_ap_id(notification.activity.actor)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|> Enum.filter(& &1)
|
|> Enum.filter(& &1)
|
||||||
|
|
||||||
followers =
|
followers =
|
||||||
notifications
|
notifications
|
||||||
|> Enum.filter(&(&1.activity.data["type"] == "Follow"))
|
|> Enum.filter(&(&1.activity.data["type"] == "Follow"))
|
||||||
|> Enum.map(fn notification ->
|
|> Enum.map(fn notification ->
|
||||||
from = User.get_by_ap_id(notification.activity.actor)
|
from = User.get_by_ap_id(notification.activity.actor)
|
||||||
|
|
||||||
if not is_nil(from) do
|
if not is_nil(from) do
|
||||||
%{
|
%{
|
||||||
data: notification,
|
data: notification,
|
||||||
object: Pleroma.Object.normalize(notification.activity, fetch: false),
|
object: Pleroma.Object.normalize(notification.activity, fetch: false),
|
||||||
from: User.get_by_ap_id(notification.activity.actor)
|
from: User.get_by_ap_id(notification.activity.actor)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|> Enum.filter(& &1)
|
|> Enum.filter(& &1)
|
||||||
|
|
||||||
unless Enum.empty?(mentions) do
|
unless Enum.empty?(mentions) do
|
||||||
styling = Config.get([__MODULE__, :styling])
|
styling = Config.get([__MODULE__, :styling])
|
||||||
logo = Config.get([__MODULE__, :logo])
|
logo = Config.get([__MODULE__, :logo])
|
||||||
|
|
||||||
html_data = %{
|
html_data = %{
|
||||||
instance: instance_name(),
|
instance: instance_name(),
|
||||||
user: user,
|
user: user,
|
||||||
mentions: mentions,
|
mentions: mentions,
|
||||||
followers: followers,
|
followers: followers,
|
||||||
unsubscribe_link: unsubscribe_url(user, "digest"),
|
unsubscribe_link: unsubscribe_url(user, "digest"),
|
||||||
styling: styling
|
styling: styling
|
||||||
}
|
}
|
||||||
|
|
||||||
logo_path =
|
logo_path =
|
||||||
if is_nil(logo) do
|
if is_nil(logo) do
|
||||||
Path.join(:code.priv_dir(:pleroma), "static/static/logo.svg")
|
Path.join(:code.priv_dir(:pleroma), "static/static/logo.svg")
|
||||||
else
|
else
|
||||||
Path.join(Config.get([:instance, :static_dir]), logo)
|
Path.join(Config.get([:instance, :static_dir]), logo)
|
||||||
end
|
end
|
||||||
|
|
||||||
new()
|
new()
|
||||||
|> to(recipient(user))
|
|> to(recipient(user))
|
||||||
|> from(sender())
|
|> from(sender())
|
||||||
|> subject("Your digest from #{instance_name()}")
|
|> subject(
|
||||||
|> put_layout(false)
|
Gettext.dpgettext(
|
||||||
|> render_body("digest.html", html_data)
|
"static_pages",
|
||||||
|> attachment(Swoosh.Attachment.new(logo_path, filename: "logo.svg", type: :inline))
|
"digest email subject",
|
||||||
|
"Your digest from %{instance_name}",
|
||||||
|
instance_name: instance_name()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|> put_layout(false)
|
||||||
|
|> render_body("digest.html", html_data)
|
||||||
|
|> attachment(Swoosh.Attachment.new(logo_path, filename: "logo.svg", type: :inline))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -226,27 +347,47 @@ def unsubscribe_url(user, notifications_type) do
|
||||||
|
|
||||||
def backup_is_ready_email(backup, admin_user_id \\ nil) do
|
def backup_is_ready_email(backup, admin_user_id \\ nil) do
|
||||||
%{user: user} = Pleroma.Repo.preload(backup, :user)
|
%{user: user} = Pleroma.Repo.preload(backup, :user)
|
||||||
download_url = Pleroma.Web.PleromaAPI.BackupView.download_url(backup)
|
|
||||||
|
|
||||||
html_body =
|
Gettext.with_locale_or_default user.language do
|
||||||
if is_nil(admin_user_id) do
|
download_url = Pleroma.Web.PleromaAPI.BackupView.download_url(backup)
|
||||||
"""
|
|
||||||
<p>You requested a full backup of your Pleroma account. It's ready for download:</p>
|
|
||||||
<p><a href="#{download_url}">#{download_url}</a></p>
|
|
||||||
"""
|
|
||||||
else
|
|
||||||
admin = Pleroma.Repo.get(User, admin_user_id)
|
|
||||||
|
|
||||||
"""
|
html_body =
|
||||||
<p>Admin @#{admin.nickname} requested a full backup of your Pleroma account. It's ready for download:</p>
|
if is_nil(admin_user_id) do
|
||||||
<p><a href="#{download_url}">#{download_url}</a></p>
|
Gettext.dpgettext(
|
||||||
"""
|
"static_pages",
|
||||||
end
|
"account archive email body - self-requested",
|
||||||
|
"""
|
||||||
|
<p>You requested a full backup of your Pleroma account. It's ready for download:</p>
|
||||||
|
<p><a href="%{download_url}">%{download_url}</a></p>
|
||||||
|
""",
|
||||||
|
download_url: download_url
|
||||||
|
)
|
||||||
|
else
|
||||||
|
admin = Pleroma.Repo.get(User, admin_user_id)
|
||||||
|
|
||||||
new()
|
Gettext.dpgettext(
|
||||||
|> to(recipient(user))
|
"static_pages",
|
||||||
|> from(sender())
|
"account archive email body - admin requested",
|
||||||
|> subject("Your account archive is ready")
|
"""
|
||||||
|> html_body(html_body)
|
<p>Admin @%{admin_nickname} requested a full backup of your Pleroma account. It's ready for download:</p>
|
||||||
|
<p><a href="%{download_url}">%{download_url}</a></p>
|
||||||
|
""",
|
||||||
|
admin_nickname: admin.nickname,
|
||||||
|
download_url: download_url
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
new()
|
||||||
|
|> to(recipient(user))
|
||||||
|
|> from(sender())
|
||||||
|
|> subject(
|
||||||
|
Gettext.dpgettext(
|
||||||
|
"static_pages",
|
||||||
|
"account archive email subject",
|
||||||
|
"Your account archive is ready"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|> html_body(html_body)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
# emoji-test.txt
|
# emoji-test.txt
|
||||||
# Date: 2020-09-12, 22:19:50 GMT
|
# Date: 2021-08-26, 17:22:23 GMT
|
||||||
# © 2020 Unicode®, Inc.
|
# © 2021 Unicode®, Inc.
|
||||||
# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
|
# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
|
||||||
# For terms of use, see http://www.unicode.org/terms_of_use.html
|
# For terms of use, see http://www.unicode.org/terms_of_use.html
|
||||||
#
|
#
|
||||||
# Emoji Keyboard/Display Test Data for UTS #51
|
# Emoji Keyboard/Display Test Data for UTS #51
|
||||||
# Version: 13.1
|
# Version: 14.0
|
||||||
#
|
#
|
||||||
# For documentation and usage, see http://www.unicode.org/reports/tr51
|
# For documentation and usage, see http://www.unicode.org/reports/tr51
|
||||||
#
|
#
|
||||||
|
@ -43,6 +43,7 @@
|
||||||
1F602 ; fully-qualified # 😂 E0.6 face with tears of joy
|
1F602 ; fully-qualified # 😂 E0.6 face with tears of joy
|
||||||
1F642 ; fully-qualified # 🙂 E1.0 slightly smiling face
|
1F642 ; fully-qualified # 🙂 E1.0 slightly smiling face
|
||||||
1F643 ; fully-qualified # 🙃 E1.0 upside-down face
|
1F643 ; fully-qualified # 🙃 E1.0 upside-down face
|
||||||
|
1FAE0 ; fully-qualified # 🫠 E14.0 melting face
|
||||||
1F609 ; fully-qualified # 😉 E0.6 winking face
|
1F609 ; fully-qualified # 😉 E0.6 winking face
|
||||||
1F60A ; fully-qualified # 😊 E0.6 smiling face with smiling eyes
|
1F60A ; fully-qualified # 😊 E0.6 smiling face with smiling eyes
|
||||||
1F607 ; fully-qualified # 😇 E1.0 smiling face with halo
|
1F607 ; fully-qualified # 😇 E1.0 smiling face with halo
|
||||||
|
@ -68,10 +69,13 @@
|
||||||
1F911 ; fully-qualified # 🤑 E1.0 money-mouth face
|
1F911 ; fully-qualified # 🤑 E1.0 money-mouth face
|
||||||
|
|
||||||
# subgroup: face-hand
|
# subgroup: face-hand
|
||||||
1F917 ; fully-qualified # 🤗 E1.0 hugging face
|
1F917 ; fully-qualified # 🤗 E1.0 smiling face with open hands
|
||||||
1F92D ; fully-qualified # 🤭 E5.0 face with hand over mouth
|
1F92D ; fully-qualified # 🤭 E5.0 face with hand over mouth
|
||||||
|
1FAE2 ; fully-qualified # 🫢 E14.0 face with open eyes and hand over mouth
|
||||||
|
1FAE3 ; fully-qualified # 🫣 E14.0 face with peeking eye
|
||||||
1F92B ; fully-qualified # 🤫 E5.0 shushing face
|
1F92B ; fully-qualified # 🤫 E5.0 shushing face
|
||||||
1F914 ; fully-qualified # 🤔 E1.0 thinking face
|
1F914 ; fully-qualified # 🤔 E1.0 thinking face
|
||||||
|
1FAE1 ; fully-qualified # 🫡 E14.0 saluting face
|
||||||
|
|
||||||
# subgroup: face-neutral-skeptical
|
# subgroup: face-neutral-skeptical
|
||||||
1F910 ; fully-qualified # 🤐 E1.0 zipper-mouth face
|
1F910 ; fully-qualified # 🤐 E1.0 zipper-mouth face
|
||||||
|
@ -79,6 +83,7 @@
|
||||||
1F610 ; fully-qualified # 😐 E0.7 neutral face
|
1F610 ; fully-qualified # 😐 E0.7 neutral face
|
||||||
1F611 ; fully-qualified # 😑 E1.0 expressionless face
|
1F611 ; fully-qualified # 😑 E1.0 expressionless face
|
||||||
1F636 ; fully-qualified # 😶 E1.0 face without mouth
|
1F636 ; fully-qualified # 😶 E1.0 face without mouth
|
||||||
|
1FAE5 ; fully-qualified # 🫥 E14.0 dotted line face
|
||||||
1F636 200D 1F32B FE0F ; fully-qualified # 😶🌫️ E13.1 face in clouds
|
1F636 200D 1F32B FE0F ; fully-qualified # 😶🌫️ E13.1 face in clouds
|
||||||
1F636 200D 1F32B ; minimally-qualified # 😶🌫 E13.1 face in clouds
|
1F636 200D 1F32B ; minimally-qualified # 😶🌫 E13.1 face in clouds
|
||||||
1F60F ; fully-qualified # 😏 E0.6 smirking face
|
1F60F ; fully-qualified # 😏 E0.6 smirking face
|
||||||
|
@ -105,7 +110,7 @@
|
||||||
1F975 ; fully-qualified # 🥵 E11.0 hot face
|
1F975 ; fully-qualified # 🥵 E11.0 hot face
|
||||||
1F976 ; fully-qualified # 🥶 E11.0 cold face
|
1F976 ; fully-qualified # 🥶 E11.0 cold face
|
||||||
1F974 ; fully-qualified # 🥴 E11.0 woozy face
|
1F974 ; fully-qualified # 🥴 E11.0 woozy face
|
||||||
1F635 ; fully-qualified # 😵 E0.6 knocked-out face
|
1F635 ; fully-qualified # 😵 E0.6 face with crossed-out eyes
|
||||||
1F635 200D 1F4AB ; fully-qualified # 😵💫 E13.1 face with spiral eyes
|
1F635 200D 1F4AB ; fully-qualified # 😵💫 E13.1 face with spiral eyes
|
||||||
1F92F ; fully-qualified # 🤯 E5.0 exploding head
|
1F92F ; fully-qualified # 🤯 E5.0 exploding head
|
||||||
|
|
||||||
|
@ -121,6 +126,7 @@
|
||||||
|
|
||||||
# subgroup: face-concerned
|
# subgroup: face-concerned
|
||||||
1F615 ; fully-qualified # 😕 E1.0 confused face
|
1F615 ; fully-qualified # 😕 E1.0 confused face
|
||||||
|
1FAE4 ; fully-qualified # 🫤 E14.0 face with diagonal mouth
|
||||||
1F61F ; fully-qualified # 😟 E1.0 worried face
|
1F61F ; fully-qualified # 😟 E1.0 worried face
|
||||||
1F641 ; fully-qualified # 🙁 E1.0 slightly frowning face
|
1F641 ; fully-qualified # 🙁 E1.0 slightly frowning face
|
||||||
2639 FE0F ; fully-qualified # ☹️ E0.7 frowning face
|
2639 FE0F ; fully-qualified # ☹️ E0.7 frowning face
|
||||||
|
@ -130,6 +136,7 @@
|
||||||
1F632 ; fully-qualified # 😲 E0.6 astonished face
|
1F632 ; fully-qualified # 😲 E0.6 astonished face
|
||||||
1F633 ; fully-qualified # 😳 E0.6 flushed face
|
1F633 ; fully-qualified # 😳 E0.6 flushed face
|
||||||
1F97A ; fully-qualified # 🥺 E11.0 pleading face
|
1F97A ; fully-qualified # 🥺 E11.0 pleading face
|
||||||
|
1F979 ; fully-qualified # 🥹 E14.0 face holding back tears
|
||||||
1F626 ; fully-qualified # 😦 E1.0 frowning face with open mouth
|
1F626 ; fully-qualified # 😦 E1.0 frowning face with open mouth
|
||||||
1F627 ; fully-qualified # 😧 E1.0 anguished face
|
1F627 ; fully-qualified # 😧 E1.0 anguished face
|
||||||
1F628 ; fully-qualified # 😨 E0.6 fearful face
|
1F628 ; fully-qualified # 😨 E0.6 fearful face
|
||||||
|
@ -232,8 +239,8 @@
|
||||||
1F4AD ; fully-qualified # 💭 E1.0 thought balloon
|
1F4AD ; fully-qualified # 💭 E1.0 thought balloon
|
||||||
1F4A4 ; fully-qualified # 💤 E0.6 zzz
|
1F4A4 ; fully-qualified # 💤 E0.6 zzz
|
||||||
|
|
||||||
# Smileys & Emotion subtotal: 170
|
# Smileys & Emotion subtotal: 177
|
||||||
# Smileys & Emotion subtotal: 170 w/o modifiers
|
# Smileys & Emotion subtotal: 177 w/o modifiers
|
||||||
|
|
||||||
# group: People & Body
|
# group: People & Body
|
||||||
|
|
||||||
|
@ -269,6 +276,30 @@
|
||||||
1F596 1F3FD ; fully-qualified # 🖖🏽 E1.0 vulcan salute: medium skin tone
|
1F596 1F3FD ; fully-qualified # 🖖🏽 E1.0 vulcan salute: medium skin tone
|
||||||
1F596 1F3FE ; fully-qualified # 🖖🏾 E1.0 vulcan salute: medium-dark skin tone
|
1F596 1F3FE ; fully-qualified # 🖖🏾 E1.0 vulcan salute: medium-dark skin tone
|
||||||
1F596 1F3FF ; fully-qualified # 🖖🏿 E1.0 vulcan salute: dark skin tone
|
1F596 1F3FF ; fully-qualified # 🖖🏿 E1.0 vulcan salute: dark skin tone
|
||||||
|
1FAF1 ; fully-qualified # 🫱 E14.0 rightwards hand
|
||||||
|
1FAF1 1F3FB ; fully-qualified # 🫱🏻 E14.0 rightwards hand: light skin tone
|
||||||
|
1FAF1 1F3FC ; fully-qualified # 🫱🏼 E14.0 rightwards hand: medium-light skin tone
|
||||||
|
1FAF1 1F3FD ; fully-qualified # 🫱🏽 E14.0 rightwards hand: medium skin tone
|
||||||
|
1FAF1 1F3FE ; fully-qualified # 🫱🏾 E14.0 rightwards hand: medium-dark skin tone
|
||||||
|
1FAF1 1F3FF ; fully-qualified # 🫱🏿 E14.0 rightwards hand: dark skin tone
|
||||||
|
1FAF2 ; fully-qualified # 🫲 E14.0 leftwards hand
|
||||||
|
1FAF2 1F3FB ; fully-qualified # 🫲🏻 E14.0 leftwards hand: light skin tone
|
||||||
|
1FAF2 1F3FC ; fully-qualified # 🫲🏼 E14.0 leftwards hand: medium-light skin tone
|
||||||
|
1FAF2 1F3FD ; fully-qualified # 🫲🏽 E14.0 leftwards hand: medium skin tone
|
||||||
|
1FAF2 1F3FE ; fully-qualified # 🫲🏾 E14.0 leftwards hand: medium-dark skin tone
|
||||||
|
1FAF2 1F3FF ; fully-qualified # 🫲🏿 E14.0 leftwards hand: dark skin tone
|
||||||
|
1FAF3 ; fully-qualified # 🫳 E14.0 palm down hand
|
||||||
|
1FAF3 1F3FB ; fully-qualified # 🫳🏻 E14.0 palm down hand: light skin tone
|
||||||
|
1FAF3 1F3FC ; fully-qualified # 🫳🏼 E14.0 palm down hand: medium-light skin tone
|
||||||
|
1FAF3 1F3FD ; fully-qualified # 🫳🏽 E14.0 palm down hand: medium skin tone
|
||||||
|
1FAF3 1F3FE ; fully-qualified # 🫳🏾 E14.0 palm down hand: medium-dark skin tone
|
||||||
|
1FAF3 1F3FF ; fully-qualified # 🫳🏿 E14.0 palm down hand: dark skin tone
|
||||||
|
1FAF4 ; fully-qualified # 🫴 E14.0 palm up hand
|
||||||
|
1FAF4 1F3FB ; fully-qualified # 🫴🏻 E14.0 palm up hand: light skin tone
|
||||||
|
1FAF4 1F3FC ; fully-qualified # 🫴🏼 E14.0 palm up hand: medium-light skin tone
|
||||||
|
1FAF4 1F3FD ; fully-qualified # 🫴🏽 E14.0 palm up hand: medium skin tone
|
||||||
|
1FAF4 1F3FE ; fully-qualified # 🫴🏾 E14.0 palm up hand: medium-dark skin tone
|
||||||
|
1FAF4 1F3FF ; fully-qualified # 🫴🏿 E14.0 palm up hand: dark skin tone
|
||||||
|
|
||||||
# subgroup: hand-fingers-partial
|
# subgroup: hand-fingers-partial
|
||||||
1F44C ; fully-qualified # 👌 E0.6 OK hand
|
1F44C ; fully-qualified # 👌 E0.6 OK hand
|
||||||
|
@ -302,6 +333,12 @@
|
||||||
1F91E 1F3FD ; fully-qualified # 🤞🏽 E3.0 crossed fingers: medium skin tone
|
1F91E 1F3FD ; fully-qualified # 🤞🏽 E3.0 crossed fingers: medium skin tone
|
||||||
1F91E 1F3FE ; fully-qualified # 🤞🏾 E3.0 crossed fingers: medium-dark skin tone
|
1F91E 1F3FE ; fully-qualified # 🤞🏾 E3.0 crossed fingers: medium-dark skin tone
|
||||||
1F91E 1F3FF ; fully-qualified # 🤞🏿 E3.0 crossed fingers: dark skin tone
|
1F91E 1F3FF ; fully-qualified # 🤞🏿 E3.0 crossed fingers: dark skin tone
|
||||||
|
1FAF0 ; fully-qualified # 🫰 E14.0 hand with index finger and thumb crossed
|
||||||
|
1FAF0 1F3FB ; fully-qualified # 🫰🏻 E14.0 hand with index finger and thumb crossed: light skin tone
|
||||||
|
1FAF0 1F3FC ; fully-qualified # 🫰🏼 E14.0 hand with index finger and thumb crossed: medium-light skin tone
|
||||||
|
1FAF0 1F3FD ; fully-qualified # 🫰🏽 E14.0 hand with index finger and thumb crossed: medium skin tone
|
||||||
|
1FAF0 1F3FE ; fully-qualified # 🫰🏾 E14.0 hand with index finger and thumb crossed: medium-dark skin tone
|
||||||
|
1FAF0 1F3FF ; fully-qualified # 🫰🏿 E14.0 hand with index finger and thumb crossed: dark skin tone
|
||||||
1F91F ; fully-qualified # 🤟 E5.0 love-you gesture
|
1F91F ; fully-qualified # 🤟 E5.0 love-you gesture
|
||||||
1F91F 1F3FB ; fully-qualified # 🤟🏻 E5.0 love-you gesture: light skin tone
|
1F91F 1F3FB ; fully-qualified # 🤟🏻 E5.0 love-you gesture: light skin tone
|
||||||
1F91F 1F3FC ; fully-qualified # 🤟🏼 E5.0 love-you gesture: medium-light skin tone
|
1F91F 1F3FC ; fully-qualified # 🤟🏼 E5.0 love-you gesture: medium-light skin tone
|
||||||
|
@ -359,6 +396,12 @@
|
||||||
261D 1F3FD ; fully-qualified # ☝🏽 E1.0 index pointing up: medium skin tone
|
261D 1F3FD ; fully-qualified # ☝🏽 E1.0 index pointing up: medium skin tone
|
||||||
261D 1F3FE ; fully-qualified # ☝🏾 E1.0 index pointing up: medium-dark skin tone
|
261D 1F3FE ; fully-qualified # ☝🏾 E1.0 index pointing up: medium-dark skin tone
|
||||||
261D 1F3FF ; fully-qualified # ☝🏿 E1.0 index pointing up: dark skin tone
|
261D 1F3FF ; fully-qualified # ☝🏿 E1.0 index pointing up: dark skin tone
|
||||||
|
1FAF5 ; fully-qualified # 🫵 E14.0 index pointing at the viewer
|
||||||
|
1FAF5 1F3FB ; fully-qualified # 🫵🏻 E14.0 index pointing at the viewer: light skin tone
|
||||||
|
1FAF5 1F3FC ; fully-qualified # 🫵🏼 E14.0 index pointing at the viewer: medium-light skin tone
|
||||||
|
1FAF5 1F3FD ; fully-qualified # 🫵🏽 E14.0 index pointing at the viewer: medium skin tone
|
||||||
|
1FAF5 1F3FE ; fully-qualified # 🫵🏾 E14.0 index pointing at the viewer: medium-dark skin tone
|
||||||
|
1FAF5 1F3FF ; fully-qualified # 🫵🏿 E14.0 index pointing at the viewer: dark skin tone
|
||||||
|
|
||||||
# subgroup: hand-fingers-closed
|
# subgroup: hand-fingers-closed
|
||||||
1F44D ; fully-qualified # 👍 E0.6 thumbs up
|
1F44D ; fully-qualified # 👍 E0.6 thumbs up
|
||||||
|
@ -411,6 +454,12 @@
|
||||||
1F64C 1F3FD ; fully-qualified # 🙌🏽 E1.0 raising hands: medium skin tone
|
1F64C 1F3FD ; fully-qualified # 🙌🏽 E1.0 raising hands: medium skin tone
|
||||||
1F64C 1F3FE ; fully-qualified # 🙌🏾 E1.0 raising hands: medium-dark skin tone
|
1F64C 1F3FE ; fully-qualified # 🙌🏾 E1.0 raising hands: medium-dark skin tone
|
||||||
1F64C 1F3FF ; fully-qualified # 🙌🏿 E1.0 raising hands: dark skin tone
|
1F64C 1F3FF ; fully-qualified # 🙌🏿 E1.0 raising hands: dark skin tone
|
||||||
|
1FAF6 ; fully-qualified # 🫶 E14.0 heart hands
|
||||||
|
1FAF6 1F3FB ; fully-qualified # 🫶🏻 E14.0 heart hands: light skin tone
|
||||||
|
1FAF6 1F3FC ; fully-qualified # 🫶🏼 E14.0 heart hands: medium-light skin tone
|
||||||
|
1FAF6 1F3FD ; fully-qualified # 🫶🏽 E14.0 heart hands: medium skin tone
|
||||||
|
1FAF6 1F3FE ; fully-qualified # 🫶🏾 E14.0 heart hands: medium-dark skin tone
|
||||||
|
1FAF6 1F3FF ; fully-qualified # 🫶🏿 E14.0 heart hands: dark skin tone
|
||||||
1F450 ; fully-qualified # 👐 E0.6 open hands
|
1F450 ; fully-qualified # 👐 E0.6 open hands
|
||||||
1F450 1F3FB ; fully-qualified # 👐🏻 E1.0 open hands: light skin tone
|
1F450 1F3FB ; fully-qualified # 👐🏻 E1.0 open hands: light skin tone
|
||||||
1F450 1F3FC ; fully-qualified # 👐🏼 E1.0 open hands: medium-light skin tone
|
1F450 1F3FC ; fully-qualified # 👐🏼 E1.0 open hands: medium-light skin tone
|
||||||
|
@ -424,6 +473,31 @@
|
||||||
1F932 1F3FE ; fully-qualified # 🤲🏾 E5.0 palms up together: medium-dark skin tone
|
1F932 1F3FE ; fully-qualified # 🤲🏾 E5.0 palms up together: medium-dark skin tone
|
||||||
1F932 1F3FF ; fully-qualified # 🤲🏿 E5.0 palms up together: dark skin tone
|
1F932 1F3FF ; fully-qualified # 🤲🏿 E5.0 palms up together: dark skin tone
|
||||||
1F91D ; fully-qualified # 🤝 E3.0 handshake
|
1F91D ; fully-qualified # 🤝 E3.0 handshake
|
||||||
|
1F91D 1F3FB ; fully-qualified # 🤝🏻 E3.0 handshake: light skin tone
|
||||||
|
1F91D 1F3FC ; fully-qualified # 🤝🏼 E3.0 handshake: medium-light skin tone
|
||||||
|
1F91D 1F3FD ; fully-qualified # 🤝🏽 E3.0 handshake: medium skin tone
|
||||||
|
1F91D 1F3FE ; fully-qualified # 🤝🏾 E3.0 handshake: medium-dark skin tone
|
||||||
|
1F91D 1F3FF ; fully-qualified # 🤝🏿 E3.0 handshake: dark skin tone
|
||||||
|
1FAF1 1F3FB 200D 1FAF2 1F3FC ; fully-qualified # 🫱🏻🫲🏼 E14.0 handshake: light skin tone, medium-light skin tone
|
||||||
|
1FAF1 1F3FB 200D 1FAF2 1F3FD ; fully-qualified # 🫱🏻🫲🏽 E14.0 handshake: light skin tone, medium skin tone
|
||||||
|
1FAF1 1F3FB 200D 1FAF2 1F3FE ; fully-qualified # 🫱🏻🫲🏾 E14.0 handshake: light skin tone, medium-dark skin tone
|
||||||
|
1FAF1 1F3FB 200D 1FAF2 1F3FF ; fully-qualified # 🫱🏻🫲🏿 E14.0 handshake: light skin tone, dark skin tone
|
||||||
|
1FAF1 1F3FC 200D 1FAF2 1F3FB ; fully-qualified # 🫱🏼🫲🏻 E14.0 handshake: medium-light skin tone, light skin tone
|
||||||
|
1FAF1 1F3FC 200D 1FAF2 1F3FD ; fully-qualified # 🫱🏼🫲🏽 E14.0 handshake: medium-light skin tone, medium skin tone
|
||||||
|
1FAF1 1F3FC 200D 1FAF2 1F3FE ; fully-qualified # 🫱🏼🫲🏾 E14.0 handshake: medium-light skin tone, medium-dark skin tone
|
||||||
|
1FAF1 1F3FC 200D 1FAF2 1F3FF ; fully-qualified # 🫱🏼🫲🏿 E14.0 handshake: medium-light skin tone, dark skin tone
|
||||||
|
1FAF1 1F3FD 200D 1FAF2 1F3FB ; fully-qualified # 🫱🏽🫲🏻 E14.0 handshake: medium skin tone, light skin tone
|
||||||
|
1FAF1 1F3FD 200D 1FAF2 1F3FC ; fully-qualified # 🫱🏽🫲🏼 E14.0 handshake: medium skin tone, medium-light skin tone
|
||||||
|
1FAF1 1F3FD 200D 1FAF2 1F3FE ; fully-qualified # 🫱🏽🫲🏾 E14.0 handshake: medium skin tone, medium-dark skin tone
|
||||||
|
1FAF1 1F3FD 200D 1FAF2 1F3FF ; fully-qualified # 🫱🏽🫲🏿 E14.0 handshake: medium skin tone, dark skin tone
|
||||||
|
1FAF1 1F3FE 200D 1FAF2 1F3FB ; fully-qualified # 🫱🏾🫲🏻 E14.0 handshake: medium-dark skin tone, light skin tone
|
||||||
|
1FAF1 1F3FE 200D 1FAF2 1F3FC ; fully-qualified # 🫱🏾🫲🏼 E14.0 handshake: medium-dark skin tone, medium-light skin tone
|
||||||
|
1FAF1 1F3FE 200D 1FAF2 1F3FD ; fully-qualified # 🫱🏾🫲🏽 E14.0 handshake: medium-dark skin tone, medium skin tone
|
||||||
|
1FAF1 1F3FE 200D 1FAF2 1F3FF ; fully-qualified # 🫱🏾🫲🏿 E14.0 handshake: medium-dark skin tone, dark skin tone
|
||||||
|
1FAF1 1F3FF 200D 1FAF2 1F3FB ; fully-qualified # 🫱🏿🫲🏻 E14.0 handshake: dark skin tone, light skin tone
|
||||||
|
1FAF1 1F3FF 200D 1FAF2 1F3FC ; fully-qualified # 🫱🏿🫲🏼 E14.0 handshake: dark skin tone, medium-light skin tone
|
||||||
|
1FAF1 1F3FF 200D 1FAF2 1F3FD ; fully-qualified # 🫱🏿🫲🏽 E14.0 handshake: dark skin tone, medium skin tone
|
||||||
|
1FAF1 1F3FF 200D 1FAF2 1F3FE ; fully-qualified # 🫱🏿🫲🏾 E14.0 handshake: dark skin tone, medium-dark skin tone
|
||||||
1F64F ; fully-qualified # 🙏 E0.6 folded hands
|
1F64F ; fully-qualified # 🙏 E0.6 folded hands
|
||||||
1F64F 1F3FB ; fully-qualified # 🙏🏻 E1.0 folded hands: light skin tone
|
1F64F 1F3FB ; fully-qualified # 🙏🏻 E1.0 folded hands: light skin tone
|
||||||
1F64F 1F3FC ; fully-qualified # 🙏🏼 E1.0 folded hands: medium-light skin tone
|
1F64F 1F3FC ; fully-qualified # 🙏🏼 E1.0 folded hands: medium-light skin tone
|
||||||
|
@ -501,6 +575,7 @@
|
||||||
1F441 ; unqualified # 👁 E0.7 eye
|
1F441 ; unqualified # 👁 E0.7 eye
|
||||||
1F445 ; fully-qualified # 👅 E0.6 tongue
|
1F445 ; fully-qualified # 👅 E0.6 tongue
|
||||||
1F444 ; fully-qualified # 👄 E0.6 mouth
|
1F444 ; fully-qualified # 👄 E0.6 mouth
|
||||||
|
1FAE6 ; fully-qualified # 🫦 E14.0 biting lip
|
||||||
|
|
||||||
# subgroup: person
|
# subgroup: person
|
||||||
1F476 ; fully-qualified # 👶 E0.6 baby
|
1F476 ; fully-qualified # 👶 E0.6 baby
|
||||||
|
@ -1472,6 +1547,12 @@
|
||||||
1F477 1F3FE 200D 2640 ; minimally-qualified # 👷🏾♀ E4.0 woman construction worker: medium-dark skin tone
|
1F477 1F3FE 200D 2640 ; minimally-qualified # 👷🏾♀ E4.0 woman construction worker: medium-dark skin tone
|
||||||
1F477 1F3FF 200D 2640 FE0F ; fully-qualified # 👷🏿♀️ E4.0 woman construction worker: dark skin tone
|
1F477 1F3FF 200D 2640 FE0F ; fully-qualified # 👷🏿♀️ E4.0 woman construction worker: dark skin tone
|
||||||
1F477 1F3FF 200D 2640 ; minimally-qualified # 👷🏿♀ E4.0 woman construction worker: dark skin tone
|
1F477 1F3FF 200D 2640 ; minimally-qualified # 👷🏿♀ E4.0 woman construction worker: dark skin tone
|
||||||
|
1FAC5 ; fully-qualified # 🫅 E14.0 person with crown
|
||||||
|
1FAC5 1F3FB ; fully-qualified # 🫅🏻 E14.0 person with crown: light skin tone
|
||||||
|
1FAC5 1F3FC ; fully-qualified # 🫅🏼 E14.0 person with crown: medium-light skin tone
|
||||||
|
1FAC5 1F3FD ; fully-qualified # 🫅🏽 E14.0 person with crown: medium skin tone
|
||||||
|
1FAC5 1F3FE ; fully-qualified # 🫅🏾 E14.0 person with crown: medium-dark skin tone
|
||||||
|
1FAC5 1F3FF ; fully-qualified # 🫅🏿 E14.0 person with crown: dark skin tone
|
||||||
1F934 ; fully-qualified # 🤴 E3.0 prince
|
1F934 ; fully-qualified # 🤴 E3.0 prince
|
||||||
1F934 1F3FB ; fully-qualified # 🤴🏻 E3.0 prince: light skin tone
|
1F934 1F3FB ; fully-qualified # 🤴🏻 E3.0 prince: light skin tone
|
||||||
1F934 1F3FC ; fully-qualified # 🤴🏼 E3.0 prince: medium-light skin tone
|
1F934 1F3FC ; fully-qualified # 🤴🏼 E3.0 prince: medium-light skin tone
|
||||||
|
@ -1592,6 +1673,18 @@
|
||||||
1F930 1F3FD ; fully-qualified # 🤰🏽 E3.0 pregnant woman: medium skin tone
|
1F930 1F3FD ; fully-qualified # 🤰🏽 E3.0 pregnant woman: medium skin tone
|
||||||
1F930 1F3FE ; fully-qualified # 🤰🏾 E3.0 pregnant woman: medium-dark skin tone
|
1F930 1F3FE ; fully-qualified # 🤰🏾 E3.0 pregnant woman: medium-dark skin tone
|
||||||
1F930 1F3FF ; fully-qualified # 🤰🏿 E3.0 pregnant woman: dark skin tone
|
1F930 1F3FF ; fully-qualified # 🤰🏿 E3.0 pregnant woman: dark skin tone
|
||||||
|
1FAC3 ; fully-qualified # 🫃 E14.0 pregnant man
|
||||||
|
1FAC3 1F3FB ; fully-qualified # 🫃🏻 E14.0 pregnant man: light skin tone
|
||||||
|
1FAC3 1F3FC ; fully-qualified # 🫃🏼 E14.0 pregnant man: medium-light skin tone
|
||||||
|
1FAC3 1F3FD ; fully-qualified # 🫃🏽 E14.0 pregnant man: medium skin tone
|
||||||
|
1FAC3 1F3FE ; fully-qualified # 🫃🏾 E14.0 pregnant man: medium-dark skin tone
|
||||||
|
1FAC3 1F3FF ; fully-qualified # 🫃🏿 E14.0 pregnant man: dark skin tone
|
||||||
|
1FAC4 ; fully-qualified # 🫄 E14.0 pregnant person
|
||||||
|
1FAC4 1F3FB ; fully-qualified # 🫄🏻 E14.0 pregnant person: light skin tone
|
||||||
|
1FAC4 1F3FC ; fully-qualified # 🫄🏼 E14.0 pregnant person: medium-light skin tone
|
||||||
|
1FAC4 1F3FD ; fully-qualified # 🫄🏽 E14.0 pregnant person: medium skin tone
|
||||||
|
1FAC4 1F3FE ; fully-qualified # 🫄🏾 E14.0 pregnant person: medium-dark skin tone
|
||||||
|
1FAC4 1F3FF ; fully-qualified # 🫄🏿 E14.0 pregnant person: dark skin tone
|
||||||
1F931 ; fully-qualified # 🤱 E5.0 breast-feeding
|
1F931 ; fully-qualified # 🤱 E5.0 breast-feeding
|
||||||
1F931 1F3FB ; fully-qualified # 🤱🏻 E5.0 breast-feeding: light skin tone
|
1F931 1F3FB ; fully-qualified # 🤱🏻 E5.0 breast-feeding: light skin tone
|
||||||
1F931 1F3FC ; fully-qualified # 🤱🏼 E5.0 breast-feeding: medium-light skin tone
|
1F931 1F3FC ; fully-qualified # 🤱🏼 E5.0 breast-feeding: medium-light skin tone
|
||||||
|
@ -1862,6 +1955,7 @@
|
||||||
1F9DF 200D 2642 ; minimally-qualified # 🧟♂ E5.0 man zombie
|
1F9DF 200D 2642 ; minimally-qualified # 🧟♂ E5.0 man zombie
|
||||||
1F9DF 200D 2640 FE0F ; fully-qualified # 🧟♀️ E5.0 woman zombie
|
1F9DF 200D 2640 FE0F ; fully-qualified # 🧟♀️ E5.0 woman zombie
|
||||||
1F9DF 200D 2640 ; minimally-qualified # 🧟♀ E5.0 woman zombie
|
1F9DF 200D 2640 ; minimally-qualified # 🧟♀ E5.0 woman zombie
|
||||||
|
1F9CC ; fully-qualified # 🧌 E14.0 troll
|
||||||
|
|
||||||
# subgroup: person-activity
|
# subgroup: person-activity
|
||||||
1F486 ; fully-qualified # 💆 E0.6 person getting massage
|
1F486 ; fully-qualified # 💆 E0.6 person getting massage
|
||||||
|
@ -3168,8 +3262,8 @@
|
||||||
1FAC2 ; fully-qualified # 🫂 E13.0 people hugging
|
1FAC2 ; fully-qualified # 🫂 E13.0 people hugging
|
||||||
1F463 ; fully-qualified # 👣 E0.6 footprints
|
1F463 ; fully-qualified # 👣 E0.6 footprints
|
||||||
|
|
||||||
# People & Body subtotal: 2899
|
# People & Body subtotal: 2986
|
||||||
# People & Body subtotal: 494 w/o modifiers
|
# People & Body subtotal: 506 w/o modifiers
|
||||||
|
|
||||||
# group: Component
|
# group: Component
|
||||||
|
|
||||||
|
@ -3304,6 +3398,7 @@
|
||||||
1F988 ; fully-qualified # 🦈 E3.0 shark
|
1F988 ; fully-qualified # 🦈 E3.0 shark
|
||||||
1F419 ; fully-qualified # 🐙 E0.6 octopus
|
1F419 ; fully-qualified # 🐙 E0.6 octopus
|
||||||
1F41A ; fully-qualified # 🐚 E0.6 spiral shell
|
1F41A ; fully-qualified # 🐚 E0.6 spiral shell
|
||||||
|
1FAB8 ; fully-qualified # 🪸 E14.0 coral
|
||||||
|
|
||||||
# subgroup: animal-bug
|
# subgroup: animal-bug
|
||||||
1F40C ; fully-qualified # 🐌 E0.6 snail
|
1F40C ; fully-qualified # 🐌 E0.6 snail
|
||||||
|
@ -3329,6 +3424,7 @@
|
||||||
1F490 ; fully-qualified # 💐 E0.6 bouquet
|
1F490 ; fully-qualified # 💐 E0.6 bouquet
|
||||||
1F338 ; fully-qualified # 🌸 E0.6 cherry blossom
|
1F338 ; fully-qualified # 🌸 E0.6 cherry blossom
|
||||||
1F4AE ; fully-qualified # 💮 E0.6 white flower
|
1F4AE ; fully-qualified # 💮 E0.6 white flower
|
||||||
|
1FAB7 ; fully-qualified # 🪷 E14.0 lotus
|
||||||
1F3F5 FE0F ; fully-qualified # 🏵️ E0.7 rosette
|
1F3F5 FE0F ; fully-qualified # 🏵️ E0.7 rosette
|
||||||
1F3F5 ; unqualified # 🏵 E0.7 rosette
|
1F3F5 ; unqualified # 🏵 E0.7 rosette
|
||||||
1F339 ; fully-qualified # 🌹 E0.6 rose
|
1F339 ; fully-qualified # 🌹 E0.6 rose
|
||||||
|
@ -3353,9 +3449,11 @@
|
||||||
1F341 ; fully-qualified # 🍁 E0.6 maple leaf
|
1F341 ; fully-qualified # 🍁 E0.6 maple leaf
|
||||||
1F342 ; fully-qualified # 🍂 E0.6 fallen leaf
|
1F342 ; fully-qualified # 🍂 E0.6 fallen leaf
|
||||||
1F343 ; fully-qualified # 🍃 E0.6 leaf fluttering in wind
|
1F343 ; fully-qualified # 🍃 E0.6 leaf fluttering in wind
|
||||||
|
1FAB9 ; fully-qualified # 🪹 E14.0 empty nest
|
||||||
|
1FABA ; fully-qualified # 🪺 E14.0 nest with eggs
|
||||||
|
|
||||||
# Animals & Nature subtotal: 147
|
# Animals & Nature subtotal: 151
|
||||||
# Animals & Nature subtotal: 147 w/o modifiers
|
# Animals & Nature subtotal: 151 w/o modifiers
|
||||||
|
|
||||||
# group: Food & Drink
|
# group: Food & Drink
|
||||||
|
|
||||||
|
@ -3396,6 +3494,7 @@
|
||||||
1F9C5 ; fully-qualified # 🧅 E12.0 onion
|
1F9C5 ; fully-qualified # 🧅 E12.0 onion
|
||||||
1F344 ; fully-qualified # 🍄 E0.6 mushroom
|
1F344 ; fully-qualified # 🍄 E0.6 mushroom
|
||||||
1F95C ; fully-qualified # 🥜 E3.0 peanuts
|
1F95C ; fully-qualified # 🥜 E3.0 peanuts
|
||||||
|
1FAD8 ; fully-qualified # 🫘 E14.0 beans
|
||||||
1F330 ; fully-qualified # 🌰 E0.6 chestnut
|
1F330 ; fully-qualified # 🌰 E0.6 chestnut
|
||||||
|
|
||||||
# subgroup: food-prepared
|
# subgroup: food-prepared
|
||||||
|
@ -3491,6 +3590,7 @@
|
||||||
1F37B ; fully-qualified # 🍻 E0.6 clinking beer mugs
|
1F37B ; fully-qualified # 🍻 E0.6 clinking beer mugs
|
||||||
1F942 ; fully-qualified # 🥂 E3.0 clinking glasses
|
1F942 ; fully-qualified # 🥂 E3.0 clinking glasses
|
||||||
1F943 ; fully-qualified # 🥃 E3.0 tumbler glass
|
1F943 ; fully-qualified # 🥃 E3.0 tumbler glass
|
||||||
|
1FAD7 ; fully-qualified # 🫗 E14.0 pouring liquid
|
||||||
1F964 ; fully-qualified # 🥤 E5.0 cup with straw
|
1F964 ; fully-qualified # 🥤 E5.0 cup with straw
|
||||||
1F9CB ; fully-qualified # 🧋 E13.0 bubble tea
|
1F9CB ; fully-qualified # 🧋 E13.0 bubble tea
|
||||||
1F9C3 ; fully-qualified # 🧃 E12.0 beverage box
|
1F9C3 ; fully-qualified # 🧃 E12.0 beverage box
|
||||||
|
@ -3504,10 +3604,11 @@
|
||||||
1F374 ; fully-qualified # 🍴 E0.6 fork and knife
|
1F374 ; fully-qualified # 🍴 E0.6 fork and knife
|
||||||
1F944 ; fully-qualified # 🥄 E3.0 spoon
|
1F944 ; fully-qualified # 🥄 E3.0 spoon
|
||||||
1F52A ; fully-qualified # 🔪 E0.6 kitchen knife
|
1F52A ; fully-qualified # 🔪 E0.6 kitchen knife
|
||||||
|
1FAD9 ; fully-qualified # 🫙 E14.0 jar
|
||||||
1F3FA ; fully-qualified # 🏺 E1.0 amphora
|
1F3FA ; fully-qualified # 🏺 E1.0 amphora
|
||||||
|
|
||||||
# Food & Drink subtotal: 131
|
# Food & Drink subtotal: 134
|
||||||
# Food & Drink subtotal: 131 w/o modifiers
|
# Food & Drink subtotal: 134 w/o modifiers
|
||||||
|
|
||||||
# group: Travel & Places
|
# group: Travel & Places
|
||||||
|
|
||||||
|
@ -3597,6 +3698,7 @@
|
||||||
2668 FE0F ; fully-qualified # ♨️ E0.6 hot springs
|
2668 FE0F ; fully-qualified # ♨️ E0.6 hot springs
|
||||||
2668 ; unqualified # ♨ E0.6 hot springs
|
2668 ; unqualified # ♨ E0.6 hot springs
|
||||||
1F3A0 ; fully-qualified # 🎠 E0.6 carousel horse
|
1F3A0 ; fully-qualified # 🎠 E0.6 carousel horse
|
||||||
|
1F6DD ; fully-qualified # 🛝 E14.0 playground slide
|
||||||
1F3A1 ; fully-qualified # 🎡 E0.6 ferris wheel
|
1F3A1 ; fully-qualified # 🎡 E0.6 ferris wheel
|
||||||
1F3A2 ; fully-qualified # 🎢 E0.6 roller coaster
|
1F3A2 ; fully-qualified # 🎢 E0.6 roller coaster
|
||||||
1F488 ; fully-qualified # 💈 E0.6 barber pole
|
1F488 ; fully-qualified # 💈 E0.6 barber pole
|
||||||
|
@ -3652,6 +3754,7 @@
|
||||||
1F6E2 FE0F ; fully-qualified # 🛢️ E0.7 oil drum
|
1F6E2 FE0F ; fully-qualified # 🛢️ E0.7 oil drum
|
||||||
1F6E2 ; unqualified # 🛢 E0.7 oil drum
|
1F6E2 ; unqualified # 🛢 E0.7 oil drum
|
||||||
26FD ; fully-qualified # ⛽ E0.6 fuel pump
|
26FD ; fully-qualified # ⛽ E0.6 fuel pump
|
||||||
|
1F6DE ; fully-qualified # 🛞 E14.0 wheel
|
||||||
1F6A8 ; fully-qualified # 🚨 E0.6 police car light
|
1F6A8 ; fully-qualified # 🚨 E0.6 police car light
|
||||||
1F6A5 ; fully-qualified # 🚥 E0.6 horizontal traffic light
|
1F6A5 ; fully-qualified # 🚥 E0.6 horizontal traffic light
|
||||||
1F6A6 ; fully-qualified # 🚦 E1.0 vertical traffic light
|
1F6A6 ; fully-qualified # 🚦 E1.0 vertical traffic light
|
||||||
|
@ -3660,6 +3763,7 @@
|
||||||
|
|
||||||
# subgroup: transport-water
|
# subgroup: transport-water
|
||||||
2693 ; fully-qualified # ⚓ E0.6 anchor
|
2693 ; fully-qualified # ⚓ E0.6 anchor
|
||||||
|
1F6DF ; fully-qualified # 🛟 E14.0 ring buoy
|
||||||
26F5 ; fully-qualified # ⛵ E0.6 sailboat
|
26F5 ; fully-qualified # ⛵ E0.6 sailboat
|
||||||
1F6F6 ; fully-qualified # 🛶 E3.0 canoe
|
1F6F6 ; fully-qualified # 🛶 E3.0 canoe
|
||||||
1F6A4 ; fully-qualified # 🚤 E0.6 speedboat
|
1F6A4 ; fully-qualified # 🚤 E0.6 speedboat
|
||||||
|
@ -3797,8 +3901,8 @@
|
||||||
1F4A7 ; fully-qualified # 💧 E0.6 droplet
|
1F4A7 ; fully-qualified # 💧 E0.6 droplet
|
||||||
1F30A ; fully-qualified # 🌊 E0.6 water wave
|
1F30A ; fully-qualified # 🌊 E0.6 water wave
|
||||||
|
|
||||||
# Travel & Places subtotal: 264
|
# Travel & Places subtotal: 267
|
||||||
# Travel & Places subtotal: 264 w/o modifiers
|
# Travel & Places subtotal: 267 w/o modifiers
|
||||||
|
|
||||||
# group: Activities
|
# group: Activities
|
||||||
|
|
||||||
|
@ -3874,6 +3978,7 @@
|
||||||
1F52E ; fully-qualified # 🔮 E0.6 crystal ball
|
1F52E ; fully-qualified # 🔮 E0.6 crystal ball
|
||||||
1FA84 ; fully-qualified # 🪄 E13.0 magic wand
|
1FA84 ; fully-qualified # 🪄 E13.0 magic wand
|
||||||
1F9FF ; fully-qualified # 🧿 E11.0 nazar amulet
|
1F9FF ; fully-qualified # 🧿 E11.0 nazar amulet
|
||||||
|
1FAAC ; fully-qualified # 🪬 E14.0 hamsa
|
||||||
1F3AE ; fully-qualified # 🎮 E0.6 video game
|
1F3AE ; fully-qualified # 🎮 E0.6 video game
|
||||||
1F579 FE0F ; fully-qualified # 🕹️ E0.7 joystick
|
1F579 FE0F ; fully-qualified # 🕹️ E0.7 joystick
|
||||||
1F579 ; unqualified # 🕹 E0.7 joystick
|
1F579 ; unqualified # 🕹 E0.7 joystick
|
||||||
|
@ -3882,6 +3987,7 @@
|
||||||
1F9E9 ; fully-qualified # 🧩 E11.0 puzzle piece
|
1F9E9 ; fully-qualified # 🧩 E11.0 puzzle piece
|
||||||
1F9F8 ; fully-qualified # 🧸 E11.0 teddy bear
|
1F9F8 ; fully-qualified # 🧸 E11.0 teddy bear
|
||||||
1FA85 ; fully-qualified # 🪅 E13.0 piñata
|
1FA85 ; fully-qualified # 🪅 E13.0 piñata
|
||||||
|
1FAA9 ; fully-qualified # 🪩 E14.0 mirror ball
|
||||||
1FA86 ; fully-qualified # 🪆 E13.0 nesting dolls
|
1FA86 ; fully-qualified # 🪆 E13.0 nesting dolls
|
||||||
2660 FE0F ; fully-qualified # ♠️ E0.6 spade suit
|
2660 FE0F ; fully-qualified # ♠️ E0.6 spade suit
|
||||||
2660 ; unqualified # ♠ E0.6 spade suit
|
2660 ; unqualified # ♠ E0.6 spade suit
|
||||||
|
@ -3907,8 +4013,8 @@
|
||||||
1F9F6 ; fully-qualified # 🧶 E11.0 yarn
|
1F9F6 ; fully-qualified # 🧶 E11.0 yarn
|
||||||
1FAA2 ; fully-qualified # 🪢 E13.0 knot
|
1FAA2 ; fully-qualified # 🪢 E13.0 knot
|
||||||
|
|
||||||
# Activities subtotal: 95
|
# Activities subtotal: 97
|
||||||
# Activities subtotal: 95 w/o modifiers
|
# Activities subtotal: 97 w/o modifiers
|
||||||
|
|
||||||
# group: Objects
|
# group: Objects
|
||||||
|
|
||||||
|
@ -4009,6 +4115,7 @@
|
||||||
|
|
||||||
# subgroup: computer
|
# subgroup: computer
|
||||||
1F50B ; fully-qualified # 🔋 E0.6 battery
|
1F50B ; fully-qualified # 🔋 E0.6 battery
|
||||||
|
1FAAB ; fully-qualified # 🪫 E14.0 low battery
|
||||||
1F50C ; fully-qualified # 🔌 E0.6 electric plug
|
1F50C ; fully-qualified # 🔌 E0.6 electric plug
|
||||||
1F4BB ; fully-qualified # 💻 E0.6 laptop
|
1F4BB ; fully-qualified # 💻 E0.6 laptop
|
||||||
1F5A5 FE0F ; fully-qualified # 🖥️ E0.7 desktop computer
|
1F5A5 FE0F ; fully-qualified # 🖥️ E0.7 desktop computer
|
||||||
|
@ -4207,7 +4314,9 @@
|
||||||
1FA78 ; fully-qualified # 🩸 E12.0 drop of blood
|
1FA78 ; fully-qualified # 🩸 E12.0 drop of blood
|
||||||
1F48A ; fully-qualified # 💊 E0.6 pill
|
1F48A ; fully-qualified # 💊 E0.6 pill
|
||||||
1FA79 ; fully-qualified # 🩹 E12.0 adhesive bandage
|
1FA79 ; fully-qualified # 🩹 E12.0 adhesive bandage
|
||||||
|
1FA7C ; fully-qualified # 🩼 E14.0 crutch
|
||||||
1FA7A ; fully-qualified # 🩺 E12.0 stethoscope
|
1FA7A ; fully-qualified # 🩺 E12.0 stethoscope
|
||||||
|
1FA7B ; fully-qualified # 🩻 E14.0 x-ray
|
||||||
|
|
||||||
# subgroup: household
|
# subgroup: household
|
||||||
1F6AA ; fully-qualified # 🚪 E0.6 door
|
1F6AA ; fully-qualified # 🚪 E0.6 door
|
||||||
|
@ -4232,6 +4341,7 @@
|
||||||
1F9FB ; fully-qualified # 🧻 E11.0 roll of paper
|
1F9FB ; fully-qualified # 🧻 E11.0 roll of paper
|
||||||
1FAA3 ; fully-qualified # 🪣 E13.0 bucket
|
1FAA3 ; fully-qualified # 🪣 E13.0 bucket
|
||||||
1F9FC ; fully-qualified # 🧼 E11.0 soap
|
1F9FC ; fully-qualified # 🧼 E11.0 soap
|
||||||
|
1FAE7 ; fully-qualified # 🫧 E14.0 bubbles
|
||||||
1FAA5 ; fully-qualified # 🪥 E13.0 toothbrush
|
1FAA5 ; fully-qualified # 🪥 E13.0 toothbrush
|
||||||
1F9FD ; fully-qualified # 🧽 E11.0 sponge
|
1F9FD ; fully-qualified # 🧽 E11.0 sponge
|
||||||
1F9EF ; fully-qualified # 🧯 E11.0 fire extinguisher
|
1F9EF ; fully-qualified # 🧯 E11.0 fire extinguisher
|
||||||
|
@ -4246,9 +4356,10 @@
|
||||||
26B1 ; unqualified # ⚱ E1.0 funeral urn
|
26B1 ; unqualified # ⚱ E1.0 funeral urn
|
||||||
1F5FF ; fully-qualified # 🗿 E0.6 moai
|
1F5FF ; fully-qualified # 🗿 E0.6 moai
|
||||||
1FAA7 ; fully-qualified # 🪧 E13.0 placard
|
1FAA7 ; fully-qualified # 🪧 E13.0 placard
|
||||||
|
1FAAA ; fully-qualified # 🪪 E14.0 identification card
|
||||||
|
|
||||||
# Objects subtotal: 299
|
# Objects subtotal: 304
|
||||||
# Objects subtotal: 299 w/o modifiers
|
# Objects subtotal: 304 w/o modifiers
|
||||||
|
|
||||||
# group: Symbols
|
# group: Symbols
|
||||||
|
|
||||||
|
@ -4409,6 +4520,7 @@
|
||||||
2795 ; fully-qualified # ➕ E0.6 plus
|
2795 ; fully-qualified # ➕ E0.6 plus
|
||||||
2796 ; fully-qualified # ➖ E0.6 minus
|
2796 ; fully-qualified # ➖ E0.6 minus
|
||||||
2797 ; fully-qualified # ➗ E0.6 divide
|
2797 ; fully-qualified # ➗ E0.6 divide
|
||||||
|
1F7F0 ; fully-qualified # 🟰 E14.0 heavy equals sign
|
||||||
267E FE0F ; fully-qualified # ♾️ E11.0 infinity
|
267E FE0F ; fully-qualified # ♾️ E11.0 infinity
|
||||||
267E ; unqualified # ♾ E11.0 infinity
|
267E ; unqualified # ♾ E11.0 infinity
|
||||||
|
|
||||||
|
@ -4581,8 +4693,8 @@
|
||||||
1F533 ; fully-qualified # 🔳 E0.6 white square button
|
1F533 ; fully-qualified # 🔳 E0.6 white square button
|
||||||
1F532 ; fully-qualified # 🔲 E0.6 black square button
|
1F532 ; fully-qualified # 🔲 E0.6 black square button
|
||||||
|
|
||||||
# Symbols subtotal: 301
|
# Symbols subtotal: 302
|
||||||
# Symbols subtotal: 301 w/o modifiers
|
# Symbols subtotal: 302 w/o modifiers
|
||||||
|
|
||||||
# group: Flags
|
# group: Flags
|
||||||
|
|
||||||
|
@ -4871,7 +4983,7 @@
|
||||||
# Flags subtotal: 275 w/o modifiers
|
# Flags subtotal: 275 w/o modifiers
|
||||||
|
|
||||||
# Status Counts
|
# Status Counts
|
||||||
# fully-qualified : 3512
|
# fully-qualified : 3624
|
||||||
# minimally-qualified : 817
|
# minimally-qualified : 817
|
||||||
# unqualified : 252
|
# unqualified : 252
|
||||||
# component : 9
|
# component : 9
|
||||||
|
|
|
@ -159,7 +159,11 @@ def maybe_quote(name) when is_binary(name) do
|
||||||
if is_unicode_emoji?(name) do
|
if is_unicode_emoji?(name) do
|
||||||
name
|
name
|
||||||
else
|
else
|
||||||
":#{name}:"
|
if String.starts_with?(name, ":") do
|
||||||
|
name
|
||||||
|
else
|
||||||
|
":#{name}:"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -542,7 +542,7 @@ defp get_filename(pack, shortcode) do
|
||||||
defp http_get(%URI{} = url), do: url |> to_string() |> http_get()
|
defp http_get(%URI{} = url), do: url |> to_string() |> http_get()
|
||||||
|
|
||||||
defp http_get(url) do
|
defp http_get(url) do
|
||||||
with {:ok, %{body: body}} <- Pleroma.HTTP.get(url, [], pool: :default) do
|
with {:ok, %{body: body}} <- Pleroma.HTTP.get(url, [], []) do
|
||||||
Jason.decode(body)
|
Jason.decode(body)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -194,12 +194,13 @@ def move_following(origin, target) do
|
||||||
|> join(:inner, [r], f in assoc(r, :follower))
|
|> join(:inner, [r], f in assoc(r, :follower))
|
||||||
|> where(following_id: ^origin.id)
|
|> where(following_id: ^origin.id)
|
||||||
|> where([r, f], f.allow_following_move == true)
|
|> where([r, f], f.allow_following_move == true)
|
||||||
|
|> where([r, f], f.local == true)
|
||||||
|> limit(50)
|
|> limit(50)
|
||||||
|> preload([:follower])
|
|> preload([:follower])
|
||||||
|> Repo.all()
|
|> Repo.all()
|
||||||
|> Enum.map(fn following_relationship ->
|
|> Enum.map(fn following_relationship ->
|
||||||
Repo.delete(following_relationship)
|
|
||||||
Pleroma.Web.CommonAPI.follow(following_relationship.follower, target)
|
Pleroma.Web.CommonAPI.follow(following_relationship.follower, target)
|
||||||
|
Pleroma.Web.CommonAPI.unfollow(following_relationship.follower, origin)
|
||||||
end)
|
end)
|
||||||
|> case do
|
|> case do
|
||||||
[] ->
|
[] ->
|
||||||
|
|
|
@ -93,7 +93,7 @@ defp download_build(frontend_info, dest) do
|
||||||
url = String.replace(frontend_info["build_url"], "${ref}", frontend_info["ref"])
|
url = String.replace(frontend_info["build_url"], "${ref}", frontend_info["ref"])
|
||||||
|
|
||||||
with {:ok, %{status: 200, body: zip_body}} <-
|
with {:ok, %{status: 200, body: zip_body}} <-
|
||||||
Pleroma.HTTP.get(url, [], pool: :media, recv_timeout: 120_000) do
|
Pleroma.HTTP.get(url, [], recv_timeout: 120_000) do
|
||||||
unzip(zip_body, dest)
|
unzip(zip_body, dest)
|
||||||
else
|
else
|
||||||
{:error, e} -> {:error, e}
|
{:error, e} -> {:error, e}
|
||||||
|
|
|
@ -1,162 +0,0 @@
|
||||||
# Pleroma: A lightweight social networking server
|
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
|
|
||||||
defmodule Pleroma.Gopher.Server do
|
|
||||||
use GenServer
|
|
||||||
require Logger
|
|
||||||
|
|
||||||
def start_link(_) do
|
|
||||||
config = Pleroma.Config.get(:gopher, [])
|
|
||||||
ip = Keyword.get(config, :ip, {0, 0, 0, 0})
|
|
||||||
port = Keyword.get(config, :port, 1234)
|
|
||||||
|
|
||||||
if Keyword.get(config, :enabled, false) do
|
|
||||||
GenServer.start_link(__MODULE__, [ip, port], [])
|
|
||||||
else
|
|
||||||
Logger.info("Gopher server disabled")
|
|
||||||
:ignore
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def init([ip, port]) do
|
|
||||||
Logger.info("Starting gopher server on #{port}")
|
|
||||||
|
|
||||||
:ranch.start_listener(
|
|
||||||
:gopher,
|
|
||||||
100,
|
|
||||||
:ranch_tcp,
|
|
||||||
[ip: ip, port: port],
|
|
||||||
__MODULE__.ProtocolHandler,
|
|
||||||
[]
|
|
||||||
)
|
|
||||||
|
|
||||||
{:ok, %{ip: ip, port: port}}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
defmodule Pleroma.Gopher.Server.ProtocolHandler do
|
|
||||||
alias Pleroma.Activity
|
|
||||||
alias Pleroma.HTML
|
|
||||||
alias Pleroma.Object
|
|
||||||
alias Pleroma.User
|
|
||||||
alias Pleroma.Web.ActivityPub.ActivityPub
|
|
||||||
alias Pleroma.Web.ActivityPub.Visibility
|
|
||||||
|
|
||||||
def start_link(ref, socket, transport, opts) do
|
|
||||||
pid = spawn_link(__MODULE__, :init, [ref, socket, transport, opts])
|
|
||||||
{:ok, pid}
|
|
||||||
end
|
|
||||||
|
|
||||||
def init(ref, socket, transport, [] = _Opts) do
|
|
||||||
:ok = :ranch.accept_ack(ref)
|
|
||||||
loop(socket, transport)
|
|
||||||
end
|
|
||||||
|
|
||||||
def info(text) do
|
|
||||||
text = String.replace(text, ~r/[\t\n]/, "")
|
|
||||||
|
|
||||||
String.split(text, "\r")
|
|
||||||
|> Enum.map(fn text ->
|
|
||||||
"i#{text}\tfake\t(NULL)\t0\r\n"
|
|
||||||
end)
|
|
||||||
|> Enum.join("")
|
|
||||||
end
|
|
||||||
|
|
||||||
def link(name, selector, type \\ 1) do
|
|
||||||
address = Pleroma.Web.Endpoint.host()
|
|
||||||
port = Pleroma.Config.get([:gopher, :port], 1234)
|
|
||||||
dstport = Pleroma.Config.get([:gopher, :dstport], port)
|
|
||||||
"#{type}#{name}\t#{selector}\t#{address}\t#{dstport}\r\n"
|
|
||||||
end
|
|
||||||
|
|
||||||
def render_activities(activities) do
|
|
||||||
activities
|
|
||||||
|> Enum.reverse()
|
|
||||||
|> Enum.map(fn activity ->
|
|
||||||
user = User.get_cached_by_ap_id(activity.data["actor"])
|
|
||||||
|
|
||||||
object = Object.normalize(activity, fetch: false)
|
|
||||||
like_count = object.data["like_count"] || 0
|
|
||||||
announcement_count = object.data["announcement_count"] || 0
|
|
||||||
|
|
||||||
link("Post ##{activity.id} by #{user.nickname}", "/notices/#{activity.id}") <>
|
|
||||||
info("#{like_count} likes, #{announcement_count} repeats") <>
|
|
||||||
"i\tfake\t(NULL)\t0\r\n" <>
|
|
||||||
info(HTML.strip_tags(String.replace(object.data["content"], "<br>", "\r")))
|
|
||||||
end)
|
|
||||||
|> Enum.join("i\tfake\t(NULL)\t0\r\n")
|
|
||||||
end
|
|
||||||
|
|
||||||
def response("") do
|
|
||||||
info("Welcome to #{Pleroma.Config.get([:instance, :name], "Pleroma")}!") <>
|
|
||||||
link("Public Timeline", "/main/public") <>
|
|
||||||
link("Federated Timeline", "/main/all") <> ".\r\n"
|
|
||||||
end
|
|
||||||
|
|
||||||
def response("/main/public") do
|
|
||||||
posts =
|
|
||||||
%{type: ["Create"], local_only: true}
|
|
||||||
|> ActivityPub.fetch_public_activities()
|
|
||||||
|> render_activities()
|
|
||||||
|
|
||||||
info("Welcome to the Public Timeline!") <> posts <> ".\r\n"
|
|
||||||
end
|
|
||||||
|
|
||||||
def response("/main/all") do
|
|
||||||
posts =
|
|
||||||
%{type: ["Create"]}
|
|
||||||
|> ActivityPub.fetch_public_activities()
|
|
||||||
|> render_activities()
|
|
||||||
|
|
||||||
info("Welcome to the Federated Timeline!") <> posts <> ".\r\n"
|
|
||||||
end
|
|
||||||
|
|
||||||
def response("/notices/" <> id) do
|
|
||||||
with %Activity{} = activity <- Activity.get_by_id(id),
|
|
||||||
true <- Visibility.is_public?(activity) do
|
|
||||||
activities =
|
|
||||||
ActivityPub.fetch_activities_for_context(activity.data["context"])
|
|
||||||
|> render_activities
|
|
||||||
|
|
||||||
user = User.get_cached_by_ap_id(activity.data["actor"])
|
|
||||||
|
|
||||||
info("Post #{activity.id} by #{user.nickname}") <>
|
|
||||||
link("More posts by #{user.nickname}", "/users/#{user.nickname}") <> activities <> ".\r\n"
|
|
||||||
else
|
|
||||||
_e ->
|
|
||||||
info("Not public") <> ".\r\n"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def response("/users/" <> nickname) do
|
|
||||||
with %User{} = user <- User.get_cached_by_nickname(nickname) do
|
|
||||||
params = %{
|
|
||||||
type: ["Create"],
|
|
||||||
actor_id: user.ap_id
|
|
||||||
}
|
|
||||||
|
|
||||||
activities =
|
|
||||||
params
|
|
||||||
|> ActivityPub.fetch_public_activities()
|
|
||||||
|> render_activities()
|
|
||||||
|
|
||||||
info("Posts by #{user.nickname}") <> activities <> ".\r\n"
|
|
||||||
else
|
|
||||||
_e ->
|
|
||||||
info("No such user") <> ".\r\n"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def loop(socket, transport) do
|
|
||||||
case transport.recv(socket, 0, 5000) do
|
|
||||||
{:ok, data} ->
|
|
||||||
data = String.trim_trailing(data, "\r\n")
|
|
||||||
transport.send(socket, response(data))
|
|
||||||
:ok = transport.close(socket)
|
|
||||||
|
|
||||||
_ ->
|
|
||||||
:ok = transport.close(socket)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -61,7 +61,6 @@ def get_or_create_by_names(names) when is_list(names) do
|
||||||
{:ok, Repo.all(from(ht in Hashtag, where: ht.name in ^names))}
|
{:ok, Repo.all(from(ht in Hashtag, where: ht.name in ^names))}
|
||||||
end)
|
end)
|
||||||
|> Repo.transaction() do
|
|> Repo.transaction() do
|
||||||
Pleroma.Elasticsearch.maybe_bulk_post(hashtags, :hashtags)
|
|
||||||
{:ok, hashtags}
|
{:ok, hashtags}
|
||||||
else
|
else
|
||||||
{:error, _name, value, _changes_so_far} -> {:error, value}
|
{:error, _name, value, _changes_so_far} -> {:error, value}
|
||||||
|
|
|
@ -24,7 +24,7 @@ def missing_dependencies do
|
||||||
def image_resize(url, options) do
|
def image_resize(url, options) do
|
||||||
with executable when is_binary(executable) <- System.find_executable("convert"),
|
with executable when is_binary(executable) <- System.find_executable("convert"),
|
||||||
{:ok, args} <- prepare_image_resize_args(options),
|
{:ok, args} <- prepare_image_resize_args(options),
|
||||||
{:ok, env} <- HTTP.get(url, [], pool: :media),
|
{:ok, env} <- HTTP.get(url, [], []),
|
||||||
{:ok, fifo_path} <- mkfifo() do
|
{:ok, fifo_path} <- mkfifo() do
|
||||||
args = List.flatten([fifo_path, args])
|
args = List.flatten([fifo_path, args])
|
||||||
run_fifo(fifo_path, env, executable, args)
|
run_fifo(fifo_path, env, executable, args)
|
||||||
|
@ -73,7 +73,7 @@ defp prepare_image_resize_args(_), do: {:error, :missing_options}
|
||||||
# Note: video thumbnail is intentionally not resized (always has original dimensions)
|
# Note: video thumbnail is intentionally not resized (always has original dimensions)
|
||||||
def video_framegrab(url) do
|
def video_framegrab(url) do
|
||||||
with executable when is_binary(executable) <- System.find_executable("ffmpeg"),
|
with executable when is_binary(executable) <- System.find_executable("ffmpeg"),
|
||||||
{:ok, env} <- HTTP.get(url, [], pool: :media),
|
{:ok, env} <- HTTP.get(url, [], []),
|
||||||
{:ok, fifo_path} <- mkfifo(),
|
{:ok, fifo_path} <- mkfifo(),
|
||||||
args = [
|
args = [
|
||||||
"-y",
|
"-y",
|
||||||
|
|
|
@ -66,17 +66,9 @@ def request(method, url, body, headers, options) when is_binary(url) do
|
||||||
params = options[:params] || []
|
params = options[:params] || []
|
||||||
request = build_request(method, headers, options, url, body, params)
|
request = build_request(method, headers, options, url, body, params)
|
||||||
|
|
||||||
adapter = Application.get_env(:tesla, :adapter)
|
client = Tesla.client([Tesla.Middleware.FollowRedirects])
|
||||||
|
|
||||||
client = Tesla.client(adapter_middlewares(adapter), adapter)
|
request(client, request)
|
||||||
|
|
||||||
maybe_limit(
|
|
||||||
fn ->
|
|
||||||
request(client, request)
|
|
||||||
end,
|
|
||||||
adapter,
|
|
||||||
adapter_opts
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@spec request(Client.t(), keyword()) :: {:ok, Env.t()} | {:error, any()}
|
@spec request(Client.t(), keyword()) :: {:ok, Env.t()} | {:error, any()}
|
||||||
|
@ -92,19 +84,4 @@ defp build_request(method, headers, options, url, body, params) do
|
||||||
|> Builder.add_param(:query, :query, params)
|
|> Builder.add_param(:query, :query, params)
|
||||||
|> Builder.convert_to_keyword()
|
|> Builder.convert_to_keyword()
|
||||||
end
|
end
|
||||||
|
|
||||||
@prefix Pleroma.Gun.ConnectionPool
|
|
||||||
defp maybe_limit(fun, Tesla.Adapter.Gun, opts) do
|
|
||||||
ConcurrentLimiter.limit(:"#{@prefix}.#{opts[:pool] || :default}", fun)
|
|
||||||
end
|
|
||||||
|
|
||||||
defp maybe_limit(fun, _, _) do
|
|
||||||
fun.()
|
|
||||||
end
|
|
||||||
|
|
||||||
defp adapter_middlewares(Tesla.Adapter.Gun) do
|
|
||||||
[Tesla.Middleware.FollowRedirects, Pleroma.Tesla.Middleware.ConnectionPool]
|
|
||||||
end
|
|
||||||
|
|
||||||
defp adapter_middlewares(_), do: []
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,7 +6,7 @@ defmodule Pleroma.HTTP.AdapterHelper do
|
||||||
@moduledoc """
|
@moduledoc """
|
||||||
Configure Tesla.Client with default and customized adapter options.
|
Configure Tesla.Client with default and customized adapter options.
|
||||||
"""
|
"""
|
||||||
@defaults [pool: :federation, connect_timeout: 5_000, recv_timeout: 5_000]
|
@defaults [name: MyFinch, connect_timeout: 5_000, recv_timeout: 5_000]
|
||||||
|
|
||||||
@type proxy_type() :: :socks4 | :socks5
|
@type proxy_type() :: :socks4 | :socks5
|
||||||
@type host() :: charlist() | :inet.ip_address()
|
@type host() :: charlist() | :inet.ip_address()
|
||||||
|
@ -43,17 +43,7 @@ def maybe_add_proxy(opts, proxy), do: Keyword.put_new(opts, :proxy, proxy)
|
||||||
def options(%URI{} = uri, opts \\ []) do
|
def options(%URI{} = uri, opts \\ []) do
|
||||||
@defaults
|
@defaults
|
||||||
|> Keyword.merge(opts)
|
|> Keyword.merge(opts)
|
||||||
|> adapter_helper().options(uri)
|
|> AdapterHelper.Default.options(uri)
|
||||||
end
|
|
||||||
|
|
||||||
defp adapter, do: Application.get_env(:tesla, :adapter)
|
|
||||||
|
|
||||||
defp adapter_helper do
|
|
||||||
case adapter() do
|
|
||||||
Tesla.Adapter.Gun -> AdapterHelper.Gun
|
|
||||||
Tesla.Adapter.Hackney -> AdapterHelper.Hackney
|
|
||||||
_ -> AdapterHelper.Default
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@spec parse_proxy(String.t() | tuple() | nil) ::
|
@spec parse_proxy(String.t() | tuple() | nil) ::
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue