From 1c8a2cf901904d2009ea6eac85fe55a1185494e5 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Wed, 29 Jun 2022 12:05:59 +0100 Subject: [PATCH 1/4] Update README, add migration docs --- README.md | 104 ++++------------------- config/description.exs | 71 ---------------- docs/installation/migrating_to_akkoma.md | 79 +++++++++++++++++ 3 files changed, 95 insertions(+), 159 deletions(-) create mode 100644 docs/installation/migrating_to_akkoma.md diff --git a/README.md b/README.md index bf56cb817..e4817e6c6 100644 --- a/README.md +++ b/README.md @@ -2,103 +2,38 @@ *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 - - - ## 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 ). +For clients it supports the [Mastodon client API](https://docs.joinmastodon.org/api/guidelines/) with Pleroma extensions (see the API section on ). -- [Client Applications for Pleroma](https://docs-develop.pleroma.social/backend/clients/) +- [Client Applications for Pleroma](https://docs.akkoma.dev/main/backend/clients/) ## Installation ### 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 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/) -- [Arch Linux](https://docs-develop.pleroma.social/backend/installation/arch_linux_en/) -- [CentOS 7](https://docs-develop.pleroma.social/backend/installation/centos7_en/) -- [Debian-based](https://docs-develop.pleroma.social/backend/installation/debian_based_en/) -- [Debian-based (jp)](https://docs-develop.pleroma.social/backend/installation/debian_based_jp/) -- [FreeBSD](https://docs-develop.pleroma.social/backend/installation/freebsd_en/) -- [Gentoo Linux](https://docs-develop.pleroma.social/backend/installation/gentoo_en/) -- [NetBSD](https://docs-develop.pleroma.social/backend/installation/netbsd_en/) -- [OpenBSD](https://docs-develop.pleroma.social/backend/installation/openbsd_en/) -- [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**. +- [Alpine Linux](https://docs.akkoma.dev/main/backend/installation/alpine_linux_en/) +- [Arch Linux](https://docs.akkoma.dev/main/backend/installation/arch_linux_en/) +- [CentOS 7](https://docs.akkoma.dev/main/backend/installation/centos7_en/) +- [Debian-based](https://docs.akkoma.dev/main/backend/installation/debian_based_en/) +- [Debian-based (jp)](https://docs.akkoma.dev/main/backend/installation/debian_based_jp/) +- [FreeBSD](https://docs.akkoma.dev/main/backend/installation/freebsd_en/) +- [Gentoo Linux](https://docs.akkoma.dev/main/backend/installation/gentoo_en/) +- [NetBSD](https://docs.akkoma.dev/main/backend/installation/netbsd_en/) +- [OpenBSD](https://docs.akkoma.dev/main/backend/installation/openbsd_en/) +- [OpenBSD (fi)](https://docs.akkoma.dev/main/backend/installation/openbsd_fi/) ### Docker While we don’t provide docker files, other people have written very good ones. Take a look at or . -### Raspberry Pi -Community maintained Raspberry Pi image that you can flash and run Pleroma on your Raspberry Pi. Available here . - ### Compilation Troubleshooting If you ever encounter compilation issues during the updating of Pleroma, you can try these commands and see if they fix things: @@ -107,12 +42,5 @@ If you ever encounter compilation issues during the updating of Pleroma, you can - `mix local.hex` - `rm -r _build` -If you are not developing Pleroma, it is better to use the OTP release, which comes with everything precompiled. - ## Documentation -- Latest Released revision: -- Latest Git revision: - -## Community Channels -* IRC: **#pleroma** and **#pleroma-dev** on libera.chat, webchat is available at -* Matrix: [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) and [#pleroma-dev:libera.chat](https://matrix.to/#/#pleroma-dev:libera.chat) +- https://docs.akkoma.dev/main diff --git a/config/description.exs b/config/description.exs index 48e0c59a8..4ca79ad51 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1651,38 +1651,6 @@ config :pleroma, :config_description, [ } ] }, - %{ - group: :pleroma, - key: :gopher, - type: :group, - description: "Gopher settings", - children: [ - %{ - key: :enabled, - type: :boolean, - description: "Enables the gopher interface" - }, - %{ - key: :ip, - label: "IP", - type: :tuple, - description: "IP address to bind to", - suggestions: [{0, 0, 0, 0}] - }, - %{ - key: :port, - type: :integer, - description: "Port to bind to", - suggestions: [9999] - }, - %{ - key: :dstport, - type: :integer, - description: "Port advertised in URLs (optional, defaults to port)", - suggestions: [9999] - } - ] - }, %{ group: :pleroma, key: :activitypub, @@ -2567,45 +2535,6 @@ config :pleroma, :config_description, [ } ] }, - %{ - group: :esshd, - label: "ESSHD", - type: :group, - description: - "Before enabling this you must add :esshd to mix.exs as one of the extra_applications " <> - "and generate host keys in your priv dir with ssh-keygen -m PEM -N \"\" -b 2048 -t rsa -f ssh_host_rsa_key", - children: [ - %{ - key: :enabled, - type: :boolean, - description: "Enables SSH" - }, - %{ - key: :priv_dir, - type: :string, - description: "Dir with SSH keys", - suggestions: ["/some/path/ssh_keys"] - }, - %{ - key: :handler, - type: :string, - description: "Handler module", - suggestions: ["Pleroma.BBS.Handler"] - }, - %{ - key: :port, - type: :integer, - description: "Port to connect", - suggestions: [10_022] - }, - %{ - key: :password_authenticator, - type: :string, - description: "Authenticator module", - suggestions: ["Pleroma.BBS.Authenticator"] - } - ] - }, %{ group: :mime, label: "Mime Types", diff --git a/docs/installation/migrating_to_akkoma.md b/docs/installation/migrating_to_akkoma.md new file mode 100644 index 000000000..a6b0fc0c2 --- /dev/null +++ b/docs/installation/migrating_to_akkoma.md @@ -0,0 +1,79 @@ +# 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 Pleroma - 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 Pleroma 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. From 22090b2fd13585b8453766039160be5a73ea1ef7 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Wed, 29 Jun 2022 12:12:48 +0100 Subject: [PATCH 2/4] re-add gopher to URLs, fix markdown --- config/config.exs | 43 +++++++++++------------- docs/installation/migrating_to_akkoma.md | 5 +-- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/config/config.exs b/config/config.exs index ea0b23360..6aa2d5cfa 100644 --- a/config/config.exs +++ b/config/config.exs @@ -97,6 +97,7 @@ config :pleroma, :uri_schemes, "http", "dat", "dweb", + "gopher", "hyper", "ipfs", "ipns", @@ -148,7 +149,7 @@ config :pleroma, Pleroma.Web.Endpoint, ] # Configures Elixir's Logger -config :logger, truncate: 65536 +config :logger, truncate: 65_536 config :logger, :console, level: :info, @@ -187,7 +188,7 @@ config :pleroma, :instance, name: "Pleroma", email: "example@example.com", notify_email: "noreply@example.com", - description: "Pleroma: An efficient and flexible fediverse server", + description: "Akkoma: The cooler fediverse server", background_image: "/images/city.jpg", instance_thumbnail: "/instance/thumbnail.jpeg", limit: 5_000, @@ -602,7 +603,8 @@ config :pleroma, :ldap, uid: System.get_env("LDAP_UID") || "cn" oauth_consumer_strategies = - System.get_env("OAUTH_CONSUMER_STRATEGIES") + "OAUTH_CONSUMER_STRATEGIES" + |> System.get_env() |> to_string() |> String.split() |> Enum.map(&hd(String.split(&1, ":"))) @@ -699,7 +701,7 @@ config :pleroma, Pleroma.Web.Plugs.RemoteIp, "192.168.0.0/16" ] -config :pleroma, :static_fe, enabled: false +config :pleroma, :static_fe, enabled: true # Example of frontend configuration # This example will make us serve the primary frontend from the @@ -712,17 +714,15 @@ config :pleroma, :static_fe, enabled: false # config :pleroma, :frontends, # primary: %{"name" => "pleroma-fe", "ref" => "develop"}, # admin: %{"name" => "admin-fe", "ref" => "stable"}, +# mastodon: %{"enabled" => true, "name" => "mastodon-fe", "ref" => "develop"} # available: %{...} config :pleroma, :frontends, + primary: %{ + "name" => "pleroma-fe", + "ref" => "develop" + }, available: %{ - "kenoma" => %{ - "name" => "kenoma", - "git" => "https://git.pleroma.social/lambadalambda/kenoma", - "build_url" => - "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build", - "ref" => "master" - }, "pleroma-fe" => %{ "name" => "pleroma-fe", "git" => "https://akkoma.dev/AkkomaGang/pleroma-fe", @@ -730,21 +730,18 @@ config :pleroma, :frontends, "ref" => "develop", "build_dir" => "dist" }, - "fedi-fe" => %{ - "name" => "fedi-fe", - "git" => "https://git.pleroma.social/pleroma/fedi-fe", - "build_url" => - "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build", - "ref" => "master", - "custom-http-headers" => [ - {"service-worker-allowed", "/"} - ] + # mastodon-Fe cannot be set as a primary - this is only here so we can update this seperately + "mastodon-fe" => %{ + "name" => "mastodon-fe", + "git" => "https://akkoma.dev/AkkomaGang/masto-fe", + "build_url" => "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/masto-fe.zip", + "build_dir" => "distribution", + "ref" => "develop" }, "admin-fe" => %{ "name" => "admin-fe", - "git" => "https://git.pleroma.social/pleroma/admin-fe", - "build_url" => - "https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build", + "git" => "https://akkoma.dev/AkkomaGang/admin-fe", + "build_url" => "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/admin-fe.zip", "ref" => "develop" }, "soapbox-fe" => %{ diff --git a/docs/installation/migrating_to_akkoma.md b/docs/installation/migrating_to_akkoma.md index a6b0fc0c2..0aef40f66 100644 --- a/docs/installation/migrating_to_akkoma.md +++ b/docs/installation/migrating_to_akkoma.md @@ -1,10 +1,11 @@ # Migrating to Akkoma -**Akkoma does not currently have a stable release, until 3.0, all builds should be considered "develop** +**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 +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) From e22f3ce89cfae3275a3bf7119eb508b020334e16 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Wed, 29 Jun 2022 12:16:00 +0100 Subject: [PATCH 3/4] don't enable static-fe --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.exs b/config/config.exs index 6aa2d5cfa..15bcfb2b9 100644 --- a/config/config.exs +++ b/config/config.exs @@ -701,7 +701,7 @@ config :pleroma, Pleroma.Web.Plugs.RemoteIp, "192.168.0.0/16" ] -config :pleroma, :static_fe, enabled: true +config :pleroma, :static_fe, enabled: false # Example of frontend configuration # This example will make us serve the primary frontend from the From 4d2149a124001ab150489897810c21678d22aae2 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 1 Jul 2022 13:15:21 +0100 Subject: [PATCH 4/4] don't set primary just yet --- config/config.exs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/config/config.exs b/config/config.exs index 15bcfb2b9..cecbea9b3 100644 --- a/config/config.exs +++ b/config/config.exs @@ -718,10 +718,6 @@ config :pleroma, :static_fe, enabled: false # available: %{...} config :pleroma, :frontends, - primary: %{ - "name" => "pleroma-fe", - "ref" => "develop" - }, available: %{ "pleroma-fe" => %{ "name" => "pleroma-fe",