summaryrefslogtreecommitdiff
path: root/docs/installation
diff options
context:
space:
mode:
Diffstat (limited to 'docs/installation')
-rw-r--r--docs/installation/debian_based_jp.md6
-rw-r--r--docs/installation/freebsd_en.md3
-rw-r--r--docs/installation/generic_dependencies.include6
-rw-r--r--docs/installation/gentoo_en.md4
-rw-r--r--docs/installation/gentoo_otp_en.md2
-rw-r--r--docs/installation/netbsd_en.md153
-rw-r--r--docs/installation/openbsd_en.md4
-rw-r--r--docs/installation/otp_en.md2
8 files changed, 130 insertions, 50 deletions
diff --git a/docs/installation/debian_based_jp.md b/docs/installation/debian_based_jp.md
index 1424ad7f4..5a0823a63 100644
--- a/docs/installation/debian_based_jp.md
+++ b/docs/installation/debian_based_jp.md
@@ -12,9 +12,9 @@ Note: This article is potentially outdated because at this time we may not have
### 必要なソフトウェア
-- 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ユーザーでインストールしてください)
+- PostgreSQL 11.0以上 (Ubuntu16.04では9.5しか提供されていないので,[](https://www.postgresql.org/download/linux/ubuntu/)こちらから新しいバージョンを入手してください)
+- `postgresql-contrib` 11.0以上 (同上)
+- Elixir 1.13 以上 ([Debianのリポジトリからインストールしないこと!!! ここからインストールすること!](https://elixir-lang.org/install.html#unix-and-unix-like)。または [asdf](https://github.com/asdf-vm/asdf) をpleromaユーザーでインストールしてください)
- `erlang-dev`
- `erlang-nox`
- `git`
diff --git a/docs/installation/freebsd_en.md b/docs/installation/freebsd_en.md
index 50ed30d74..02513daf2 100644
--- a/docs/installation/freebsd_en.md
+++ b/docs/installation/freebsd_en.md
@@ -9,7 +9,7 @@ This document was written for FreeBSD 12.1, but should be work on future release
This assumes the target system has `pkg(8)`.
```
-# pkg install elixir postgresql12-server postgresql12-client postgresql12-contrib git-lite sudo nginx gmake acme.sh cmake
+# pkg install elixir postgresql12-server postgresql12-client postgresql12-contrib git-lite sudo nginx gmake acme.sh cmake vips
```
Copy the rc.d scripts to the right directory:
@@ -41,6 +41,7 @@ Create a user for Pleroma:
```
# pw add user pleroma -m
# echo 'export LC_ALL="en_US.UTF-8"' >> /home/pleroma/.profile
+# echo 'export VIX_COMPILATION_MODE=PLATFORM_PROVIDED_LIBVIPS' >> /home/pleroma/.profile
# su -l pleroma
```
diff --git a/docs/installation/generic_dependencies.include b/docs/installation/generic_dependencies.include
index 3365a36a8..bdb7f94d3 100644
--- a/docs/installation/generic_dependencies.include
+++ b/docs/installation/generic_dependencies.include
@@ -1,8 +1,8 @@
## Required dependencies
-* PostgreSQL >=9.6
-* Elixir >=1.11.0 <1.15
-* Erlang OTP >=22.2.0 <26
+* PostgreSQL >=11.0
+* Elixir >=1.13.0 <1.17
+* Erlang OTP >=22.2.0 (supported: <27)
* git
* file / libmagic
* gcc or clang
diff --git a/docs/installation/gentoo_en.md b/docs/installation/gentoo_en.md
index 87128d6f6..dc47d27f8 100644
--- a/docs/installation/gentoo_en.md
+++ b/docs/installation/gentoo_en.md
@@ -59,7 +59,7 @@ Gentoo quite pointedly does not come with a cron daemon installed, and as such i
If you would not like to install the optional packages, remove them from this line.
-If you're running this from a low-powered virtual machine, it should work though it will take some time. There were no issues on a VPS with a single core and 1GB of RAM; if you are using an even more limited device and run into issues, you can try creating a swapfile or use a more powerful machine running Gentoo to [cross build](https://wiki.gentoo.org/wiki/Cross_build_environment). If you have a wait ahead of you, now would be a good time to take a break, strech a bit, refresh your beverage of choice and/or get a snack, and reply to Arch users' posts with "I use Gentoo btw" as we do.
+If you're running this from a low-powered virtual machine, it should work though it will take some time. There were no issues on a VPS with a single core and 1GB of RAM; if you are using an even more limited device and run into issues, you can try creating a swapfile or use a more powerful machine running Gentoo to [cross build](https://wiki.gentoo.org/wiki/Cross_build_environment). If you have a wait ahead of you, now would be a good time to take a break, stretch a bit, refresh your beverage of choice and/or get a snack, and reply to Arch users' posts with "I use Gentoo btw" as we do.
### Install PostgreSQL
@@ -104,7 +104,7 @@ Not only does this make it much easier to deploy changes you make, as you can co
* 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 `pleroma` user will make finishing the insallation and common maintenence tasks somewhat easier:
+Remove `,wheel` if you do not want this user to be able to use `sudo`, however note that being able to `sudo` as the `pleroma` user will make finishing the installation and common maintenance tasks somewhat easier:
```shell
# useradd -m -G users,wheel -s /bin/bash pleroma
diff --git a/docs/installation/gentoo_otp_en.md b/docs/installation/gentoo_otp_en.md
index 4fafc0c17..20d8835da 100644
--- a/docs/installation/gentoo_otp_en.md
+++ b/docs/installation/gentoo_otp_en.md
@@ -49,7 +49,7 @@ Gentoo quite pointedly does not come with a cron daemon installed, and as such i
If you would not like to install the optional packages, remove them from this line.
-If you're running this from a low-powered virtual machine, it should work though it will take some time. There were no issues on a VPS with a single core and 1GB of RAM; if you are using an even more limited device and run into issues, you can try creating a swapfile or use a more powerful machine running Gentoo to [cross build](https://wiki.gentoo.org/wiki/Cross_build_environment). If you have a wait ahead of you, now would be a good time to take a break, strech a bit, refresh your beverage of choice and/or get a snack, and reply to Arch users' posts with "I use Gentoo btw" as we do.
+If you're running this from a low-powered virtual machine, it should work though it will take some time. There were no issues on a VPS with a single core and 1GB of RAM; if you are using an even more limited device and run into issues, you can try creating a swapfile or use a more powerful machine running Gentoo to [cross build](https://wiki.gentoo.org/wiki/Cross_build_environment). If you have a wait ahead of you, now would be a good time to take a break, stretch a bit, refresh your beverage of choice and/or get a snack, and reply to Arch users' posts with "I use Gentoo btw" as we do.
### Setup PostgreSQL
diff --git a/docs/installation/netbsd_en.md b/docs/installation/netbsd_en.md
index 2ade7df98..7c003700c 100644
--- a/docs/installation/netbsd_en.md
+++ b/docs/installation/netbsd_en.md
@@ -2,14 +2,41 @@
{! backend/installation/generic_dependencies.include !}
-## Installing software used in this guide
+# Installation options
+
+Currently there are two options available for NetBSD: manual installation (from source) or using experimental package from [pkgsrc-wip](https://github.com/NetBSD/pkgsrc-wip/tree/master/pleroma).
+
+WIP package can be installed via pkgsrc and can be crosscompiled for easier binary distribution. Source installation most probably will be restricted to a single machine.
+
+## pkgsrc installation
+
+WIP package creates Mix.Release (similar to how Docker images are built) but doesn't bundle Erlang runtime, listing it as a dependency instead. This allows for easier and more modular installations, especially on weaker machines. Currently this method also does not support all features of `pleroma_ctl` command (like changing installation type or managing frontends) as NetBSD is not yet a supported binary flavour of Pleroma's CI.
+
+In any case, you can install it the same way as any other `pkgsrc-wip` package:
+
+```
+cd /usr/pkgsrc
+git clone --depth 1 git://wip.pkgsrc.org/pkgsrc-wip.git wip
+cp -rf wip/pleroma www
+cp -rf wip/libvips graphics
+cd /usr/pkgsrc/www/pleroma
+bmake && bmake install
+```
+
+Use `bmake package` to create a binary package. This can come especially handy if you're targeting embedded or low-power systems and are crosscompiling on a more powerful machine.
+
+> Note: Elixir has [endianness bug](https://github.com/elixir-lang/elixir/issues/2785) which requires it to be compiled on a machine with the same endianness. In other words, package crosscompiled on amd64 (little endian) won't work on powerpc or sparc machines (big endian). While _in theory™_ nothing catastrophic should happen, one can see that for example regexes won't work properly. Some distributions just strip this warning away, so it doesn't bother the users... anyway, you've been warned.
+
+## Source installation
pkgin should have been installed by the NetBSD installer if you selected
-the right options. If it isn't installed, install it using pkg_add.
+the right options. If it isn't installed, install it using `pkg_add`.
Note that `postgresql11-contrib` is needed for the Postgres extensions
Pleroma uses.
+> Note: you can use modern versions of PostgreSQL. In this case, just use `postgresql16-contrib` and so on.
+
The `mksh` shell is needed to run the Elixir `mix` script.
`# pkgin install acmesh elixir git-base git-docs mksh nginx postgresql11-server postgresql11-client postgresql11-contrib sudo ffmpeg4 ImageMagick`
@@ -29,80 +56,114 @@ shells/mksh
www/nginx
```
-Copy the rc.d scripts to the right directory:
+Create a user for Pleroma:
```
-# cp /usr/pkg/share/examples/rc.d/nginx /usr/pkg/share/examples/rc.d/pgsql /etc/rc.d
+# 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
```
-Add nginx and Postgres to `/etc/rc.conf`:
+Clone the repository:
```
-nginx=YES
-pgsql=YES
+$ cd /home/pleroma
+$ git clone -b stable https://git.pleroma.social/pleroma/pleroma.git
```
-## Configuring postgres
+Get deps and compile:
-First, run `# /etc/rc.d/pgsql start`. Then, `$ sudo -Hu pgsql -g pgsql createdb`.
+```
+$ cd /home/pleroma/pleroma
+$ export MIX_ENV=prod
+$ mix deps.get
+$ mix compile
+```
-### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md))
+## Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md))
`# pkgin install ImageMagick ffmpeg4 p5-Image-ExifTool`
-## Configuring Pleroma
+or via pkgsrc:
-Create a user for Pleroma:
+```
+graphics/p5-Image-ExifTool
+graphics/ImageMagick
+multimedia/ffmpeg4
+```
+
+# Configuration
+
+## Understanding $PREFIX
+
+From now on, you may encounter `$PREFIX` variable in the paths. This variable indicates your current local pkgsrc prefix. Usually it's `/usr/pkg` unless you configured it otherwise. Translating to pkgsrc's lingo, it's called `LOCALBASE`, which essentially means the same this. You may want to set it up for your local shell session (this uses `mksh` which should already be installed as one of the required dependencies):
```
-# 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
+$ export PREFIX=$(pkg_info -Q LOCALBASE mksh)
+$ echo $PREFIX
+/usr/pkg
```
-Clone the repository:
+## Setting up your instance
+
+Now, you need to configure your instance. During this initial configuration, you will be asked some questions about your server. You will need a domain name at this point; it doesn't have to be deployed, but changing it later will be very cumbersome.
+
+If you've installed via pkgsrc, `pleroma_ctl` should already be in your `PATH`; if you've installed from source, it's located at `/home/pleroma/pleroma/release/bin/pleroma_ctl`.
```
-$ cd /home/pleroma
-$ git clone -b stable https://git.pleroma.social/pleroma/pleroma.git
+$ su -l pleroma
+$ pleroma_ctl instance gen --output $PREFIX/etc/pleroma/config.exs --output-psql /tmp/setup_db.psql
```
-Configure Pleroma. Note that you need a domain name at this point:
+During installation, you will be asked about static and upload directories. Don't forget to create them and update permissions:
```
-$ cd /home/pleroma/pleroma
-$ mix deps.get
-$ MIX_ENV=prod mix pleroma.instance gen # You will be asked a few questions here.
+mkdir -p /var/lib/pleroma/uploads
+chown -R pleroma:pleroma /var/lib/pleroma
```
-Since Postgres is configured, we can now initialize the database. There should
-now be a file in `config/setup_db.psql` that makes this easier. Edit it, and
-*change the password* to a password of your choice. Make sure it is secure, since
+## Setting up the database
+
+First, run `# /etc/rc.d/pgsql start`. Then, `$ sudo -Hu pgsql -g pgsql createdb`.
+
+We can now initialize the database. You'll need to edit generated SQL file from the previous step. It's located at `/tmp/setup_db.psql`.
+
+Edit this file, and *change the password* to a password of your choice. Make sure it is secure, since
it'll be protecting your database. Now initialize the database:
```
-$ sudo -Hu pgsql -g pgsql psql -f config/setup_db.psql
+$ sudo -Hu pgsql -g pgsql psql -f /tmp/setup_db.psql
```
Postgres allows connections from all users without a password by default. To
-fix this, edit `/usr/pkg/pgsql/data/pg_hba.conf`. Change every `trust` to
+fix this, edit `$PREFIX/pgsql/data/pg_hba.conf`. Change every `trust` to
`password`.
Once this is done, restart Postgres with `# /etc/rc.d/pgsql restart`.
Run the database migrations.
+
+### pkgsrc installation
+
+```
+pleroma_ctl migrate
+```
+
+### Source installation
+
You will need to do this whenever you update with `git pull`:
```
+$ cd /home/pleroma/pleroma
$ MIX_ENV=prod mix ecto.migrate
```
## Configuring nginx
Install the example configuration file
-`/home/pleroma/pleroma/installation/pleroma.nginx` to
-`/usr/pkg/etc/nginx.conf`.
+(`$PREFIX/share/examples/pleroma/pleroma.nginx` or `/home/pleroma/pleroma/installation/pleroma.nginx`) to
+`$PREFIX/etc/nginx.conf`.
Note that it will need to be wrapped in a `http {}` block. You should add
settings for the nginx daemon outside of the http block, for example:
@@ -176,27 +237,45 @@ Let's add auto-renewal to `/etc/daily.local`
--stateless
```
-## Creating a startup script for Pleroma
+## Autostart
+
+For properly functioning instance, you will need pleroma (backend service), nginx (reverse proxy) and postgresql (database) services running. There's no requirement for them to reside on the same machine, but you have to provide autostart for each of them.
+
+### nginx
+```
+# cp $PREFIX/share/examples/rc.d/nginx /etc/rc.d
+# echo "nginx=YES" >> /etc/rc.conf
+```
+
+### postgresql
+
+```
+# cp $PREFIX/share/examples/rc.d/pgsql /etc/rc.d
+# echo "pgsql=YES" >> /etc/rc.conf
+```
+
+### pleroma
-Copy the startup script to the correct location and make sure it's executable:
+First, copy the script (pkgsrc variant)
+```
+# cp $PREFIX/share/examples/pleroma/pleroma.rc /etc/rc.d/pleroma
+```
+or source variant
```
# 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`:
+Then, add the following to `/etc/rc.conf`:
```
pleroma=YES
-pleroma_home="/home/pleroma"
-pleroma_user="pleroma"
```
-Run `# /etc/rc.d/pleroma start` to start Pleroma.
-
## Conclusion
+Run `# /etc/rc.d/pleroma start` to start Pleroma.
Restart nginx with `# /etc/rc.d/nginx restart` and you should be up and running.
Make sure your time is in sync, or other instances will receive your posts with
diff --git a/docs/installation/openbsd_en.md b/docs/installation/openbsd_en.md
index 9e7e040f5..e58e144d2 100644
--- a/docs/installation/openbsd_en.md
+++ b/docs/installation/openbsd_en.md
@@ -62,7 +62,7 @@ rcctl start postgresql
To check that it started properly and didn't fail right after starting, you can run `ps aux | grep postgres`, there should be multiple lines of output.
#### httpd
-httpd will have three fuctions:
+httpd will have three functions:
* redirect requests trying to reach the instance over http to the https URL
* serve a robots.txt file
@@ -225,7 +225,7 @@ pass in quick on $if inet6 proto icmp6 to ($if) icmp6-type { echoreq unreach par
pass in quick on $if proto tcp to ($if) port { http https } # relayd/httpd
pass in quick on $if proto tcp from $authorized_ssh_clients to ($if) port ssh
```
-Replace *<network interface\>* by your server's network interface name (which you can get with ifconfig). Consider replacing the content of the authorized\_ssh\_clients macro by, for exemple, your home IP address, to avoid SSH connection attempts from bots.
+Replace *<network interface\>* by your server's network interface name (which you can get with ifconfig). Consider replacing the content of the authorized\_ssh\_clients macro by, for example, your home IP address, to avoid SSH connection attempts from bots.
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`.
diff --git a/docs/installation/otp_en.md b/docs/installation/otp_en.md
index a69b2fe7a..86efa27f8 100644
--- a/docs/installation/otp_en.md
+++ b/docs/installation/otp_en.md
@@ -238,7 +238,7 @@ At this point if you open your (sub)domain in a browser you should see a 502 err
systemctl enable pleroma
```
-If everything worked, you should see Pleroma-FE when visiting your domain. If that didn't happen, try reviewing the installation steps, starting Pleroma in the foreground and seeing if there are any errrors.
+If everything worked, you should see 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 errors.
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).