静看光阴荏苒
不管不顾不问不说也不念

Pleroma:支持ActivityPub的社交网络服务器

Pleroma支持ActivityPub,这意味着可以和Mastodon/Misskey上的用户进行互动。

Pleroma的特点是:高性能/内存使用率低,低配置的机器有福了,跑不了Mastodon可以换用Pleroma。而且喜欢小巧/紧凑风格的人,应该会非常喜欢Pleroma的前端和一系列主题。

以下安装步骤基于Debian10。首先安装全部需要用到的软件/依赖:

apt -y install build-essential git nginx certbot python-certbot-nginx \
postgresql postgresql-contrib elixir erlang-inets erlang-dev erlang-tools \
erlang-parsetools erlang-eldap erlang-ssh erlang-xmerl

新建一个不允许登录shell的用户:

useradd -r -s /bin/false -m -d /var/lib/pleroma -U pleroma

拉取项目文件:

mkdir -p /opt/pleroma
chown -R pleroma:pleroma /opt/pleroma
sudo -u pleroma git clone -b master https://git.pleroma.social/pleroma/pleroma /opt/pleroma
cd /opt/pleroma

安装依赖:

sudo -u pleroma mix deps.get

生成配置文件:

sudo -u pleroma mix pleroma.instance gen

流程(需要自己改动的就下面这几个):

What domain will your instance use? (e.g pleroma.soykaf.com) []  pleroma.koko.cat
What is the name of your instance? (e.g. Pleroma/Soykaf) []  Pleroma/imlala     
What is your admin email address? []  1062951199@qq.com
What email address do you want to use for sending email notifications? [1062951199@qq.com]  
Do you want search engines to index your site? (y/n) [y] 

后面这些全部回车保持默认即可:

Do you want to store the configuration in the database (allows controlling it from admin-fe)? (y/n) [n]   
What is the hostname of your database? [localhost]  
What is the name of your database? [pleroma]  
What is the user used to connect to your database? [pleroma]  
What is the password used to connect to your database? [autogenerated]  
Would you like to use RUM indices? [n]  
What port will the app listen to (leave it if you are using the default setup with nginx)? [4000]  
What ip will the app listen to (leave it if you are using the default setup with nginx)? [127.0.0.1]  
What directory should media uploads go in (when using the local uploader)? [uploads]  
What directory should custom public files be read from (custom emojis, frontend bundle overrides, robots.txt, etc.)? [instance/static/]

将生成好的配置文件重命名:

mv config/generated_config.exs  config/prod.secret.exs

导入数据库:

sudo -u postgres psql -f config/setup_db.psql

执行数据库迁移:

sudo -u pleroma MIX_ENV=prod mix ecto.migrate

复制systemd服务文件:

cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service

启动pleroma:

systemctl start pleroma.service
systemctl enable pleroma.service

新建Nginx反代配置文件:

nano /etc/nginx/conf.d/pleroma.conf

写入:

server {
    listen       80;
    server_name  pleroma.koko.cat;
    client_max_body_size 100M;

    location / {
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;
        proxy_pass http://127.0.0.1:4000;
    }
}

签发SSL证书:

certbot --nginx --agree-tos --no-eff-email

现在打开你的域名,应该能看到Pleroma的首页:

回到终端创建管理员账号:

sudo -u pleroma MIX_ENV=prod mix pleroma.user new imlala 1062951199@qq.com --admin

说实话,我还真的是更喜欢Pleroma的风格,Mastodon的界面给人感觉太宽阔了,给人一种空洞的感觉,而Pleroma就有点小家碧玉的味道:

最后还是要简单测试一下ActivityPub,在我的Mastodon实例内可以搜索到Pleroma的用户:

赞(2)
未经允许不得转载:荒岛 » Pleroma:支持ActivityPub的社交网络服务器
分享到: 更多 (0)

评论 10

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    :cry: 高产似母猪 :grin:

    瞎折腾5年前 (2019-08-21) Google Chrome 76.0.3809.89 Google Chrome 76.0.3809.89 Android 8.1.0 Android 8.1.0回复
  2. #2

    233O:-)

    Summer5年前 (2019-08-21) Google Chrome 76.0.3809.111 Google Chrome 76.0.3809.111 Android 9 Android 9回复
  3. #3

    lala大佬 可以看一下这个项目吗?自己搭建好像有点问题

    永远爱lala5年前 (2019-08-21) Google Chrome 76.0.3809.100 Google Chrome 76.0.3809.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 我不是大佬,你才是大佬。。要不你就直接说碰到什么问题了吧。。

      LALA5年前 (2019-08-23) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  4. #4

    https://github.com/kasuganosoras/Pigeon
    呜呜呜 忘了加链接

    永远爱lala5年前 (2019-08-21) Google Chrome 76.0.3809.100 Google Chrome 76.0.3809.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  5. #5

    你可以体会到一个社交网站只有自己的那种孤独感 :razz:

    橘子5年前 (2019-08-22) Google Chrome 76.0.3809.121 Google Chrome 76.0.3809.121 Windows 10 Windows 10回复
    • 自嗨感。。 :razz:

      LALA5年前 (2019-08-22) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 好嗨哟,感觉人生已经到达了巅峰

        davvv5年前 (2019-08-23) Google Chrome 76.0.3809.100 Google Chrome 76.0.3809.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  6. #6

    git clone -b stable https://git.pleroma.social/pleroma/pleroma /opt/pleroma

    老男孩1年前 (2023-07-21) Google Chrome 114.0.0.0 Google Chrome 114.0.0.0 Windows 10 x64 Edition Windows 10 x64 Edition回复

分享创造快乐

广告合作资源投稿