forked from AkkomaGang/akkoma
Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
FloatingGhost | caedb6ebda |
|
@ -6,12 +6,6 @@ COPYING
|
|||
*file
|
||||
elixir_buildpack.config
|
||||
test/
|
||||
instance/
|
||||
_build
|
||||
deps
|
||||
test
|
||||
benchmarks
|
||||
docs/site
|
||||
|
||||
# Required to get version
|
||||
!.git
|
||||
|
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,5 +1,4 @@
|
|||
# App artifacts
|
||||
docs/site
|
||||
*.sw*
|
||||
secret
|
||||
/_build
|
||||
|
@ -62,6 +61,3 @@ pleroma.iml
|
|||
# Editor temp files
|
||||
/*~
|
||||
/*#
|
||||
|
||||
# Generated documentation
|
||||
docs/site
|
||||
|
|
464
.gitlab-ci.yml
Normal file
464
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,464 @@
|
|||
image: git.pleroma.social:5050/pleroma/pleroma/ci-base
|
||||
|
||||
variables: &global_variables
|
||||
POSTGRES_DB: pleroma_test
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
DB_HOST: postgres
|
||||
MIX_ENV: test
|
||||
|
||||
cache: &global_cache_policy
|
||||
key:
|
||||
files:
|
||||
- mix.lock
|
||||
paths:
|
||||
- deps
|
||||
- _build
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- benchmark
|
||||
- deploy
|
||||
- release
|
||||
- docker
|
||||
|
||||
before_script:
|
||||
- echo $MIX_ENV
|
||||
- rm -rf _build/*/lib/pleroma
|
||||
- mix deps.get
|
||||
|
||||
after_script:
|
||||
- rm -rf _build/*/lib/pleroma
|
||||
|
||||
build:
|
||||
stage: build
|
||||
only:
|
||||
changes:
|
||||
- "**/*.ex"
|
||||
- "**/*.exs"
|
||||
- "mix.lock"
|
||||
script:
|
||||
- mix compile --force
|
||||
|
||||
spec-build:
|
||||
stage: test
|
||||
only:
|
||||
changes:
|
||||
- "lib/pleroma/web/api_spec/**/*.ex"
|
||||
- "lib/pleroma/web/api_spec.ex"
|
||||
artifacts:
|
||||
paths:
|
||||
- spec.json
|
||||
script:
|
||||
- mix pleroma.openapi_spec spec.json
|
||||
|
||||
benchmark:
|
||||
stage: benchmark
|
||||
when: manual
|
||||
variables:
|
||||
MIX_ENV: benchmark
|
||||
services:
|
||||
- name: postgres:9.6
|
||||
alias: postgres
|
||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||
script:
|
||||
- mix ecto.create
|
||||
- mix ecto.migrate
|
||||
- mix pleroma.load_testing
|
||||
|
||||
unit-testing:
|
||||
stage: test
|
||||
only:
|
||||
changes:
|
||||
- "**/*.ex"
|
||||
- "**/*.exs"
|
||||
- "mix.lock"
|
||||
cache: &testing_cache_policy
|
||||
<<: *global_cache_policy
|
||||
policy: pull
|
||||
|
||||
services:
|
||||
- name: postgres:13
|
||||
alias: postgres
|
||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||
script:
|
||||
- mix ecto.create
|
||||
- mix ecto.migrate
|
||||
- mix coveralls --preload-modules
|
||||
|
||||
unit-testing-erratic:
|
||||
stage: test
|
||||
retry: 2
|
||||
only:
|
||||
changes:
|
||||
- "**/*.ex"
|
||||
- "**/*.exs"
|
||||
- "mix.lock"
|
||||
cache: &testing_cache_policy
|
||||
<<: *global_cache_policy
|
||||
policy: pull
|
||||
|
||||
services:
|
||||
- name: postgres:13
|
||||
alias: postgres
|
||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||
script:
|
||||
- mix ecto.create
|
||||
- mix ecto.migrate
|
||||
- mix test --only=erratic
|
||||
|
||||
# Removed to fix CI issue. In this early state it wasn't adding much value anyway.
|
||||
# TODO Fix and reinstate federated testing
|
||||
# federated-testing:
|
||||
# stage: test
|
||||
# cache: *testing_cache_policy
|
||||
# services:
|
||||
# - name: minibikini/postgres-with-rum:12
|
||||
# alias: postgres
|
||||
# command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||
# script:
|
||||
# - mix deps.get
|
||||
# - mix ecto.create
|
||||
# - mix ecto.migrate
|
||||
# - epmd -daemon
|
||||
# - mix test --trace --only federated
|
||||
|
||||
unit-testing-rum:
|
||||
stage: test
|
||||
only:
|
||||
changes:
|
||||
- "**/*.ex"
|
||||
- "**/*.exs"
|
||||
- "mix.lock"
|
||||
cache: *testing_cache_policy
|
||||
services:
|
||||
- name: minibikini/postgres-with-rum:12
|
||||
alias: postgres
|
||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||
variables:
|
||||
<<: *global_variables
|
||||
RUM_ENABLED: "true"
|
||||
script:
|
||||
- mix ecto.create
|
||||
- mix ecto.migrate
|
||||
- "mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/"
|
||||
- mix test --preload-modules
|
||||
|
||||
lint:
|
||||
image: elixir:1.12
|
||||
stage: test
|
||||
only:
|
||||
changes:
|
||||
- "**/*.ex"
|
||||
- "**/*.exs"
|
||||
- "mix.lock"
|
||||
cache: *testing_cache_policy
|
||||
before_script:
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
- mix deps.get
|
||||
script:
|
||||
- mix format --check-formatted
|
||||
|
||||
analysis:
|
||||
stage: test
|
||||
only:
|
||||
changes:
|
||||
- "**/*.ex"
|
||||
- "**/*.exs"
|
||||
- "mix.lock"
|
||||
cache: *testing_cache_policy
|
||||
script:
|
||||
- mix credo --strict --only=warnings,todo,fixme,consistency,readability
|
||||
|
||||
cycles:
|
||||
stage: test
|
||||
image: elixir:1.11
|
||||
only:
|
||||
changes:
|
||||
- "**/*.ex"
|
||||
- "**/*.exs"
|
||||
- "mix.lock"
|
||||
cache: {}
|
||||
before_script:
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
- mix deps.get
|
||||
- apt-get update
|
||||
- apt-get install cmake libmagic-dev -y
|
||||
script:
|
||||
- mix compile
|
||||
- mix xref graph --format cycles --label compile | awk '{print $0} END{exit ($0 != "No cycles found")}'
|
||||
|
||||
docs-deploy:
|
||||
stage: deploy
|
||||
cache: *testing_cache_policy
|
||||
image: alpine:latest
|
||||
only:
|
||||
- stable@pleroma/pleroma
|
||||
- develop@pleroma/pleroma
|
||||
before_script:
|
||||
- apk add curl
|
||||
script:
|
||||
- curl -X POST -F"token=$DOCS_PIPELINE_TRIGGER" -F'ref=master' -F"variables[BRANCH]=$CI_COMMIT_REF_NAME" https://git.pleroma.social/api/v4/projects/673/trigger/pipeline
|
||||
review_app:
|
||||
image: alpine:3.9
|
||||
stage: deploy
|
||||
before_script:
|
||||
- apk update && apk add openssh-client git
|
||||
when: manual
|
||||
environment:
|
||||
name: review/$CI_COMMIT_REF_NAME
|
||||
url: https://$CI_ENVIRONMENT_SLUG.pleroma.online/
|
||||
on_stop: stop_review_app
|
||||
only:
|
||||
- branches
|
||||
except:
|
||||
- master
|
||||
- develop
|
||||
script:
|
||||
- echo "$CI_ENVIRONMENT_SLUG"
|
||||
- mkdir -p ~/.ssh
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||
- ssh-keyscan -H "pleroma.online" >> ~/.ssh/known_hosts
|
||||
- (ssh -t dokku@pleroma.online -- apps:create "$CI_ENVIRONMENT_SLUG") || true
|
||||
- (ssh -t dokku@pleroma.online -- git:set "$CI_ENVIRONMENT_SLUG" keep-git-dir true) || true
|
||||
- ssh -t dokku@pleroma.online -- config:set "$CI_ENVIRONMENT_SLUG" APP_NAME="$CI_ENVIRONMENT_SLUG" APP_HOST="$CI_ENVIRONMENT_SLUG.pleroma.online" MIX_ENV=dokku
|
||||
- (ssh -t dokku@pleroma.online -- postgres:create $(echo $CI_ENVIRONMENT_SLUG | sed -e 's/-/_/g')_db) || true
|
||||
- (ssh -t dokku@pleroma.online -- postgres:link $(echo $CI_ENVIRONMENT_SLUG | sed -e 's/-/_/g')_db "$CI_ENVIRONMENT_SLUG") || true
|
||||
- (ssh -t dokku@pleroma.online -- certs:add "$CI_ENVIRONMENT_SLUG" /home/dokku/server.crt /home/dokku/server.key) || true
|
||||
- git push -f dokku@pleroma.online:$CI_ENVIRONMENT_SLUG $CI_COMMIT_SHA:refs/heads/master
|
||||
|
||||
spec-deploy:
|
||||
stage: deploy
|
||||
artifacts:
|
||||
paths:
|
||||
- spec.json
|
||||
only:
|
||||
- develop@pleroma/pleroma
|
||||
image: alpine:latest
|
||||
before_script:
|
||||
- apk add curl
|
||||
script:
|
||||
- curl -X POST -F"token=$API_DOCS_PIPELINE_TRIGGER" -F'ref=master' -F"variables[BRANCH]=$CI_COMMIT_REF_NAME" -F"variables[JOB_REF]=$CI_JOB_ID" https://git.pleroma.social/api/v4/projects/1130/trigger/pipeline
|
||||
|
||||
|
||||
stop_review_app:
|
||||
image: alpine:3.9
|
||||
stage: deploy
|
||||
before_script:
|
||||
- apk update && apk add openssh-client git
|
||||
when: manual
|
||||
environment:
|
||||
name: review/$CI_COMMIT_REF_NAME
|
||||
action: stop
|
||||
script:
|
||||
- echo "$CI_ENVIRONMENT_SLUG"
|
||||
- mkdir -p ~/.ssh
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||
- ssh-keyscan -H "pleroma.online" >> ~/.ssh/known_hosts
|
||||
- ssh -t dokku@pleroma.online -- --force apps:destroy "$CI_ENVIRONMENT_SLUG"
|
||||
- ssh -t dokku@pleroma.online -- --force postgres:destroy $(echo $CI_ENVIRONMENT_SLUG | sed -e 's/-/_/g')_db
|
||||
|
||||
amd64:
|
||||
stage: release
|
||||
image: elixir:1.10.4
|
||||
only: &release-only
|
||||
- stable@pleroma/pleroma
|
||||
- develop@pleroma/pleroma
|
||||
- /^maint/.*$/@pleroma/pleroma
|
||||
- /^release/.*$/@pleroma/pleroma
|
||||
artifacts: &release-artifacts
|
||||
name: "pleroma-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
|
||||
paths:
|
||||
- release/*
|
||||
# Ideally it would be never for master branch and with the next commit for develop,
|
||||
# but Gitlab does not support neither `only` for artifacts
|
||||
# nor setting it to never from .gitlab-ci.yml
|
||||
# nor expiring with the next commit
|
||||
expire_in: 42 yrs
|
||||
|
||||
cache: &release-cache
|
||||
key: $CI_COMMIT_REF_NAME-$CI_JOB_NAME
|
||||
paths:
|
||||
- deps
|
||||
variables: &release-variables
|
||||
MIX_ENV: prod
|
||||
before_script: &before-release
|
||||
- apt-get update && apt-get install -y cmake libmagic-dev
|
||||
- echo "import Mix.Config" > config/prod.secret.exs
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
script: &release
|
||||
- mix deps.get --only prod
|
||||
- mkdir release
|
||||
- export PLEROMA_BUILD_BRANCH=$CI_COMMIT_REF_NAME
|
||||
- mix release --path release
|
||||
|
||||
|
||||
amd64-musl:
|
||||
stage: release
|
||||
artifacts: *release-artifacts
|
||||
only: *release-only
|
||||
image: elixir:1.10.4-alpine
|
||||
cache: *release-cache
|
||||
variables: *release-variables
|
||||
before_script: &before-release-musl
|
||||
- apk add git gcc g++ musl-dev make cmake file-dev
|
||||
- echo "import Mix.Config" > config/prod.secret.exs
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
script: *release
|
||||
|
||||
arm:
|
||||
stage: release
|
||||
artifacts: *release-artifacts
|
||||
only: *release-only
|
||||
tags:
|
||||
- arm32-specified
|
||||
image: arm32v7/elixir:1.10.4
|
||||
cache: *release-cache
|
||||
variables: *release-variables
|
||||
before_script: *before-release
|
||||
script: *release
|
||||
|
||||
arm-musl:
|
||||
stage: release
|
||||
artifacts: *release-artifacts
|
||||
only: *release-only
|
||||
tags:
|
||||
- arm32-specified
|
||||
image: arm32v7/elixir:1.10.4-alpine
|
||||
cache: *release-cache
|
||||
variables: *release-variables
|
||||
before_script: *before-release-musl
|
||||
script: *release
|
||||
|
||||
arm64:
|
||||
stage: release
|
||||
artifacts: *release-artifacts
|
||||
only: *release-only
|
||||
tags:
|
||||
- arm
|
||||
image: arm64v8/elixir:1.10.4
|
||||
cache: *release-cache
|
||||
variables: *release-variables
|
||||
before_script: *before-release
|
||||
script: *release
|
||||
|
||||
arm64-musl:
|
||||
stage: release
|
||||
artifacts: *release-artifacts
|
||||
only: *release-only
|
||||
tags:
|
||||
- arm
|
||||
image: arm64v8/elixir:1.10.4-alpine
|
||||
cache: *release-cache
|
||||
variables: *release-variables
|
||||
before_script: *before-release-musl
|
||||
script: *release
|
||||
|
||||
docker:
|
||||
stage: docker
|
||||
image: docker:latest
|
||||
cache: {}
|
||||
dependencies: []
|
||||
variables: &docker-variables
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_HOST: unix:///var/run/docker.sock
|
||||
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
|
||||
IMAGE_TAG_SLUG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||
IMAGE_TAG_LATEST: $CI_REGISTRY_IMAGE:latest
|
||||
IMAGE_TAG_LATEST_STABLE: $CI_REGISTRY_IMAGE:latest-stable
|
||||
DOCKER_BUILDX_URL: https://github.com/docker/buildx/releases/download/v0.6.3/buildx-v0.6.3.linux-amd64
|
||||
DOCKER_BUILDX_HASH: 980e6b9655f971991fbbb5fd6cd19f1672386195
|
||||
before_script: &before-docker
|
||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||
- docker pull $IMAGE_TAG_SLUG || true
|
||||
- export CI_JOB_TIMESTAMP=$(date --utc -Iseconds)
|
||||
- export CI_VCS_REF=$CI_COMMIT_SHORT_SHA
|
||||
allow_failure: true
|
||||
script:
|
||||
- mkdir -p /root/.docker/cli-plugins
|
||||
- wget "${DOCKER_BUILDX_URL}" -O ~/.docker/cli-plugins/docker-buildx
|
||||
- echo "${DOCKER_BUILDX_HASH} /root/.docker/cli-plugins/docker-buildx" | sha1sum -c
|
||||
- chmod +x ~/.docker/cli-plugins/docker-buildx
|
||||
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
- docker buildx create --name mbuilder --driver docker-container --use
|
||||
- docker buildx inspect --bootstrap
|
||||
- docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --push --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST .
|
||||
tags:
|
||||
- dind
|
||||
only:
|
||||
- develop@pleroma/pleroma
|
||||
|
||||
docker-stable:
|
||||
stage: docker
|
||||
image: docker:latest
|
||||
cache: {}
|
||||
dependencies: []
|
||||
variables: *docker-variables
|
||||
before_script: *before-docker
|
||||
allow_failure: true
|
||||
script:
|
||||
- mkdir -p /root/.docker/cli-plugins
|
||||
- wget "${DOCKER_BUILDX_URL}" -O ~/.docker/cli-plugins/docker-buildx
|
||||
- echo "${DOCKER_BUILDX_HASH} /root/.docker/cli-plugins/docker-buildx" | sha1sum -c
|
||||
- chmod +x ~/.docker/cli-plugins/docker-buildx
|
||||
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
- docker buildx create --name mbuilder --driver docker-container --use
|
||||
- docker buildx inspect --bootstrap
|
||||
- docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --push --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST_STABLE .
|
||||
tags:
|
||||
- dind
|
||||
only:
|
||||
- stable@pleroma/pleroma
|
||||
|
||||
docker-release:
|
||||
stage: docker
|
||||
image: docker:latest
|
||||
cache: {}
|
||||
dependencies: []
|
||||
variables: *docker-variables
|
||||
before_script: *before-docker
|
||||
allow_failure: true
|
||||
script:
|
||||
script:
|
||||
- mkdir -p /root/.docker/cli-plugins
|
||||
- wget "${DOCKER_BUILDX_URL}" -O ~/.docker/cli-plugins/docker-buildx
|
||||
- echo "${DOCKER_BUILDX_HASH} /root/.docker/cli-plugins/docker-buildx" | sha1sum -c
|
||||
- chmod +x ~/.docker/cli-plugins/docker-buildx
|
||||
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
- docker buildx create --name mbuilder --driver docker-container --use
|
||||
- docker buildx inspect --bootstrap
|
||||
- docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --push --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG .
|
||||
tags:
|
||||
- dind
|
||||
only:
|
||||
- /^release/.*$/@pleroma/pleroma
|
||||
|
||||
docker-adhoc:
|
||||
stage: docker
|
||||
image: docker:latest
|
||||
cache: {}
|
||||
dependencies: []
|
||||
variables: *docker-variables
|
||||
before_script: *before-docker
|
||||
allow_failure: true
|
||||
script:
|
||||
script:
|
||||
- mkdir -p /root/.docker/cli-plugins
|
||||
- wget "${DOCKER_BUILDX_URL}" -O ~/.docker/cli-plugins/docker-buildx
|
||||
- echo "${DOCKER_BUILDX_HASH} /root/.docker/cli-plugins/docker-buildx" | sha1sum -c
|
||||
- chmod +x ~/.docker/cli-plugins/docker-buildx
|
||||
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
- docker buildx create --name mbuilder --driver docker-container --use
|
||||
- docker buildx inspect --bootstrap
|
||||
- docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --push --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG .
|
||||
tags:
|
||||
- dind
|
||||
only:
|
||||
- /^build-docker/.*$/@pleroma/pleroma
|
187
.woodpecker.yml
187
.woodpecker.yml
|
@ -1,187 +0,0 @@
|
|||
variables:
|
||||
- &scw-secrets
|
||||
- SCW_ACCESS_KEY
|
||||
- SCW_SECRET_KEY
|
||||
- SCW_DEFAULT_ORGANIZATION_ID
|
||||
- &setup-hex "mix local.hex --force && mix local.rebar --force"
|
||||
- &on-release
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
branch:
|
||||
- develop
|
||||
- stable
|
||||
- refs/tags/v*
|
||||
- refs/tags/stable-*
|
||||
- &on-point-release
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
branch:
|
||||
- develop
|
||||
- stable
|
||||
- &on-pr-open
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
|
||||
- &tag-build "export BUILD_TAG=$${CI_COMMIT_TAG:-\"$CI_COMMIT_BRANCH\"} && export PLEROMA_BUILD_BRANCH=$BUILD_TAG"
|
||||
|
||||
- &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)"
|
||||
- &mix-clean "mix deps.clean --all && mix clean"
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:13
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
environment:
|
||||
POSTGRES_DB: pleroma_test
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
|
||||
pipeline:
|
||||
lint:
|
||||
<<: *on-pr-open
|
||||
image: akkoma/ci-base:latest
|
||||
commands:
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
- mix format --check-formatted
|
||||
|
||||
build:
|
||||
image: akkoma/ci-base:latest
|
||||
<<: *on-pr-open
|
||||
environment:
|
||||
MIX_ENV: test
|
||||
POSTGRES_DB: pleroma_test
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
DB_HOST: postgres
|
||||
commands:
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
- mix deps.get
|
||||
- mix compile
|
||||
|
||||
test:
|
||||
image: akkoma/ci-base:latest
|
||||
<<: *on-pr-open
|
||||
environment:
|
||||
MIX_ENV: test
|
||||
POSTGRES_DB: pleroma_test
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
DB_HOST: postgres
|
||||
commands:
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
- mix deps.get
|
||||
- mix compile
|
||||
- mix ecto.drop -f -q
|
||||
- mix ecto.create
|
||||
- mix ecto.migrate
|
||||
- mix test --preload-modules --exclude erratic --exclude federated --max-cases 4
|
||||
|
||||
# Canonical amd64
|
||||
ubuntu22:
|
||||
image: hexpm/elixir:1.13.4-erlang-25.0.2-ubuntu-jammy-20220428
|
||||
<<: *on-release
|
||||
environment:
|
||||
MIX_ENV: prod
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
commands:
|
||||
- apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev git build-essential g++ wget
|
||||
- *clean
|
||||
- echo "import Config" > config/prod.secret.exs
|
||||
- *setup-hex
|
||||
- *tag-build
|
||||
- mix deps.get --only prod
|
||||
- mix release --path release
|
||||
- zip akkoma-ubuntu-jammy.zip -r release
|
||||
|
||||
release-ubuntu22:
|
||||
image: akkoma/releaser
|
||||
<<: *on-release
|
||||
secrets: *scw-secrets
|
||||
commands:
|
||||
- export SOURCE=akkoma-ubuntu-jammy.zip
|
||||
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-ubuntu-jammy.zip
|
||||
- /bin/sh /entrypoint.sh
|
||||
|
||||
debian-bullseye:
|
||||
image: elixir:1.13.4
|
||||
<<: *on-release
|
||||
environment:
|
||||
MIX_ENV: prod
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
commands:
|
||||
- apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev git build-essential gcc make g++ wget
|
||||
- *clean
|
||||
- echo "import Config" > config/prod.secret.exs
|
||||
- *setup-hex
|
||||
- *tag-build
|
||||
- *mix-clean
|
||||
- mix deps.get --only prod
|
||||
- mix release --path release
|
||||
- zip akkoma-amd64.zip -r release
|
||||
|
||||
release-debian:
|
||||
image: akkoma/releaser
|
||||
<<: *on-release
|
||||
secrets: *scw-secrets
|
||||
commands:
|
||||
- export SOURCE=akkoma-amd64.zip
|
||||
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64.zip
|
||||
- /bin/sh /entrypoint.sh
|
||||
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-debian-stable.zip
|
||||
- /bin/sh /entrypoint.sh
|
||||
|
||||
# Canonical amd64-musl
|
||||
musl:
|
||||
image: elixir:1.13.4-alpine
|
||||
<<: *on-release
|
||||
environment:
|
||||
MIX_ENV: prod
|
||||
commands:
|
||||
- apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip imagemagick
|
||||
- *clean
|
||||
- *setup-hex
|
||||
- *mix-clean
|
||||
- *tag-build
|
||||
- mix deps.get --only prod
|
||||
- mix release --path release
|
||||
- zip akkoma-amd64-musl.zip -r release
|
||||
|
||||
release-musl:
|
||||
image: akkoma/releaser
|
||||
<<: *on-release
|
||||
secrets: *scw-secrets
|
||||
commands:
|
||||
- export SOURCE=akkoma-amd64-musl.zip
|
||||
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64-musl.zip
|
||||
- /bin/sh /entrypoint.sh
|
||||
|
||||
docs:
|
||||
<<: *on-point-release
|
||||
secrets:
|
||||
- SCW_ACCESS_KEY
|
||||
- SCW_SECRET_KEY
|
||||
- SCW_DEFAULT_ORGANIZATION_ID
|
||||
environment:
|
||||
CI: "true"
|
||||
image: python:3.10-slim
|
||||
commands:
|
||||
- apt-get update && apt-get install -y rclone wget git zip
|
||||
- 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
|
||||
- chmod +x scaleway-cli
|
||||
- ./scaleway-cli object config install type=rclone
|
||||
- cd docs
|
||||
- pip install -r requirements.txt
|
||||
- mkdocs build
|
||||
- zip -r docs.zip site/*
|
||||
- cd site
|
||||
- rclone copy . scaleway:akkoma-docs/$CI_COMMIT_BRANCH/
|
74
.woodpecker/.release.yml
Normal file
74
.woodpecker/.release.yml
Normal file
|
@ -0,0 +1,74 @@
|
|||
matrix:
|
||||
docker_prefix:
|
||||
- ""
|
||||
- arm64v8/
|
||||
- arm32v7/
|
||||
tag:
|
||||
- amd64
|
||||
- arm64
|
||||
- arm
|
||||
|
||||
include:
|
||||
- tag: arm64
|
||||
docker_prefix: "arm64v8/"
|
||||
|
||||
pipeline:
|
||||
glibc:
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
secrets:
|
||||
- SCW_ACCESS_KEY
|
||||
- SCW_SECRET_KEY
|
||||
- SCW_DEFAULT_ORGANIZATION_ID
|
||||
image: ${docker_prefix}elixir:1.13
|
||||
environment:
|
||||
MIX_ENV: prod
|
||||
commands:
|
||||
- apt-get update && apt-get install -y cmake libmagic-dev rclone zip
|
||||
- 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
|
||||
- chmod +x scaleway-cli
|
||||
- ./scaleway-cli object config install type=rclone
|
||||
- echo "import Mix.Config" > config/prod.secret.exs
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
- mix deps.clean --all
|
||||
- mix deps.get --only prod
|
||||
- mkdir release
|
||||
- export PLEROMA_BUILD_BRANCH=develop
|
||||
- mix release --path release
|
||||
- zip akkoma-${tag}.zip -r release
|
||||
- rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/develop/akkoma-${tag}.zip
|
||||
|
||||
musl:
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
secrets:
|
||||
- SCW_ACCESS_KEY
|
||||
- SCW_SECRET_KEY
|
||||
- SCW_DEFAULT_ORGANIZATION_ID
|
||||
group: release
|
||||
image: ${docker_prefix}elixir:1.13-alpine
|
||||
environment:
|
||||
MIX_ENV: prod
|
||||
commands:
|
||||
- apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip
|
||||
- rm -rf release || true
|
||||
- rm -rf _build || true
|
||||
- rm -rf /root/.mix
|
||||
- rm scaleway-cli || true
|
||||
- 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
|
||||
- chmod +x scaleway-cli
|
||||
- ./scaleway-cli object config install type=rclone
|
||||
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
- mix deps.clean --all
|
||||
- mix deps.get --only prod
|
||||
- mix release --path release
|
||||
- export PLEROMA_BUILD_BRANCH=develop
|
||||
- zip akkoma-${tag}.zip -r release
|
||||
- rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/develop/akkoma-${tag}-musl.zip
|
64
CHANGELOG.md
64
CHANGELOG.md
|
@ -6,70 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- support for fedibird-fe, and non-breaking API parity for it to function
|
||||
|
||||
### Changed
|
||||
- MFM parsing is now done on the backend by a modified version of ilja's parser -> https://akkoma.dev/AkkomaGang/mfm-parser
|
||||
|
||||
### Fixed
|
||||
- Compatibility with latest meilisearch
|
||||
- Resolution of nested mix tasks (i.e search.meilisearch) in OTP releases
|
||||
- Elasticsearch returning likes and repeats, displaying as posts
|
||||
|
||||
### Removed
|
||||
- Non-finch HTTP adapters. `:tesla, :adapter` is now highly recommended to be set to the default.
|
||||
|
||||
## 2022.08
|
||||
|
||||
### Added
|
||||
- extended runtime module support, see config cheatsheet
|
||||
- quote posting; quotes are limited to public posts
|
||||
|
||||
### Changed
|
||||
- quarantining is now considered absolutely; public activities are no longer
|
||||
an exception.
|
||||
- also merged quarantine and mrf reject - quarantine is now deprecated
|
||||
- flavours:
|
||||
- amd64 is built for debian stable. Compatible with ubuntu 20.
|
||||
- ubuntu-jammy is built for... well, ubuntu 22 (LTS)
|
||||
- amd64-musl is built for alpine 3.16
|
||||
|
||||
### Fixed
|
||||
- Updated mastoFE path, for the newer version
|
||||
|
||||
### Removed
|
||||
- Scrobbling support
|
||||
- `/api/v1/pleroma/scrobble`
|
||||
- `/api/v1/pleroma/accounts/{id}/scrobbles`
|
||||
- Deprecated endpoints
|
||||
- `/api/v1/pleroma/chats`
|
||||
- `/api/v1/notifications/dismiss`
|
||||
- `/api/v1/search`
|
||||
- `/api/v1/statuses/{id}/card`
|
||||
- Chats, they were half-baked. Just use PMs.
|
||||
- Prometheus, it causes massive slowdown
|
||||
|
||||
## 2022.07
|
||||
|
||||
### Added
|
||||
- Added move account API
|
||||
- Added ability to set instance accent-color via theme-color
|
||||
- A fallback page for when a user does not have a frontend installed
|
||||
- Support for OTP musl11
|
||||
|
||||
### Removed
|
||||
- SSH frontend, to be potentially re-enabled via a bridge rather than wired into the main system
|
||||
- Gopher frontend, as above
|
||||
- All pre-compiled javascript
|
||||
|
||||
### Fixed
|
||||
- ES8 support for bulk indexing activities
|
||||
|
||||
### Upgrade Notes
|
||||
- The bundled frontend has been removed, you will need to run the `pleroma.frontend install` mix task to install your frontend of choice. Configuration by default is set to `pleroma-fe`.
|
||||
- Admin-FE users will have to ensure that :admin is set _BEFORE_ restart, or
|
||||
you might end up in a situation where you don't have an ability to get it.
|
||||
|
||||
## 2.5.2
|
||||
|
||||
|
@ -115,7 +54,6 @@ you might end up in a situation where you don't have an ability to get it.
|
|||
- Readded mastoFE
|
||||
- Added support for custom emoji reactions
|
||||
- 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
|
||||
- Subscription(Bell) Notifications: Don't create from Pipeline Ingested replies
|
||||
|
@ -178,7 +116,6 @@ you might end up in a situation where you don't have an ability to get it.
|
|||
- 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.
|
||||
- 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
|
||||
|
||||
|
@ -190,7 +127,6 @@ you might end up in a situation where you don't have an ability to get it.
|
|||
- Attachment dimensions and blurhashes are federated when available.
|
||||
- Mastodon API: support `poll` notification.
|
||||
- Pinned posts federation
|
||||
- Possibility to discover users like `user@example.org`, while Akkoma is working on `akkoma.example.org`. Additional configuration required.
|
||||
|
||||
### Fixed
|
||||
- Don't crash so hard when email settings are invalid.
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
# Akkoma Code of Conduct
|
||||
|
||||
The Akkoma project aims to be **enjoyable** for anyone to participate in, regardless of their identity or level of expertise. To achieve this, the community must create an environment which is **safe** and **equitable**; the following guidelines have been created with these goals in mind.
|
||||
|
||||
1. **Treat individuals with respect.** Differing experiences and viewpoints deserve to be respected, and bigotry and harassment are not tolerated under any circumstances.
|
||||
- Individuals should at all times be treated as equals, regardless of their age, gender, sexuality, race, ethnicity, _or any other characteristic_, intrinsic or otherwise.
|
||||
- Behaviour that is harmful in nature should be addressed and corrected *regardless of intent*.
|
||||
- Respect personal boundaries and ask for clarification whenever they are unclear.
|
||||
- (Obviously, hate does not count as merely a "differing viewpoint", because it is harmful in nature.)
|
||||
|
||||
2. **Be understanding of differences in communication.** Not everyone is aware of unspoken social cues, and speech that is not intended to be offensive should not be treated as such simply due to an atypical manner of communication.
|
||||
- Somebody who speaks bluntly is not necessarily rude, and somebody who swears a lot is not necessarily volatile.
|
||||
- Try to confirm your interpretation of their intent rather than assuming bad faith.
|
||||
- Someone may not communicate as, or come across as a picture of "professionalism", but this should not be seen as a reason to dismiss them. This is a **casual** space, and communication styles can reflect that.
|
||||
|
||||
3. **"Uncomfortable" does not mean "unsafe".** In an ideal world, the community would be safe, equitable, enjoyable, *and* comfortable for all members at all times. Unfortunately, this is not always possible in reality.
|
||||
- Safety and equity will be prioritized over comfort whenever it is necessary to do so.
|
||||
- Weaponizing one's own discomfort to deflect accountability or censor an individual (e.g. "white fragility") is a form of discriminatory conduct.
|
||||
|
||||
4. **Let people grow from their mistakes.** Nobody is perfect; even the most well-meaning individual can do something hurtful. Everyone should be given a fair opportunity to explain themselves and correct their behaviour. Portraying someone as inherently malicious prevents improvement and shifts focus away from the *action* that was problematic.
|
||||
- Avoid bringing up past events that do not accurately reflect an individual's current actions or beliefs. (This is, of course, different from providing evidence of a recurring pattern of behaviour.)
|
||||
|
||||
---
|
||||
This document was adapted from one created by ~keith as part of punks default repository template, and is licensed under CC-BY-SA 4.0. The original template is here: <https://bytes.keithhacks.cyou/keith/default-template>
|
38
Dockerfile
38
Dockerfile
|
@ -1,50 +1,52 @@
|
|||
FROM elixir:1.13.4-alpine as build
|
||||
FROM elixir:1.9-alpine as build
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV MIX_ENV=prod
|
||||
|
||||
RUN apk add git gcc g++ musl-dev make cmake file-dev &&\
|
||||
echo "import Config" > config/prod.secret.exs &&\
|
||||
echo "import Mix.Config" > config/prod.secret.exs &&\
|
||||
mix local.hex --force &&\
|
||||
mix local.rebar --force &&\
|
||||
mix deps.get --only prod &&\
|
||||
mkdir release &&\
|
||||
mix release --path release
|
||||
|
||||
FROM alpine:3.16
|
||||
FROM alpine:3.14
|
||||
|
||||
ARG BUILD_DATE
|
||||
ARG VCS_REF
|
||||
|
||||
LABEL org.opencontainers.image.title="akkoma" \
|
||||
org.opencontainers.image.description="Akkoma for Docker" \
|
||||
org.opencontainers.image.vendor="akkoma.dev" \
|
||||
org.opencontainers.image.documentation="https://docs.akkoma.dev/stable/" \
|
||||
LABEL maintainer="ops@pleroma.social" \
|
||||
org.opencontainers.image.title="pleroma" \
|
||||
org.opencontainers.image.description="Pleroma for Docker" \
|
||||
org.opencontainers.image.authors="ops@pleroma.social" \
|
||||
org.opencontainers.image.vendor="pleroma.social" \
|
||||
org.opencontainers.image.documentation="https://git.pleroma.social/pleroma/pleroma" \
|
||||
org.opencontainers.image.licenses="AGPL-3.0" \
|
||||
org.opencontainers.image.url="https://akkoma.dev" \
|
||||
org.opencontainers.image.url="https://pleroma.social" \
|
||||
org.opencontainers.image.revision=$VCS_REF \
|
||||
org.opencontainers.image.created=$BUILD_DATE
|
||||
|
||||
ARG HOME=/opt/akkoma
|
||||
ARG DATA=/var/lib/akkoma
|
||||
ARG HOME=/opt/pleroma
|
||||
ARG DATA=/var/lib/pleroma
|
||||
|
||||
RUN apk update &&\
|
||||
apk add exiftool ffmpeg imagemagick libmagic ncurses postgresql-client &&\
|
||||
adduser --system --shell /bin/false --home ${HOME} akkoma &&\
|
||||
adduser --system --shell /bin/false --home ${HOME} pleroma &&\
|
||||
mkdir -p ${DATA}/uploads &&\
|
||||
mkdir -p ${DATA}/static &&\
|
||||
chown -R akkoma ${DATA} &&\
|
||||
mkdir -p /etc/akkoma &&\
|
||||
chown -R akkoma /etc/akkoma
|
||||
chown -R pleroma ${DATA} &&\
|
||||
mkdir -p /etc/pleroma &&\
|
||||
chown -R pleroma /etc/pleroma
|
||||
|
||||
USER akkoma
|
||||
USER pleroma
|
||||
|
||||
COPY --from=build --chown=akkoma:0 /release ${HOME}
|
||||
COPY --from=build --chown=pleroma:0 /release ${HOME}
|
||||
|
||||
COPY ./config/docker.exs /etc/akkoma/config.exs
|
||||
COPY ./config/docker.exs /etc/pleroma/config.exs
|
||||
COPY ./docker-entrypoint.sh ${HOME}
|
||||
|
||||
EXPOSE 4000
|
||||
|
||||
ENTRYPOINT ["/opt/akkoma/docker-entrypoint.sh"]
|
||||
ENTRYPOINT ["/opt/pleroma/docker-entrypoint.sh"]
|
||||
|
|
7
Makefile
7
Makefile
|
@ -1,7 +0,0 @@
|
|||
all: install
|
||||
pipenv run mkdocs build
|
||||
|
||||
install:
|
||||
pipenv install
|
||||
clean:
|
||||
rm -rf docs
|
107
README.md
107
README.md
|
@ -2,44 +2,117 @@
|
|||
|
||||
*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
|
||||
|
||||
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. Akkoma will federate with all servers that implement ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Peertube, and Pixelfed.
|
||||
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.
|
||||
|
||||
Akkoma is written in Elixir and uses PostgresSQL for data storage.
|
||||
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).
|
||||
|
||||
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/stable/>).
|
||||
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>).
|
||||
|
||||
- [Client Applications for Akkoma](https://docs.akkoma.dev/stable/clients/)
|
||||
- [Client Applications for Pleroma](https://docs-develop.pleroma.social/backend/clients/)
|
||||
|
||||
## Installation
|
||||
|
||||
### OTP releases (Recommended)
|
||||
If you are running Linux (glibc or musl) on x86, the recommended way to install Akkoma 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/stable/installation/otp_en/).
|
||||
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/).
|
||||
|
||||
### From Source
|
||||
If your platform is not supported, or you just want to be able to edit the source code easily, you may install Akkoma 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.akkoma.dev/stable/installation/alpine_linux_en/)
|
||||
- [Arch Linux](https://docs.akkoma.dev/stable/installation/arch_linux_en/)
|
||||
- [Debian-based](https://docs.akkoma.dev/stable/installation/debian_based_en/)
|
||||
- [Debian-based (jp)](https://docs.akkoma.dev/stable/installation/debian_based_jp/)
|
||||
- [FreeBSD](https://docs.akkoma.dev/stable/installation/freebsd_en/)
|
||||
- [Gentoo Linux](https://docs.akkoma.dev/stable/installation/gentoo_en/)
|
||||
- [NetBSD](https://docs.akkoma.dev/stable/installation/netbsd_en/)
|
||||
- [OpenBSD](https://docs.akkoma.dev/stable/installation/openbsd_en/)
|
||||
- [OpenBSD (fi)](https://docs.akkoma.dev/stable/installation/openbsd_fi/)
|
||||
- [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**.
|
||||
|
||||
### 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
|
||||
If you ever encounter compilation issues during the updating of Akkoma, 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:
|
||||
|
||||
- `mix deps.clean --all`
|
||||
- `mix local.rebar`
|
||||
- `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
|
||||
- https://docs.akkoma.dev/stable
|
||||
- Latest Released revision: <https://docs.pleroma.social>
|
||||
- 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,6 +70,8 @@ config :pleroma, :rate_limit,
|
|||
|
||||
config :pleroma, :http_security, report_uri: "https://endpoint.com"
|
||||
|
||||
config :pleroma, :http, send_user_agent: false
|
||||
|
||||
rum_enabled = System.get_env("RUM_ENABLED") == "true"
|
||||
config :pleroma, :database, rum_enabled: rum_enabled
|
||||
IO.puts("RUM enabled: #{rum_enabled}")
|
||||
|
|
|
@ -97,7 +97,6 @@ config :pleroma, :uri_schemes,
|
|||
"http",
|
||||
"dat",
|
||||
"dweb",
|
||||
"gopher",
|
||||
"hyper",
|
||||
"ipfs",
|
||||
"ipns",
|
||||
|
@ -149,7 +148,7 @@ config :pleroma, Pleroma.Web.Endpoint,
|
|||
]
|
||||
|
||||
# Configures Elixir's Logger
|
||||
config :logger, truncate: 65_536
|
||||
config :logger, truncate: 65536
|
||||
|
||||
config :logger, :console,
|
||||
level: :info,
|
||||
|
@ -175,11 +174,12 @@ config :mime, :types, %{
|
|||
"application/ld+json" => ["activity+json"]
|
||||
}
|
||||
|
||||
config :tesla, :adapter, {Tesla.Adapter.Finch, name: MyFinch}
|
||||
config :tesla, adapter: Tesla.Adapter.Hackney
|
||||
|
||||
# Configures http settings, upstream proxy etc.
|
||||
config :pleroma, :http,
|
||||
proxy_url: nil,
|
||||
send_user_agent: true,
|
||||
user_agent: :default,
|
||||
adapter: []
|
||||
|
||||
|
@ -187,7 +187,7 @@ config :pleroma, :instance,
|
|||
name: "Pleroma",
|
||||
email: "example@example.com",
|
||||
notify_email: "noreply@example.com",
|
||||
description: "Akkoma: The cooler fediverse server",
|
||||
description: "Pleroma: An efficient and flexible fediverse server",
|
||||
background_image: "/images/city.jpg",
|
||||
instance_thumbnail: "/instance/thumbnail.jpeg",
|
||||
limit: 5_000,
|
||||
|
@ -215,6 +215,7 @@ config :pleroma, :instance,
|
|||
],
|
||||
allow_relay: true,
|
||||
public: true,
|
||||
quarantined_instances: [],
|
||||
static_dir: "instance/static/",
|
||||
allowed_post_formats: [
|
||||
"text/plain",
|
||||
|
@ -258,8 +259,7 @@ config :pleroma, :instance,
|
|||
show_reactions: true,
|
||||
password_reset_token_validity: 60 * 60 * 24,
|
||||
profile_directory: true,
|
||||
privileged_staff: false,
|
||||
local_bubble: []
|
||||
privileged_staff: false
|
||||
|
||||
config :pleroma, :welcome,
|
||||
direct_message: [
|
||||
|
@ -267,6 +267,11 @@ config :pleroma, :welcome,
|
|||
sender_nickname: nil,
|
||||
message: nil
|
||||
],
|
||||
chat_message: [
|
||||
enabled: false,
|
||||
sender_nickname: nil,
|
||||
message: nil
|
||||
],
|
||||
email: [
|
||||
enabled: false,
|
||||
sender: nil,
|
||||
|
@ -357,8 +362,7 @@ config :pleroma, :activitypub,
|
|||
follow_handshake_timeout: 500,
|
||||
note_replies_output_limit: 5,
|
||||
sign_object_fetches: true,
|
||||
authorized_fetch_mode: false,
|
||||
max_collection_objects: 50
|
||||
authorized_fetch_mode: false
|
||||
|
||||
config :pleroma, :streamer,
|
||||
workers: 3,
|
||||
|
@ -406,8 +410,6 @@ config :pleroma, :mrf_vocabulary,
|
|||
accept: [],
|
||||
reject: []
|
||||
|
||||
config :pleroma, :mrf_inline_quote, prefix: "RE"
|
||||
|
||||
# threshold of 7 days
|
||||
config :pleroma, :mrf_object_age,
|
||||
threshold: 604_800,
|
||||
|
@ -436,7 +438,11 @@ config :pleroma, :media_proxy,
|
|||
redirect_on_failure: false,
|
||||
max_body_length: 25 * 1_048_576,
|
||||
# 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: []
|
||||
|
||||
|
@ -474,8 +480,6 @@ config :pleroma, Pleroma.Web.Metadata,
|
|||
],
|
||||
unfurl_nsfw: false
|
||||
|
||||
config :pleroma, Pleroma.Web.Metadata.Providers.Theme, theme_color: "#593196"
|
||||
|
||||
config :pleroma, Pleroma.Web.Preload,
|
||||
providers: [
|
||||
Pleroma.Web.Preload.Providers.Instance
|
||||
|
@ -563,8 +567,7 @@ config :pleroma, Oban,
|
|||
remote_fetcher: 2,
|
||||
attachments_cleanup: 1,
|
||||
new_users_digest: 1,
|
||||
mute_expire: 5,
|
||||
search_indexing: 10
|
||||
mute_expire: 5
|
||||
],
|
||||
plugins: [Oban.Plugins.Pruner],
|
||||
crontab: [
|
||||
|
@ -575,8 +578,7 @@ config :pleroma, Oban,
|
|||
config :pleroma, :workers,
|
||||
retries: [
|
||||
federator_incoming: 5,
|
||||
federator_outgoing: 5,
|
||||
search_indexing: 2
|
||||
federator_outgoing: 5
|
||||
]
|
||||
|
||||
config :pleroma, Pleroma.Formatter,
|
||||
|
@ -600,8 +602,7 @@ config :pleroma, :ldap,
|
|||
uid: System.get_env("LDAP_UID") || "cn"
|
||||
|
||||
oauth_consumer_strategies =
|
||||
"OAUTH_CONSUMER_STRATEGIES"
|
||||
|> System.get_env()
|
||||
System.get_env("OAUTH_CONSUMER_STRATEGIES")
|
||||
|> to_string()
|
||||
|> String.split()
|
||||
|> Enum.map(&hd(String.split(&1, ":")))
|
||||
|
@ -635,6 +636,13 @@ config :pleroma, Pleroma.Emails.UserEmail,
|
|||
|
||||
config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: false
|
||||
|
||||
config :prometheus, Pleroma.Web.Endpoint.MetricsExporter,
|
||||
enabled: false,
|
||||
auth: false,
|
||||
ip_whitelist: [],
|
||||
path: "/api/pleroma/app_metrics",
|
||||
format: :text
|
||||
|
||||
config :pleroma, Pleroma.ScheduledActivity,
|
||||
daily_user_limit: 25,
|
||||
total_user_limit: 300,
|
||||
|
@ -704,66 +712,48 @@ 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" => "stable"},
|
||||
admin: %{"name" => "admin-fe", "ref" => "stable"},
|
||||
mastodon: %{"name" => "mastodon-fe", "ref" => "akkoma"},
|
||||
swagger: %{
|
||||
"name" => "swagger-ui",
|
||||
"ref" => "stable",
|
||||
"enabled" => false
|
||||
},
|
||||
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",
|
||||
"build_url" =>
|
||||
"https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/akkoma-fe.zip",
|
||||
"ref" => "stable",
|
||||
"build_url" => "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/akkoma-fe.zip",
|
||||
"ref" => "develop",
|
||||
"build_dir" => "dist"
|
||||
},
|
||||
# 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",
|
||||
"fedi-fe" => %{
|
||||
"name" => "fedi-fe",
|
||||
"git" => "https://git.pleroma.social/pleroma/fedi-fe",
|
||||
"build_url" =>
|
||||
"https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/masto-fe.zip",
|
||||
"build_dir" => "distribution",
|
||||
"ref" => "akkoma"
|
||||
},
|
||||
"fedibird-fe" => %{
|
||||
"name" => "fedibird-fe",
|
||||
"git" => "https://akkoma.dev/AkkomaGang/fedibird-fe",
|
||||
"build_url" =>
|
||||
"https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/fedibird-fe.zip",
|
||||
"build_dir" => "distribution",
|
||||
"ref" => "akkoma"
|
||||
"https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build",
|
||||
"ref" => "master",
|
||||
"custom-http-headers" => [
|
||||
{"service-worker-allowed", "/"}
|
||||
]
|
||||
},
|
||||
"admin-fe" => %{
|
||||
"name" => "admin-fe",
|
||||
"git" => "https://akkoma.dev/AkkomaGang/admin-fe",
|
||||
"git" => "https://git.pleroma.social/pleroma/admin-fe",
|
||||
"build_url" =>
|
||||
"https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/admin-fe.zip",
|
||||
"ref" => "stable"
|
||||
"https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
|
||||
"ref" => "develop"
|
||||
},
|
||||
"soapbox-fe" => %{
|
||||
"name" => "soapbox-fe",
|
||||
"git" => "https://gitlab.com/soapbox-pub/soapbox-fe",
|
||||
"build_url" =>
|
||||
"https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/${ref}/download?job=build-production",
|
||||
"ref" => "v2.0.0",
|
||||
"ref" => "v1.0.0",
|
||||
"build_dir" => "static"
|
||||
},
|
||||
# For developers - enables a swagger frontend to view the openapi spec
|
||||
"swagger-ui" => %{
|
||||
"name" => "swagger-ui",
|
||||
"git" => "https://github.com/swagger-api/swagger-ui",
|
||||
"build_url" => "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/swagger-ui.zip",
|
||||
"build_dir" => "dist",
|
||||
"ref" => "stable"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -779,6 +769,51 @@ config :pleroma, Pleroma.Repo,
|
|||
parameters: [gin_fuzzy_search_limit: "500"],
|
||||
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
|
||||
|
||||
private_instance? = :if_instance_is_private
|
||||
|
@ -795,6 +830,8 @@ config :pleroma, :mrf,
|
|||
transparency: true,
|
||||
transparency_exclusions: []
|
||||
|
||||
config :tzdata, :http_client, Pleroma.HTTP.Tzdata
|
||||
|
||||
config :ex_aws, http_client: Pleroma.HTTP.ExAws
|
||||
|
||||
config :web_push_encryption, http_client: Pleroma.HTTP.WebPush
|
||||
|
@ -812,34 +849,17 @@ config :pleroma, Pleroma.User.Backup,
|
|||
|
||||
config :pleroma, ConcurrentLimiter, [
|
||||
{Pleroma.Web.RichMedia.Helpers, [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]}
|
||||
{Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, [max_running: 5, max_waiting: 5]}
|
||||
]
|
||||
|
||||
config :pleroma, Pleroma.Web.WebFinger, domain: nil, update_nickname_on_user_fetch: true
|
||||
config :pleroma, :search, provider: Pleroma.Search.Builtin
|
||||
|
||||
config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch
|
||||
|
||||
config :pleroma, Pleroma.Search.Meilisearch,
|
||||
url: "http://127.0.0.1:7700/",
|
||||
private_key: nil,
|
||||
initial_indexing_chunk_size: 100_000
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
config :pleroma, :telemetry,
|
||||
slow_queries_logging: [
|
||||
enabled: false,
|
||||
min_duration: 500_000,
|
||||
exclude_sources: [nil, "oban_jobs"]
|
||||
]
|
||||
|
||||
# Import environment specific config. This must remain at the bottom
|
||||
# of this file so it overrides the configuration defined above.
|
||||
|
|
|
@ -691,7 +691,7 @@ config :pleroma, :config_description, [
|
|||
key_placeholder: "instance",
|
||||
value_placeholder: "reason",
|
||||
description:
|
||||
"(Deprecated, will be removed in next release) List of ActivityPub instances where activities will not be sent, and the reason for doing so",
|
||||
"List of ActivityPub instances where private (DMs, followers-only) activities will not be sent and the reason for doing so",
|
||||
suggestions: [
|
||||
{"quarantined.com", "Reason"},
|
||||
{"*.quarantined.com", "Reason"}
|
||||
|
@ -946,13 +946,7 @@ config :pleroma, :config_description, [
|
|||
key: :privileged_staff,
|
||||
type: :boolean,
|
||||
description:
|
||||
"Let moderators access sensitive data (e.g. updating user credentials, get password reset token, delete users, index and read private statuses)"
|
||||
},
|
||||
%{
|
||||
key: :local_bubble,
|
||||
type: {:list, :string},
|
||||
description:
|
||||
"List of instances that make up your local bubble (closely-related instances). Used to populate the 'bubble' timeline (domain only)."
|
||||
"Let moderators access sensitive data (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -990,6 +984,35 @@ config :pleroma, :config_description, [
|
|||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
key: :chat_message,
|
||||
type: :keyword,
|
||||
descpiption: "Chat message settings",
|
||||
children: [
|
||||
%{
|
||||
key: :enabled,
|
||||
type: :boolean,
|
||||
description: "Enables sending a chat message to newly registered users"
|
||||
},
|
||||
%{
|
||||
key: :message,
|
||||
type: :string,
|
||||
description:
|
||||
"A message that will be sent to newly registered users as a chat message",
|
||||
suggestions: [
|
||||
"Hello, welcome on board!"
|
||||
]
|
||||
},
|
||||
%{
|
||||
key: :sender_nickname,
|
||||
type: :string,
|
||||
description: "The nickname of the local user that sends a welcome chat message",
|
||||
suggestions: [
|
||||
"lain"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
key: :email,
|
||||
type: :keyword,
|
||||
|
@ -1169,6 +1192,7 @@ config :pleroma, :config_description, [
|
|||
hideFilteredStatuses: false,
|
||||
hideMutedPosts: false,
|
||||
hidePostStats: false,
|
||||
hideSitename: false,
|
||||
hideUserStats: false,
|
||||
loginMethod: "password",
|
||||
logo: "/static/logo.svg",
|
||||
|
@ -1234,6 +1258,12 @@ config :pleroma, :config_description, [
|
|||
type: :boolean,
|
||||
description: "Hide notices statistics (repeats, favorites, ...)"
|
||||
},
|
||||
%{
|
||||
key: :hideSitename,
|
||||
label: "Hide Sitename",
|
||||
type: :boolean,
|
||||
description: "Hides instance name from PleromaFE banner"
|
||||
},
|
||||
%{
|
||||
key: :hideUserStats,
|
||||
label: "Hide user stats",
|
||||
|
@ -1343,42 +1373,6 @@ config :pleroma, :config_description, [
|
|||
type: :string,
|
||||
description: "Which theme to use. Available themes are defined in styles.json",
|
||||
suggestions: ["pleroma-dark"]
|
||||
},
|
||||
%{
|
||||
key: :showPanelNavShortcuts,
|
||||
label: "Show timeline panel nav shortcuts",
|
||||
type: :boolean,
|
||||
description: "Whether to put timeline nav tabs on the top of the panel"
|
||||
},
|
||||
%{
|
||||
key: :showNavShortcuts,
|
||||
label: "Show navbar shortcuts",
|
||||
type: :boolean,
|
||||
description: "Whether to put extra navigation options on the navbar"
|
||||
},
|
||||
%{
|
||||
key: :showWiderShortcuts,
|
||||
label: "Increase navbar shortcut spacing",
|
||||
type: :boolean,
|
||||
description: "Whether to add extra space between navbar icons"
|
||||
},
|
||||
%{
|
||||
key: :hideSiteFavicon,
|
||||
label: "Hide site favicon",
|
||||
type: :boolean,
|
||||
description: "Whether to hide the instance favicon from the navbar"
|
||||
},
|
||||
%{
|
||||
key: :hideSiteName,
|
||||
label: "Hide site name",
|
||||
type: :boolean,
|
||||
description: "Whether to hide the site name from the navbar"
|
||||
},
|
||||
%{
|
||||
key: :renderMisskeyMarkdown,
|
||||
label: "Render misskey markdown",
|
||||
type: :boolean,
|
||||
description: "Whether to render Misskey-flavoured markdown"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1471,14 +1465,13 @@ config :pleroma, :config_description, [
|
|||
%{
|
||||
key: :theme_color,
|
||||
type: :string,
|
||||
description: "Describe the theme color of the app - this is only used for mastodon-fe",
|
||||
description: "Describe the theme color of the app",
|
||||
suggestions: ["#282c37", "mediumpurple"]
|
||||
},
|
||||
%{
|
||||
key: :background_color,
|
||||
type: :string,
|
||||
description:
|
||||
"Describe the background color of the app - this is only used for mastodon-fe",
|
||||
description: "Describe the background color of the app",
|
||||
suggestions: ["#191b22", "aliceblue"]
|
||||
}
|
||||
]
|
||||
|
@ -1658,6 +1651,38 @@ 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,
|
||||
|
@ -1685,11 +1710,6 @@ config :pleroma, :config_description, [
|
|||
type: :boolean,
|
||||
description: "Sign object fetches with HTTP signatures"
|
||||
},
|
||||
%{
|
||||
key: :authorized_fetch_mode,
|
||||
type: :boolean,
|
||||
description: "Require HTTP signatures on AP fetches"
|
||||
},
|
||||
%{
|
||||
key: :note_replies_output_limit,
|
||||
type: :integer,
|
||||
|
@ -1701,13 +1721,6 @@ config :pleroma, :config_description, [
|
|||
type: :integer,
|
||||
description: "Following handshake timeout",
|
||||
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]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1991,21 +2004,6 @@ config :pleroma, :config_description, [
|
|||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
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,
|
||||
key: :rich_media,
|
||||
|
@ -2569,6 +2567,45 @@ 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",
|
||||
|
@ -2617,6 +2654,27 @@ config :pleroma, :config_description, [
|
|||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
group: :pleroma,
|
||||
key: :shout,
|
||||
type: :group,
|
||||
description: "Pleroma shout settings",
|
||||
children: [
|
||||
%{
|
||||
key: :enabled,
|
||||
type: :boolean,
|
||||
description: "Enables the backend Shoutbox chat feature."
|
||||
},
|
||||
%{
|
||||
key: :limit,
|
||||
type: :integer,
|
||||
description: "Shout message character limit.",
|
||||
suggestions: [
|
||||
5_000
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
group: :pleroma,
|
||||
key: :http,
|
||||
|
@ -2627,10 +2685,13 @@ config :pleroma, :config_description, [
|
|||
%{
|
||||
key: :proxy_url,
|
||||
label: "Proxy URL",
|
||||
type: :string,
|
||||
description:
|
||||
"Proxy URL - of the format http://host:port. Advise setting in .exs instead of admin-fe due to this being set at boot-time.",
|
||||
suggestions: ["http://localhost:3128"]
|
||||
type: [:string, :tuple],
|
||||
description: "Proxy URL",
|
||||
suggestions: ["localhost:9020", {:socks5, :localhost, 3090}]
|
||||
},
|
||||
%{
|
||||
key: :send_user_agent,
|
||||
type: :boolean
|
||||
},
|
||||
%{
|
||||
key: :user_agent,
|
||||
|
@ -2944,6 +3005,147 @@ config :pleroma, :config_description, [
|
|||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
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,
|
||||
key: :restrict_unauthenticated,
|
||||
|
@ -3081,27 +3283,6 @@ config :pleroma, :config_description, [
|
|||
description: "Admin frontend",
|
||||
children: installed_frontend_options
|
||||
},
|
||||
%{
|
||||
key: :mastodon,
|
||||
type: :map,
|
||||
description: "Mastodon frontend",
|
||||
children: installed_frontend_options
|
||||
},
|
||||
%{
|
||||
key: :swagger,
|
||||
type: :map,
|
||||
description: "Swagger API reference frontend",
|
||||
children:
|
||||
installed_frontend_options ++
|
||||
[
|
||||
%{
|
||||
key: "enabled",
|
||||
label: "Enabled",
|
||||
type: :boolean,
|
||||
description: "Whether to have this enabled at all"
|
||||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
key: :available,
|
||||
type: :map,
|
||||
|
@ -3164,6 +3345,43 @@ config :pleroma, :config_description, [
|
|||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
group: :prometheus,
|
||||
key: Pleroma.Web.Endpoint.MetricsExporter,
|
||||
type: :group,
|
||||
description: "Prometheus app metrics endpoint configuration",
|
||||
children: [
|
||||
%{
|
||||
key: :enabled,
|
||||
type: :boolean,
|
||||
description: "[Pleroma extension] Enables app metrics endpoint."
|
||||
},
|
||||
%{
|
||||
key: :ip_whitelist,
|
||||
label: "IP Whitelist",
|
||||
type: [{:list, :string}, {:list, :charlist}, {:list, :tuple}],
|
||||
description: "Restrict access of app metrics endpoint to the specified IP addresses."
|
||||
},
|
||||
%{
|
||||
key: :auth,
|
||||
type: [:boolean, :tuple],
|
||||
description: "Enables HTTP Basic Auth for app metrics endpoint.",
|
||||
suggestion: [false, {:basic, "myusername", "mypassword"}]
|
||||
},
|
||||
%{
|
||||
key: :path,
|
||||
type: :string,
|
||||
description: "App metrics endpoint URI path.",
|
||||
suggestions: ["/api/pleroma/app_metrics"]
|
||||
},
|
||||
%{
|
||||
key: :format,
|
||||
type: :atom,
|
||||
description: "App metrics endpoint output format.",
|
||||
suggestions: [:text, :protobuf]
|
||||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
group: :pleroma,
|
||||
key: ConcurrentLimiter,
|
||||
|
@ -3211,133 +3429,5 @@ config :pleroma, :config_description, [
|
|||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
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]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
4
config/emoji.txt
Normal file
4
config/emoji.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
firefox, /emoji/Firefox.gif, Gif,Fun
|
||||
blank, /emoji/blank.png, Fun
|
||||
dinosaur, /emoji/dino walking.gif, Gif
|
||||
100a, /emoji/100a.png, Fun
|
|
@ -45,7 +45,7 @@ config :pleroma, Pleroma.Repo,
|
|||
adapter: Ecto.Adapters.Postgres,
|
||||
username: "postgres",
|
||||
password: "postgres",
|
||||
database: "akkoma_test",
|
||||
database: "pleroma_test",
|
||||
hostname: System.get_env("DB_HOST") || "localhost",
|
||||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
pool_size: 50,
|
||||
|
@ -104,8 +104,12 @@ IO.puts("RUM enabled: #{rum_enabled}")
|
|||
|
||||
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, Pleroma.Gun, Pleroma.GunMock
|
||||
|
||||
config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: true
|
||||
|
||||
config :pleroma, Pleroma.Web.Plugs.RemoteIp, enabled: false
|
||||
|
@ -126,16 +130,10 @@ config :pleroma, :pipeline,
|
|||
|
||||
config :pleroma, :cachex, provider: Pleroma.CachexMock
|
||||
|
||||
config :pleroma, Pleroma.Web.WebFinger, update_nickname_on_user_fetch: false
|
||||
|
||||
config :pleroma, :side_effects,
|
||||
ap_streamer: Pleroma.Web.ActivityPub.ActivityPubMock,
|
||||
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
|
||||
# https://dashbit.co/blog/speeding-up-re-compilation-of-elixir-projects
|
||||
config :phoenix, :plug_init_mode, :runtime
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
all: install
|
||||
pipenv run mkdocs build
|
||||
|
||||
install:
|
||||
pipenv install
|
||||
clean:
|
||||
rm -rf site
|
||||
serve:
|
||||
pipenv run python3 -m http.server -d site
|
10
docs/Pipfile
10
docs/Pipfile
|
@ -1,10 +0,0 @@
|
|||
[[source]]
|
||||
name = "pypi"
|
||||
url = "https://pypi.org/simple"
|
||||
verify_ssl = true
|
||||
|
||||
[dev-packages]
|
||||
|
||||
[packages]
|
||||
mkdocs-material = "*"
|
||||
markdown-include = "*"
|
277
docs/Pipfile.lock
generated
277
docs/Pipfile.lock
generated
|
@ -1,277 +0,0 @@
|
|||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "926d34630c729228bb015cb958c04f8269c57f5ca1ffc2ceab1dfd1798884772"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {},
|
||||
"sources": [
|
||||
{
|
||||
"name": "pypi",
|
||||
"url": "https://pypi.org/simple",
|
||||
"verify_ssl": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"default": {
|
||||
"click": {
|
||||
"hashes": [
|
||||
"sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e",
|
||||
"sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==8.1.3"
|
||||
},
|
||||
"ghp-import": {
|
||||
"hashes": [
|
||||
"sha256:8337dd7b50877f163d4c0289bc1f1c7f127550241988d568c1db512c4324a619",
|
||||
"sha256:9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343"
|
||||
],
|
||||
"version": "==2.1.0"
|
||||
},
|
||||
"importlib-metadata": {
|
||||
"hashes": [
|
||||
"sha256:637245b8bab2b6502fcbc752cc4b7a6f6243bb02b31c5c26156ad103d3d45670",
|
||||
"sha256:7401a975809ea1fdc658c3aa4f78cc2195a0e019c5cbc4c06122884e9ae80c23"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==4.12.0"
|
||||
},
|
||||
"jinja2": {
|
||||
"hashes": [
|
||||
"sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852",
|
||||
"sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==3.1.2"
|
||||
},
|
||||
"markdown": {
|
||||
"hashes": [
|
||||
"sha256:cbb516f16218e643d8e0a95b309f77eb118cb138d39a4f27851e6a63581db874",
|
||||
"sha256:f5da449a6e1c989a4cea2631aa8ee67caa5a2ef855d551c88f9e309f4634c621"
|
||||
],
|
||||
"markers": "python_version >= '3.6'",
|
||||
"version": "==3.3.7"
|
||||
},
|
||||
"markdown-include": {
|
||||
"hashes": [
|
||||
"sha256:6f5d680e36f7780c7f0f61dca53ca581bd50d1b56137ddcd6353efafa0c3e4a2"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.6.0"
|
||||
},
|
||||
"markupsafe": {
|
||||
"hashes": [
|
||||
"sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003",
|
||||
"sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88",
|
||||
"sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5",
|
||||
"sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7",
|
||||
"sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a",
|
||||
"sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603",
|
||||
"sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1",
|
||||
"sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135",
|
||||
"sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247",
|
||||
"sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6",
|
||||
"sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601",
|
||||
"sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77",
|
||||
"sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02",
|
||||
"sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e",
|
||||
"sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63",
|
||||
"sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f",
|
||||
"sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980",
|
||||
"sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b",
|
||||
"sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812",
|
||||
"sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff",
|
||||
"sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96",
|
||||
"sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1",
|
||||
"sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925",
|
||||
"sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a",
|
||||
"sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6",
|
||||
"sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e",
|
||||
"sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f",
|
||||
"sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4",
|
||||
"sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f",
|
||||
"sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3",
|
||||
"sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c",
|
||||
"sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a",
|
||||
"sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417",
|
||||
"sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a",
|
||||
"sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a",
|
||||
"sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37",
|
||||
"sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452",
|
||||
"sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933",
|
||||
"sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a",
|
||||
"sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==2.1.1"
|
||||
},
|
||||
"mergedeep": {
|
||||
"hashes": [
|
||||
"sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8",
|
||||
"sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307"
|
||||
],
|
||||
"markers": "python_version >= '3.6'",
|
||||
"version": "==1.3.4"
|
||||
},
|
||||
"mkdocs": {
|
||||
"hashes": [
|
||||
"sha256:26bd2b03d739ac57a3e6eed0b7bcc86168703b719c27b99ad6ca91dc439aacde",
|
||||
"sha256:b504405b04da38795fec9b2e5e28f6aa3a73bb0960cb6d5d27ead28952bd35ea"
|
||||
],
|
||||
"markers": "python_version >= '3.6'",
|
||||
"version": "==1.3.0"
|
||||
},
|
||||
"mkdocs-material": {
|
||||
"hashes": [
|
||||
"sha256:263f2721f3abe533b61f7c8bed435a0462620912742c919821ac2d698b4bfe67",
|
||||
"sha256:dc82b667d2a83f0de581b46a6d0949732ab77e7638b87ea35b770b33bc02e75a"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==8.3.9"
|
||||
},
|
||||
"mkdocs-material-extensions": {
|
||||
"hashes": [
|
||||
"sha256:a82b70e533ce060b2a5d9eb2bc2e1be201cf61f901f93704b4acf6e3d5983a44",
|
||||
"sha256:bfd24dfdef7b41c312ede42648f9eb83476ea168ec163b613f9abd12bbfddba2"
|
||||
],
|
||||
"markers": "python_version >= '3.6'",
|
||||
"version": "==1.0.3"
|
||||
},
|
||||
"packaging": {
|
||||
"hashes": [
|
||||
"sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb",
|
||||
"sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"
|
||||
],
|
||||
"markers": "python_version >= '3.6'",
|
||||
"version": "==21.3"
|
||||
},
|
||||
"pygments": {
|
||||
"hashes": [
|
||||
"sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb",
|
||||
"sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"
|
||||
],
|
||||
"markers": "python_version >= '3.6'",
|
||||
"version": "==2.12.0"
|
||||
},
|
||||
"pymdown-extensions": {
|
||||
"hashes": [
|
||||
"sha256:3ef2d998c0d5fa7eb09291926d90d69391283561cf6306f85cd588a5eb5befa0",
|
||||
"sha256:ec141c0f4983755349f0c8710416348d1a13753976c028186ed14f190c8061c4"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==9.5"
|
||||
},
|
||||
"pyparsing": {
|
||||
"hashes": [
|
||||
"sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb",
|
||||
"sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"
|
||||
],
|
||||
"markers": "python_full_version >= '3.6.8'",
|
||||
"version": "==3.0.9"
|
||||
},
|
||||
"python-dateutil": {
|
||||
"hashes": [
|
||||
"sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86",
|
||||
"sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
||||
"version": "==2.8.2"
|
||||
},
|
||||
"pyyaml": {
|
||||
"hashes": [
|
||||
"sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293",
|
||||
"sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b",
|
||||
"sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57",
|
||||
"sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b",
|
||||
"sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4",
|
||||
"sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07",
|
||||
"sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba",
|
||||
"sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9",
|
||||
"sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287",
|
||||
"sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513",
|
||||
"sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0",
|
||||
"sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0",
|
||||
"sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92",
|
||||
"sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f",
|
||||
"sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2",
|
||||
"sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc",
|
||||
"sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c",
|
||||
"sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86",
|
||||
"sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4",
|
||||
"sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c",
|
||||
"sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34",
|
||||
"sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b",
|
||||
"sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c",
|
||||
"sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb",
|
||||
"sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737",
|
||||
"sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3",
|
||||
"sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d",
|
||||
"sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53",
|
||||
"sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78",
|
||||
"sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803",
|
||||
"sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a",
|
||||
"sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174",
|
||||
"sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"
|
||||
],
|
||||
"markers": "python_version >= '3.6'",
|
||||
"version": "==6.0"
|
||||
},
|
||||
"pyyaml-env-tag": {
|
||||
"hashes": [
|
||||
"sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb",
|
||||
"sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"
|
||||
],
|
||||
"markers": "python_version >= '3.6'",
|
||||
"version": "==0.1"
|
||||
},
|
||||
"six": {
|
||||
"hashes": [
|
||||
"sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926",
|
||||
"sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
||||
"version": "==1.16.0"
|
||||
},
|
||||
"watchdog": {
|
||||
"hashes": [
|
||||
"sha256:083171652584e1b8829581f965b9b7723ca5f9a2cd7e20271edf264cfd7c1412",
|
||||
"sha256:117ffc6ec261639a0209a3252546b12800670d4bf5f84fbd355957a0595fe654",
|
||||
"sha256:186f6c55abc5e03872ae14c2f294a153ec7292f807af99f57611acc8caa75306",
|
||||
"sha256:195fc70c6e41237362ba720e9aaf394f8178bfc7fa68207f112d108edef1af33",
|
||||
"sha256:226b3c6c468ce72051a4c15a4cc2ef317c32590d82ba0b330403cafd98a62cfd",
|
||||
"sha256:247dcf1df956daa24828bfea5a138d0e7a7c98b1a47cf1fa5b0c3c16241fcbb7",
|
||||
"sha256:255bb5758f7e89b1a13c05a5bceccec2219f8995a3a4c4d6968fe1de6a3b2892",
|
||||
"sha256:43ce20ebb36a51f21fa376f76d1d4692452b2527ccd601950d69ed36b9e21609",
|
||||
"sha256:4f4e1c4aa54fb86316a62a87b3378c025e228178d55481d30d857c6c438897d6",
|
||||
"sha256:5952135968519e2447a01875a6f5fc8c03190b24d14ee52b0f4b1682259520b1",
|
||||
"sha256:64a27aed691408a6abd83394b38503e8176f69031ca25d64131d8d640a307591",
|
||||
"sha256:6b17d302850c8d412784d9246cfe8d7e3af6bcd45f958abb2d08a6f8bedf695d",
|
||||
"sha256:70af927aa1613ded6a68089a9262a009fbdf819f46d09c1a908d4b36e1ba2b2d",
|
||||
"sha256:7a833211f49143c3d336729b0020ffd1274078e94b0ae42e22f596999f50279c",
|
||||
"sha256:8250546a98388cbc00c3ee3cc5cf96799b5a595270dfcfa855491a64b86ef8c3",
|
||||
"sha256:97f9752208f5154e9e7b76acc8c4f5a58801b338de2af14e7e181ee3b28a5d39",
|
||||
"sha256:9f05a5f7c12452f6a27203f76779ae3f46fa30f1dd833037ea8cbc2887c60213",
|
||||
"sha256:a735a990a1095f75ca4f36ea2ef2752c99e6ee997c46b0de507ba40a09bf7330",
|
||||
"sha256:ad576a565260d8f99d97f2e64b0f97a48228317095908568a9d5c786c829d428",
|
||||
"sha256:b530ae007a5f5d50b7fbba96634c7ee21abec70dc3e7f0233339c81943848dc1",
|
||||
"sha256:bfc4d351e6348d6ec51df007432e6fe80adb53fd41183716017026af03427846",
|
||||
"sha256:d3dda00aca282b26194bdd0adec21e4c21e916956d972369359ba63ade616153",
|
||||
"sha256:d9820fe47c20c13e3c9dd544d3706a2a26c02b2b43c993b62fcd8011bcc0adb3",
|
||||
"sha256:ed80a1628cee19f5cfc6bb74e173f1b4189eb532e705e2a13e3250312a62e0c9",
|
||||
"sha256:ee3e38a6cc050a8830089f79cbec8a3878ec2fe5160cdb2dc8ccb6def8552658"
|
||||
],
|
||||
"markers": "python_version >= '3.6'",
|
||||
"version": "==2.1.9"
|
||||
},
|
||||
"zipp": {
|
||||
"hashes": [
|
||||
"sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad",
|
||||
"sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==3.8.0"
|
||||
}
|
||||
},
|
||||
"develop": {}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
## Building the docs
|
||||
|
||||
You don't need to build and test the docs as long as you make sure the syntax is correct. But in case you do want to build the docs, feel free to do so.
|
||||
|
||||
You'll need to install mkdocs for which you can check the [mkdocs installation guide](https://www.mkdocs.org/#installation). Generally it's best to install it using `pip`. You'll also need to install the correct dependencies.
|
||||
|
||||
### Example using a Debian based distro
|
||||
|
||||
#### 1. Install pipenv and dependencies
|
||||
|
||||
```shell
|
||||
pip install pipenv
|
||||
pipenv sync
|
||||
```
|
||||
|
||||
#### 2. (Optional) Activate the virtual environment
|
||||
|
||||
Since dependencies are installed in a virtual environment, you can't use them directly. To use them you should either prefix the command with `pipenv run`, or activate the virtual environment for current shell by executing `pipenv shell` once.
|
||||
|
||||
#### 3. Build the docs using the script
|
||||
|
||||
```shell
|
||||
[pipenv run] make all
|
||||
```
|
||||
|
||||
#### 4. Serve the files
|
||||
|
||||
A folder `site` containing the static html pages will have been created. You can serve them from a server by pointing your server software (nginx, apache...) to this location. During development, you can run locally with
|
||||
|
||||
```shell
|
||||
[pipenv run] mkdocs serve
|
||||
```
|
||||
|
||||
This handles setting up an http server and rebuilding when files change. You can then access the docs on <http://127.0.0.1:8000>
|
|
@ -1,6 +1,6 @@
|
|||
# Transfering the config to/from the database
|
||||
|
||||
{! administration/CLI_tasks/general_cli_task_info.include !}
|
||||
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
|
||||
|
||||
## Transfer config from file to DB.
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
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/akkoma`. For installation from source - `config` directory in the akkoma 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/pleroma`. For installation from source - `config` directory in the pleroma folder.
|
||||
- `<env>` - environment, for which is migrated config. By default is `prod`.
|
||||
- To delete transferred settings from database optional flag `-d` can be used
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# Database maintenance tasks
|
||||
|
||||
{! administration/CLI_tasks/general_cli_task_info.include !}
|
||||
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
|
||||
|
||||
!!! danger
|
||||
These mix tasks can take a long time to complete. Many of them were written to address specific database issues that happened because of bugs in migrations or other specific scenarios. Do not run these tasks "just in case" if everything is fine your instance.
|
|
@ -1,6 +1,6 @@
|
|||
# Managing digest emails
|
||||
|
||||
{! administration/CLI_tasks/general_cli_task_info.include !}
|
||||
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
|
||||
|
||||
## Send digest email since given date (user registration date by default) ignoring user activity status.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# EMail administration tasks
|
||||
|
||||
{! administration/CLI_tasks/general_cli_task_info.include !}
|
||||
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
|
||||
|
||||
## Send test email (instance email by default)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# Managing emoji packs
|
||||
|
||||
{! administration/CLI_tasks/general_cli_task_info.include !}
|
||||
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
|
||||
|
||||
## Lists emoji packs and metadata specified in the manifest
|
||||
|
|
@ -18,9 +18,10 @@ You can give all the options directly on the command line, but missing informati
|
|||
|
||||
Currently, known `<frontend>` values are:
|
||||
|
||||
- [admin-fe](https://akkoma.dev/AkkomaGang/admin-fe)
|
||||
- [mastodon-fe](https://akkoma.dev/AkkomaGang/masto-fe)
|
||||
- [pleroma-fe](https://akkoma.dev/AkkomaGang/pleroma-fe)
|
||||
- [admin-fe](https://git.pleroma.social/pleroma/admin-fe)
|
||||
- [kenoma](http://git.pleroma.social/lambadalambda/kenoma)
|
||||
- [pleroma-fe](http://git.pleroma.social/pleroma/pleroma-fe)
|
||||
- [fedi-fe](https://git.pleroma.social/pleroma/fedi-fe)
|
||||
- [soapbox-fe](https://gitlab.com/soapbox-pub/soapbox-fe)
|
||||
|
||||
You can still install frontends that are not configured, see below.
|
||||
|
@ -32,29 +33,29 @@ For a frontend configured under the `available` key, it's enough to install it b
|
|||
=== "OTP"
|
||||
|
||||
```sh
|
||||
./bin/pleroma_ctl frontend install pleroma-fe
|
||||
./bin/pleroma_ctl frontend install pleroma
|
||||
```
|
||||
|
||||
=== "From Source"
|
||||
|
||||
```sh
|
||||
mix pleroma.frontend install pleroma-fe
|
||||
mix pleroma.frontend install pleroma
|
||||
```
|
||||
|
||||
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-FE build from a different URL, you could do this:
|
||||
You can override any of the details. To install a pleroma build from a different URL, you could do this:
|
||||
|
||||
=== "OTP"
|
||||
|
||||
```sh
|
||||
./bin/pleroma_ctl frontend install pleroma-fe --ref 2hu_edition --build-url https://example.org/raymoo.zip
|
||||
./bin/pleroma_ctl frontend install pleroma --ref 2hu_edition --build-url https://example.org/raymoo.zip
|
||||
```
|
||||
|
||||
=== "From Source"
|
||||
|
||||
```sh
|
||||
mix pleroma.frontend install pleroma-fe --ref 2hu_edition --build-url https://example.org/raymoo.zip
|
||||
mix pleroma.frontend install pleroma --ref 2hu_edition --build-url https://example.org/raymoo.zip
|
||||
```
|
||||
|
||||
Similarly, you can also install from a local zip file.
|
||||
|
@ -62,13 +63,13 @@ Similarly, you can also install from a local zip file.
|
|||
=== "OTP"
|
||||
|
||||
```sh
|
||||
./bin/pleroma_ctl frontend install pleroma-fe --ref mybuild --file ~/Downloads/doomfe.zip
|
||||
./bin/pleroma_ctl frontend install pleroma --ref mybuild --file ~/Downloads/doomfe.zip
|
||||
```
|
||||
|
||||
=== "From Source"
|
||||
|
||||
```sh
|
||||
mix pleroma.frontend install pleroma-fe --ref mybuild --file ~/Downloads/doomfe.zip
|
||||
mix pleroma.frontend install pleroma --ref mybuild --file ~/Downloads/doomfe.zip
|
||||
```
|
||||
|
||||
The resulting frontend will always be installed into a folder of this template: `${instance_static}/frontends/${name}/${ref}`.
|
|
@ -0,0 +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"`.
|
||||
|
||||
??? 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`
|
|
@ -1,6 +1,6 @@
|
|||
# Managing instance configuration
|
||||
|
||||
{! administration/CLI_tasks/general_cli_task_info.include !}
|
||||
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
|
||||
|
||||
## Generate a new configuration file
|
||||
=== "OTP"
|
|
@ -1,6 +1,6 @@
|
|||
# Creating trusted OAuth App
|
||||
|
||||
{! administration/CLI_tasks/general_cli_task_info.include !}
|
||||
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
|
||||
|
||||
## Create trusted OAuth App.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# Managing relays
|
||||
|
||||
{! administration/CLI_tasks/general_cli_task_info.include !}
|
||||
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
|
||||
|
||||
## Follow a relay
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# Managing robots.txt
|
||||
|
||||
{! administration/CLI_tasks/general_cli_task_info.include !}
|
||||
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
|
||||
|
||||
## Generate a new robots.txt file and add it to the static directory
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# Managing uploads
|
||||
|
||||
{! administration/CLI_tasks/general_cli_task_info.include !}
|
||||
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
|
||||
|
||||
## Migrate uploads from local to remote storage
|
||||
=== "OTP"
|
|
@ -1,6 +1,6 @@
|
|||
# Managing users
|
||||
|
||||
{! administration/CLI_tasks/general_cli_task_info.include !}
|
||||
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
|
||||
|
||||
## Create a user
|
||||
|
||||
|
@ -300,28 +300,3 @@
|
|||
```sh
|
||||
mix pleroma.user unconfirm_all
|
||||
```
|
||||
|
||||
## Fix following state
|
||||
|
||||
Sometimes the system can get into a situation where
|
||||
it think you're already following someone and won't send a request
|
||||
to the remote instance, or won't let you unfollow someone. This
|
||||
bug was fixed, but in case you encounter these weird states:
|
||||
|
||||
=== "OTP"
|
||||
|
||||
```sh
|
||||
./bin/pleroma_ctl user fix_follow_state localuser remoteuser@example.com
|
||||
```
|
||||
|
||||
=== "From Source"
|
||||
|
||||
```sh
|
||||
mix pleroma.user fix_follow_state localuser remoteuser@example.com
|
||||
```
|
||||
|
||||
The first argument is the local user's nickname - if you are `myuser@myinstance`, this should be `myuser`.
|
||||
|
||||
The second is the remote user, consisting of both nickname AND domain.
|
||||
|
||||
If you are a weird follow state situation and cannot resolve it with the above, you may need to co-operate with the remote admin to clear the state their side too - they should provide the arguments *backwards*, i.e `fix_follow_state remote local`.
|
41
docs/administration/backup.md
Normal file
41
docs/administration/backup.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Backup/Restore/Move/Remove your instance
|
||||
|
||||
## Backup
|
||||
|
||||
1. Stop the Pleroma service.
|
||||
2. Go to the working directory of Pleroma (default is `/opt/pleroma`)
|
||||
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)
|
||||
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.
|
||||
5. Restart the Pleroma service.
|
||||
|
||||
## Restore/Move
|
||||
|
||||
1. Optionally reinstall Pleroma (either on the same server or on another server if you want to move servers).
|
||||
2. Stop the Pleroma service.
|
||||
3. Go to the working directory of Pleroma (default is `/opt/pleroma`)
|
||||
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>;'`
|
||||
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`.
|
||||
|
||||
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.
|
||||
|
||||
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>`
|
||||
8. If you installed a newer Pleroma version, you should run `mix ecto.migrate`[^1]. This task performs database migrations, if there were any.
|
||||
9. Restart the Pleroma service.
|
||||
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.
|
||||
|
||||
[^1]: Prefix with `MIX_ENV=prod` to run it using the production config file.
|
||||
|
||||
## Remove
|
||||
|
||||
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 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`
|
||||
3. Disable pleroma from systemd `systemctl disable pleroma`
|
||||
4. Remove the files and folders you created during installation (see installation guide). This includes the pleroma, nginx and systemd files and folders.
|
||||
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>;'`
|
||||
7. Remove the system user `userdel pleroma`
|
||||
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
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
Besides that, doing the following is generally enough:
|
||||
|
||||
|
@ -8,20 +8,20 @@ Besides that, doing the following is generally enough:
|
|||
|
||||
```sh
|
||||
# Download the new release
|
||||
su akkoma -s $SHELL -lc "./bin/pleroma_ctl update"
|
||||
su pleroma -s $SHELL -lc "./bin/pleroma_ctl update"
|
||||
|
||||
# Migrate the database, you are advised to stop the instance before doing that
|
||||
su akkoma -s $SHELL -lc "./bin/pleroma_ctl migrate"
|
||||
su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"
|
||||
```
|
||||
|
||||
## For from source installations (using git)
|
||||
|
||||
1. Go to the working directory of Akkoma (default is `/opt/akkoma`)
|
||||
2. Run `git pull` [^1]. This pulls the latest changes from upstream.
|
||||
1. Go to the working directory of Pleroma (default is `/opt/pleroma`)
|
||||
2. Run `git pull`. This pulls the latest changes from upstream.
|
||||
3. Run `mix deps.get` [^1]. This pulls in any new dependencies.
|
||||
4. Stop the Akkoma service.
|
||||
4. Stop the Pleroma service.
|
||||
5. Run `mix ecto.migrate` [^1] [^2]. This task performs database migrations, if there were any.
|
||||
6. Start the Akkoma service.
|
||||
6. Start the Pleroma service.
|
||||
|
||||
[^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.
|
||||
[^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.
|
||||
[^2]: Prefix with `MIX_ENV=prod` to run it using the production config file.
|
|
@ -1,12 +1,17 @@
|
|||
# Configuration Cheat Sheet
|
||||
|
||||
This is a cheat sheet for Akkoma configuration file, any setting possible to configure should be listed here.
|
||||
This is a cheat sheet for Pleroma configuration file, any setting possible to configure should be listed here.
|
||||
|
||||
For OTP installations the configuration is typically stored in `/etc/akkoma/config.exs`.
|
||||
For OTP installations the configuration is typically stored in `/etc/pleroma/config.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`.
|
||||
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`.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
## :shout
|
||||
|
||||
* `enabled` - Enables the backend Shoutbox chat feature. Defaults to `true`.
|
||||
* `limit` - Shout character limit. Defaults to `5_000`
|
||||
|
||||
## :instance
|
||||
* `name`: The instance’s name.
|
||||
|
@ -34,7 +39,7 @@ To add configuration to your config file, you can copy it from the base config.
|
|||
* `federation_reachability_timeout_days`: Timeout (in days) of each external federation target being unreachable prior to pausing federating to it.
|
||||
* `allow_relay`: Permits remote instances to subscribe to all public posts of your instance. This may increase the visibility of your instance.
|
||||
* `public`: Makes the client API in authenticated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. Note that there is a dependent setting restricting or allowing unauthenticated access to specific resources, see `restrict_unauthenticated` for more details.
|
||||
* `quarantined_instances`: *DEPRECATED* ActivityPub instances where activities will not be sent. They can still reach there via other means, we just won't send them.
|
||||
* `quarantined_instances`: ActivityPub instances where private (DMs, followers-only) activities will not be send.
|
||||
* `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML).
|
||||
* `extended_nickname_format`: Set to `true` to use extended local nicknames format (allows underscores/dashes). This will break federation with
|
||||
older software for theses nicknames.
|
||||
|
@ -72,6 +77,10 @@ To add configuration to your config file, you can copy it from the base config.
|
|||
* `enabled`: Enables the send a direct message to a newly registered user. Defaults to `false`.
|
||||
* `sender_nickname`: The nickname of the local user that sends the welcome message.
|
||||
* `message`: A message that will be send to a newly registered users as a direct message.
|
||||
* `chat_message`: - welcome message sent as a chat message.
|
||||
* `enabled`: Enables the send a chat message to a newly registered user. Defaults to `false`.
|
||||
* `sender_nickname`: The nickname of the local user that sends the welcome message.
|
||||
* `message`: A message that will be send to a newly registered users as a chat message.
|
||||
* `email`: - welcome message sent as a email.
|
||||
* `enabled`: Enables the send a welcome email to a newly registered user. Defaults to `false`.
|
||||
* `sender`: The email address or tuple with `{nickname, email}` that will use as sender to the welcome email.
|
||||
|
@ -90,7 +99,7 @@ To add configuration to your config file, you can copy it from the base config.
|
|||
],
|
||||
email: [
|
||||
enabled: true,
|
||||
sender: {"Akkoma App", "welcome@akkoma.app"},
|
||||
sender: {"Pleroma App", "welcome@pleroma.app"},
|
||||
subject: "Welcome to <%= instance_name %>",
|
||||
html: "Welcome to <%= instance_name %>",
|
||||
text: "Welcome to <%= instance_name %>"
|
||||
|
@ -116,8 +125,6 @@ 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.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.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_exclusions`: Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.
|
||||
|
||||
|
@ -131,7 +138,7 @@ To add configuration to your config file, you can copy it from the base config.
|
|||
* `media_removal`: List of instances to strip media attachments from and the reason for doing so.
|
||||
* `media_nsfw`: List of instances to tag all media as NSFW (sensitive) from and the reason for doing so.
|
||||
* `federated_timeline_removal`: List of instances to remove from the Federated Timeline (aka The Whole Known Network) and the reason for doing so.
|
||||
* `reject`: List of instances to reject activities (except deletes) from and the reason for doing so. Additionally prevents activities from being sent to that instance.
|
||||
* `reject`: List of instances to reject activities (except deletes) from and the reason for doing so.
|
||||
* `accept`: List of instances to only accept activities (except deletes) from and the reason for doing so.
|
||||
* `followers_only`: Force posts from the given instances to be visible by followers only and the reason for doing so.
|
||||
* `report_removal`: List of instances to reject reports from and the reason for doing so.
|
||||
|
@ -227,7 +234,6 @@ Notes:
|
|||
* `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
|
||||
* `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
|
||||
|
||||
|
@ -240,15 +246,13 @@ Notes:
|
|||
* `total_user_limit`: the number of scheduled activities a user is allowed to create in total (Default: `300`)
|
||||
* `enabled`: whether scheduled activities are sent to the job queue to be executed
|
||||
|
||||
## Frontend Management
|
||||
|
||||
### :frontend_configurations
|
||||
|
||||
This can be used to configure a keyword list that keeps the configuration data for any kind of frontend. By default, settings for `pleroma_fe` and `masto_fe` are configured. You can find the documentation for `pleroma_fe` configuration into [Pleroma-FE configuration and customization for instance administrators](https://docs-fe.akkoma.dev/stable/CONFIGURATION/#options).
|
||||
This can be used to configure a keyword list that keeps the configuration data for any kind of frontend. By default, settings for `pleroma_fe` and `masto_fe` are configured. You can find the documentation for `pleroma_fe` configuration into [Pleroma-FE configuration and customization for instance administrators](/frontend/CONFIGURATION/#options).
|
||||
|
||||
Frontends can access these settings at `/api/v1/pleroma/frontend_configurations`
|
||||
|
||||
To add your own configuration for Pleroma-FE, use it like this:
|
||||
To add your own configuration for PleromaFE, use it like this:
|
||||
|
||||
```elixir
|
||||
config :pleroma, :frontend_configurations,
|
||||
|
@ -263,39 +267,7 @@ config :pleroma, :frontend_configurations,
|
|||
|
||||
These settings **need to be complete**, they will override the defaults.
|
||||
|
||||
### :frontends
|
||||
|
||||
These settings tell akkoma which frontend files to serve the user.
|
||||
|
||||
See: [Frontend Management](../frontend_management)
|
||||
|
||||
```elixir
|
||||
config :pleroma, :frontends,
|
||||
primary: %{
|
||||
"name" => "pleroma-fe",
|
||||
"ref" => "develop"
|
||||
},
|
||||
admin: %{
|
||||
"name" => "admin-fe",
|
||||
"ref" => "develop"
|
||||
},
|
||||
swagger: %{
|
||||
"name" => "swagger-ui",
|
||||
"ref" => "stable",
|
||||
"enabled" => true
|
||||
},
|
||||
mastodon: %{
|
||||
"name" => "mastodon-fe",
|
||||
"ref" => "akkoma"
|
||||
}
|
||||
```
|
||||
|
||||
* `:primary` - The frontend that will be served at `/`
|
||||
* `:admin` - The frontend that will be served at `/pleroma/admin`
|
||||
* `:swagger` - Config for developers to act as an API reference to be served at `/akkoma/swaggerui/` (trailing slash _needed_). Disabled by default.
|
||||
* `:mastodon` - The mastodon-fe configuration. This shouldn't need to be changed. This is served at `/web` when installed.
|
||||
|
||||
### :static\_fe
|
||||
### :static_fe
|
||||
|
||||
Render profiles and posts using server-generated HTML that is viewable without using JavaScript.
|
||||
|
||||
|
@ -424,7 +396,7 @@ config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
|
|||
!!! 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.
|
||||
|
||||
* `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).
|
||||
* `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).
|
||||
- `ip` - a tuple consisting of 4 integers
|
||||
- `port`
|
||||
* `url` - a list containing the configuration for generating urls, accepts
|
||||
|
@ -444,7 +416,7 @@ config :pleroma, Pleroma.Web.Endpoint,
|
|||
]
|
||||
```
|
||||
|
||||
This will make Akkoma listen on `127.0.0.1` port `8080` and generate urls starting with `https://example.com:2020`
|
||||
This will make Pleroma listen on `127.0.0.1` port `8080` and generate urls starting with `https://example.com:2020`
|
||||
|
||||
### :http_security
|
||||
* ``enabled``: Whether the managed content security policy is enabled.
|
||||
|
@ -521,7 +493,7 @@ Available caches:
|
|||
|
||||
### :http
|
||||
|
||||
* `proxy_url`: an upstream proxy to fetch posts and/or media with, (default: `nil`); for example `http://127.0.0.1:3192`. Does not support SOCKS5 proxy, only http(s).
|
||||
* `proxy_url`: an upstream proxy to fetch posts and/or media with, (default: `nil`)
|
||||
* `send_user_agent`: should we include a user agent with HTTP requests? (default: `true`)
|
||||
* `user_agent`: what user agent should we use? (default: `:default`), must be string or `:default`
|
||||
* `adapter`: array of adapter options
|
||||
|
@ -602,9 +574,9 @@ the source code is here: [kocaptcha](https://github.com/koto-bank/kocaptcha). Th
|
|||
|
||||
* `uploader`: Which one of the [uploaders](#uploaders) to use.
|
||||
* `filters`: List of [upload filters](#upload-filters) to use.
|
||||
* `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`
|
||||
* `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`
|
||||
* `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, Akkoma will proxy media requests instead of redirecting to it.
|
||||
* `proxy_remote`: If you're using a remote uploader, Pleroma will proxy media requests instead of redirecting to it.
|
||||
* `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.
|
||||
* `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
|
||||
|
@ -709,7 +681,7 @@ Email notifications settings.
|
|||
|
||||
### Pleroma.Emails.UserEmail
|
||||
|
||||
- `:logo` - a path to a custom logo. Set it to `nil` to use the default Akkoma logo.
|
||||
- `:logo` - a path to a custom logo. Set it to `nil` to use the default Pleroma logo.
|
||||
- `:styling` - a map with color settings for email templates.
|
||||
|
||||
### Pleroma.Emails.NewUsersDigestEmail
|
||||
|
@ -729,7 +701,7 @@ Configuration options described in [Oban readme](https://github.com/sorentwo/oba
|
|||
* `queues` - job queues (see below)
|
||||
* `crontab` - periodic jobs, see [`Oban.Cron`](#obancron)
|
||||
|
||||
Akkoma has the following queues:
|
||||
Pleroma has the following queues:
|
||||
|
||||
* `activity_expiration` - Activity expiration
|
||||
* `federator_outgoing` - Outgoing federation
|
||||
|
@ -741,7 +713,7 @@ Akkoma has the following queues:
|
|||
|
||||
#### Oban.Cron
|
||||
|
||||
Akkoma has these periodic job workers:
|
||||
Pleroma has these periodic job workers:
|
||||
|
||||
* `Pleroma.Workers.Cron.DigestEmailsWorker` - digest emails for users with new mentions and follows
|
||||
* `Pleroma.Workers.Cron.NewUsersDigestWorker` - digest emails for admins with new registrations
|
||||
|
@ -900,11 +872,11 @@ Authentication / authorization settings.
|
|||
|
||||
### :ldap
|
||||
|
||||
Use LDAP for user authentication. When a user logs in to the Akkoma
|
||||
Use LDAP for user authentication. When a user logs in to the Pleroma
|
||||
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
|
||||
is no account with the same name yet on the Akkoma instance then a new
|
||||
Akkoma account will be created with the same name as the LDAP user name.
|
||||
is no account with the same name yet on the Pleroma instance then a new
|
||||
Pleroma account will be created with the same name as the LDAP user name.
|
||||
|
||||
* `enabled`: enables LDAP authentication
|
||||
* `host`: LDAP server hostname
|
||||
|
@ -919,7 +891,7 @@ Akkoma 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
|
||||
OpenLDAP server the value may be `uid: "uid"`.
|
||||
|
||||
### :oauth2 (Akkoma as OAuth 2.0 provider settings)
|
||||
### :oauth2 (Pleroma as OAuth 2.0 provider settings)
|
||||
|
||||
OAuth 2.0 provider settings:
|
||||
|
||||
|
@ -944,7 +916,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.
|
||||
|
||||
!!! note
|
||||
Each strategy requires separate setup (on external provider side and Akkoma side). Below are the guidelines on setting up most popular strategies.
|
||||
Each strategy requires separate setup (on external provider side and Pleroma side). Below are the guidelines on setting up most popular strategies.
|
||||
|
||||
!!! 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"`
|
||||
|
@ -1014,7 +986,7 @@ config :ueberauth, Ueberauth,
|
|||
|
||||
### Pleroma.Formatter
|
||||
|
||||
Configuration for Akkoma's link formatter which parses mentions, hashtags, and URLs.
|
||||
Configuration for Pleroma's link formatter which parses mentions, hashtags, and URLs.
|
||||
|
||||
* `class` - specify the class to be added to the generated link (default: `false`)
|
||||
* `rel` - specify the rel attribute (default: `ugc`)
|
||||
|
@ -1039,22 +1011,7 @@ config :pleroma, Pleroma.Formatter,
|
|||
|
||||
## Custom Runtime Modules (`:modules`)
|
||||
|
||||
* `runtime_dir`: A path to custom Elixir modules, such as MRF policies or
|
||||
custom authenticators. These modules will be loaded on boot, and can be
|
||||
contained in subdirectories. It is advised to use version-controlled
|
||||
subdirectories to make management of them a bit easier. Note that only
|
||||
files with the extension `.ex` will be loaded.
|
||||
|
||||
```elixir
|
||||
config :pleroma, :modules, runtime_dir: "instance/modules"
|
||||
```
|
||||
|
||||
### Adding a module
|
||||
|
||||
```bash
|
||||
cd instance/modules/
|
||||
git clone <MY MODULE>
|
||||
```
|
||||
* `runtime_dir`: A path to custom Elixir modules (such as MRF policies).
|
||||
|
||||
## :configurable_from_database
|
||||
|
||||
|
@ -1121,24 +1078,38 @@ Control favicons for instances.
|
|||
|
||||
* `: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.
|
||||
* `:dir` a string with a path to backup temporary directory or `nil` to let Akkoma choose temporary directory in the following order:
|
||||
* `:dir` a string with a path to backup temporary directory or `nil` to let Pleroma choose temporary directory in the following order:
|
||||
1. the directory named by the TMPDIR environment variable
|
||||
2. the directory named by the TEMP environment variable
|
||||
3. the directory named by the TMP environment variable
|
||||
4. C:\TMP on Windows or /tmp on Unix-like operating systems
|
||||
5. as a last resort, the current working directory
|
||||
|
||||
### Theme settings
|
||||
## Frontend management
|
||||
|
||||
Settings to change theme as exposed to the outside world, for software
|
||||
that scans `index.html` (mainly misskey)
|
||||
Frontends in Pleroma 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.
|
||||
|
||||
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.
|
||||
|
||||
If you don't set anything here, the bundled frontends will be used.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
config :pleroma, Pleroma.Web.Metadata.Providers.Theme, theme_color: "#593196"
|
||||
config :pleroma, :frontends,
|
||||
primary: %{
|
||||
"name" => "pleroma",
|
||||
"ref" => "stable"
|
||||
},
|
||||
admin: %{
|
||||
"name" => "admin",
|
||||
"ref" => "develop"
|
||||
}
|
||||
```
|
||||
|
||||
This sets the `theme-color` meta tag on `index.html`, and is basically
|
||||
a hack to make misskey find the right thing.
|
||||
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.
|
||||
|
||||
## Ephemeral activities (Pleroma.Workers.PurgeExpiredActivity)
|
||||
|
|
@ -13,7 +13,7 @@ To add custom emoji:
|
|||
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,
|
||||
you'll have to list all other emojis in the pack too.
|
||||
* Either restart Akkoma or connect to the iex session Akkoma's running and
|
||||
* Either restart pleroma or connect to the iex session pleroma's running and
|
||||
run `Pleroma.Emoji.reload/0` in it.
|
||||
|
||||
Example:
|
|
@ -1,5 +1,5 @@
|
|||
# Hardening your instance
|
||||
Here are some suggestions which improve the security of parts of your Akkoma instance.
|
||||
Here are some suggestions which improve the security of parts of your Pleroma instance.
|
||||
|
||||
## 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}]`
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
### `secure_cookie_flag`
|
||||
|
||||
> Recommended value: `true`
|
||||
|
||||
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))
|
||||
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))
|
||||
|
||||
### `:http_security`
|
||||
|
||||
|
@ -76,7 +76,7 @@ Use private `/tmp` and `/var/tmp` folders inside a new file system namespace, wh
|
|||
|
||||
> Recommended value: `true`
|
||||
|
||||
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`.
|
||||
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`.
|
||||
|
||||
### ProtectSystem
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# How to activate Akkoma in-database configuration
|
||||
# How to activate Pleroma in-database configuration
|
||||
## Explanation
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
## Migration to database config
|
||||
|
||||
|
@ -17,7 +17,7 @@ The configuration of Akkoma (and Pleroma) has traditionally been managed with a
|
|||
|
||||
**OTP:**
|
||||
|
||||
*Note: OTP users need Akkoma to be running for `pleroma_ctl` commands to work*
|
||||
*Note: OTP users need Pleroma to be running for `pleroma_ctl` commands to work*
|
||||
|
||||
```
|
||||
$ ./bin/pleroma_ctl config migrate_to_db
|
||||
|
@ -36,7 +36,7 @@ The configuration of Akkoma (and Pleroma) has traditionally been managed with a
|
|||
cp config/dev.secret.exs config/dev.secret.exs.orig
|
||||
```
|
||||
|
||||
3. Edit your Akkoma config to enable database configuration:
|
||||
3. Edit your Pleroma config to enable database configuration:
|
||||
|
||||
```
|
||||
config :pleroma, configurable_from_database: true
|
||||
|
@ -66,9 +66,9 @@ The configuration of Akkoma (and Pleroma) has traditionally been managed with a
|
|||
|
||||
config :pleroma, Pleroma.Repo,
|
||||
adapter: Ecto.Adapters.Postgres,
|
||||
username: "akkoma",
|
||||
username: "pleroma",
|
||||
password: "MySecretPassword",
|
||||
database: "akkoma_prod",
|
||||
database: "pleroma_prod",
|
||||
hostname: "localhost"
|
||||
|
||||
config :pleroma, configurable_from_database: true
|
|
@ -1,29 +1,29 @@
|
|||
# Configuring Ejabberd (XMPP Server) to use Akkoma for authentication
|
||||
# Configuring Ejabberd (XMPP Server) to use Pleroma for authentication
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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 `AKKOMA_HOST` and `AKKOMA_PORT`, if necessary.
|
||||
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.
|
||||
|
||||
```bash
|
||||
cp akkoma_ejabberd_auth.py /etc/ejabberd/akkoma_ejabberd_auth.py
|
||||
chown ejabberd /etc/ejabberd/akkoma_ejabberd_auth.py
|
||||
chmod 700 /etc/ejabberd/akkoma_ejabberd_auth.py
|
||||
cp pleroma_ejabberd_auth.py /etc/ejabberd/pleroma_ejabberd_auth.py
|
||||
chown ejabberd /etc/ejabberd/pleroma_ejabberd_auth.py
|
||||
chmod 700 /etc/ejabberd/pleroma_ejabberd_auth.py
|
||||
```
|
||||
|
||||
Set external auth params in ejabberd.yaml file:
|
||||
|
||||
```bash
|
||||
auth_method: [external]
|
||||
extauth_program: "python3 /etc/ejabberd/akkoma_ejabberd_auth.py"
|
||||
extauth_program: "python3 /etc/ejabberd/pleroma_ejabberd_auth.py"
|
||||
extauth_instances: 3
|
||||
auth_use_cache: false
|
||||
```
|
||||
|
||||
Restart / reload your ejabberd service.
|
||||
|
||||
After restarting your Ejabberd server, your users should now be able to connect with their Akkoma credentials.
|
||||
After restarting your Ejabberd server, your users should now be able to connect with their Pleroma credentials.
|
||||
|
||||
|
||||
```python
|
||||
|
@ -34,18 +34,18 @@ from base64 import b64encode
|
|||
import logging
|
||||
|
||||
|
||||
AKKOMA_HOST = "127.0.0.1"
|
||||
AKKOMA_PORT = "4000"
|
||||
PLEROMA_HOST = "127.0.0.1"
|
||||
PLEROMA_PORT = "4000"
|
||||
AUTH_ENDPOINT = "/api/v1/accounts/verify_credentials"
|
||||
USER_ENDPOINT = "/api/v1/accounts"
|
||||
LOGFILE = "/var/log/ejabberd/akkoma_auth.log"
|
||||
LOGFILE = "/var/log/ejabberd/pleroma_auth.log"
|
||||
|
||||
logging.basicConfig(filename=LOGFILE, level=logging.INFO)
|
||||
|
||||
|
||||
# Akkoma functions
|
||||
# Pleroma functions
|
||||
def create_connection():
|
||||
return http.client.HTTPConnection(AKKOMA_HOST, AKKOMA_PORT)
|
||||
return http.client.HTTPConnection(PLEROMA_HOST, PLEROMA_PORT)
|
||||
|
||||
|
||||
def verify_credentials(user: str, password: str) -> bool:
|
||||
|
@ -124,7 +124,7 @@ def write(result):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
logging.info("Starting akkoma ejabberd auth daemon...")
|
||||
logging.info("Starting pleroma ejabberd auth daemon...")
|
||||
while True:
|
||||
try:
|
||||
read()
|
||||
|
@ -133,4 +133,4 @@ if __name__ == "__main__":
|
|||
"Error while processing data from ejabberd %s", str(e))
|
||||
pass
|
||||
|
||||
```
|
||||
```
|
|
@ -1,7 +1,7 @@
|
|||
# How to activate mediaproxy
|
||||
## Explanation
|
||||
|
||||
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.
|
||||
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.
|
||||
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
|
||||
|
@ -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:
|
||||
```
|
||||
location /proxy {
|
||||
proxy_cache akkoma_media_cache;
|
||||
proxy_cache pleroma_media_cache;
|
||||
proxy_cache_lock on;
|
||||
proxy_pass http://localhost:4000;
|
||||
}
|
||||
```
|
||||
Also add the following on top of the configuration, outside of the `server` block:
|
||||
```
|
||||
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;
|
||||
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;
|
||||
```
|
||||
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.
|
||||
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.
|
||||
|
||||
* 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: [
|
||||
redirect_on_failure: true
|
||||
]
|
||||
#base_url: "https://cache.akkoma.social"
|
||||
#base_url: "https://cache.pleroma.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.
|
||||
|
||||
* Restart nginx and Akkoma
|
||||
* Restart nginx and Pleroma
|
|
@ -1,10 +1,10 @@
|
|||
# Configuring MongooseIM (XMPP Server) to use Akkoma for authentication
|
||||
# Configuring MongooseIM (XMPP Server) to use Pleroma for authentication
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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}`.
|
||||
2. Add the http auth pool like this: `{http, global, auth, [{workers, 50}], [{server, "https://yourakkomainstance.com"}]}`
|
||||
2. Add the http auth pool like this: `{http, global, auth, [{workers, 50}], [{server, "https://yourpleromainstance.com"}]}`
|
||||
|
||||
Restart your MongooseIM server, your users should now be able to connect with their Akkoma credentials.
|
||||
Restart your MongooseIM server, your users should now be able to connect with their Pleroma credentials.
|
|
@ -1,12 +1,12 @@
|
|||
# How to configure upstream proxy for federation
|
||||
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:
|
||||
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:
|
||||
|
||||
```
|
||||
config :pleroma, :http,
|
||||
proxy_url: "127.0.0.1:8123"
|
||||
```
|
||||
|
||||
The other way to do it, for example, with Tor can be done like so:
|
||||
The other way to do it, for example, with Tor you would most likely add something like this:
|
||||
```
|
||||
config :pleroma, :http, proxy_url: {:socks5, :localhost, 9050}
|
||||
```
|
|
@ -1,11 +1,11 @@
|
|||
# How to enable text search for Chinese, Japanese and Korean
|
||||
|
||||
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).
|
||||
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).
|
||||
|
||||
|
||||
## 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 Akkoma community.
|
||||
In most cases, you would need an extension installed to support parsing CJK text. Here are a few extensions you may choose from, or you are more than welcome to share additional ones you found working for you with the rest of Pleroma community.
|
||||
|
||||
* [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
|
||||
|
@ -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.
|
||||
|
||||
## Restart database connection
|
||||
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.
|
||||
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.
|
||||
|
||||
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 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.
|
||||
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.
|
||||
|
||||
### Give the theme a name
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
Example of `my-awesome-theme.json` where we add the name "My Awesome Theme"
|
||||
```json
|
||||
|
@ -60,7 +60,7 @@ Example of `my-awesome-theme.json` where we add the name "My Awesome Theme"
|
|||
|
||||
### Set as default theme
|
||||
|
||||
Now we can set the new theme as default in the [Pleroma FE configuration](https://docs-fe.akkoma.dev/stable/CONFIGURATION).
|
||||
Now we can set the new theme as default in the [Pleroma FE configuration](../../../frontend/CONFIGURATION).
|
||||
|
||||
Example of adding the new theme in the back-end config files
|
||||
```elixir
|
|
@ -1,6 +1,6 @@
|
|||
# I2P Federation and Accessability
|
||||
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
|
@ -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.
|
||||
|
||||
Assuming you're running in prod, cd to your Akkoma folder and append the following to `config/prod.secret.exs`:
|
||||
Assuming you're running in prod, cd to your Pleroma folder and append the following to `config/prod.secret.exs`:
|
||||
```
|
||||
config :pleroma, :http, proxy_url: {:socks5, :localhost, 4447}
|
||||
```
|
||||
And then run the following:
|
||||
```
|
||||
su akkoma
|
||||
su pleroma
|
||||
MIX_ENV=prod mix deps.get
|
||||
MIX_ENV=prod mix ecto.migrate
|
||||
exit
|
||||
|
@ -45,7 +45,7 @@ To use [fedproxy](https://github.com/majestrate/fedproxy) you'll need to install
|
|||
```
|
||||
apt install golang
|
||||
```
|
||||
Use a different user than akkoma or root. Run the following to add the Gopath to your ~/.bashrc.
|
||||
Use a different user than pleroma or root. Run the following to add the Gopath to your ~/.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
|
||||
```
|
||||
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 Akkoma config.
|
||||
You'll also need to modify your Pleroma config.
|
||||
|
||||
Assuming you're running in prod, cd to your Akkoma folder and append the following to `config/prod.secret.exs`:
|
||||
Assuming you're running in prod, cd to your Pleroma folder and append the following to `config/prod.secret.exs`:
|
||||
```
|
||||
config :pleroma, :http, proxy_url: {:socks5, :localhost, 2000}
|
||||
```
|
||||
And then run the following:
|
||||
```
|
||||
su akkoma
|
||||
su pleroma
|
||||
MIX_ENV=prod mix deps.get
|
||||
MIX_ENV=prod mix ecto.migrate
|
||||
exit
|
||||
|
@ -89,11 +89,11 @@ Make your instance accessible using I2P.
|
|||
|
||||
Add the following to your I2PD config `/etc/i2pd/tunnels.conf`:
|
||||
```
|
||||
[akkoma]
|
||||
[pleroma]
|
||||
type = http
|
||||
host = 127.0.0.1
|
||||
port = 14447
|
||||
keys = akkoma.dat
|
||||
keys = pleroma.dat
|
||||
```
|
||||
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:
|
||||
`ssh -L 7070:127.0.0.1:7070 user@ip -p port`.
|
||||
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 "akkoma".
|
||||
Go to I2P tunnels page. Look for Server tunnels and you will see an address that ends with `.b32.i2p` next to "pleroma".
|
||||
This is your site's address.
|
||||
|
||||
### 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)
|
||||
|
||||
If not an I2P-only instance, add the nginx config below to your existing config at `/etc/nginx/sites-enabled/akkoma.nginx`.
|
||||
If not an I2P-only instance, add the nginx config below to your existing config at `/etc/nginx/sites-enabled/pleroma.nginx`.
|
||||
|
||||
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 Akkoma folder (/home/akkoma/akkoma/):
|
||||
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).
|
||||
Copy the following into the `config/prod.secret.exs` in your Pleroma folder (/home/pleroma/pleroma/):
|
||||
```
|
||||
config :pleroma, :http_security,
|
||||
enabled: false
|
||||
|
@ -132,7 +132,7 @@ config :pleroma, :http_security,
|
|||
|
||||
Use this as the Nginx config:
|
||||
```
|
||||
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;
|
||||
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;
|
||||
# The above already exists in a clearnet instance's config.
|
||||
# If not, add it.
|
||||
|
||||
|
@ -173,7 +173,7 @@ server {
|
|||
}
|
||||
|
||||
location /proxy {
|
||||
proxy_cache akkoma_media_cache;
|
||||
proxy_cache pleroma_media_cache;
|
||||
proxy_cache_lock on;
|
||||
proxy_ignore_client_abort on;
|
||||
proxy_pass http://localhost:4000;
|
|
@ -11,7 +11,7 @@ Possible uses include:
|
|||
* removing media from messages
|
||||
* sending only public messages to a specific instance
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
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:
|
||||
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:
|
||||
|
||||
```elixir
|
||||
config :pleroma, :mrf,
|
||||
|
@ -132,7 +132,7 @@ config :pleroma, :mrf,
|
|||
]
|
||||
```
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
### MRF policies descriptions
|
||||
|
|
@ -1,22 +1,31 @@
|
|||
# Easy Onion Federation (Tor)
|
||||
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.
|
||||
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.
|
||||
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 guide assumes you already got Akkoma working, and that it's running on the default port 4000.
|
||||
This guide also assumes you're using Nginx as the reverse proxy.
|
||||
This guide assumes you already got Pleroma working, and that it's running on the default port 4000.
|
||||
Currently only has an Nginx example.
|
||||
|
||||
To install Tor on Debian / Ubuntu:
|
||||
```
|
||||
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.
|
||||
|
||||
Create the hidden service for your Akkoma instance in `/etc/tor/torrc`:
|
||||
Create the hidden service for your Pleroma instance in `/etc/tor/torrc`:
|
||||
```
|
||||
HiddenServiceDir /var/lib/tor/akkoma_hidden_service/
|
||||
HiddenServiceDir /var/lib/tor/pleroma_hidden_service/
|
||||
HiddenServicePort 80 127.0.0.1:8099
|
||||
HiddenServiceVersion 3 # Remove if Tor version is below 0.3 ( tor --version )
|
||||
```
|
||||
|
@ -26,28 +35,28 @@ systemctl restart tor@default.service
|
|||
```
|
||||
Get the address:
|
||||
```
|
||||
cat /var/lib/tor/akkoma_hidden_service/hostname
|
||||
cat /var/lib/tor/pleroma_hidden_service/hostname
|
||||
```
|
||||
|
||||
# Federation
|
||||
|
||||
Next, edit your Akkoma config.
|
||||
If running in prod, navigate to your Akkoma directory, edit `config/prod.secret.exs`
|
||||
Next, edit your Pleroma config.
|
||||
If running in prod, cd to your Pleroma directory, edit `config/prod.secret.exs`
|
||||
and append this line:
|
||||
```
|
||||
config :pleroma, :http, proxy_url: {:socks5, :localhost, 9050}
|
||||
```
|
||||
In your Akkoma directory, assuming you're running prod,
|
||||
In your Pleroma directory, assuming you're running prod,
|
||||
run the following:
|
||||
```
|
||||
su akkoma
|
||||
su pleroma
|
||||
MIX_ENV=prod mix deps.get
|
||||
MIX_ENV=prod mix ecto.migrate
|
||||
exit
|
||||
```
|
||||
restart Akkoma (if using systemd):
|
||||
restart Pleroma (if using systemd):
|
||||
```
|
||||
systemctl restart akkoma
|
||||
systemctl restart pleroma
|
||||
```
|
||||
|
||||
# Tor Instance Access
|
||||
|
@ -55,7 +64,7 @@ systemctl restart akkoma
|
|||
Make your instance accessible using Tor.
|
||||
|
||||
## Tor-only Instance
|
||||
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:
|
||||
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:
|
||||
```
|
||||
url: [host: "onionaddress", scheme: "http", port: 80],
|
||||
```
|
||||
|
@ -63,11 +72,11 @@ In addition to that, replace the existing nginx config's contents with the examp
|
|||
|
||||
## Existing Instance (Clearnet Instance)
|
||||
If not a Tor-only instance,
|
||||
add the nginx config below to your existing config at `/etc/nginx/sites-enabled/akkoma.nginx`.
|
||||
add the nginx config below to your existing config at `/etc/nginx/sites-enabled/pleroma.nginx`.
|
||||
|
||||
---
|
||||
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 Akkoma folder (/home/akkoma/akkoma/):
|
||||
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).
|
||||
Copy the following into the `config/prod.secret.exs` in your Pleroma folder (/home/pleroma/pleroma/):
|
||||
```
|
||||
config :pleroma, :http_security,
|
||||
enabled: false
|
||||
|
@ -75,7 +84,7 @@ config :pleroma, :http_security,
|
|||
|
||||
Use this as the Nginx config:
|
||||
```
|
||||
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;
|
||||
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;
|
||||
# The above already exists in a clearnet instance's config.
|
||||
# If not, add it.
|
||||
|
||||
|
@ -116,7 +125,7 @@ server {
|
|||
}
|
||||
|
||||
location /proxy {
|
||||
proxy_cache akkoma_media_cache;
|
||||
proxy_cache pleroma_media_cache;
|
||||
proxy_cache_lock on;
|
||||
proxy_ignore_client_abort on;
|
||||
proxy_pass http://localhost:4000;
|
||||
|
@ -134,17 +143,17 @@ You should now be able to both access your instance using Tor and federate with
|
|||
|
||||
### Possible Issues
|
||||
|
||||
* 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
|
||||
* 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
|
||||
```
|
||||
ls -la /var/lib/tor/
|
||||
```
|
||||
If it's not, run:
|
||||
```
|
||||
chown -R debian-tor:debian-tor /var/lib/tor/akkoma_hidden_service/
|
||||
chown -R debian-tor:debian-tor /var/lib/tor/pleroma_hidden_service/
|
||||
```
|
||||
* Make sure *only* the owner has *only* read and write permissions.
|
||||
If not, run:
|
||||
```
|
||||
chmod -R 600 /var/lib/tor/akkoma_hidden_service/
|
||||
chmod -R 600 /var/lib/tor/pleroma_hidden_service/
|
||||
```
|
||||
* 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
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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:
|
||||
|
||||
`ExecStart=/usr/bin/elixir --erl '-args_file /opt/akkoma/config/vm.args' -S /usr/bin/mix phx.server`
|
||||
`ExecStart=/usr/bin/elixir --erl '-args_file /opt/pleroma/config/vm.args' -S /usr/bin/mix phx.server`
|
||||
|
||||
Check your OS documentation to adopt a similar strategy on other platforms.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# Optimizing PostgreSQL performance
|
||||
|
||||
Akkoma performance is largely dependent on performance of the underlying database. Better performance can be achieved by adjusting a few settings.
|
||||
Pleroma performance is largely dependent on performance of the underlying database. Better performance can be achieved by adjusting a few settings.
|
||||
|
||||
## PGTune
|
||||
|
||||
|
@ -10,10 +10,10 @@ Akkoma performance is largely dependent on performance of the underlying databas
|
|||
|
||||
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 Akkoma 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 Pleroma sends, leading to serious performance loss. Therefore, it is recommended to disable generic mode.
|
||||
|
||||
|
||||
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:
|
||||
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:
|
||||
```elixir
|
||||
config :pleroma, Pleroma.Repo,
|
||||
prepare: :named,
|
|
@ -1,6 +1,6 @@
|
|||
# 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.
|
||||
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.
|
||||
|
||||
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
|
||||
config :pleroma, :instance,
|
||||
static_dir: "/var/lib/akkoma/static/"
|
||||
static_dir: "/var/lib/pleroma/static/"
|
||||
```
|
||||
|
||||
=== "From Source"
|
||||
|
@ -53,7 +53,7 @@ Create and Edit your file at `$static_dir/instance/panel.html`.
|
|||
|
||||
## Background
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
E.g. if you put `$static_dir/images/background.jpg`
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
# Storing Remote Media
|
||||
|
||||
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 Akkoma which will automatically fetch all media through the proxy
|
||||
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
|
||||
for a year and to activate the `MediaProxyWarmingPolicy` MRF policy in Pleroma which will automatically fetch all media through the proxy
|
||||
as soon as the post is received by your instance.
|
||||
|
||||
## Nginx
|
||||
|
||||
```
|
||||
proxy_cache_path /long/term/storage/path/akkoma-media-cache levels=1:2
|
||||
keys_zone=akkoma_media_cache:10m inactive=1y use_temp_path=off;
|
||||
proxy_cache_path /long/term/storage/path/pleroma-media-cache levels=1:2
|
||||
keys_zone=pleroma_media_cache:10m inactive=1y use_temp_path=off;
|
||||
|
||||
location ~ ^/(media|proxy) {
|
||||
proxy_cache akkoma_media_cache;
|
||||
proxy_cache pleroma_media_cache;
|
||||
slice 1m;
|
||||
proxy_cache_key $host$uri$is_args$args$slice_range;
|
||||
proxy_set_header Range $slice_range;
|
||||
|
@ -28,7 +28,7 @@ as soon as the post is received by your instance.
|
|||
}
|
||||
```
|
||||
|
||||
## Akkoma
|
||||
## Pleroma
|
||||
|
||||
Add to your `prod.secret.exs`:
|
||||
|
|
@ -1031,6 +1031,7 @@ Most of the settings will be applied in `runtime`, this means that you don't nee
|
|||
- `:hackney_pools`
|
||||
- `:connections_pool`
|
||||
- `:pools`
|
||||
- `:chat`
|
||||
- partially settings inside these keys:
|
||||
- `:seconds_valid` in `Pleroma.Captcha`
|
||||
- `:proxy_remote` in `Pleroma.Upload`
|
||||
|
@ -1410,6 +1411,127 @@ Loads json generated from `config/descriptions.exs`.
|
|||
|
||||
```
|
||||
|
||||
## GET /api/v1/pleroma/admin/users/:nickname/chats
|
||||
|
||||
### List a user's chats
|
||||
|
||||
- Params: None
|
||||
|
||||
- Response:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"sender": {
|
||||
"id": "someflakeid",
|
||||
"username": "somenick",
|
||||
...
|
||||
},
|
||||
"receiver": {
|
||||
"id": "someflakeid",
|
||||
"username": "somenick",
|
||||
...
|
||||
},
|
||||
"id" : "1",
|
||||
"unread" : 2,
|
||||
"last_message" : {...}, // The last message in that chat
|
||||
"updated_at": "2020-04-21T15:11:46.000Z"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## GET /api/v1/pleroma/admin/chats/:chat_id
|
||||
|
||||
### View a single chat
|
||||
|
||||
- Params: None
|
||||
|
||||
- Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"sender": {
|
||||
"id": "someflakeid",
|
||||
"username": "somenick",
|
||||
...
|
||||
},
|
||||
"receiver": {
|
||||
"id": "someflakeid",
|
||||
"username": "somenick",
|
||||
...
|
||||
},
|
||||
"id" : "1",
|
||||
"unread" : 2,
|
||||
"last_message" : {...}, // The last message in that chat
|
||||
"updated_at": "2020-04-21T15:11:46.000Z"
|
||||
}
|
||||
```
|
||||
|
||||
## GET /api/v1/pleroma/admin/chats/:chat_id/messages
|
||||
|
||||
### List the messages in a chat
|
||||
|
||||
- Params: `max_id`, `min_id`
|
||||
|
||||
- Response:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"account_id": "someflakeid",
|
||||
"chat_id": "1",
|
||||
"content": "Check this out :firefox:",
|
||||
"created_at": "2020-04-21T15:11:46.000Z",
|
||||
"emojis": [
|
||||
{
|
||||
"shortcode": "firefox",
|
||||
"static_url": "https://dontbulling.me/emoji/Firefox.gif",
|
||||
"url": "https://dontbulling.me/emoji/Firefox.gif",
|
||||
"visible_in_picker": false
|
||||
}
|
||||
],
|
||||
"id": "13",
|
||||
"unread": true
|
||||
},
|
||||
{
|
||||
"account_id": "someflakeid",
|
||||
"chat_id": "1",
|
||||
"content": "Whats' up?",
|
||||
"created_at": "2020-04-21T15:06:45.000Z",
|
||||
"emojis": [],
|
||||
"id": "12",
|
||||
"unread": false
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## DELETE /api/v1/pleroma/admin/chats/:chat_id/messages/:message_id
|
||||
|
||||
### Delete a single message
|
||||
|
||||
- Params: None
|
||||
|
||||
- Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"account_id": "someflakeid",
|
||||
"chat_id": "1",
|
||||
"content": "Check this out :firefox:",
|
||||
"created_at": "2020-04-21T15:11:46.000Z",
|
||||
"emojis": [
|
||||
{
|
||||
"shortcode": "firefox",
|
||||
"static_url": "https://dontbulling.me/emoji/Firefox.gif",
|
||||
"url": "https://dontbulling.me/emoji/Firefox.gif",
|
||||
"visible_in_picker": false
|
||||
}
|
||||
],
|
||||
"id": "13",
|
||||
"unread": false
|
||||
}
|
||||
```
|
||||
|
||||
## `GET /api/v1/pleroma/admin/instance_document/:document_name`
|
||||
|
||||
### Get an instance document
|
||||
|
@ -1514,117 +1636,3 @@ Returns the content of the document
|
|||
"error": "Could not install frontend"
|
||||
}
|
||||
```
|
||||
|
||||
## `GET /api/v1/pleroma/admin/announcements`
|
||||
|
||||
### List announcements
|
||||
|
||||
- Params: `offset`, `limit`
|
||||
|
||||
- Response: JSON, list of announcements
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "AHDp0GBdRn1EPN5HN2",
|
||||
"content": "some content",
|
||||
"starts_at": null,
|
||||
"ends_at": null,
|
||||
"all_day": false,
|
||||
"published_at": "2022-03-09T02:13:05",
|
||||
"reactions": [],
|
||||
"statuses": [],
|
||||
"tags": [],
|
||||
"emojis": [],
|
||||
"updated_at": "2022-03-09T02:13:05"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
Note that this differs from the Mastodon API variant: Mastodon API only returns *active* announcements, while this returns all.
|
||||
|
||||
## `GET /api/v1/pleroma/admin/announcements/:id`
|
||||
|
||||
### Display one announcement
|
||||
|
||||
- Response: JSON, one announcement
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "AHDp0GBdRn1EPN5HN2",
|
||||
"content": "some content",
|
||||
"starts_at": null,
|
||||
"ends_at": null,
|
||||
"all_day": false,
|
||||
"published_at": "2022-03-09T02:13:05",
|
||||
"reactions": [],
|
||||
"statuses": [],
|
||||
"tags": [],
|
||||
"emojis": [],
|
||||
"updated_at": "2022-03-09T02:13:05"
|
||||
}
|
||||
```
|
||||
|
||||
## `POST /api/v1/pleroma/admin/announcements`
|
||||
|
||||
### Create an announcement
|
||||
|
||||
- Params:
|
||||
- `content`: string, required, announcement content
|
||||
- `starts_at`: datetime, optional, default to null, the time when the announcement will become active (displayed to users); if it is null, the announcement will be active immediately
|
||||
- `ends_at`: datetime, optional, default to null, the time when the announcement will become inactive (no longer displayed to users); if it is null, the announcement will be active until an admin deletes it
|
||||
- `all_day`: boolean, optional, default to false, tells the client whether to only display dates for `starts_at` and `ends_at`
|
||||
|
||||
- Response: JSON, created announcement
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "AHDp0GBdRn1EPN5HN2",
|
||||
"content": "some content",
|
||||
"starts_at": null,
|
||||
"ends_at": null,
|
||||
"all_day": false,
|
||||
"published_at": "2022-03-09T02:13:05",
|
||||
"reactions": [],
|
||||
"statuses": [],
|
||||
"tags": [],
|
||||
"emojis": [],
|
||||
"updated_at": "2022-03-09T02:13:05"
|
||||
}
|
||||
```
|
||||
|
||||
## `PATCH /api/v1/pleroma/admin/announcements/:id`
|
||||
|
||||
### Change an announcement
|
||||
|
||||
- Params: same as `POST /api/v1/pleroma/admin/announcements`, except no param is required.
|
||||
|
||||
- Updates the announcement according to params. Missing params are kept as-is.
|
||||
|
||||
- Response: JSON, updated announcement
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "AHDp0GBdRn1EPN5HN2",
|
||||
"content": "some content",
|
||||
"starts_at": null,
|
||||
"ends_at": null,
|
||||
"all_day": false,
|
||||
"published_at": "2022-03-09T02:13:05",
|
||||
"reactions": [],
|
||||
"statuses": [],
|
||||
"tags": [],
|
||||
"emojis": [],
|
||||
"updated_at": "2022-03-09T02:13:05"
|
||||
}
|
||||
```
|
||||
|
||||
## `DELETE /api/v1/pleroma/admin/announcements/:id`
|
||||
|
||||
### Delete an announcement
|
||||
|
||||
- Response: JSON, empty object
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
255
docs/development/API/chats.md
Normal file
255
docs/development/API/chats.md
Normal file
|
@ -0,0 +1,255 @@
|
|||
# Chats
|
||||
|
||||
Chats are a way to represent an IM-style conversation between two actors. They are not the same as direct messages and they are not `Status`es, even though they have a lot in common.
|
||||
|
||||
## Why Chats?
|
||||
|
||||
There are no 'visibility levels' in ActivityPub, their definition is purely a Mastodon convention. Direct Messaging between users on the fediverse has mostly been modeled by using ActivityPub addressing following Mastodon conventions on normal `Note` objects. In this case, a 'direct message' would be a message that has no followers addressed and also does not address the special public actor, but just the recipients in the `to` field. It would still be a `Note` and is presented with other `Note`s as a `Status` in the API.
|
||||
|
||||
This is an awkward setup for a few reasons:
|
||||
|
||||
- As DMs generally still follow the usual `Status` conventions, it is easy to accidentally pull somebody into a DM thread by mentioning them. (e.g. "I hate @badguy so much")
|
||||
- It is possible to go from a publicly addressed `Status` to a DM reply, back to public, then to a 'followers only' reply, and so on. This can be become very confusing, as it is unclear which user can see which part of the conversation.
|
||||
- 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 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.
|
||||
|
||||
## Chats explained
|
||||
For this reasons, Chats are a new and different entity, both in the API as well as in ActivityPub. A quick overview:
|
||||
|
||||
- Chats are meant to represent an instant message conversation between two actors. For now these are only 1-on-1 conversations, but the other actor can be a group in the future.
|
||||
- Chat messages have the ActivityPub type `ChatMessage`. They are not `Note`s. Servers that don't understand them will just drop them.
|
||||
- The only addressing allowed in `ChatMessage`s is one single ActivityPub actor in the `to` field.
|
||||
- There's always only one Chat between two actors. If you start chatting with someone and later start a 'new' Chat, the old Chat will be continued.
|
||||
- `ChatMessage`s are posted with a different api, making it very hard to accidentally send a message to the wrong person.
|
||||
- `ChatMessage`s don't show up in the existing timelines.
|
||||
- Chats can never go from private to public. They are always private between the two actors.
|
||||
|
||||
## Caveats
|
||||
|
||||
- Chats are NOT E2E encrypted (yet). Security is still the same as email.
|
||||
|
||||
## API
|
||||
|
||||
In general, the way to send a `ChatMessage` is to first create a `Chat`, then post a message to that `Chat`. `Group`s will later be supported by making them a sub-type of `Account`.
|
||||
|
||||
This is the overview of using the API. The API is also documented via OpenAPI, so you can view it and play with it by pointing SwaggerUI or a similar OpenAPI tool to `https://yourinstance.tld/api/openapi`.
|
||||
|
||||
### Creating or getting a chat.
|
||||
|
||||
To create or get an existing Chat for a certain recipient (identified by Account ID)
|
||||
you can call:
|
||||
|
||||
`POST /api/v1/pleroma/chats/by-account-id/:account_id`
|
||||
|
||||
The account id is the normal FlakeId of the user
|
||||
```
|
||||
POST /api/v1/pleroma/chats/by-account-id/someflakeid
|
||||
```
|
||||
|
||||
If you already have the id of a chat, you can also use
|
||||
|
||||
```
|
||||
GET /api/v1/pleroma/chats/:id
|
||||
```
|
||||
|
||||
There will only ever be ONE Chat for you and a given recipient, so this call
|
||||
will return the same Chat if you already have one with that user.
|
||||
|
||||
Returned data:
|
||||
|
||||
```json
|
||||
{
|
||||
"account": {
|
||||
"id": "someflakeid",
|
||||
"username": "somenick",
|
||||
...
|
||||
},
|
||||
"id" : "1",
|
||||
"unread" : 2,
|
||||
"last_message" : {...}, // The last message in that chat
|
||||
"updated_at": "2020-04-21T15:11:46.000Z"
|
||||
}
|
||||
```
|
||||
|
||||
### Marking a chat as read
|
||||
|
||||
To mark a number of messages in a chat up to a certain message as read, you can use
|
||||
|
||||
`POST /api/v1/pleroma/chats/:id/read`
|
||||
|
||||
|
||||
Parameters:
|
||||
- last_read_id: Given this id, all chat messages until this one will be marked as read. Required.
|
||||
|
||||
|
||||
Returned data:
|
||||
|
||||
```json
|
||||
{
|
||||
"account": {
|
||||
"id": "someflakeid",
|
||||
"username": "somenick",
|
||||
...
|
||||
},
|
||||
"id" : "1",
|
||||
"unread" : 0,
|
||||
"updated_at": "2020-04-21T15:11:46.000Z"
|
||||
}
|
||||
```
|
||||
|
||||
### Marking a single chat message as read
|
||||
|
||||
To set the `unread` property of a message to `false`
|
||||
|
||||
`POST /api/v1/pleroma/chats/:id/messages/:message_id/read`
|
||||
|
||||
Returned data:
|
||||
|
||||
The modified chat message
|
||||
|
||||
### Getting a list of Chats
|
||||
|
||||
`GET /api/v1/pleroma/chats`
|
||||
|
||||
This will return a list of chats that you have been involved in, sorted by their
|
||||
last update (so new chats will be at the top).
|
||||
|
||||
Parameters:
|
||||
|
||||
- with_muted: Include chats from muted users (boolean).
|
||||
|
||||
Returned data:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"account": {
|
||||
"id": "someflakeid",
|
||||
"username": "somenick",
|
||||
...
|
||||
},
|
||||
"id" : "1",
|
||||
"unread" : 2,
|
||||
"last_message" : {...}, // The last message in that chat
|
||||
"updated_at": "2020-04-21T15:11:46.000Z"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
The recipient of messages that are sent to this chat is given by their AP ID.
|
||||
No pagination is implemented for now.
|
||||
|
||||
### Getting the messages for a Chat
|
||||
|
||||
For a given Chat id, you can get the associated messages with
|
||||
|
||||
`GET /api/v1/pleroma/chats/:id/messages`
|
||||
|
||||
This will return all messages, sorted by most recent to least recent. The usual
|
||||
pagination options are implemented.
|
||||
|
||||
Returned data:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"account_id": "someflakeid",
|
||||
"chat_id": "1",
|
||||
"content": "Check this out :firefox:",
|
||||
"created_at": "2020-04-21T15:11:46.000Z",
|
||||
"emojis": [
|
||||
{
|
||||
"shortcode": "firefox",
|
||||
"static_url": "https://dontbulling.me/emoji/Firefox.gif",
|
||||
"url": "https://dontbulling.me/emoji/Firefox.gif",
|
||||
"visible_in_picker": false
|
||||
}
|
||||
],
|
||||
"id": "13",
|
||||
"unread": true
|
||||
},
|
||||
{
|
||||
"account_id": "someflakeid",
|
||||
"chat_id": "1",
|
||||
"content": "Whats' up?",
|
||||
"created_at": "2020-04-21T15:06:45.000Z",
|
||||
"emojis": [],
|
||||
"id": "12",
|
||||
"unread": false,
|
||||
"idempotency_key": "75442486-0874-440c-9db1-a7006c25a31f"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
- idempotency_key: The copy of the `idempotency-key` HTTP request header that can be used for optimistic message sending. Included only during the first few minutes after the message creation.
|
||||
|
||||
### Posting a chat message
|
||||
|
||||
Posting a chat message for given Chat id works like this:
|
||||
|
||||
`POST /api/v1/pleroma/chats/:id/messages`
|
||||
|
||||
Parameters:
|
||||
- content: The text content of the message. Optional if media is attached.
|
||||
- media_id: The id of an upload that will be attached to the message.
|
||||
|
||||
Currently, no formatting beyond basic escaping and emoji is implemented.
|
||||
|
||||
Returned data:
|
||||
|
||||
```json
|
||||
{
|
||||
"account_id": "someflakeid",
|
||||
"chat_id": "1",
|
||||
"content": "Check this out :firefox:",
|
||||
"created_at": "2020-04-21T15:11:46.000Z",
|
||||
"emojis": [
|
||||
{
|
||||
"shortcode": "firefox",
|
||||
"static_url": "https://dontbulling.me/emoji/Firefox.gif",
|
||||
"url": "https://dontbulling.me/emoji/Firefox.gif",
|
||||
"visible_in_picker": false
|
||||
}
|
||||
],
|
||||
"id": "13",
|
||||
"unread": false
|
||||
}
|
||||
```
|
||||
|
||||
### Deleting a chat message
|
||||
|
||||
Deleting a chat message for given Chat id works like this:
|
||||
|
||||
`DELETE /api/v1/pleroma/chats/:chat_id/messages/:message_id`
|
||||
|
||||
Returned data is the deleted message.
|
||||
|
||||
### Notifications
|
||||
|
||||
There's a new `pleroma:chat_mention` notification, which has this form. It is not given out in the notifications endpoint by default, you need to explicitly request it with `include_types[]=pleroma:chat_mention`:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "someid",
|
||||
"type": "pleroma:chat_mention",
|
||||
"account": { ... } // User account of the sender,
|
||||
"chat_message": {
|
||||
"chat_id": "1",
|
||||
"id": "10",
|
||||
"content": "Hello",
|
||||
"account_id": "someflakeid",
|
||||
"unread": false
|
||||
},
|
||||
"created_at": "somedate"
|
||||
}
|
||||
```
|
||||
|
||||
### Streaming
|
||||
|
||||
There is an additional `user:pleroma_chat` stream. Incoming chat messages will make the current chat be sent to this `user` stream. The `event` of an incoming chat message is `pleroma:chat_update`. The payload is the updated chat with the incoming chat message in the `last_message` field.
|
||||
|
||||
### Web Push
|
||||
|
||||
If you want to receive push messages for this type, you'll need to add the `pleroma:chat_mention` type to your alerts in the push subscription.
|
|
@ -1,10 +1,10 @@
|
|||
# Differences in Mastodon API responses from vanilla Mastodon
|
||||
|
||||
A Akkoma instance can be identified by "<Mastodon version> (compatible; Pleroma <version>)" present in `version` field in response from `/api/v1/instance`
|
||||
A Pleroma instance can be identified by "<Mastodon version> (compatible; Pleroma <version>)" present in `version` field in response from `/api/v1/instance`
|
||||
|
||||
## Flake IDs
|
||||
|
||||
Akkoma uses 128-bit ids as opposed to Mastodon's 64 bits. However, just like Mastodon's ids, they are lexically sortable strings
|
||||
Pleroma uses 128-bit ids as opposed to Mastodon's 64 bits. However, just like Mastodon's ids, they are lexically sortable strings
|
||||
|
||||
## Timelines
|
||||
|
||||
|
@ -54,11 +54,11 @@ Has these additional fields under the `pleroma` object:
|
|||
|
||||
### Attachment cap
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
### Limitations
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
## Accounts
|
||||
|
||||
|
@ -99,11 +99,13 @@ Has these additional fields under the `pleroma` object:
|
|||
- `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
|
||||
- `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`
|
||||
- `deactivated`: boolean, true when the user is deactivated
|
||||
- `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_notifications_count`: The count of unread notifications. Only returned to the account owner.
|
||||
- `notification_settings`: object, can be absent. See `/api/v1/pleroma/notification_settings` for the parameters/keys returned.
|
||||
- `accepts_chat_messages`: boolean, but can be null if we don't have that information about a user
|
||||
- `favicon`: nullable URL string, Favicon image of the user's instance
|
||||
|
||||
### Source
|
||||
|
@ -157,6 +159,15 @@ The `type` value is `pleroma:emoji_reaction`. Has these fields:
|
|||
- `account`: The account of the user who reacted
|
||||
- `status`: The status that was reacted on
|
||||
|
||||
### ChatMention Notification (not default)
|
||||
|
||||
This notification has to be requested explicitly.
|
||||
|
||||
The `type` value is `pleroma:chat_mention`
|
||||
|
||||
- `account`: The account who sent the message
|
||||
- `chat_message`: The chat message
|
||||
|
||||
### Report Notification (not default)
|
||||
|
||||
This notification has to be requested explicitly.
|
||||
|
@ -171,7 +182,7 @@ The `type` value is `pleroma:report`
|
|||
Accepts additional parameters:
|
||||
|
||||
- `exclude_visibilities`: will exclude the notifications for activities with the given visibilities. The parameter accepts an array of visibility types (`public`, `unlisted`, `private`, `direct`). Usage example: `GET /api/v1/notifications?exclude_visibilities[]=direct&exclude_visibilities[]=private`.
|
||||
- `include_types`: will include the notifications for activities with the given types. The parameter accepts an array of types (`mention`, `follow`, `reblog`, `favourite`, `move`, `pleroma:emoji_reaction`, `pleroma:report`). Usage example: `GET /api/v1/notifications?include_types[]=mention&include_types[]=reblog`.
|
||||
- `include_types`: will include the notifications for activities with the given types. The parameter accepts an array of types (`mention`, `follow`, `reblog`, `favourite`, `move`, `pleroma:emoji_reaction`, `pleroma:chat_mention`, `pleroma:report`). Usage example: `GET /api/v1/notifications?include_types[]=mention&include_types[]=reblog`.
|
||||
|
||||
## DELETE `/api/v1/notifications/destroy_multiple`
|
||||
|
||||
|
@ -229,13 +240,13 @@ Additional parameters can be added to the JSON body/Form data:
|
|||
- `pleroma_background_image` - sets the background image of the user. Can be set to "" (an empty string) to reset.
|
||||
- `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.
|
||||
- `language` - user's preferred language for receiving emails (digest, confirmation, etc.)
|
||||
- `accepts_chat_messages` - if false, this account will reject all chat messages.
|
||||
|
||||
All images (avatar, banner and background) can be reset to the default by sending an empty string ("") instead of a file.
|
||||
|
||||
### Akkoma Settings Store
|
||||
### Pleroma Settings Store
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
|
@ -243,7 +254,7 @@ This information is returned in the `/api/v1/accounts/verify_credentials` endpoi
|
|||
|
||||
## Authentication
|
||||
|
||||
*Akkoma supports refreshing tokens.*
|
||||
*Pleroma supports refreshing tokens.*
|
||||
|
||||
### POST `/oauth/token`
|
||||
|
||||
|
@ -266,14 +277,14 @@ To obtain a token from a user's password, pass `grant_type=password` with the fo
|
|||
|
||||
Additional fields are returned in the response:
|
||||
|
||||
- `id`: The primary key of this token in Akkoma's database.
|
||||
- `id`: The primary key of this token in Pleroma's database.
|
||||
- `me` (user tokens only): The ActivityPub ID of the user who owns the token.
|
||||
|
||||
## Account Registration
|
||||
|
||||
`POST /api/v1/accounts`
|
||||
|
||||
Has these additional parameters (which are the same as in Akkoma-API):
|
||||
Has these additional parameters (which are the same as in Pleroma-API):
|
||||
|
||||
- `fullname`: optional
|
||||
- `bio`: optional
|
||||
|
@ -281,13 +292,13 @@ Has these additional parameters (which are the same as in Akkoma-API):
|
|||
- `captcha_token`: optional, contains provider-specific captcha token
|
||||
- `captcha_answer_data`: optional, contains provider-specific captcha data
|
||||
- `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
|
||||
|
||||
`GET /api/v1/instance` has additional fields
|
||||
|
||||
- `max_toot_chars`: The maximum characters per post
|
||||
- `chat_limit`: The maximum characters per chat message
|
||||
- `description_limit`: The maximum characters per image description
|
||||
- `poll_limits`: The limits of polls
|
||||
- `upload_limit`: The maximum upload file size
|
||||
|
@ -308,6 +319,7 @@ Has these additional parameters (which are the same as in Akkoma-API):
|
|||
|
||||
Permits these additional alert types:
|
||||
|
||||
- pleroma:chat_mention
|
||||
- pleroma:emoji_reaction
|
||||
|
||||
## Markers
|
||||
|
@ -318,13 +330,17 @@ Has these additional fields under the `pleroma` object:
|
|||
|
||||
## Streaming
|
||||
|
||||
### Chats
|
||||
|
||||
There is an additional `user:pleroma_chat` stream. Incoming chat messages will make the current chat be sent to this `user` stream. The `event` of an incoming chat message is `pleroma:chat_update`. The payload is the updated chat with the incoming chat message in the `last_message` field.
|
||||
|
||||
### Remote timelines
|
||||
|
||||
For viewing remote server timelines, there are `public:remote` and `public:remote:media` streams. Each of these accept a parameter like `?instance=lain.com`.
|
||||
|
||||
### Follow relationships updates
|
||||
|
||||
Akkoma streams follow relationships updates as `pleroma:follow_relationships_update` events to the `user` stream.
|
||||
Pleroma streams follow relationships updates as `pleroma:follow_relationships_update` events to the `user` stream.
|
||||
|
||||
The message payload consist of:
|
||||
|
||||
|
@ -341,7 +357,7 @@ Both user muting and thread muting can be done for only a certain time by adding
|
|||
|
||||
## Not implemented
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
### Suggestions
|
||||
|
|
@ -44,8 +44,11 @@ See also [the Nodeinfo standard](https://nodeinfo.diaspora.software/).
|
|||
"shareable_emoji_packs",
|
||||
"multifetch",
|
||||
"pleroma:api/v1/notifications:include_types_filter",
|
||||
"chat",
|
||||
"shout",
|
||||
"relay",
|
||||
"pleroma_emoji_reactions"
|
||||
"pleroma_emoji_reactions",
|
||||
"pleroma_chat_messages"
|
||||
],
|
||||
"federation":{
|
||||
"enabled":true,
|
||||
|
@ -201,8 +204,11 @@ See also [the Nodeinfo standard](https://nodeinfo.diaspora.software/).
|
|||
"shareable_emoji_packs",
|
||||
"multifetch",
|
||||
"pleroma:api/v1/notifications:include_types_filter",
|
||||
"chat",
|
||||
"shout",
|
||||
"relay",
|
||||
"pleroma_emoji_reactions"
|
||||
"pleroma_emoji_reactions",
|
||||
"pleroma_chat_messages"
|
||||
],
|
||||
"federation":{
|
||||
"enabled":true,
|
||||
|
@ -324,8 +330,8 @@ See also [the Nodeinfo standard](https://nodeinfo.diaspora.software/).
|
|||
},
|
||||
"software":{
|
||||
"name":"pleroma",
|
||||
"repository":"https://akkoma.dev/AkkomaGang/akkoma",
|
||||
"version":"2.5.2"
|
||||
"repository":"https://git.pleroma.social/pleroma/pleroma",
|
||||
"version":"2.4.1"
|
||||
},
|
||||
"usage":{
|
||||
"localPosts":27,
|
|
@ -342,36 +342,6 @@ See [Admin-API](admin_api.md)
|
|||
* 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.
|
||||
|
||||
## `/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 have the same general structure that Mastodon Conversations have. The behavior differs in the following ways when using these endpoints:
|
||||
|
@ -576,6 +546,38 @@ The status posting endpoint takes an additional parameter, `in_reply_to_conversa
|
|||
* Response: the archive of the pack with a 200 status code, 403 if the pack is not set as shared,
|
||||
404 if the pack does not exist
|
||||
|
||||
## `GET /api/v1/pleroma/accounts/:id/scrobbles`
|
||||
### Requests a list of current and recent Listen activities for an account
|
||||
* Method `GET`
|
||||
* Authentication: not required
|
||||
* Params: None
|
||||
* Response: An array of media metadata entities.
|
||||
* Example response:
|
||||
```json
|
||||
[
|
||||
{
|
||||
"account": {...},
|
||||
"id": "1234",
|
||||
"title": "Some Title",
|
||||
"artist": "Some Artist",
|
||||
"album": "Some Album",
|
||||
"length": 180000,
|
||||
"created_at": "2019-09-28T12:40:45.000Z"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## `POST /api/v1/pleroma/scrobble`
|
||||
### Creates a new Listen activity for an account
|
||||
* Method `POST`
|
||||
* Authentication: required
|
||||
* Params:
|
||||
* `title`: the title of the media playing
|
||||
* `album`: the album of the media playing [optional]
|
||||
* `artist`: the artist of the media playing [optional]
|
||||
* `length`: the length of the media playing [optional]
|
||||
* Response: the newly created media metadata entity representing the Listen activity
|
||||
|
||||
# Emoji Reactions
|
||||
|
||||
Emoji reactions work a lot like favourites do. They make it possible to react to a post with a single emoji character. To detect the presence of this feature, you can check `pleroma_emoji_reactions` entry in the features list of nodeinfo.
|
|
@ -1,6 +1,6 @@
|
|||
# Prometheus Metrics
|
||||
|
||||
Akkoma includes support for exporting metrics via the [prometheus_ex](https://github.com/deadtrickster/prometheus.ex) library.
|
||||
Pleroma includes support for exporting metrics via the [prometheus_ex](https://github.com/deadtrickster/prometheus.ex) library.
|
||||
|
||||
Config example:
|
||||
|
||||
|
@ -13,8 +13,8 @@ config :prometheus, Pleroma.Web.Endpoint.MetricsExporter,
|
|||
format: :text
|
||||
```
|
||||
|
||||
* `enabled` (Akkoma extension) enables the endpoint
|
||||
* `ip_whitelist` (Akkoma extension) could be used to restrict access only to specified IPs
|
||||
* `enabled` (Pleroma extension) enables the endpoint
|
||||
* `ip_whitelist` (Pleroma 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)
|
||||
* `format` sets the output format (`:text` or `:protobuf`)
|
||||
* `path` sets the path to app metrics page
|
65
docs/development/ap_extensions.md
Normal file
65
docs/development/ap_extensions.md
Normal file
|
@ -0,0 +1,65 @@
|
|||
# AP Extensions
|
||||
## Actor endpoints
|
||||
|
||||
The following endpoints are additionally present into our actors.
|
||||
|
||||
- `oauthRegistrationEndpoint` (`http://litepub.social/ns#oauthRegistrationEndpoint`)
|
||||
- `uploadMedia` (`https://www.w3.org/ns/activitystreams#uploadMedia`)
|
||||
|
||||
### oauthRegistrationEndpoint
|
||||
|
||||
Points to MastodonAPI `/api/v1/apps` for now.
|
||||
|
||||
See <https://docs.joinmastodon.org/methods/apps/>
|
||||
|
||||
### uploadMedia
|
||||
|
||||
Inspired by <https://www.w3.org/wiki/SocialCG/ActivityPub/MediaUpload>, it is part of the ActivityStreams namespace because it used to be part of the ActivityPub specification and got removed from it.
|
||||
|
||||
Content-Type: multipart/form-data
|
||||
|
||||
Parameters:
|
||||
- (required) `file`: The file being uploaded
|
||||
- (optionnal) `description`: A plain-text description of the media, for accessibility purposes.
|
||||
|
||||
Response: HTTP 201 Created with the object into the body, no `Location` header provided as it doesn't have an `id`
|
||||
|
||||
The object given in the reponse should then be inserted into an Object's `attachment` field.
|
||||
|
||||
## ChatMessages
|
||||
|
||||
`ChatMessage`s are the messages sent in 1-on-1 chats. They are similar to
|
||||
`Note`s, but the addresing is done by having a single AP actor in the `to`
|
||||
field. Addressing multiple actors is not allowed. These messages are always
|
||||
private, there is no public version of them. They are created with a `Create`
|
||||
activity.
|
||||
|
||||
They are part of the `litepub` namespace as `http://litepub.social/ns#ChatMessage`.
|
||||
|
||||
Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"actor": "http://2hu.gensokyo/users/raymoo",
|
||||
"id": "http://2hu.gensokyo/objects/1",
|
||||
"object": {
|
||||
"attributedTo": "http://2hu.gensokyo/users/raymoo",
|
||||
"content": "You expected a cute girl? Too bad.",
|
||||
"id": "http://2hu.gensokyo/objects/2",
|
||||
"published": "2020-02-12T14:08:20Z",
|
||||
"to": [
|
||||
"http://2hu.gensokyo/users/marisa"
|
||||
],
|
||||
"type": "ChatMessage"
|
||||
},
|
||||
"published": "2018-02-12T14:08:20Z",
|
||||
"to": [
|
||||
"http://2hu.gensokyo/users/marisa"
|
||||
],
|
||||
"type": "Create"
|
||||
}
|
||||
```
|
||||
|
||||
This setup does not prevent multi-user chats, but these will have to go through
|
||||
a `Group`, which will be the recipient of the messages and then `Announce` them
|
||||
to the users in the `Group`.
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## OAuth token-based authentication & authorization
|
||||
|
||||
* 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/).
|
||||
* 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/).
|
||||
|
||||
* 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 Akkoma development environment
|
||||
# Setting up a Pleroma development environment
|
||||
|
||||
Akkoma requires some adjustments from the defaults for running the instance locally. The following should help you to get started.
|
||||
Pleroma requires some adjustments from the defaults for running the instance locally. The following should help you to get started.
|
||||
|
||||
## Installing
|
||||
|
||||
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 akkoma as a remote `git remote add akkoma 'https://akkoma.dev/AkkomaGang/akkoma.git'`
|
||||
1. Install Pleroma 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 skip systemd and nginx and all that stuff
|
||||
* No need to create a dedicated akkoma user, it's easier to just use your own user
|
||||
* No need to create a dedicated pleroma 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 domain you can use `localhost`
|
||||
* instead of creating a `prod.secret.exs`, create `dev.secret.exs`
|
||||
|
@ -36,44 +36,17 @@ config :logger, :console,
|
|||
level: :info
|
||||
```
|
||||
|
||||
## Testing with HTTPS
|
||||
|
||||
If you end up developing alongside other software like misskey,
|
||||
you will not be able to federate without an SSL certificate. You should
|
||||
be able to use the snakeoil certificate that comes standard with most
|
||||
distributions or generate one from scratch, then force elixir to accept it.
|
||||
|
||||
HTTP clients are none too keen to accept self-signed certs, but we can do
|
||||
this:
|
||||
|
||||
```elixir
|
||||
config :pleroma, :http,
|
||||
adapter: [
|
||||
pools: %{
|
||||
default: [
|
||||
conn_opts: [
|
||||
transport_opts: [
|
||||
verify: :verify_none
|
||||
]
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
Now your SSL requests will work. Hooray.
|
||||
|
||||
## Testing
|
||||
|
||||
1. Create a `test.secret.exs` file with the content as shown below
|
||||
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. '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 akkoma_local_test WITH CREATEDB;"`
|
||||
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.
|
||||
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;"`
|
||||
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.
|
||||
```elixir
|
||||
# Akkoma test configuration
|
||||
# Pleroma test configuration
|
||||
|
||||
# NOTE: This file should not be committed to a repo or otherwise made public
|
||||
# without removing sensitive information.
|
||||
|
@ -81,17 +54,17 @@ Example content for the `test.secret.exs` file. Feel free to use another user, d
|
|||
import Config
|
||||
|
||||
config :pleroma, Pleroma.Repo,
|
||||
username: "akkoma_local_test",
|
||||
username: "pleroma_local_test",
|
||||
password: "mysuperduperpassword",
|
||||
database: "akkoma_local_test",
|
||||
database: "pleroma_local_test",
|
||||
hostname: "localhost"
|
||||
|
||||
```
|
||||
|
||||
## Updating
|
||||
|
||||
Update Akkoma as explained in [the docs](../administration/updating.md). Just make sure you pull from upstream and not from your own fork.
|
||||
Update Pleroma 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
|
||||
|
||||
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).
|
||||
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).
|
|
@ -1,5 +0,0 @@
|
|||
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`"
|
||||
|
||||
The `mix` command should be prefixed with the name of environment your Akkoma server is running in, usually it's `MIX_ENV=prod`
|
|
@ -1,41 +0,0 @@
|
|||
# Backup/Restore/Move/Remove your instance
|
||||
|
||||
## Backup
|
||||
|
||||
1. Stop the Akkoma service.
|
||||
2. Go to the working directory of Akkoma (default is `/opt/akkoma`)
|
||||
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 `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 Akkoma service.
|
||||
|
||||
## Restore/Move
|
||||
|
||||
1. Optionally reinstall Akkoma (either on the same server or on another server if you want to move servers).
|
||||
2. Stop the Akkoma service.
|
||||
3. Go to the working directory of Akkoma (default is `/opt/akkoma`)
|
||||
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 <akkoma_db>;';` `sudo -Hu postgres psql -c 'DROP USER <akkoma_db>;'`
|
||||
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 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 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 Akkoma version, you should run `mix ecto.migrate`[^1]. This task performs database migrations, if there were any.
|
||||
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.
|
||||
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.
|
||||
|
||||
## Remove
|
||||
|
||||
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 also list local users and delete them individualy using the CLI tasks for [Managing users](./CLI_tasks/user.md).
|
||||
2. Stop the Akkoma service `systemctl stop akkoma`
|
||||
3. Disable akkoma from systemd `systemctl disable akkoma`
|
||||
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`
|
||||
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 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!
|
|
@ -1,63 +0,0 @@
|
|||
# Frontend Management
|
||||
|
||||
Frontends in Akkoma are swappable, you can pick which you'd like.
|
||||
|
||||
For a basic setup, 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.
|
||||
|
||||
If you don't set anything here, you will not have _any_ frontend at all.
|
||||
|
||||
Example:
|
||||
|
||||
```elixir
|
||||
config :pleroma, :frontends,
|
||||
primary: %{
|
||||
"name" => "pleroma-fe",
|
||||
"ref" => "stable"
|
||||
},
|
||||
admin: %{
|
||||
"name" => "admin-fe",
|
||||
"ref" => "stable"
|
||||
},
|
||||
mastodon: %{
|
||||
"name" => "mastodon-fe",
|
||||
"ref" => "akkoma"
|
||||
}
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
Refer to [the frontend CLI task](../../administration/CLI_tasks/frontend) for how to install the frontend's files
|
||||
|
||||
If you choose not to install a frontend for whatever reason, it is recommended that you enable [`:static_fe`](#static_fe) to allow remote users to click "view remote source". Don't bother with this if you've got no unauthenticated access though.
|
||||
|
||||
You can also replace the default "no frontend" page by placing an `index.html` file under your `instance/static/` directory.
|
||||
|
||||
## Mastodon-FE
|
||||
|
||||
Akkoma supports both [glitchsoc](https://github.com/glitch-soc/mastodon)'s more "vanilla" mastodon frontend,
|
||||
as well as [fedibird](https://github.com/fedibird/mastodon)'s extended frontend which has near-feature-parity with akkoma (with quoting and reactions).
|
||||
|
||||
To enable either one, you must run the `frontend.install` task for either `mastodon-fe` or `fedibird-fe` (both `--ref akkoma`), then make sure
|
||||
`:pleroma, :frontends, :mastodon` references the one you want.
|
||||
|
||||
## Swagger (openAPI) documentation viewer
|
||||
|
||||
If you're a developer and you'd like a human-readable rendering of the
|
||||
API documentation, you can enable [Swagger UI](https://github.com/swagger-api/swagger-ui).
|
||||
|
||||
In your config:
|
||||
|
||||
```elixir
|
||||
config :pleroma, :frontends,
|
||||
swagger: %{
|
||||
"name" => "swagger-ui",
|
||||
"ref" => "stable",
|
||||
"enabled" => true
|
||||
}
|
||||
```
|
||||
|
||||
Then run the [pleroma.frontend cli task](../../administration/CLI_tasks/frontend) with the name of `swagger-ui` to install the distribution files.
|
||||
|
||||
You will now be able to view documentation at `/akkoma/swaggerui`
|
|
@ -1,62 +0,0 @@
|
|||
# How to use a different domain name for Akkoma and the users it serves
|
||||
|
||||
Akkoma users are primarily identified by a `user@example.org` handle, and you might want this identifier to be the same as your email or jabber account, for instance.
|
||||
However, in this case, you are almost certainly serving some web content on `https://example.org` already, and you might want to use another domain (say `akkoma.example.org`) for Akkoma itself.
|
||||
|
||||
Akkoma supports that, but it might be tricky to set up, and any error might prevent you from federating with other instances.
|
||||
|
||||
*If you are already running Akkoma on `example.org`, it is no longer possible to move it to `akkoma.example.org`.*
|
||||
|
||||
## Account identifiers
|
||||
|
||||
It is important to understand that for federation purposes, a user in Akkoma has two unique identifiers associated:
|
||||
|
||||
- A webfinger `acct:` URI, used for discovery and as a verifiable global name for the user across Akkoma instances. In our example, our account's acct: URI is `acct:user@example.org`
|
||||
- An author/actor URI, used in every other aspect of federation. This is the way in which users are identified in ActivityPub, the underlying protocol used for federation with other Akkoma instances.
|
||||
In our case, it is `https://akkoma.example.org/users/user`.
|
||||
|
||||
Both account identifiers are unique and required for Akkoma. An important risk if you set up your Akkoma instance incorrectly is to create two users (with different acct: URIs) with conflicting author/actor URIs.
|
||||
|
||||
## WebFinger
|
||||
|
||||
As said earlier, each Akkoma user has an `acct`: URI, which is used for discovery and authentication. When you add @user@example.org, a webfinger query is performed. This is done in two steps:
|
||||
|
||||
1. Querying `https://example.org/.well-known/host-meta` (where the domain of the URL matches the domain part of the `acct`: URI) to get information on how to perform the query.
|
||||
This file will indeed contain a URL template of the form `https://example.org/.well-known/webfinger?resource={uri}` that will be used in the second step.
|
||||
2. Fill the returned template with the `acct`: URI to be queried and perform the query: `https://example.org/.well-known/webfinger?resource=acct:user@example.org`
|
||||
|
||||
## Configuring your Akkoma instance
|
||||
|
||||
**_DO NOT ATTEMPT TO CONFIGURE YOUR INSTANCE THIS WAY IF YOU DID NOT UNDERSTAND THE ABOVE_**
|
||||
|
||||
### Configuring Akkoma
|
||||
|
||||
Akkoma has a two configuration settings to enable using different domains for your users and Akkoma itself. `host` in `Pleroma.Web.Endpoint` and `domain` in `Pleroma.Web.WebFinger`. When the latter is not set, it defaults to the value of `host`.
|
||||
|
||||
*Be extra careful when configuring your Akkoma instance, as changing `host` may cause remote instances to register different accounts with the same author/actor URI, which will result in federation issues!*
|
||||
|
||||
```elixir
|
||||
config :pleroma, Pleroma.Web.Endpoint,
|
||||
url: [host: "pleroma.example.org"]
|
||||
|
||||
config :pleroma, Pleroma.Web.WebFinger, domain: "example.org"
|
||||
```
|
||||
|
||||
- `domain` - is the domain for which your Akkoma instance has authority, it's the domain used in `acct:` URI. In our example, `domain` would be set to `example.org`.
|
||||
- `host` - is the domain used for any URL generated for your instance, including the author/actor URL's. In our case, that would be `akkoma.example.org`.
|
||||
|
||||
### Configuring WebFinger domain
|
||||
|
||||
Now, you have Akkoma running at `https://akkoma.example.org` as well as a website at `https://example.org`. If you recall how webfinger queries work, the first step is to query `https://example.org/.well-known/host-meta`, which will contain an URL template.
|
||||
|
||||
Therefore, the easiest way to configure `example.org` is to redirect `/.well-known/host-meta` to `akkoma.example.org`.
|
||||
|
||||
With nginx, it would be as simple as adding:
|
||||
|
||||
```nginx
|
||||
location = /.well-known/host-meta {
|
||||
return 301 https://akkoma.example.org$request_uri;
|
||||
}
|
||||
```
|
||||
|
||||
in example.org's server block.
|
|
@ -1,165 +0,0 @@
|
|||
# Configuring search
|
||||
|
||||
{! 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,28 +0,0 @@
|
|||
# AP Extensions
|
||||
## Actor endpoints
|
||||
|
||||
The following endpoints are additionally present into our actors.
|
||||
|
||||
- `oauthRegistrationEndpoint` (`http://litepub.social/ns#oauthRegistrationEndpoint`)
|
||||
- `uploadMedia` (`https://www.w3.org/ns/activitystreams#uploadMedia`)
|
||||
|
||||
### oauthRegistrationEndpoint
|
||||
|
||||
Points to MastodonAPI `/api/v1/apps` for now.
|
||||
|
||||
See <https://docs.joinmastodon.org/methods/apps/>
|
||||
|
||||
### uploadMedia
|
||||
|
||||
Inspired by <https://www.w3.org/wiki/SocialCG/ActivityPub/MediaUpload>, it is part of the ActivityStreams namespace because it used to be part of the ActivityPub specification and got removed from it.
|
||||
|
||||
Content-Type: multipart/form-data
|
||||
|
||||
Parameters:
|
||||
- (required) `file`: The file being uploaded
|
||||
- (optionnal) `description`: A plain-text description of the media, for accessibility purposes.
|
||||
|
||||
Response: HTTP 201 Created with the object into the body, no `Location` header provided as it doesn't have an `id`
|
||||
|
||||
The object given in the reponse should then be inserted into an Object's `attachment` field.
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
|
@ -1,28 +0,0 @@
|
|||
**Note:** Akkoma documentation is still being updated, so you may still see references to Pleroma in many places.
|
||||
|
||||
# Introduction to Akkoma
|
||||
## 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.
|
||||
One account on an instance is enough to talk to the entire fediverse!
|
||||
|
||||
## How can I use it?
|
||||
|
||||
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!
|
||||
Installation instructions can be found in the installation section of these docs.
|
||||
|
||||
## I got an account, now what?
|
||||
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
|
||||
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](https://docs-fe.akkoma.dev/stable/).
|
||||
|
||||
### Mastodon interface
|
||||
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 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.
|
||||
|
||||
Remember, what you see is only the frontend part of Mastodon, the backend is still Akkoma.
|
|
@ -1,228 +0,0 @@
|
|||
# Installing on Alpine Linux
|
||||
|
||||
{! installation/otp_vs_from_source_source.include !}
|
||||
|
||||
## Installation
|
||||
|
||||
This guide is a step-by-step installation guide for Alpine Linux. The instructions were verified against Alpine v3.16 standard image. You might miss additional dependencies if you use `netboot` instead.
|
||||
|
||||
As of Alpine Linux v3.16, `doas` is the preferred way of running privileged commands, which is what this guide will use.
|
||||
If you are running an earlier version, replace `doas` with `sudo` (and use `sudo -Hu akkoma` instead of `doas -u akkoma`).
|
||||
If you want to run this guide with root, ignore the `doas` at the beginning of the lines, unless it calls a user like `doas -u akkoma`; in this case, use `su -l <username> -s $SHELL -c 'command'` instead.
|
||||
|
||||
{! installation/generic_dependencies.include !}
|
||||
|
||||
### Prepare the system
|
||||
|
||||
* The community repository must be enabled in `/etc/apk/repositories`. Depending on which version and mirror you use this looks like `https://dl-5.alpinelinux.org/alpine/v3.16/community`. If you autogenerated the mirror during installation:
|
||||
|
||||
```shell
|
||||
awk 'NR==2' /etc/apk/repositories | sed 's/main/community/' | tee -a /etc/apk/repositories
|
||||
```
|
||||
|
||||
* Then update the system, if not already done:
|
||||
|
||||
```shell
|
||||
doas apk update
|
||||
doas apk upgrade
|
||||
```
|
||||
|
||||
* Install some tools, which are needed later:
|
||||
|
||||
```shell
|
||||
doas apk add git build-base cmake file-dev
|
||||
```
|
||||
|
||||
### Install Elixir and Erlang
|
||||
|
||||
* Install Erlang and Elixir:
|
||||
|
||||
```shell
|
||||
doas apk add erlang elixir
|
||||
```
|
||||
|
||||
* Install `erlang-eldap` if you want to enable ldap authenticator
|
||||
|
||||
```shell
|
||||
doas apk add erlang-eldap
|
||||
```
|
||||
|
||||
### Install PostgreSQL
|
||||
|
||||
* Install Postgresql server:
|
||||
|
||||
```shell
|
||||
doas apk add postgresql postgresql-contrib
|
||||
```
|
||||
|
||||
* Initialize database:
|
||||
|
||||
```shell
|
||||
doas rc-service postgresql start
|
||||
```
|
||||
|
||||
* Enable and start postgresql server:
|
||||
|
||||
```shell
|
||||
doas rc-update add postgresql
|
||||
```
|
||||
|
||||
### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md))
|
||||
|
||||
```shell
|
||||
doas apk add ffmpeg imagemagick exiftool
|
||||
```
|
||||
|
||||
### Install AkkomaBE
|
||||
|
||||
* Add a new system user for the Akkoma service:
|
||||
|
||||
```shell
|
||||
doas addgroup akkoma
|
||||
doas adduser -S -s /bin/false -h /opt/akkoma -H -G akkoma akkoma
|
||||
```
|
||||
|
||||
**Note**: To execute a single command as the Akkoma system user, use `doas -u akkoma command`. You can also switch to a shell by using `doas -su akkoma`. If you don’t have and want `doas` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
||||
|
||||
* Git clone the AkkomaBE repository and make the Akkoma user the owner of the directory:
|
||||
|
||||
```shell
|
||||
doas mkdir -p /opt/akkoma
|
||||
doas chown -R akkoma:akkoma /opt/akkoma
|
||||
doas -u akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git /opt/akkoma
|
||||
```
|
||||
|
||||
* Change to the new directory:
|
||||
|
||||
```shell
|
||||
cd /opt/akkoma
|
||||
```
|
||||
|
||||
* Install the dependencies for Akkoma and answer with `yes` if it asks you to install `Hex`:
|
||||
|
||||
```shell
|
||||
doas -u akkoma mix deps.get
|
||||
```
|
||||
|
||||
* Generate the configuration: `doas -u akkoma env MIX_ENV=prod mix pleroma.instance gen`
|
||||
* Answer with `yes` if it asks you to install `rebar3`.
|
||||
* 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`.
|
||||
|
||||
* 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
|
||||
doas -u 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:
|
||||
|
||||
```shell
|
||||
doas -u postgres psql -f config/setup_db.psql
|
||||
```
|
||||
|
||||
* Now run the database migration:
|
||||
|
||||
```shell
|
||||
doas -u akkoma env MIX_ENV=prod mix ecto.migrate
|
||||
```
|
||||
|
||||
* Now you can start Akkoma already
|
||||
|
||||
```shell
|
||||
doas -u akkoma env MIX_ENV=prod mix phx.server
|
||||
```
|
||||
|
||||
### 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 Akkoma and you should consider to create an OpenRC service file for Akkoma.
|
||||
|
||||
#### Nginx
|
||||
|
||||
* Install nginx, if not already done:
|
||||
|
||||
```shell
|
||||
doas apk add nginx
|
||||
```
|
||||
|
||||
* Setup your SSL cert, using your method of choice or certbot. If using certbot, first install it:
|
||||
|
||||
```shell
|
||||
doas apk add certbot
|
||||
```
|
||||
|
||||
and then set it up:
|
||||
|
||||
```shell
|
||||
doas mkdir -p /var/lib/letsencrypt/
|
||||
doas certbot certonly --email <your@emailaddress> -d <yourdomain> --standalone
|
||||
```
|
||||
|
||||
If that doesn’t work, make sure, that nginx is not already running. If it still doesn’t work, try setting up nginx first (change ssl “on” to “off” and try again).
|
||||
|
||||
* Copy the example nginx configuration to the nginx folder
|
||||
|
||||
```shell
|
||||
doas 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).
|
||||
|
||||
```
|
||||
server {
|
||||
server_name your.domain;
|
||||
listen 80;
|
||||
...
|
||||
}
|
||||
|
||||
server {
|
||||
server_name your.domain;
|
||||
listen 443 ssl http2;
|
||||
...
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/your.domain/chain.pem;
|
||||
ssl_certificate /etc/letsencrypt/live/your.domain/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/your.domain/privkey.pem;
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
* Enable and start nginx:
|
||||
|
||||
```shell
|
||||
doas rc-update add nginx
|
||||
doas rc-service nginx start
|
||||
```
|
||||
|
||||
If you need to renew the certificate in the future, uncomment the relevant location block in the nginx config and run:
|
||||
|
||||
```shell
|
||||
doas certbot certonly --email <your@emailaddress> -d <yourdomain> --webroot -w /var/lib/letsencrypt/
|
||||
```
|
||||
|
||||
#### OpenRC service
|
||||
|
||||
* Copy example service file:
|
||||
|
||||
```shell
|
||||
doas cp /opt/akkoma/installation/init.d/akkoma /etc/init.d/akkoma
|
||||
```
|
||||
|
||||
* Make sure to start it during the boot
|
||||
|
||||
```shell
|
||||
doas rc-update add akkoma
|
||||
```
|
||||
|
||||
#### Create your first user
|
||||
|
||||
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
||||
|
||||
```shell
|
||||
doas -u akkoma env MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||
```
|
||||
|
||||
#### Further reading
|
||||
|
||||
{! installation/further_reading.include !}
|
||||
|
||||
{! support.include !}
|
|
@ -1,206 +0,0 @@
|
|||
# Installing on Fedora
|
||||
|
||||
## OTP releases and RedHat-distributions
|
||||
|
||||
While the OTP releases of Akkoma work on most Linux distributions, they do not work correctly with RedHat-distributions. Therefore from-source installations are the recommended way to go when trying to install Akkoma on Fedora, Centos Stream or RedHat.
|
||||
|
||||
However, it is possible to compile your own OTP release of Akkoma for RedHat. Keep in mind that this has a few drawbacks, and has no particular advantage over a from-source installation, since you'll need to install Erlang and Elixir anyway.
|
||||
|
||||
This guide will cover a from-source installation. For instructions on how to build your own OTP release, please check out [the OTP for RedHat guide](./otp_redhat_en.md).
|
||||
|
||||
## Installation
|
||||
|
||||
This guide will assume you are on Fedora 36. This guide should also work with current releases of Centos Stream and RedHat, although it has not been tested yet. It also assumes that you have administrative rights, either as root or a user with [sudo permissions](https://docs.fedoraproject.org/en-US/quick-docs/adding_user_to_sudoers_file/). 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.
|
||||
|
||||
{! installation/generic_dependencies.include !}
|
||||
|
||||
### Prepare the system
|
||||
|
||||
* First update the system, if not already done:
|
||||
|
||||
```shell
|
||||
sudo dnf upgrade --refresh
|
||||
```
|
||||
|
||||
* Install some of the above mentioned programs:
|
||||
|
||||
```shell
|
||||
sudo dnf install git gcc g++ make cmake file-devel postgresql-server postgresql-contrib
|
||||
```
|
||||
|
||||
* Enable and initialize Postgres:
|
||||
```shell
|
||||
sudo systemctl enable postgresql.service
|
||||
sudo postgresql-setup --initdb --unit postgresql
|
||||
# Allow password auth for postgres
|
||||
sudo sed -E -i 's|(host +all +all +127.0.0.1/32 +)ident|\1md5|' /var/lib/pgsql/data/pg_hba.conf
|
||||
sudo systemctl start postgresql.service
|
||||
```
|
||||
|
||||
### Install Elixir and Erlang
|
||||
|
||||
* Install Elixir and Erlang:
|
||||
|
||||
```shell
|
||||
sudo dnf install elixir erlang-os_mon erlang-eldap erlang-xmerl erlang-erl_interface erlang-syntax_tools
|
||||
```
|
||||
|
||||
|
||||
### Optional packages: [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md)
|
||||
|
||||
* Install ffmpeg (requires setting up the RPM-fusion repositories):
|
||||
|
||||
```shell
|
||||
sudo dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
||||
sudo dnf -y install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
||||
sudo dnf install ffmpeg
|
||||
```
|
||||
|
||||
* Install ImageMagick and ExifTool for image manipulation:
|
||||
|
||||
```shell
|
||||
sudo dnf install Imagemagick perl-Image-ExifTool
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Install AkkomaBE
|
||||
|
||||
* Add a new system user for the Akkoma service:
|
||||
|
||||
```shell
|
||||
sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
||||
```
|
||||
|
||||
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
||||
|
||||
* Git clone the AkkomaBE repository and make the Akkoma user the owner of the directory:
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /opt/akkoma
|
||||
sudo chown -R akkoma:akkoma /opt/akkoma
|
||||
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git /opt/akkoma
|
||||
```
|
||||
|
||||
* Change to the new directory:
|
||||
|
||||
```shell
|
||||
cd /opt/akkoma
|
||||
```
|
||||
|
||||
* Install the dependencies for Akkoma and answer with `yes` if it asks you to install `Hex`:
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma mix deps.get
|
||||
```
|
||||
|
||||
* Generate the configuration: `sudo -Hu akkoma MIX_ENV=prod mix pleroma.instance gen`
|
||||
* Answer with `yes` if it asks you to install `rebar3`.
|
||||
* 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`.
|
||||
|
||||
* 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
|
||||
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:
|
||||
|
||||
```shell
|
||||
sudo -Hu postgres psql -f config/setup_db.psql
|
||||
```
|
||||
|
||||
* Now run the database migration:
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma MIX_ENV=prod mix ecto.migrate
|
||||
```
|
||||
|
||||
* Now you can start Akkoma already
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma MIX_ENV=prod mix phx.server
|
||||
```
|
||||
|
||||
### 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 Akkoma and you should consider to create a systemd service file for Akkoma.
|
||||
|
||||
#### Nginx
|
||||
|
||||
* Install nginx, if not already done:
|
||||
|
||||
```shell
|
||||
sudo dnf install nginx
|
||||
```
|
||||
|
||||
* Setup your SSL cert, using your method of choice or certbot. If using certbot, first install it:
|
||||
|
||||
```shell
|
||||
sudo dnf install certbot
|
||||
```
|
||||
|
||||
and then set it up:
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /var/lib/letsencrypt/
|
||||
sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --standalone
|
||||
```
|
||||
|
||||
If that doesn’t work, make sure, that nginx is not already running. If it still doesn’t work, try setting up nginx first (change ssl “on” to “off” and try again).
|
||||
|
||||
---
|
||||
|
||||
* Copy the example nginx configuration and activate it:
|
||||
|
||||
```shell
|
||||
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 (e.g. change servername, change cert paths)
|
||||
* Enable and start nginx:
|
||||
|
||||
```shell
|
||||
sudo systemctl enable --now nginx.service
|
||||
```
|
||||
|
||||
If you need to renew the certificate in the future, uncomment the relevant location block in the nginx config and run:
|
||||
|
||||
```shell
|
||||
sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --webroot -w /var/lib/letsencrypt/
|
||||
```
|
||||
|
||||
#### Other webserver/proxies
|
||||
|
||||
You can find example configurations for them in `/opt/akkoma/installation/`.
|
||||
|
||||
#### Systemd service
|
||||
|
||||
* Copy example service file
|
||||
|
||||
```shell
|
||||
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
|
||||
* Enable and start `akkoma.service`:
|
||||
|
||||
```shell
|
||||
sudo systemctl enable --now akkoma.service
|
||||
```
|
||||
|
||||
#### Create your first user
|
||||
|
||||
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||
```
|
||||
|
||||
#### Further reading
|
||||
|
||||
{! installation/further_reading.include !}
|
||||
|
||||
{! support.include !}
|
|
@ -1,87 +0,0 @@
|
|||
# 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
|
||||
# or, if you're on an instance-specific branch, you may want
|
||||
# to run "git merge stable" instead (or develop if you want)
|
||||
```
|
||||
|
||||
Then compile, migrate and restart as usual.
|
||||
|
||||
## From OTP
|
||||
|
||||
This will just be setting the update URL - find your flavour from the [mapping on the install guide](../otp_en/#detecting-flavour) first.
|
||||
|
||||
```bash
|
||||
export FLAVOUR=[the flavour you found above]
|
||||
|
||||
./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 couple of commands,
|
||||
|
||||
```bash
|
||||
# From source
|
||||
mix pleroma.frontend install pleroma-fe
|
||||
# you'll probably want this too
|
||||
mix pleroma.frontend install admin-fe
|
||||
|
||||
# OTP
|
||||
./bin/pleroma_ctl frontend install pleroma-fe
|
||||
# you'll probably want this too
|
||||
./bin/pleroma_ctl frontend install admin-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.
|
|
@ -1,285 +0,0 @@
|
|||
# Installing on RedHat using OTP releases
|
||||
|
||||
## OTP releases and Fedora/RedHat
|
||||
|
||||
The current OTP builds available for Linux are unfortunately incompatible with RedHat Linux distributions, like Fedora and Centos Stream. This is due to RedHat maintaining patched versions of certain Erlang libraries, making them incompatible with other Linux distributions.
|
||||
|
||||
However, you may compile your own OTP release from scratch. This is particularly useful if you wish to quickly distribute your OTP build onto multiple systems, without having to worry about compiling code on every system. However, if your goal is to simply set up a single instance for yourself, installing from-source might be a simpler option. To install from-source, please follow [this guide](./fedora_based_en.md).
|
||||
|
||||
|
||||
## Pre-requisites
|
||||
|
||||
In order to compile a RedHat-compatible OTP release, you will need to run a RedHat Linux distribution. This guide will assume you run Fedora 36, though it should also work on older Fedora releases and other RedHat distributions. It also assumes that you have administrative rights and sufficient knowledge on how to perform common CLI tasks in Linux. If you want to run this guide with root, ignore the `sudo` at the beginning of the lines.
|
||||
|
||||
Important: keep in mind that you must build your OTP release for the specific RedHat distribution you wish to use it on. A build on Fedora will only be compatible with a specific Fedora release version.
|
||||
|
||||
|
||||
## Building an OTP release for Fedora 36
|
||||
|
||||
### Installing required packages
|
||||
|
||||
* First, update your system, if not already done:
|
||||
|
||||
```shell
|
||||
sudo dnf upgrade --refresh
|
||||
```
|
||||
|
||||
* Then install the required packages to build your OTP release:
|
||||
|
||||
```shell
|
||||
sudo dnf install git gcc g++ erlang elixir erlang-os_mon erlang-eldap erlang-xmerl erlang-erl_interface erlang-syntax_tools make cmake file-devel
|
||||
```
|
||||
|
||||
|
||||
### Preparing the project files
|
||||
|
||||
* Git clone the AkkomaBE repository. This can be done anywhere:
|
||||
|
||||
```shell
|
||||
cd ~
|
||||
git clone https://akkoma.dev/AkkomaGang/akkoma.git
|
||||
```
|
||||
|
||||
* Change to the new directory:
|
||||
|
||||
```shell
|
||||
cd ./akkoma
|
||||
```
|
||||
|
||||
|
||||
### Building the OTP release
|
||||
|
||||
* Run the following commands:
|
||||
|
||||
```shell
|
||||
export MIX_ENV=prod
|
||||
echo "import Config" > config/prod.secret.exs
|
||||
mix local.hex --force
|
||||
mix local.rebar --force
|
||||
mix deps.get --only prod
|
||||
mkdir release
|
||||
mix release --path release
|
||||
```
|
||||
|
||||
Note that compiling the OTP release will take some time. Once it completes, you will find the OTP files in the directory `release`.
|
||||
|
||||
If all went well, you will have built your very own Fedora-compatible OTP release! You can now pack up the files in the `release` directory and deploy them to your other Fedora servers.
|
||||
|
||||
|
||||
## Installing the OTP release
|
||||
|
||||
Installing the OTP release from this point onward will be very similar to the regular OTP release. This guide assumes you will want to install your OTP package on other systems, so additional pre-requisites will be listed below.
|
||||
|
||||
Please note that running your own OTP release has some minor caveats that you should be aware of. They will be listed below as well.
|
||||
|
||||
|
||||
### Installing required packages
|
||||
|
||||
Other than things bundled in the OTP release Akkoma depends on:
|
||||
|
||||
* curl (to download the release build)
|
||||
* ncurses (ERTS won't run without it)
|
||||
* PostgreSQL (also utilizes extensions in postgresql-contrib)
|
||||
* nginx (could be swapped with another reverse proxy but this guide covers only it)
|
||||
* certbot (for Let's Encrypt certificates, could be swapped with another ACME client, but this guide covers only it)
|
||||
* libmagic/file
|
||||
|
||||
First, update your system, if not already done:
|
||||
|
||||
```shell
|
||||
sudo dnf upgrade --refresh
|
||||
```
|
||||
|
||||
Then install the required packages:
|
||||
|
||||
```shell
|
||||
sudo dnf install curl ncurses postgresql postgresql-contrib nginx certbot file-devel
|
||||
```
|
||||
|
||||
|
||||
### Optional packages: [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md)
|
||||
|
||||
* Install ffmpeg (requires setting up the RPM-fusion repositories):
|
||||
|
||||
```shell
|
||||
sudo dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
||||
sudo dnf -y install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
||||
sudo dnf install ffmpeg
|
||||
```
|
||||
|
||||
* Install ImageMagick and ExifTool for image manipulation:
|
||||
|
||||
```shell
|
||||
sudo dnf install Imagemagick perl-Image-ExifTool
|
||||
```
|
||||
|
||||
|
||||
### Configuring PostgreSQL
|
||||
#### (Optional) Performance configuration
|
||||
It is encouraged to check [Optimizing your PostgreSQL performance](../configuration/postgresql.md) document, for tips on PostgreSQL tuning.
|
||||
|
||||
Restart PostgreSQL to apply configuration changes:
|
||||
|
||||
```shell
|
||||
sudo systemctl restart postgresql
|
||||
```
|
||||
|
||||
### Installing Akkoma
|
||||
```sh
|
||||
# Create a Akkoma user
|
||||
adduser --system --shell /bin/false --home /opt/akkoma akkoma
|
||||
|
||||
# Move your custom OTP release to the home directory
|
||||
sudo -Hu akkoma mv /your/custom/otp/release /opt/akkoma
|
||||
|
||||
# Create uploads directory and set proper permissions (skip if planning to use a remote uploader)
|
||||
# Note: It does not have to be `/var/lib/akkoma/uploads`, the config generator will ask about the upload directory later
|
||||
|
||||
sudo mkdir -p /var/lib/akkoma/uploads
|
||||
sudo chown -R akkoma /var/lib/akkoma
|
||||
|
||||
# Create custom public files directory (custom emojis, frontend bundle overrides, robots.txt, etc.)
|
||||
# Note: It does not have to be `/var/lib/akkoma/static`, the config generator will ask about the custom public files directory later
|
||||
sudo mkdir -p /var/lib/akkoma/static
|
||||
sudo chown -R akkoma /var/lib/akkoma
|
||||
|
||||
# Create a config directory
|
||||
sudo mkdir -p /etc/akkoma
|
||||
sudo chown -R akkoma /etc/akkoma
|
||||
|
||||
# Run the config generator
|
||||
sudo -Hu akkoma ./bin/pleroma_ctl instance gen --output /etc/akkoma/config.exs --output-psql /tmp/setup_db.psql
|
||||
|
||||
# Create the postgres database
|
||||
sudo -Hu postgres psql -f /tmp/setup_db.psql
|
||||
|
||||
# Create the database schema
|
||||
sudo -Hu akkoma ./bin/pleroma_ctl migrate
|
||||
|
||||
# Start the instance to verify that everything is working as expected
|
||||
sudo -Hu akkoma ./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
|
||||
sleep 20 && curl http://localhost:4000/api/v1/instance
|
||||
|
||||
# Stop the instance
|
||||
sudo -Hu akkoma ./bin/pleroma stop
|
||||
```
|
||||
|
||||
|
||||
### Setting up nginx and getting Let's Encrypt SSL certificaties
|
||||
|
||||
#### Get a Let's Encrypt certificate
|
||||
|
||||
```shell
|
||||
certbot certonly --standalone --preferred-challenges http -d yourinstance.tld
|
||||
```
|
||||
|
||||
#### Copy Akkoma nginx configuration to the nginx folder
|
||||
|
||||
```shell
|
||||
cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/conf.d/akkoma.conf
|
||||
```
|
||||
|
||||
#### Edit the nginx config
|
||||
```shell
|
||||
# Replace example.tld with your (sub)domain (replace $EDITOR with your editor of choice)
|
||||
sudo $EDITOR /etc/nginx/conf.d/akkoma.conf
|
||||
|
||||
# Verify that the config is valid
|
||||
sudo nginx -t
|
||||
```
|
||||
#### Start nginx
|
||||
|
||||
```shell
|
||||
sudo systemctl start nginx
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
```shell
|
||||
# Copy the service into a proper directory
|
||||
cp /opt/akkoma/installation/akkoma.service /etc/systemd/system/akkoma.service
|
||||
|
||||
# Edit the service file and make any neccesary changes
|
||||
sudo $EDITOR /etc/systemd/system/akkoma.service
|
||||
|
||||
# If you use SELinux, set the correct file context on the pleroma binary
|
||||
sudo semanage fcontext -a -t init_t /opt/akkoma/bin/pleroma
|
||||
sudo restorecon -v /opt/akkoma/bin/pleroma
|
||||
|
||||
# Start akkoma and enable it on boot
|
||||
sudo systemctl start akkoma
|
||||
sudo systemctl enable akkoma
|
||||
```
|
||||
|
||||
If everything worked, you should see a response from Akkoma-BE when visiting your domain. You may need to install frontends like Akkoma-FE and Admin-FE; refer to [this guide](../administration/CLI_tasks/frontend.md) on how to install them.
|
||||
|
||||
If that didn't happen, try reviewing the installation steps, starting Akkoma in the foreground and seeing if there are any errrors.
|
||||
|
||||
{! support.include !}
|
||||
|
||||
## Post installation
|
||||
|
||||
### Setting up auto-renew of the Let's Encrypt certificate
|
||||
|
||||
```shell
|
||||
# Create the directory for webroot challenges
|
||||
sudo mkdir -p /var/lib/letsencrypt
|
||||
|
||||
# Uncomment the webroot method
|
||||
sudo $EDITOR /etc/nginx/conf.d/akkoma.conf
|
||||
|
||||
# Verify that the config is valid
|
||||
sudo nginx -t
|
||||
|
||||
# Restart nginx
|
||||
sudo systemctl restart nginx
|
||||
|
||||
# Ensure the webroot menthod and post hook is working
|
||||
sudo certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook 'systemctl reload nginx'
|
||||
|
||||
# Add it to the daily cron
|
||||
echo '#!/bin/sh
|
||||
certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --post-hook "systemctl reload nginx"
|
||||
' > /etc/cron.daily/renew-akkoma-cert
|
||||
sudo chmod +x /etc/cron.daily/renew-akkoma-cert
|
||||
|
||||
# If everything worked the output should contain /etc/cron.daily/renew-akkoma-cert
|
||||
sudo run-parts --test /etc/cron.daily
|
||||
```
|
||||
|
||||
|
||||
## Create your first user and set as admin
|
||||
```shell
|
||||
cd /opt/akkoma
|
||||
sudo -Hu akkoma ./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.
|
||||
|
||||
## Further reading
|
||||
|
||||
### Caveats of building your own OTP release
|
||||
|
||||
There are some things to take note of when your are running your own OTP builds.
|
||||
|
||||
#### Updating your OTP builds
|
||||
|
||||
Using your custom OTP build, you will not be able to update the installation using the `pleroma_ctl update` command. Running this command would overwrite your install with an OTP release from the main Akkoma repository, which will break your install.
|
||||
|
||||
Instead, you will have to rebuild your OTP release every time there are updates, then manually move it to where your Akkoma installation is running, overwriting the old OTP release files. Make sure to stop the Akkoma-BE server before overwriting any files!
|
||||
|
||||
After that, run the `pleroma_ctl migrate` command as usual to perform database migrations.
|
||||
|
||||
|
||||
#### Cross-compatibility between RedHat distributions
|
||||
|
||||
As it currently stands, your OTP build will only be compatible for the specific RedHat distribution you've built it on. Fedora builds only work on Fedora, Centos builds only on Centos, RedHat builds only on RedHat. Secondly, for Fedora, they will also be bound to the specific Fedora release. This is because different releases of Fedora may have significant changes made in some of the required packages and libraries.
|
||||
|
||||
|
||||
{! installation/further_reading.include !}
|
||||
|
||||
{! support.include !}
|
|
@ -1,3 +0,0 @@
|
|||
## OTP releases vs from-source installations
|
||||
|
||||
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,5 +0,0 @@
|
|||
## Support
|
||||
|
||||
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||
|
||||
Or message via IRC on #akkoma at irc.akkoma.dev (port 6697, SSL)
|
26
docs/index.md
Normal file
26
docs/index.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Introduction to Pleroma
|
||||
## 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.
|
||||
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.
|
||||
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!
|
||||
|
||||
## 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>.
|
||||
|
||||
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.
|
||||
|
||||
## 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)
|
||||
|
||||
### 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).
|
||||
|
||||
### 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!
|
||||
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!
|
||||
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.
|
228
docs/installation/alpine_linux_en.md
Normal file
228
docs/installation/alpine_linux_en.md
Normal file
|
@ -0,0 +1,228 @@
|
|||
# Installing on Alpine Linux
|
||||
|
||||
{! backend/installation/otp_vs_from_source_source.include !}
|
||||
|
||||
## Installation
|
||||
|
||||
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.
|
||||
|
||||
{! backend/installation/generic_dependencies.include !}
|
||||
|
||||
### Prepare the system
|
||||
|
||||
* The community repository must be enabled in `/etc/apk/repositories`. Depending on which version and mirror you use this looks like `http://alpine.42.fr/v3.10/community`. If you autogenerated the mirror during installation:
|
||||
|
||||
```shell
|
||||
awk 'NR==2' /etc/apk/repositories | sed 's/main/community/' | tee -a /etc/apk/repositories
|
||||
```
|
||||
|
||||
* Then update the system, if not already done:
|
||||
|
||||
```shell
|
||||
sudo apk update
|
||||
sudo apk upgrade
|
||||
```
|
||||
|
||||
* Install some tools, which are needed later:
|
||||
|
||||
```shell
|
||||
sudo apk add git build-base cmake file-dev
|
||||
```
|
||||
|
||||
### Install Elixir and Erlang
|
||||
|
||||
* Install Erlang and Elixir:
|
||||
|
||||
```shell
|
||||
sudo apk add erlang erlang-runtime-tools erlang-xmerl elixir
|
||||
```
|
||||
|
||||
* Install `erlang-eldap` if you want to enable ldap authenticator
|
||||
|
||||
```shell
|
||||
sudo apk add erlang-eldap
|
||||
```
|
||||
|
||||
### Install PostgreSQL
|
||||
|
||||
* Install Postgresql server:
|
||||
|
||||
```shell
|
||||
sudo apk add postgresql postgresql-contrib
|
||||
```
|
||||
|
||||
* Initialize database:
|
||||
|
||||
```shell
|
||||
sudo /etc/init.d/postgresql start
|
||||
```
|
||||
|
||||
* Enable and start postgresql server:
|
||||
|
||||
```shell
|
||||
sudo rc-update add postgresql
|
||||
```
|
||||
|
||||
### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md))
|
||||
|
||||
```shell
|
||||
sudo apk add ffmpeg imagemagick exiftool
|
||||
```
|
||||
|
||||
### Install PleromaBE
|
||||
|
||||
* Add a new system user for the Pleroma service:
|
||||
|
||||
```shell
|
||||
sudo addgroup pleroma
|
||||
sudo adduser -S -s /bin/false -h /opt/pleroma -H -G pleroma pleroma
|
||||
```
|
||||
|
||||
**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.
|
||||
|
||||
* Git clone the PleromaBE repository and make the Pleroma user the owner of the directory:
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /opt/pleroma
|
||||
sudo chown -R pleroma:pleroma /opt/pleroma
|
||||
sudo -Hu pleroma git clone -b stable https://git.pleroma.social/pleroma/pleroma /opt/pleroma
|
||||
```
|
||||
|
||||
* Change to the new directory:
|
||||
|
||||
```shell
|
||||
cd /opt/pleroma
|
||||
```
|
||||
|
||||
* Install the dependencies for Pleroma and answer with `yes` if it asks you to install `Hex`:
|
||||
|
||||
```shell
|
||||
sudo -Hu pleroma mix deps.get
|
||||
```
|
||||
|
||||
* Generate the configuration: `sudo -Hu pleroma MIX_ENV=prod mix pleroma.instance gen`
|
||||
* Answer with `yes` if it asks you to install `rebar3`.
|
||||
* This may take some time, because parts of pleroma 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`.
|
||||
|
||||
* 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):
|
||||
|
||||
```shell
|
||||
sudo -Hu pleroma 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:
|
||||
|
||||
```shell
|
||||
sudo -Hu postgres psql -f config/setup_db.psql
|
||||
```
|
||||
|
||||
* Now run the database migration:
|
||||
|
||||
```shell
|
||||
sudo -Hu pleroma MIX_ENV=prod mix ecto.migrate
|
||||
```
|
||||
|
||||
* Now you can start Pleroma already
|
||||
|
||||
```shell
|
||||
sudo -Hu pleroma MIX_ENV=prod mix phx.server
|
||||
```
|
||||
|
||||
### 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.
|
||||
|
||||
#### Nginx
|
||||
|
||||
* Install nginx, if not already done:
|
||||
|
||||
```shell
|
||||
sudo apk add nginx
|
||||
```
|
||||
|
||||
* Setup your SSL cert, using your method of choice or certbot. If using certbot, first install it:
|
||||
|
||||
```shell
|
||||
sudo apk add certbot
|
||||
```
|
||||
|
||||
and then set it up:
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /var/lib/letsencrypt/
|
||||
sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --standalone
|
||||
```
|
||||
|
||||
If that doesn’t work, make sure, that nginx is not already running. If it still doesn’t work, try setting up nginx first (change ssl “on” to “off” and try again).
|
||||
|
||||
* Copy the example nginx configuration to the nginx folder
|
||||
|
||||
```shell
|
||||
sudo cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/conf.d/pleroma.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).
|
||||
|
||||
```
|
||||
server {
|
||||
server_name your.domain;
|
||||
listen 80;
|
||||
...
|
||||
}
|
||||
|
||||
server {
|
||||
server_name your.domain;
|
||||
listen 443 ssl http2;
|
||||
...
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/your.domain/chain.pem;
|
||||
ssl_certificate /etc/letsencrypt/live/your.domain/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/your.domain/privkey.pem;
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
* Enable and start nginx:
|
||||
|
||||
```shell
|
||||
sudo rc-update add nginx
|
||||
sudo service nginx start
|
||||
```
|
||||
|
||||
If you need to renew the certificate in the future, uncomment the relevant location block in the nginx config and run:
|
||||
|
||||
```shell
|
||||
sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --webroot -w /var/lib/letsencrypt/
|
||||
```
|
||||
|
||||
#### OpenRC service
|
||||
|
||||
* Copy example service file:
|
||||
|
||||
```shell
|
||||
sudo cp /opt/pleroma/installation/init.d/pleroma /etc/init.d/pleroma
|
||||
```
|
||||
|
||||
* Make sure to start it during the boot
|
||||
|
||||
```shell
|
||||
sudo rc-update add pleroma
|
||||
```
|
||||
|
||||
#### Create your first user
|
||||
|
||||
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
||||
|
||||
```shell
|
||||
sudo -Hu pleroma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||
```
|
||||
|
||||
#### Further reading
|
||||
|
||||
{! backend/installation/further_reading.include !}
|
||||
|
||||
## 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.
|
|
@ -1,10 +1,10 @@
|
|||
# Installing on Arch Linux
|
||||
|
||||
{! installation/otp_vs_from_source_source.include !}
|
||||
{! backend/installation/otp_vs_from_source_source.include !}
|
||||
|
||||
## 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 akkoma`; 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 pleroma`; in this case, use `su <username> -s $SHELL -c 'command'` instead.
|
||||
|
||||
### Required packages
|
||||
|
||||
|
@ -65,45 +65,45 @@ sudo systemctl enable --now postgresql.service
|
|||
sudo pacman -S ffmpeg imagemagick perl-image-exiftool
|
||||
```
|
||||
|
||||
### Install AkkomaBE
|
||||
### Install PleromaBE
|
||||
|
||||
* Add a new system user for the Akkoma service:
|
||||
* Add a new system user for the Pleroma service:
|
||||
|
||||
```shell
|
||||
sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
||||
sudo useradd -r -s /bin/false -m -d /var/lib/pleroma -U pleroma
|
||||
```
|
||||
|
||||
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
||||
**Note**: To execute a single command as the 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.
|
||||
|
||||
* Git clone the AkkomaBE repository and make the Akkoma user the owner of the directory:
|
||||
* Git clone the PleromaBE repository and make the Pleroma user the owner of the directory:
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /opt/akkoma
|
||||
sudo chown -R akkoma:akkoma /opt/akkoma
|
||||
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git /opt/akkoma
|
||||
sudo mkdir -p /opt/pleroma
|
||||
sudo chown -R pleroma:pleroma /opt/pleroma
|
||||
sudo -Hu pleroma git clone -b stable https://git.pleroma.social/pleroma/pleroma /opt/pleroma
|
||||
```
|
||||
|
||||
* Change to the new directory:
|
||||
|
||||
```shell
|
||||
cd /opt/akkoma
|
||||
cd /opt/pleroma
|
||||
```
|
||||
|
||||
* Install the dependencies for Akkoma and answer with `yes` if it asks you to install `Hex`:
|
||||
* Install the dependencies for Pleroma and answer with `yes` if it asks you to install `Hex`:
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma mix deps.get
|
||||
sudo -Hu pleroma mix deps.get
|
||||
```
|
||||
|
||||
* Generate the configuration: `sudo -Hu akkoma MIX_ENV=prod mix pleroma.instance gen`
|
||||
* Generate the configuration: `sudo -Hu pleroma MIX_ENV=prod mix pleroma.instance gen`
|
||||
* Answer with `yes` if it asks you to install `rebar3`.
|
||||
* This may take some time, because parts of akkoma get compiled first.
|
||||
* This may take some time, because parts of pleroma 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`.
|
||||
|
||||
* 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):
|
||||
* 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):
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma mv config/{generated_config.exs,prod.secret.exs}
|
||||
sudo -Hu pleroma 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:
|
||||
|
@ -115,18 +115,18 @@ sudo -Hu postgres psql -f config/setup_db.psql
|
|||
* Now run the database migration:
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma MIX_ENV=prod mix ecto.migrate
|
||||
sudo -Hu pleroma MIX_ENV=prod mix ecto.migrate
|
||||
```
|
||||
|
||||
* Now you can start Akkoma already
|
||||
* Now you can start Pleroma already
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma MIX_ENV=prod mix phx.server
|
||||
sudo -Hu pleroma MIX_ENV=prod mix phx.server
|
||||
```
|
||||
|
||||
### 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 Akkoma and you should consider to create a systemd service file for Akkoma.
|
||||
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.
|
||||
|
||||
#### 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:
|
||||
|
||||
```shell
|
||||
sudo cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/sites-available/akkoma.nginx
|
||||
sudo ln -s /etc/nginx/sites-available/akkoma.nginx /etc/nginx/sites-enabled/akkoma.nginx
|
||||
sudo cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.nginx
|
||||
sudo ln -s /etc/nginx/sites-available/pleroma.nginx /etc/nginx/sites-enabled/pleroma.nginx
|
||||
```
|
||||
|
||||
* 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
|
||||
|
||||
You can find example configurations for them in `/opt/akkoma/installation/`.
|
||||
You can find example configurations for them in `/opt/pleroma/installation/`.
|
||||
|
||||
#### Systemd service
|
||||
|
||||
* Copy example service file
|
||||
|
||||
```shell
|
||||
sudo cp /opt/akkoma/installation/akkoma.service /etc/systemd/system/akkoma.service
|
||||
sudo cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
|
||||
```
|
||||
|
||||
* Edit the service file and make sure that all paths fit your installation
|
||||
* Enable and start `akkoma.service`:
|
||||
* Enable and start `pleroma.service`:
|
||||
|
||||
```shell
|
||||
sudo systemctl enable --now akkoma.service
|
||||
sudo systemctl enable --now pleroma.service
|
||||
```
|
||||
|
||||
#### Create your first user
|
||||
|
@ -209,11 +209,13 @@ sudo systemctl enable --now akkoma.service
|
|||
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||
sudo -Hu pleroma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||
```
|
||||
|
||||
#### Further reading
|
||||
|
||||
{! installation/further_reading.include !}
|
||||
{! backend/installation/further_reading.include !}
|
||||
|
||||
{! support.include !}
|
||||
## 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.
|
|
@ -1,12 +1,12 @@
|
|||
# Installing on Debian Based Distributions
|
||||
|
||||
{! installation/otp_vs_from_source_source.include !}
|
||||
{! backend/installation/otp_vs_from_source_source.include !}
|
||||
|
||||
## 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 akkoma`; 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 pleroma`; in this case, use `su <username> -s $SHELL -c 'command'` instead.
|
||||
|
||||
{! installation/generic_dependencies.include !}
|
||||
{! backend/installation/generic_dependencies.include !}
|
||||
|
||||
### Prepare the system
|
||||
|
||||
|
@ -39,45 +39,45 @@ sudo apt install elixir erlang-dev erlang-nox
|
|||
sudo apt install imagemagick ffmpeg libimage-exiftool-perl
|
||||
```
|
||||
|
||||
### Install AkkomaBE
|
||||
### Install PleromaBE
|
||||
|
||||
* Add a new system user for the Akkoma service:
|
||||
* Add a new system user for the Pleroma service:
|
||||
|
||||
```shell
|
||||
sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
||||
sudo useradd -r -s /bin/false -m -d /var/lib/pleroma -U pleroma
|
||||
```
|
||||
|
||||
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
||||
**Note**: To execute a single command as the 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.
|
||||
|
||||
* Git clone the AkkomaBE repository and make the Akkoma user the owner of the directory:
|
||||
* Git clone the PleromaBE repository and make the Pleroma user the owner of the directory:
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /opt/akkoma
|
||||
sudo chown -R akkoma:akkoma /opt/akkoma
|
||||
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git /opt/akkoma
|
||||
sudo mkdir -p /opt/pleroma
|
||||
sudo chown -R pleroma:pleroma /opt/pleroma
|
||||
sudo -Hu pleroma git clone -b stable https://git.pleroma.social/pleroma/pleroma /opt/pleroma
|
||||
```
|
||||
|
||||
* Change to the new directory:
|
||||
|
||||
```shell
|
||||
cd /opt/akkoma
|
||||
cd /opt/pleroma
|
||||
```
|
||||
|
||||
* Install the dependencies for Akkoma and answer with `yes` if it asks you to install `Hex`:
|
||||
* Install the dependencies for Pleroma and answer with `yes` if it asks you to install `Hex`:
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma mix deps.get
|
||||
sudo -Hu pleroma mix deps.get
|
||||
```
|
||||
|
||||
* Generate the configuration: `sudo -Hu akkoma MIX_ENV=prod mix pleroma.instance gen`
|
||||
* Generate the configuration: `sudo -Hu pleroma MIX_ENV=prod mix pleroma.instance gen`
|
||||
* Answer with `yes` if it asks you to install `rebar3`.
|
||||
* This may take some time, because parts of akkoma get compiled first.
|
||||
* This may take some time, because parts of pleroma 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`.
|
||||
|
||||
* 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):
|
||||
* 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):
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma mv config/{generated_config.exs,prod.secret.exs}
|
||||
sudo -Hu pleroma 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:
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma MIX_ENV=prod mix ecto.migrate
|
||||
sudo -Hu pleroma MIX_ENV=prod mix ecto.migrate
|
||||
```
|
||||
|
||||
* Now you can start Akkoma already
|
||||
* Now you can start Pleroma already
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma MIX_ENV=prod mix phx.server
|
||||
sudo -Hu pleroma MIX_ENV=prod mix phx.server
|
||||
```
|
||||
|
||||
### 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 Akkoma and you should consider to create a systemd service file for Akkoma.
|
||||
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.
|
||||
|
||||
#### 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:
|
||||
|
||||
```shell
|
||||
sudo cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/sites-available/akkoma.nginx
|
||||
sudo ln -s /etc/nginx/sites-available/akkoma.nginx /etc/nginx/sites-enabled/akkoma.nginx
|
||||
sudo cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.nginx
|
||||
sudo ln -s /etc/nginx/sites-available/pleroma.nginx /etc/nginx/sites-enabled/pleroma.nginx
|
||||
```
|
||||
|
||||
* 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
|
||||
|
||||
You can find example configurations for them in `/opt/akkoma/installation/`.
|
||||
You can find example configurations for them in `/opt/pleroma/installation/`.
|
||||
|
||||
#### Systemd service
|
||||
|
||||
* Copy example service file
|
||||
|
||||
```shell
|
||||
sudo cp /opt/akkoma/installation/akkoma.service /etc/systemd/system/akkoma.service
|
||||
sudo cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
|
||||
```
|
||||
|
||||
* Edit the service file and make sure that all paths fit your installation
|
||||
* Enable and start `akkoma.service`:
|
||||
* Enable and start `pleroma.service`:
|
||||
|
||||
```shell
|
||||
sudo systemctl enable --now akkoma.service
|
||||
sudo systemctl enable --now pleroma.service
|
||||
```
|
||||
|
||||
#### Create your first user
|
||||
|
@ -172,11 +172,13 @@ sudo systemctl enable --now akkoma.service
|
|||
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||
sudo -Hu pleroma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||
```
|
||||
|
||||
#### Further reading
|
||||
|
||||
{! installation/further_reading.include !}
|
||||
{! backend/installation/further_reading.include !}
|
||||
|
||||
{! support.include !}
|
||||
## 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.
|
195
docs/installation/debian_based_jp.md
Normal file
195
docs/installation/debian_based_jp.md
Normal file
|
@ -0,0 +1,195 @@
|
|||
# Pleromaの入れ方
|
||||
## 日本語訳について
|
||||
|
||||
この記事は [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'` を代わりに使ってください。
|
||||
|
||||
### 必要なソフトウェア
|
||||
|
||||
- PostgreSQL 9.6以上 (Ubuntu16.04では9.5しか提供されていないので,[](https://www.postgresql.org/download/linux/ubuntu/)こちらから新しいバージョンを入手してください)
|
||||
- `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ユーザーでインストールしてください)
|
||||
- `erlang-dev`
|
||||
- `erlang-nox`
|
||||
- `git`
|
||||
- `build-essential`
|
||||
- `cmake`
|
||||
- `libmagic-dev`
|
||||
|
||||
#### このガイドで利用している追加パッケージ
|
||||
|
||||
- `nginx` (おすすめです。他のリバースプロキシを使う場合は、参考となる設定をこのリポジトリから探してください)
|
||||
- `certbot` (または何らかのLet's Encrypt向けACMEクライアント)
|
||||
- `ImageMagick`
|
||||
- `ffmpeg`
|
||||
- `exiftool`
|
||||
|
||||
### システムを準備する
|
||||
|
||||
* まずシステムをアップデートしてください。
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt full-upgrade
|
||||
```
|
||||
|
||||
* 上記に挙げたパッケージをインストールしておきます。
|
||||
```
|
||||
sudo apt install git build-essential postgresql postgresql-contrib cmake ffmpeg imagemagick libmagic-dev
|
||||
```
|
||||
|
||||
### ElixirとErlangをインストールします
|
||||
|
||||
* Erlangのリポジトリをダウンロードおよびインストールします。
|
||||
```
|
||||
wget -P /tmp/ https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb
|
||||
sudo dpkg -i /tmp/erlang-solutions_2.0_all.deb
|
||||
```
|
||||
|
||||
* ElixirとErlangをインストールします、
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt install elixir erlang-dev erlang-nox
|
||||
```
|
||||
|
||||
### オプションパッケージ: [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md)
|
||||
|
||||
```shell
|
||||
sudo apt install imagemagick ffmpeg libimage-exiftool-perl
|
||||
```
|
||||
|
||||
### Pleroma BE (バックエンド) をインストールします
|
||||
|
||||
* Pleroma用に新しいユーザーを作ります。
|
||||
|
||||
```
|
||||
sudo useradd -r -s /bin/false -m -d /var/lib/pleroma -U pleroma
|
||||
```
|
||||
|
||||
**注意**: Pleromaユーザとして単発のコマンドを実行したい場合はは、`sudo -Hu pleroma command` を使ってください。シェルを使いたい場合は `sudo -Hu pleroma $SHELL`です。もし `sudo` を使わない場合は、rootユーザで `su -l pleroma -s $SHELL -c 'command'` とすることでコマンドを、`su -l pleroma -s $SHELL` とすることでシェルを開始できます。
|
||||
|
||||
* Gitリポジトリをクローンします。
|
||||
```
|
||||
sudo mkdir -p /opt/pleroma
|
||||
sudo chown -R pleroma:pleroma /opt/pleroma
|
||||
sudo -Hu pleroma git clone -b stable https://git.pleroma.social/pleroma/pleroma /opt/pleroma
|
||||
```
|
||||
|
||||
* 新しいディレクトリに移動します。
|
||||
```
|
||||
cd /opt/pleroma
|
||||
```
|
||||
|
||||
* Pleromaが依存するパッケージをインストールします。Hexをインストールしてもよいか聞かれたら、yesを入力してください。
|
||||
```
|
||||
sudo -Hu pleroma mix deps.get
|
||||
```
|
||||
|
||||
* コンフィギュレーションを生成します。
|
||||
```
|
||||
sudo -Hu pleroma MIX_ENV=prod mix pleroma.instance gen
|
||||
```
|
||||
* rebar3をインストールしてもよいか聞かれたら、yesを入力してください。
|
||||
* このときにpleromaの一部がコンパイルされるため、この処理には時間がかかります。
|
||||
* あなたのインスタンスについて、いくつかの質問されます。この質問により `config/generated_config.exs` という設定ファイルが生成されます。
|
||||
|
||||
|
||||
* コンフィギュレーションを確認して、もし問題なければ、ファイル名を変更してください。
|
||||
```
|
||||
sudo -Hu pleroma mv config/{generated_config.exs,prod.secret.exs}
|
||||
```
|
||||
|
||||
* 先程のコマンドで、すでに `config/setup_db.psql` というファイルが作られています。このファイルをもとに、データベースを作成します。
|
||||
```
|
||||
sudo -Hu pleroma MIX_ENV=prod mix pleroma.instance gen
|
||||
```
|
||||
|
||||
* そして、データベースのマイグレーションを実行します。
|
||||
```
|
||||
sudo -Hu pleroma MIX_ENV=prod mix ecto.migrate
|
||||
```
|
||||
|
||||
* これでPleromaを起動できるようになりました。
|
||||
```
|
||||
sudo -Hu pleroma MIX_ENV=prod mix phx.server
|
||||
```
|
||||
|
||||
### インストールの最終段階
|
||||
|
||||
あなたの新しいインスタンスを世界に向けて公開するには、nginx等のWebサーバやプロキシサーバをPleromaの前段に使用する必要があります。また、Pleroma のためにシステムサービスファイルを作成する必要があります。
|
||||
|
||||
#### Nginx
|
||||
|
||||
* まだインストールしていないなら、nginxをインストールします。
|
||||
```
|
||||
sudo apt install nginx
|
||||
```
|
||||
|
||||
* SSLをセットアップします。他の方法でもよいですが、ここではcertbotを説明します。
|
||||
certbotを使うならば、まずそれをインストールします。
|
||||
```
|
||||
sudo apt install certbot
|
||||
```
|
||||
そしてセットアップします。
|
||||
```
|
||||
sudo mkdir -p /var/lib/letsencrypt/
|
||||
sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --standalone
|
||||
```
|
||||
もしうまくいかないときは、nginxが正しく動いていない可能性があります。先にnginxを設定してください。ssl "on" を "off" に変えてから再試行してください。
|
||||
|
||||
---
|
||||
|
||||
* nginxの設定ファイルサンプルをnginxフォルダーにコピーします。
|
||||
```
|
||||
sudo cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.nginx
|
||||
sudo ln -s /etc/nginx/sites-available/pleroma.nginx /etc/nginx/sites-enabled/pleroma.nginx
|
||||
```
|
||||
|
||||
* nginxを起動する前に、設定ファイルを編集してください。例えば、サーバー名、証明書のパスなどを変更する必要があります。
|
||||
* nginxを再起動します。
|
||||
```
|
||||
sudo systemctl enable --now nginx.service
|
||||
```
|
||||
|
||||
もし証明書を更新する必要が出てきた場合には、nginxの関連するlocationブロックのコメントアウトを外し、以下のコマンドを動かします。
|
||||
|
||||
```
|
||||
sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --webroot -w /var/lib/letsencrypt/
|
||||
```
|
||||
|
||||
#### 他のWebサーバやプロキシ
|
||||
これに関してはサンプルが `/opt/pleroma/installation/` にあるので、探してみてください。
|
||||
|
||||
#### Systemd サービス
|
||||
|
||||
* サービスファイルのサンプルをコピーします。
|
||||
```
|
||||
sudo cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
|
||||
```
|
||||
|
||||
* サービスファイルを変更します。すべてのパスが正しいことを確認してください
|
||||
* サービスを有効化し `pleroma.service` を開始してください
|
||||
```
|
||||
sudo systemctl enable --now pleroma.service
|
||||
```
|
||||
|
||||
#### 初期ユーザの作成
|
||||
|
||||
新たにインスタンスを作成したら、以下のコマンドにより管理者権限を持った初期ユーザを作成できます。
|
||||
|
||||
```
|
||||
sudo -Hu pleroma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||
```
|
||||
|
||||
#### その他の設定とカスタマイズ
|
||||
|
||||
{! backend/installation/further_reading.include !}
|
||||
|
||||
## 質問ある?
|
||||
|
||||
インストールについて質問がある、もしくは、うまくいかないときは、以下のところで質問できます。
|
||||
|
||||
* [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat)
|
||||
* **libera.chat** の **#pleroma** IRCチャンネル
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
This document was written for FreeBSD 12.1, but should be work on future releases.
|
||||
|
||||
{! installation/generic_dependencies.include !}
|
||||
{! backend/installation/generic_dependencies.include !}
|
||||
|
||||
## Installing software used in this guide
|
||||
|
||||
|
@ -34,27 +34,27 @@ Setup the required services to automatically start at boot, using `sysrc(8)`.
|
|||
# pkg install imagemagick ffmpeg p5-Image-ExifTool
|
||||
```
|
||||
|
||||
## Configuring Akkoma
|
||||
## Configuring Pleroma
|
||||
|
||||
Create a user for Akkoma:
|
||||
Create a user for Pleroma:
|
||||
|
||||
```
|
||||
# pw add user akkoma -m
|
||||
# echo 'export LC_ALL="en_US.UTF-8"' >> /home/akkoma/.profile
|
||||
# su -l akkoma
|
||||
# pw add user pleroma -m
|
||||
# echo 'export LC_ALL="en_US.UTF-8"' >> /home/pleroma/.profile
|
||||
# su -l pleroma
|
||||
```
|
||||
|
||||
Clone the repository:
|
||||
|
||||
```
|
||||
$ cd $HOME # Should be the same as /home/akkoma
|
||||
$ git clone https://akkoma.dev/AkkomaGang/akkoma.git
|
||||
$ cd $HOME # Should be the same as /home/pleroma
|
||||
$ git clone -b stable https://git.pleroma.social/pleroma/pleroma.git
|
||||
```
|
||||
|
||||
Configure Akkoma. Note that you need a domain name at this point:
|
||||
Configure Pleroma. Note that you need a domain name at this point:
|
||||
|
||||
```
|
||||
$ cd /home/akkoma/akkoma
|
||||
$ cd /home/pleroma/pleroma
|
||||
$ 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.
|
||||
$ 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:
|
||||
|
||||
```
|
||||
# cd /home/akkoma/akkoma
|
||||
# cd /home/pleroma/pleroma
|
||||
# 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.
|
||||
|
||||
Back as the akkoma user, run the following to implement any database migrations.
|
||||
Back as the pleroma user, run the following to implement any database migrations.
|
||||
|
||||
```
|
||||
# su -l akkoma
|
||||
$ cd /home/akkoma/akkoma
|
||||
# su -l pleroma
|
||||
$ cd /home/pleroma/pleroma
|
||||
$ MIX_ENV=prod mix ecto.migrate
|
||||
```
|
||||
|
||||
|
@ -163,40 +163,40 @@ http {
|
|||
}
|
||||
```
|
||||
|
||||
As root, copy `/home/akkoma/akkoma/installation/nginx/akkoma.nginx` to
|
||||
`/usr/local/etc/nginx/sites-available/akkoma.nginx`.
|
||||
As root, copy `/home/pleroma/pleroma/installation/pleroma.nginx` to
|
||||
`/usr/local/etc/nginx/sites-available/pleroma.nginx`.
|
||||
|
||||
Edit the defaults of `/usr/local/etc/nginx/sites-available/akkoma.nginx`:
|
||||
Edit the defaults of `/usr/local/etc/nginx/sites-available/pleroma.nginx`:
|
||||
|
||||
* 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_key` to `/var/db/acme/certs/example.tld/example.tld.key`.
|
||||
* Change all references of `example.tld` to your instance's domain name.
|
||||
|
||||
## Creating a startup script for Akkoma
|
||||
## Creating a startup script for Pleroma
|
||||
|
||||
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 akkoma from the
|
||||
Pleroma 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
|
||||
command-line before utilizing the rc.d script. That is done as follows:
|
||||
|
||||
```
|
||||
# su -l akkoma
|
||||
$ cd $HOME/akkoma
|
||||
# su -l pleroma
|
||||
$ cd $HOME/pleroma
|
||||
$ MIX_ENV=prod mix phx.server
|
||||
```
|
||||
|
||||
Copy the startup script to the correct location and make sure it's executable:
|
||||
|
||||
```
|
||||
# cp /home/akkoma/akkoma/installation/freebsd/rc.d/akkoma /usr/local/etc/rc.d/akkoma
|
||||
# chmod +x /usr/local/etc/rc.d/akkoma
|
||||
# cp /home/pleroma/pleroma/installation/freebsd/rc.d/pleroma /usr/local/etc/rc.d/pleroma
|
||||
# chmod +x /usr/local/etc/rc.d/pleroma
|
||||
```
|
||||
|
||||
Update the `/etc/rc.conf` and start akkoma with the following commands:
|
||||
Update the `/etc/rc.conf` and start pleroma with the following commands:
|
||||
|
||||
```
|
||||
# sysrc akkoma_enable=YES
|
||||
# service akkoma start
|
||||
# sysrc pleroma_enable=YES
|
||||
# service pleroma start
|
||||
```
|
||||
|
||||
#### Create your first user
|
||||
|
@ -204,7 +204,7 @@ Update the `/etc/rc.conf` and start akkoma with the following commands:
|
|||
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
||||
|
||||
```shell
|
||||
sudo -Hu akkoma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||
sudo -Hu pleroma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||
```
|
||||
## Conclusion
|
||||
|
||||
|
@ -213,4 +213,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
|
||||
incorrect timestamps. You should have ntpd running.
|
||||
|
||||
{! support.include !}
|
||||
## 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.
|
|
@ -1,7 +1,7 @@
|
|||
## Required dependencies
|
||||
|
||||
* PostgreSQL 9.6+
|
||||
* Elixir 1.12+ (1.13+ recommended)
|
||||
* Elixir 1.9+
|
||||
* Erlang OTP 22.2+
|
||||
* git
|
||||
* file / libmagic
|
|
@ -1,16 +1,16 @@
|
|||
# Installing on Gentoo GNU/Linux
|
||||
|
||||
{! installation/otp_vs_from_source_source.include !}
|
||||
{! backend/installation/otp_vs_from_source_source.include !}
|
||||
|
||||
## 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. `akkoma$` should be run as the `akkoma` 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. `pleroma$` should be run as the `pleroma` user.
|
||||
|
||||
{! installation/generic_dependencies.include !}
|
||||
{! backend/installation/generic_dependencies.include !}
|
||||
|
||||
### 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 `akkoma` 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 `pleroma` would do fine, depending on how you like to arrange your package.use flags.
|
||||
|
||||
```text
|
||||
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
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||
### Install AkkomaBE
|
||||
### Install PleromaBE
|
||||
|
||||
* Add a new system user for the Akkoma service and set up default directories:
|
||||
* Add a new system user for the Pleroma 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 `akkoma` 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 `pleroma` user will make finishing the insallation and common maintenence tasks somewhat easier:
|
||||
|
||||
```shell
|
||||
# useradd -m -G users,wheel -s /bin/bash akkoma
|
||||
# useradd -m -G users,wheel -s /bin/bash pleroma
|
||||
```
|
||||
|
||||
Optional: If you are using sudo, review your sudo setup to ensure it works for you. The `/etc/sudoers` file has a lot of options and examples to help you, and [the Gentoo sudo guide](https://wiki.gentoo.org/wiki/Sudo) has more information. Finishing this installation will be somewhat easier if you have a way to sudo from the `akkoma` user, but it might be best to not allow that user to sudo during normal operation, and as such there will be a reminder at the end of this guide to double check if you would like to lock down the `akkoma` user after initial setup.
|
||||
Optional: If you are using sudo, review your sudo setup to ensure it works for you. The `/etc/sudoers` file has a lot of options and examples to help you, and [the Gentoo sudo guide](https://wiki.gentoo.org/wiki/Sudo) has more information. Finishing this installation will be somewhat easier if you have a way to sudo from the `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.
|
||||
|
||||
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don't have or want `sudo` or would like to use the system as the `akkoma` user for instance maintenance tasks, you can simply use `su - akkoma` to switch to the `akkoma` user.
|
||||
**Note**: To execute a single command as the 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.
|
||||
|
||||
* Git clone the AkkomaBE repository and make the Akkoma user the owner of the directory:
|
||||
* Git clone the PleromaBE repository and make the Pleroma 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://akkoma.dev/AkkomaGang/akkoma.git` 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://git.pleroma.social/pleroma/pleroma` will work here.
|
||||
|
||||
```shell
|
||||
akkoma$ cd ~
|
||||
akkoma$ git clone -b stable https://path/to/repo
|
||||
pleroma$ cd ~
|
||||
pleroma$ git clone -b stable https://path/to/repo
|
||||
```
|
||||
|
||||
* Change to the new directory:
|
||||
|
||||
```shell
|
||||
akkoma$ cd ~/akkoma
|
||||
pleroma$ cd ~/pleroma
|
||||
```
|
||||
|
||||
* Install the dependencies for Akkoma and answer with `yes` if it asks you to install `Hex`:
|
||||
* Install the dependencies for Pleroma and answer with `yes` if it asks you to install `Hex`:
|
||||
|
||||
```shell
|
||||
akkoma$ mix deps.get
|
||||
pleroma$ mix deps.get
|
||||
```
|
||||
|
||||
* Generate the configuration:
|
||||
|
||||
```shell
|
||||
akkoma$ MIX_ENV=prod mix pleroma.instance gen
|
||||
pleroma$ MIX_ENV=prod mix pleroma.instance gen
|
||||
```
|
||||
|
||||
* Answer with `yes` if it asks you to install `rebar3`.
|
||||
|
||||
* This part precompiles some parts of Akkoma, so it might take a few moments
|
||||
* This part precompiles some parts of Pleroma, 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`.
|
||||
|
||||
* 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
|
||||
akkoma$ mv config/generated_config.exs config/prod.secret.exs
|
||||
pleroma$ 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:
|
||||
|
||||
```shell
|
||||
akkoma$ sudo -Hu postgres psql -f config/setup_db.psql
|
||||
pleroma$ sudo -Hu postgres psql -f config/setup_db.psql
|
||||
```
|
||||
|
||||
* Now run the database migration:
|
||||
|
||||
```shell
|
||||
akkoma$ MIX_ENV=prod mix ecto.migrate
|
||||
pleroma$ MIX_ENV=prod mix ecto.migrate
|
||||
```
|
||||
|
||||
* Now you can start Akkoma already
|
||||
* Now you can start Pleroma already
|
||||
|
||||
```shell
|
||||
akkoma$ MIX_ENV=prod mix phx.server
|
||||
pleroma$ 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 akkoma 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 pleroma application, as well as configure SSL.
|
||||
|
||||
### 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 Akkoma. It is also a good idea to set up Akkoma 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 Pleroma. It is also a good idea to set up Pleroma to run as a system service.
|
||||
|
||||
#### 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:
|
||||
|
||||
```shell
|
||||
# cp /home/akkoma/akkoma/installation/nginx/akkoma.nginx /etc/nginx/sites-available/
|
||||
# ln -s /etc/nginx/sites-available/akkoma.nginx /etc/nginx/sites-enabled/akkoma.nginx
|
||||
# cp /home/pleroma/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/
|
||||
# ln -s /etc/nginx/sites-available/pleroma.nginx /etc/nginx/sites-enabled/pleroma.nginx
|
||||
```
|
||||
|
||||
* 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 akkoma 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 pleroma 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.
|
||||
|
||||
|
@ -254,14 +254,14 @@ This will run certbot on the first of the month at midnight. If you'd rather run
|
|||
|
||||
#### Other webserver/proxies
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
#### Create the uploads folder
|
||||
|
||||
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:
|
||||
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:
|
||||
|
||||
```shell
|
||||
akkoma$ mkdir -p ~/akkoma/uploads
|
||||
pleroma$ mkdir -p ~/pleroma/uploads
|
||||
```
|
||||
|
||||
#### init.d service
|
||||
|
@ -269,16 +269,16 @@ Even if you are using S3, Akkoma needs someplace to store media posted on your i
|
|||
* Copy example service file
|
||||
|
||||
```shell
|
||||
# cp /home/akkoma/akkoma/installation/init.d/akkoma /etc/init.d/
|
||||
# cp /home/pleroma/pleroma/installation/init.d/pleroma /etc/init.d/
|
||||
```
|
||||
|
||||
* Be sure to take a look at this service file and make sure that all paths fit your installation
|
||||
|
||||
* Enable and start `akkoma`:
|
||||
* Enable and start `pleroma`:
|
||||
|
||||
```shell
|
||||
# rc-update add akkoma default
|
||||
# /etc/init.d/akkoma start
|
||||
# rc-update add pleroma default
|
||||
# /etc/init.d/pleroma start
|
||||
```
|
||||
|
||||
#### Create your first user
|
||||
|
@ -286,15 +286,17 @@ Even if you are using S3, Akkoma needs someplace to store media posted on your i
|
|||
If your instance is up and running, you can create your first user with administrative rights with the following task:
|
||||
|
||||
```shell
|
||||
akkoma$ MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||
pleroma$ MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||
```
|
||||
|
||||
#### Privilege cleanup
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
#### Further reading
|
||||
|
||||
{! installation/further_reading.include !}
|
||||
{! backend/installation/further_reading.include !}
|
||||
|
||||
{! support.include !}
|
||||
## 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.
|
|
@ -1,6 +1,6 @@
|
|||
# Switching a from-source install to OTP releases
|
||||
|
||||
{! installation/otp_vs_from_source.include !}
|
||||
{! backend/installation/otp_vs_from_source.include !}
|
||||
|
||||
In this guide we cover how you can migrate from a from source installation to one using OTP releases.
|
||||
|
||||
|
@ -20,65 +20,65 @@ The system needs to have `curl` and `unzip` installed for downloading and unpack
|
|||
```
|
||||
|
||||
## 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 Akkoma 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 Pleroma are configurable, so it is possible to move them out of there.
|
||||
|
||||
Akkoma should be stopped before proceeding.
|
||||
Pleroma should be stopped before proceeding.
|
||||
|
||||
### Moving uploads/custom public files directory
|
||||
|
||||
```sh
|
||||
# Create uploads directory and set proper permissions (skip if using a remote uploader)
|
||||
# Note: It does not have to be `/var/lib/akkoma/uploads`, you can configure it to be something else later
|
||||
mkdir -p /var/lib/akkoma/uploads
|
||||
chown -R akkoma /var/lib/akkoma
|
||||
# Note: It does not have to be `/var/lib/pleroma/uploads`, you can configure it to be something else later
|
||||
mkdir -p /var/lib/pleroma/uploads
|
||||
chown -R pleroma /var/lib/pleroma
|
||||
|
||||
# Create custom public files directory
|
||||
# Note: It does not have to be `/var/lib/akkoma/static`, you can configure it to be something else later
|
||||
mkdir -p /var/lib/akkoma/static
|
||||
chown -R akkoma /var/lib/akkoma
|
||||
# Note: It does not have to be `/var/lib/pleroma/static`, you can configure it to be something else later
|
||||
mkdir -p /var/lib/pleroma/static
|
||||
chown -R pleroma /var/lib/pleroma
|
||||
|
||||
# If you use the local uploader with default settings your uploads should be located in `~akkoma/uploads`
|
||||
mv ~akkoma/uploads/* /var/lib/akkoma/uploads
|
||||
# If you use the local uploader with default settings your uploads should be located in `~pleroma/uploads`
|
||||
mv ~pleroma/uploads/* /var/lib/pleroma/uploads
|
||||
|
||||
# If you have created the custom public files directory with default settings it should be located in `~akkoma/instance/static`
|
||||
mv ~akkoma/instance/static /var/lib/akkoma/static
|
||||
# If you have created the custom public files directory with default settings it should be located in `~pleroma/instance/static`
|
||||
mv ~pleroma/instance/static /var/lib/pleroma/static
|
||||
```
|
||||
|
||||
### Moving emoji
|
||||
Assuming you have all emojis in subdirectories of `priv/static/emoji` moving them can be done with
|
||||
```sh
|
||||
mkdir /var/lib/akkoma/static/emoji
|
||||
ls -d ~akkoma/priv/static/emoji/*/ | xargs -i sh -c 'mv "{}" "/var/lib/akkoma/static/emoji/$(basename {})"'
|
||||
mkdir /var/lib/pleroma/static/emoji
|
||||
ls -d ~pleroma/priv/static/emoji/*/ | xargs -i sh -c 'mv "{}" "/var/lib/pleroma/static/emoji/$(basename {})"'
|
||||
```
|
||||
|
||||
But, if for some reason you have custom emojis in the root directory you should copy the whole directory instead.
|
||||
```sh
|
||||
mv ~akkoma/priv/static/emoji /var/lib/akkoma/static/emoji
|
||||
mv ~pleroma/priv/static/emoji /var/lib/pleroma/static/emoji
|
||||
```
|
||||
and then copy custom emojis to `/var/lib/akkoma/static/emoji/custom`.
|
||||
and then copy custom emojis to `/var/lib/pleroma/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/akkoma/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/pleroma/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).
|
||||
|
||||
### Moving the config
|
||||
```sh
|
||||
# Create the config directory
|
||||
# The default path for Akkoma config is /etc/akkoma/config.exs
|
||||
# The default path for Pleroma config is /etc/pleroma/config.exs
|
||||
# but it can be set via PLEROMA_CONFIG_PATH environment variable
|
||||
mkdir -p /etc/akkoma
|
||||
mkdir -p /etc/pleroma
|
||||
|
||||
# Move the config file
|
||||
mv ~akkoma/config/prod.secret.exs /etc/akkoma/config.exs
|
||||
mv ~pleroma/config/prod.secret.exs /etc/pleroma/config.exs
|
||||
|
||||
# Change `use Mix.Config` at the top to `import Config`
|
||||
$EDITOR /etc/akkoma/config.exs
|
||||
$EDITOR /etc/pleroma/config.exs
|
||||
```
|
||||
## Installing the release
|
||||
Before proceeding, get the flavour from [Detecting flavour](otp_en.md#detecting-flavour) section in OTP installation guide.
|
||||
```sh
|
||||
# Delete all files in akkoma user's directory
|
||||
rm -r ~akkoma/*
|
||||
# Delete all files in pleroma user's directory
|
||||
rm -r ~pleroma/*
|
||||
|
||||
# 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
|
||||
|
@ -86,60 +86,58 @@ export FLAVOUR="amd64-musl"
|
|||
|
||||
# Clone the release build into a temporary directory and unpack it
|
||||
# Replace `stable` with `unstable` if you want to run the unstable branch
|
||||
su akkoma -s $SHELL -lc "
|
||||
curl 'https://akkoma-updates.s3-website.fr-par.scw.cloud/develop/akkoma-$FLAVOUR.zip' -o /tmp/akkoma.zip
|
||||
unzip /tmp/akkoma.zip -d /tmp/
|
||||
su pleroma -s $SHELL -lc "
|
||||
curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=$FLAVOUR' -o /tmp/pleroma.zip
|
||||
unzip /tmp/pleroma.zip -d /tmp/
|
||||
"
|
||||
|
||||
# Move the release to the home directory and delete temporary files
|
||||
su akkoma -s $SHELL -lc "
|
||||
mv /tmp/release/* ~akkoma/
|
||||
su pleroma -s $SHELL -lc "
|
||||
mv /tmp/release/* ~pleroma/
|
||||
rmdir /tmp/release
|
||||
rm /tmp/akkoma.zip
|
||||
rm /tmp/pleroma.zip
|
||||
"
|
||||
|
||||
# Start the instance to verify that everything is working as expected
|
||||
su akkoma -s $SHELL -lc "./bin/pleroma daemon"
|
||||
su pleroma -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
|
||||
sleep 20 && curl http://localhost:4000/api/v1/instance
|
||||
|
||||
# Stop the instance
|
||||
su akkoma -s $SHELL -lc "./bin/pleroma stop"
|
||||
su pleroma -s $SHELL -lc "./bin/pleroma stop"
|
||||
```
|
||||
|
||||
## Setting up a system service
|
||||
OTP releases have different service files than from-source installs so they need to be copied over again.
|
||||
|
||||
**Warning:** The service files assume akkoma user's home directory is `/opt/akkoma`, please make sure all paths fit your installation.
|
||||
**Warning:** The service files assume pleroma user's home directory is `/opt/pleroma`, please make sure all paths fit your installation.
|
||||
|
||||
=== "Alpine"
|
||||
```sh
|
||||
# Copy the service into a proper directory
|
||||
cp -f ~akkoma/installation/init.d/akkoma /etc/init.d/akkoma
|
||||
cp -f ~pleroma/installation/init.d/pleroma /etc/init.d/pleroma
|
||||
|
||||
# Start akkoma
|
||||
rc-service akkoma start
|
||||
# Start pleroma
|
||||
rc-service pleroma start
|
||||
```
|
||||
|
||||
=== "Debian/Ubuntu"
|
||||
```sh
|
||||
# Copy the service into a proper directory
|
||||
cp ~akkoma/installation/akkoma.service /etc/systemd/system/akkoma.service
|
||||
cp ~pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
|
||||
|
||||
# Reload service files
|
||||
systemctl daemon-reload
|
||||
|
||||
# Reenable akkoma to start on boot
|
||||
systemctl reenable akkoma
|
||||
# Reenable pleroma to start on boot
|
||||
systemctl reenable pleroma
|
||||
|
||||
# Start akkoma
|
||||
systemctl start akkoma
|
||||
# Start pleroma
|
||||
systemctl start pleroma
|
||||
```
|
||||
|
||||
## Running mix tasks
|
||||
Refer to [Running mix tasks](otp_en.md#running-mix-tasks) section from OTP release installation guide.
|
||||
## Updating
|
||||
Refer to [Updating](otp_en.md#updating) section from OTP release installation guide.
|
||||
|
||||
{! support.include !}
|
|
@ -1,6 +1,6 @@
|
|||
# Installing on NetBSD
|
||||
|
||||
{! installation/generic_dependencies.include !}
|
||||
{! backend/installation/generic_dependencies.include !}
|
||||
|
||||
## Installing software used in this guide
|
||||
|
||||
|
@ -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.
|
||||
|
||||
Note that `postgresql11-contrib` is needed for the Postgres extensions
|
||||
Akkoma uses.
|
||||
Pleroma uses.
|
||||
|
||||
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`
|
||||
|
||||
## Configuring Akkoma
|
||||
## Configuring Pleroma
|
||||
|
||||
Create a user for Akkoma:
|
||||
Create a user for Pleroma:
|
||||
|
||||
```
|
||||
# groupadd akkoma
|
||||
# useradd -d /home/akkoma -m -g akkoma -s /usr/pkg/bin/mksh akkoma
|
||||
# echo 'export LC_ALL="en_GB.UTF-8"' >> /home/akkoma/.profile
|
||||
# su -l akkoma -c $SHELL
|
||||
# groupadd pleroma
|
||||
# useradd -d /home/pleroma -m -g pleroma -s /usr/pkg/bin/mksh pleroma
|
||||
# echo 'export LC_ALL="en_GB.UTF-8"' >> /home/pleroma/.profile
|
||||
# su -l pleroma -c $SHELL
|
||||
```
|
||||
|
||||
Clone the repository:
|
||||
|
||||
```
|
||||
$ cd /home/akkoma
|
||||
$ git clone https://akkoma.dev/AkkomaGang/akkoma.git
|
||||
$ cd /home/pleroma
|
||||
$ git clone -b stable https://git.pleroma.social/pleroma/pleroma.git
|
||||
```
|
||||
|
||||
Configure Akkoma. Note that you need a domain name at this point:
|
||||
Configure Pleroma. Note that you need a domain name at this point:
|
||||
|
||||
```
|
||||
$ cd /home/akkoma/akkoma
|
||||
$ cd /home/pleroma/pleroma
|
||||
$ mix deps.get
|
||||
$ 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
|
||||
|
||||
Install the example configuration file
|
||||
`/home/akkoma/akkoma/installation/nginx/akkoma.nginx` to
|
||||
`/home/pleroma/pleroma/installation/pleroma.nginx` to
|
||||
`/usr/pkg/etc/nginx.conf`.
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
## Creating a startup script for Akkoma
|
||||
## Creating a startup script for Pleroma
|
||||
|
||||
Copy the startup script to the correct location and make sure it's executable:
|
||||
|
||||
```
|
||||
# cp /home/akkoma/akkoma/installation/netbsd/rc.d/akkoma /etc/rc.d/akkoma
|
||||
# chmod +x /etc/rc.d/akkoma
|
||||
# cp /home/pleroma/pleroma/installation/netbsd/rc.d/pleroma /etc/rc.d/pleroma
|
||||
# chmod +x /etc/rc.d/pleroma
|
||||
```
|
||||
|
||||
Add the following to `/etc/rc.conf`:
|
||||
|
||||
```
|
||||
akkoma=YES
|
||||
akkoma_home="/home/akkoma"
|
||||
akkoma_user="akkoma"
|
||||
pleroma=YES
|
||||
pleroma_home="/home/pleroma"
|
||||
pleroma_user="pleroma"
|
||||
```
|
||||
|
||||
Run `# /etc/rc.d/akkoma start` to start Akkoma.
|
||||
Run `# /etc/rc.d/pleroma start` to start Pleroma.
|
||||
|
||||
## Conclusion
|
||||
|
||||
|
@ -204,6 +204,8 @@ incorrect timestamps. You should have ntpd running.
|
|||
|
||||
#### Further reading
|
||||
|
||||
{! installation/further_reading.include !}
|
||||
{! backend/installation/further_reading.include !}
|
||||
|
||||
{! support.include !}
|
||||
## 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.
|
|
@ -1,10 +1,10 @@
|
|||
# Installing on OpenBSD
|
||||
|
||||
This guide describes the installation and configuration of akkoma (and the required software to run it) on a single OpenBSD 6.6 server.
|
||||
This guide describes the installation and configuration of pleroma (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.
|
||||
|
||||
{! installation/generic_dependencies.include !}
|
||||
{! backend/installation/generic_dependencies.include !}
|
||||
|
||||
### Preparing the system
|
||||
#### Required software
|
||||
|
@ -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
|
||||
```
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
#### Optional software
|
||||
|
||||
|
@ -30,20 +30,20 @@ To install the above:
|
|||
pkg_add ImageMagick ffmpeg p5-Image-ExifTool
|
||||
```
|
||||
|
||||
#### Creating the akkoma user
|
||||
Akkoma will be run by a dedicated user, \_akkoma. Before creating it, insert the following lines in login.conf:
|
||||
#### Creating the pleroma user
|
||||
Pleroma will be run by a dedicated user, \_pleroma. Before creating it, insert the following lines in login.conf:
|
||||
```
|
||||
akkoma:\
|
||||
pleroma:\
|
||||
:datasize-max=1536M:\
|
||||
:datasize-cur=1536M:\
|
||||
:openfiles-max=4096
|
||||
```
|
||||
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.
|
||||
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.
|
||||
|
||||
Create the \_akkoma user, assign it the akkoma login class and create its home directory (/home/\_akkoma/): `useradd -m -L akkoma _akkoma`
|
||||
Create the \_pleroma user, assign it the pleroma login class and create its home directory (/home/\_pleroma/): `useradd -m -L pleroma _pleroma`
|
||||
|
||||
#### Clone akkoma's directory
|
||||
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.
|
||||
#### Clone pleroma'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.
|
||||
|
||||
#### 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.
|
||||
|
||||
#### relayd
|
||||
relayd will be used as the reverse proxy sitting in front of akkoma.
|
||||
relayd will be used as the reverse proxy sitting in front of pleroma.
|
||||
Insert the following configuration in /etc/relayd.conf:
|
||||
```
|
||||
# $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_inet6="<IPv6 address>"
|
||||
|
||||
table <akkoma_server> { 127.0.0.1 }
|
||||
table <pleroma_server> { 127.0.0.1 }
|
||||
table <httpd_server> { 127.0.0.1 }
|
||||
|
||||
http protocol plerup { # Protocol for upstream akkoma server
|
||||
http protocol plerup { # Protocol for upstream pleroma server
|
||||
#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 ecdhe secp384r1
|
||||
|
||||
# Forward some paths to the local server (as akkoma won't respond to them as you might want)
|
||||
# Forward some paths to the local server (as pleroma won't respond to them as you might want)
|
||||
pass request quick path "/robots.txt" forward to <httpd_server>
|
||||
|
||||
# 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 akkoma 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 pleroma but adding them won't hurt
|
||||
match request header append "X-Forwarded-By" value "$SERVER_ADDR:$SERVER_PORT"
|
||||
|
||||
match response header append "X-XSS-Protection" value "1; mode=block"
|
||||
|
@ -170,7 +170,7 @@ http protocol plerup { # Protocol for upstream akkoma server
|
|||
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.
|
||||
|
||||
# If you do not want remote frontends to be able to access your Akkoma backend server, comment these lines
|
||||
# If you do not want remote frontends to be able to access your Pleroma backend server, comment these lines
|
||||
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-Headers" value "Authorization, Content-Type, Idempotency-Key"
|
||||
|
@ -184,7 +184,7 @@ relay wwwtls {
|
|||
|
||||
protocol plerup
|
||||
|
||||
forward to <akkoma_server> port 4000 check http "/" code 200
|
||||
forward to <pleroma_server> port 4000 check http "/" code 200
|
||||
forward to <httpd_server> port 80 check http "/robots.txt" code 200
|
||||
}
|
||||
```
|
||||
|
@ -225,33 +225,35 @@ 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`.
|
||||
|
||||
#### Configure and start akkoma
|
||||
Enter a shell as \_akkoma (as root `su _akkoma -`) and enter akkoma's installation directory (`cd ~/akkoma/`).
|
||||
#### Configure and start pleroma
|
||||
Enter a shell as \_pleroma (as root `su _pleroma -`) and enter pleroma's installation directory (`cd ~/pleroma/`).
|
||||
|
||||
Then follow the main installation guide:
|
||||
|
||||
* run `mix deps.get`
|
||||
* 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.
|
||||
* exit your current shell back to a root one and run `psql -U postgres -f /home/_akkoma/akkoma/config/setup_db.psql` to setup the database.
|
||||
* return to a \_akkoma shell into akkoma's installation directory (`su _akkoma -;cd ~/akkoma`) and run `MIX_ENV=prod mix ecto.migrate`
|
||||
* 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.
|
||||
* return to a \_pleroma shell into pleroma's installation directory (`su _pleroma -;cd ~/pleroma`) and run `MIX_ENV=prod mix ecto.migrate`
|
||||
|
||||
As \_akkoma in /home/\_akkoma/akkoma, you can now run `LC_ALL=en_US.UTF-8 MIX_ENV=prod mix phx.server` to start your instance.
|
||||
As \_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.
|
||||
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 akkoma at boot
|
||||
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).
|
||||
##### Starting pleroma 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).
|
||||
|
||||
|
||||
#### 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 \_akkoma 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.
|
||||
```
|
||||
LC_ALL=en_US.UTF-8 MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
|
||||
```
|
||||
|
||||
#### Further reading
|
||||
|
||||
{! installation/further_reading.include !}
|
||||
{! backend/installation/further_reading.include !}
|
||||
|
||||
{! support.include !}
|
||||
## 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.
|
121
docs/installation/openbsd_fi.md
Normal file
121
docs/installation/openbsd_fi.md
Normal file
|
@ -0,0 +1,121 @@
|
|||
# Pleroman asennus OpenBSD:llä
|
||||
|
||||
Tarvitset:
|
||||
* Oman domainin
|
||||
* OpenBSD 6.3 -serverin
|
||||
* Auttavan ymmärryksen unix-järjestelmistä
|
||||
|
||||
Komennot, joiden edessä on '#', tulee ajaa käyttäjänä `root`. Tämä on
|
||||
suositeltavaa tehdä komennon `doas` avulla, katso `doas (1)` ja `doas.conf (5)`.
|
||||
Tästä eteenpäin oletuksena on, että domain "esimerkki.com" osoittaa
|
||||
serverin IP-osoitteeseen.
|
||||
|
||||
Jos asennuksen kanssa on ongelmia, IRC-kanava #pleroma Libera.chat tai
|
||||
Matrix-kanava #pleroma:libera.chat ovat hyviä paikkoja löytää apua
|
||||
(englanniksi), `/msg eal kukkuu` jos haluat välttämättä puhua härmää.
|
||||
|
||||
Asenna tarvittava ohjelmisto:
|
||||
|
||||
`# pkg_add git elixir gmake postgresql-server-10.3 postgresql-contrib-10.3 cmake ffmpeg ImageMagick`
|
||||
|
||||
#### Optional software
|
||||
|
||||
[`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md):
|
||||
* ImageMagick
|
||||
* ffmpeg
|
||||
* exiftool
|
||||
|
||||
Asenna tarvittava ohjelmisto:
|
||||
|
||||
`# pkg_add ImageMagick ffmpeg p5-Image-ExifTool`
|
||||
|
||||
Luo postgresql-tietokanta:
|
||||
|
||||
`# su - _postgresql`
|
||||
|
||||
`$ mkdir /var/postgresql/data`
|
||||
|
||||
`$ initdb -D /var/postgresql/data -E UTF8`
|
||||
|
||||
`$ createdb`
|
||||
|
||||
Käynnistä tietokanta ja aseta se käynnistymään automaattisesti.
|
||||
|
||||
`# rcctl start postgresql`
|
||||
|
||||
`# rcctl enable postgresql`
|
||||
|
||||
Luo käyttäjä pleromaa varten (kysyy muutaman kysymyksen):
|
||||
|
||||
`# adduser pleroma`
|
||||
|
||||
Vaihda pleroma-käyttäjään ja mene kotihakemistoosi:
|
||||
|
||||
`# su - pleroma`
|
||||
|
||||
Lataa pleroman lähdekoodi:
|
||||
|
||||
`$ git clone -b stable https://git.pleroma.social/pleroma/pleroma.git`
|
||||
|
||||
`$ cd pleroma`
|
||||
|
||||
Asenna tarvittavat elixir-kirjastot:
|
||||
|
||||
`$ mix deps.get`
|
||||
|
||||
`$ mix deps.compile`
|
||||
|
||||
Luo tarvittava konfiguraatio:
|
||||
|
||||
`$ mix generate_config`
|
||||
|
||||
`$ cp config/generated_config.exs config/prod.secret.exs`
|
||||
|
||||
Aja luodut tietokantakomennot:
|
||||
|
||||
`# su _postgres -c 'psql -f config/setup_db.psql'`
|
||||
|
||||
`$ MIX_ENV=prod mix ecto.migrate`
|
||||
|
||||
Käynnistä pleroma-prosessi:
|
||||
|
||||
`$ MIX_ENV=prod mix compile`
|
||||
|
||||
`$ MIX_ENV=prod mix phx.server`
|
||||
|
||||
Tässä vaiheessa on hyvä tarkistaa että asetukset ovat oikein. Avaa selaimella,
|
||||
curlilla tai vastaavalla työkalulla `esimerkki.com:4000/api/v1/instance` ja katso
|
||||
että kohta "uri" on "https://esimerkki.com".
|
||||
|
||||
Huom! Muista varmistaa että muuttuja MIX_ENV on "prod" mix-komentoja ajaessasi.
|
||||
Mix lukee oikean konfiguraatiotiedoston sen mukaisesti.
|
||||
|
||||
Ohessa enimmäkseen toimivaksi todettu rc.d-skripti pleroman käynnistämiseen.
|
||||
Kirjoita se tiedostoon /etc/rc.d/pleroma. Tämän jälkeen aja
|
||||
`# chmod +x /etc/rc.d/pleroma`, ja voit käynnistää pleroman komennolla
|
||||
`# /etc/rc.d/pleroma start`.
|
||||
|
||||
```
|
||||
#!/bin/ksh
|
||||
#/etc/rc.d/pleroma
|
||||
|
||||
daemon="cd /home/pleroma/pleroma;MIX_ENV=prod /usr/local/bin/elixir"
|
||||
daemon_flags="--detached /usr/local/bin/mix phx.server"
|
||||
daemon_user="pleroma"
|
||||
rc_reload="NO"
|
||||
rc_bg="YES"
|
||||
|
||||
pexp="beam"
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
rc_cmd $1
|
||||
```
|
||||
|
||||
Tämän jälkeen tarvitset enää HTTP-serverin välittämään kutsut pleroma-prosessille.
|
||||
Tiedostosta `install/pleroma.nginx` löytyy esimerkkikonfiguraatio, ja TLS-sertifikaatit
|
||||
saat ilmaiseksi esimerkiksi [letsencryptiltä](https://certbot.eff.org/lets-encrypt/opbsd-nginx.html).
|
||||
Nginx asentuu yksinkertaisesti komennolla `# pkg_add nginx`.
|
||||
|
||||
Kun olet valmis, avaa https://esimerkki.com selaimessasi. Luo käyttäjä ja seuraa kiinnostavia
|
||||
tyyppejä muilla palvelimilla!
|
|
@ -1,12 +1,11 @@
|
|||
# Installing on Linux using OTP releases
|
||||
|
||||
{! installation/otp_vs_from_source.include !}
|
||||
{! backend/installation/otp_vs_from_source.include !}
|
||||
|
||||
This guide covers a installation using an OTP release. To install Akkoma from source, please check out the corresponding guide for your distro.
|
||||
This guide covers a installation using an OTP release. To install Pleroma from source, please check out the corresponding guide for your distro.
|
||||
|
||||
## 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
|
||||
* For installing OTP releases on RedHat-based distros like Fedora and Centos Stream, please follow [this guide](./otp_redhat_en.md) instead.
|
||||
* A (sub)domain pointed to the machine
|
||||
|
||||
You will be running commands as root. If you aren't root already, please elevate your priviledges by executing `sudo su`/`su`.
|
||||
|
@ -15,23 +14,16 @@ While in theory OTP releases are possbile to install on any compatible machine,
|
|||
|
||||
### Detecting flavour
|
||||
|
||||
This is a little more complex than it used to be (thanks ubuntu)
|
||||
Paste the following into the shell:
|
||||
```sh
|
||||
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"
|
||||
```
|
||||
|
||||
Use the following mapping to figure out your flavour:
|
||||
|
||||
| distribution | flavour |
|
||||
| ------------- | ------------ |
|
||||
| debian stable | amd64 |
|
||||
| ubuntu focal | amd64 |
|
||||
| ubuntu jammy | ubuntu-jammy |
|
||||
| alpine | amd64-musl |
|
||||
|
||||
Other similar distributions will _probably_ work, but if it is not listed above, there is no official
|
||||
support.
|
||||
If your platform is supported the output will contain the flavour string, you will need it later. If not, this just means that we don't build releases for your platform, you can still try installing from source.
|
||||
|
||||
### Installing the required packages
|
||||
|
||||
Other than things bundled in the OTP release Akkoma depends on:
|
||||
Other than things bundled in the OTP release Pleroma depends on:
|
||||
|
||||
* curl (to download the release build)
|
||||
* unzip (needed to unpack release builds)
|
||||
|
@ -112,62 +104,62 @@ Restart PostgreSQL to apply configuration changes:
|
|||
systemctl restart postgresql
|
||||
```
|
||||
|
||||
### Installing Akkoma
|
||||
### Installing Pleroma
|
||||
```sh
|
||||
# Create a Akkoma user
|
||||
adduser --system --shell /bin/false --home /opt/akkoma akkoma
|
||||
# Create a Pleroma user
|
||||
adduser --system --shell /bin/false --home /opt/pleroma pleroma
|
||||
|
||||
# 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
|
||||
export FLAVOUR="amd64-musl"
|
||||
|
||||
# Clone the release build into a temporary directory and unpack it
|
||||
su akkoma -s $SHELL -lc "
|
||||
curl 'https://akkoma-updates.s3-website.fr-par.scw.cloud/develop/akkoma-$FLAVOUR.zip' -o /tmp/akkoma.zip
|
||||
unzip /tmp/akkoma.zip -d /tmp/
|
||||
su pleroma -s $SHELL -lc "
|
||||
curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=$FLAVOUR' -o /tmp/pleroma.zip
|
||||
unzip /tmp/pleroma.zip -d /tmp/
|
||||
"
|
||||
|
||||
# Move the release to the home directory and delete temporary files
|
||||
su akkoma -s $SHELL -lc "
|
||||
mv /tmp/release/* /opt/akkoma
|
||||
su pleroma -s $SHELL -lc "
|
||||
mv /tmp/release/* /opt/pleroma
|
||||
rmdir /tmp/release
|
||||
rm /tmp/akkoma.zip
|
||||
rm /tmp/pleroma.zip
|
||||
"
|
||||
# Create uploads directory and set proper permissions (skip if planning to use a remote uploader)
|
||||
# Note: It does not have to be `/var/lib/akkoma/uploads`, the config generator will ask about the upload directory later
|
||||
# Note: It does not have to be `/var/lib/pleroma/uploads`, the config generator will ask about the upload directory later
|
||||
|
||||
mkdir -p /var/lib/akkoma/uploads
|
||||
chown -R akkoma /var/lib/akkoma
|
||||
mkdir -p /var/lib/pleroma/uploads
|
||||
chown -R pleroma /var/lib/pleroma
|
||||
|
||||
# Create custom public files directory (custom emojis, frontend bundle overrides, robots.txt, etc.)
|
||||
# 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/akkoma/static
|
||||
chown -R akkoma /var/lib/akkoma
|
||||
# Note: It does not have to be `/var/lib/pleroma/static`, the config generator will ask about the custom public files directory later
|
||||
mkdir -p /var/lib/pleroma/static
|
||||
chown -R pleroma /var/lib/pleroma
|
||||
|
||||
# Create a config directory
|
||||
mkdir -p /etc/akkoma
|
||||
chown -R akkoma /etc/akkoma
|
||||
mkdir -p /etc/pleroma
|
||||
chown -R pleroma /etc/pleroma
|
||||
|
||||
# Run the config generator
|
||||
su akkoma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/akkoma/config.exs --output-psql /tmp/setup_db.psql"
|
||||
su pleroma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql"
|
||||
|
||||
# Create the postgres database
|
||||
su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql"
|
||||
|
||||
# Create the database schema
|
||||
su akkoma -s $SHELL -lc "./bin/pleroma_ctl migrate"
|
||||
su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"
|
||||
|
||||
# If you have installed RUM indexes uncommend and run
|
||||
# su akkoma -s $SHELL -lc "./bin/pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/"
|
||||
# su pleroma -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
|
||||
su akkoma -s $SHELL -lc "./bin/pleroma daemon"
|
||||
su pleroma -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
|
||||
sleep 20 && curl http://localhost:4000/api/v1/instance
|
||||
|
||||
# Stop the instance
|
||||
su akkoma -s $SHELL -lc "./bin/pleroma stop"
|
||||
su pleroma -s $SHELL -lc "./bin/pleroma stop"
|
||||
```
|
||||
|
||||
### Setting up nginx and getting Let's Encrypt SSL certificaties
|
||||
|
@ -177,24 +169,24 @@ su akkoma -s $SHELL -lc "./bin/pleroma stop"
|
|||
certbot certonly --standalone --preferred-challenges http -d yourinstance.tld
|
||||
```
|
||||
|
||||
#### Copy Akkoma nginx configuration to the nginx folder
|
||||
#### Copy Pleroma nginx configuration to the nginx folder
|
||||
|
||||
The location of nginx configs is dependent on the distro
|
||||
|
||||
=== "Alpine"
|
||||
```
|
||||
cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/conf.d/akkoma.conf
|
||||
cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/conf.d/pleroma.conf
|
||||
```
|
||||
|
||||
=== "Debian/Ubuntu"
|
||||
```
|
||||
cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/sites-available/akkoma.conf
|
||||
ln -s /etc/nginx/sites-available/akkoma.conf /etc/nginx/sites-enabled/akkoma.conf
|
||||
cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.conf
|
||||
ln -s /etc/nginx/sites-available/pleroma.conf /etc/nginx/sites-enabled/pleroma.conf
|
||||
```
|
||||
|
||||
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
|
||||
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
|
||||
```sh
|
||||
cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/akkoma.conf
|
||||
cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/pleroma.conf
|
||||
```
|
||||
|
||||
#### Edit the nginx config
|
||||
|
@ -217,33 +209,33 @@ nginx -t
|
|||
systemctl start nginx
|
||||
```
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
### Setting up a system service
|
||||
|
||||
=== "Alpine"
|
||||
```
|
||||
# Copy the service into a proper directory
|
||||
cp /opt/akkoma/installation/init.d/akkoma /etc/init.d/akkoma
|
||||
cp /opt/pleroma/installation/init.d/pleroma /etc/init.d/pleroma
|
||||
|
||||
# Start akkoma and enable it on boot
|
||||
rc-service akkoma start
|
||||
rc-update add akkoma
|
||||
# Start pleroma and enable it on boot
|
||||
rc-service pleroma start
|
||||
rc-update add pleroma
|
||||
```
|
||||
|
||||
=== "Debian/Ubuntu"
|
||||
```
|
||||
# Copy the service into a proper directory
|
||||
cp /opt/akkoma/installation/akkoma.service /etc/systemd/system/akkoma.service
|
||||
cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
|
||||
|
||||
# Start akkoma and enable it on boot
|
||||
systemctl start akkoma
|
||||
systemctl enable akkoma
|
||||
# Start pleroma and enable it on boot
|
||||
systemctl start pleroma
|
||||
systemctl enable pleroma
|
||||
```
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
{! support.include !}
|
||||
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).
|
||||
|
||||
## Post installation
|
||||
|
||||
|
@ -274,10 +266,10 @@ nginx -t
|
|||
# Add it to the daily cron
|
||||
echo '#!/bin/sh
|
||||
certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --post-hook "rc-service nginx reload"
|
||||
' > /etc/periodic/daily/renew-akkoma-cert
|
||||
chmod +x /etc/periodic/daily/renew-akkoma-cert
|
||||
' > /etc/periodic/daily/renew-pleroma-cert
|
||||
chmod +x /etc/periodic/daily/renew-pleroma-cert
|
||||
|
||||
# If everything worked the output should contain /etc/cron.daily/renew-akkoma-cert
|
||||
# If everything worked the output should contain /etc/cron.daily/renew-pleroma-cert
|
||||
run-parts --test /etc/periodic/daily
|
||||
```
|
||||
|
||||
|
@ -292,22 +284,24 @@ nginx -t
|
|||
# Add it to the daily cron
|
||||
echo '#!/bin/sh
|
||||
certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --post-hook "systemctl reload nginx"
|
||||
' > /etc/cron.daily/renew-akkoma-cert
|
||||
chmod +x /etc/cron.daily/renew-akkoma-cert
|
||||
' > /etc/cron.daily/renew-pleroma-cert
|
||||
chmod +x /etc/cron.daily/renew-pleroma-cert
|
||||
|
||||
# If everything worked the output should contain /etc/cron.daily/renew-akkoma-cert
|
||||
# If everything worked the output should contain /etc/cron.daily/renew-pleroma-cert
|
||||
run-parts --test /etc/cron.daily
|
||||
```
|
||||
|
||||
## Create your first user and set as admin
|
||||
```sh
|
||||
cd /opt/akkoma
|
||||
su akkoma -s $SHELL -lc "./bin/pleroma_ctl user new joeuser joeuser@sld.tld --admin"
|
||||
cd /opt/pleroma
|
||||
su pleroma -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.
|
||||
|
||||
## Further reading
|
||||
|
||||
{! installation/further_reading.include !}
|
||||
{! backend/installation/further_reading.include !}
|
||||
|
||||
{! support.include !}
|
||||
## 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).
|
3
docs/installation/otp_vs_from_source.include
Normal file
3
docs/installation/otp_vs_from_source.include
Normal file
|
@ -0,0 +1,3 @@
|
|||
## 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.
|
|
@ -1,3 +1,3 @@
|
|||
{! installation/otp_vs_from_source.include !}
|
||||
{! backend/installation/otp_vs_from_source.include !}
|
||||
|
||||
This guide covers a from-source installation. To install using OTP releases, please check out [the OTP guide](./otp_en.md).
|
9
docs/installation/yunohost_en.md
Normal file
9
docs/installation/yunohost_en.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# 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,37 +0,0 @@
|
|||
site_name: Akkoma Documentation
|
||||
theme:
|
||||
favicon: 'images/akko_badday.png'
|
||||
name: 'material'
|
||||
custom_dir: 'theme'
|
||||
# Disable google fonts
|
||||
font: false
|
||||
logo: 'images/akko_badday.png'
|
||||
features:
|
||||
- tabs
|
||||
palette:
|
||||
primary: 'deep purple'
|
||||
accent: 'blue grey'
|
||||
|
||||
extra_css:
|
||||
- css/extra.css
|
||||
repo_name: 'AkkomaGang/akkoma'
|
||||
repo_url: 'https://akkoma.dev/AkkomaGang/akkoma'
|
||||
|
||||
extra:
|
||||
repo_icon: gitea
|
||||
|
||||
markdown_extensions:
|
||||
# Note/warning blocks https://squidfunk.github.io/mkdocs-material/extensions/admonition/
|
||||
- admonition
|
||||
- codehilite:
|
||||
guess_lang: false
|
||||
# Make it possible to link to every header https://squidfunk.github.io/mkdocs-material/extensions/permalinks/
|
||||
- toc:
|
||||
permalink: true
|
||||
- pymdownx.tasklist:
|
||||
custom_checkbox: true
|
||||
- pymdownx.superfences
|
||||
- pymdownx.tabbed
|
||||
- pymdownx.details
|
||||
- markdown_include.include:
|
||||
base_path: docs
|
|
@ -1,22 +0,0 @@
|
|||
click==8.1.3
|
||||
ghp-import==2.1.0
|
||||
importlib-metadata==4.12.0
|
||||
Jinja2==3.1.2
|
||||
Markdown==3.3.7
|
||||
markdown-include==0.6.0
|
||||
MarkupSafe==2.1.1
|
||||
mergedeep==1.3.4
|
||||
mkdocs==1.3.0
|
||||
mkdocs-bootswatch==1.1
|
||||
mkdocs-material==8.1.8
|
||||
mkdocs-material-extensions==1.0.3
|
||||
packaging==21.3
|
||||
Pygments==2.11.2
|
||||
pymdown-extensions==9.1
|
||||
pyparsing==3.0.9
|
||||
python-dateutil==2.8.2
|
||||
PyYAML==6.0
|
||||
pyyaml_env_tag==0.1
|
||||
six==1.16.0
|
||||
watchdog==2.1.9
|
||||
zipp==3.8.0
|
64
docs/theme/partials/source.html
vendored
64
docs/theme/partials/source.html
vendored
|
@ -1,64 +0,0 @@
|
|||
<!--
|
||||
Copyright (c) 2016-2019 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
{% import "partials/language.html" as lang with context %}
|
||||
|
||||
<!--
|
||||
Check whether the repository is hosted on one of the supported code hosting
|
||||
platforms (GitHub, GitLab or Bitbucket) to show icon.
|
||||
-->
|
||||
{% set platform = config.extra.repo_icon or config.repo_url %}
|
||||
{% if "github" in platform %}
|
||||
{% set repo_type = "github" %}
|
||||
{% elif "gitlab" in platform %}
|
||||
{% set repo_type = "gitlab" %}
|
||||
{% elif "bitbucket" in platform %}
|
||||
{% set repo_type = "bitbucket" %}
|
||||
{% else %}
|
||||
{% set repo_type = "" %}
|
||||
{% endif %}
|
||||
|
||||
{% if page and page.url.startswith('backend') %}
|
||||
{% set repo_url = "https://git.pleroma.social/pleroma/pleroma" %}
|
||||
{% set repo_name = "pleroma/pleroma" %}
|
||||
{% elif page and page.url.startswith('frontend') %}
|
||||
{% set repo_url = "https://git.pleroma.social/pleroma/pleroma-fe" %}
|
||||
{% set repo_name = "pleroma/pleroma-fe" %}
|
||||
{% else %}
|
||||
{% set repo_url = config.repo_url %}
|
||||
{% set repo_name = config.repo_name %}
|
||||
{% endif %}
|
||||
|
||||
<!-- Repository containing source -->
|
||||
<a href="{{ repo_url }}" title="{{ lang.t('source.link.title') }}"
|
||||
class="md-source" data-md-source="{{ repo_type }}">
|
||||
{% if repo_type %}
|
||||
<div class="md-source__icon">
|
||||
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||
<use xlink:href="#__{{ repo_type }}" width="24" height="24"></use>
|
||||
</svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="md-source__repository">
|
||||
{{ repo_name }}
|
||||
</div>
|
||||
</a>
|
|
@ -1,21 +0,0 @@
|
|||
; 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
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue