ImmunoglobulinE · @lgE
482 followers · 777 posts · Server mstdn.one

部分个人嘟文索引

长毛象服务器选配新手指南 mstdn.one/@lgE/107942721914235
Cloudflare R2 评测和对比mstdn.one/@lgE/109224518430545
GCS 做对象存储的数据 mstdn.one/@lgE/107229146486132
自建对象存储可考虑 SeaweedFS mstdn.one/@lgE/106596477669652 mstdn.one/@lgE/106596887183768
中继搭建小经验 mstdn.one/@lgE/108255580372769
站点防护小经验 mstdn.one/@lgE/106754670661233 mstdn.one/@lgE/106798612388608
跨境访问体验热知识 mstdn.one/@lgE/108238248810739
可能暴露隐私的途径 mstdn.one/@list/10776301908238
WebRTC泄露自查 mstdn.one/@lgE/108346328354514

另请留意侧重日常使用 @list 和建站运维 @keeper 的小号,同时推荐 标签。

#长毛象运维 #长毛象运营

Last updated 2 years ago

ImmunoglobulinE · @lgE
457 followers · 742 posts · Server mstdn.one

想请教大家,v4.0 下自定义logo、favicon有什么推荐的方法?

#长毛象运维

Last updated 2 years ago

Su • 最后一代 · @su
79 followers · 698 posts · Server mastodon.0ne.day
ImmunoglobulinE · @lgE
457 followers · 742 posts · Server mstdn.one

个人认为,Cloudflare R2 占据了一个巧妙的生态位。

相比大厂,它存储单价未必最便宜,但流量完全免费和较高的操作数免费额度是明显的优势。

相比小厂,存储单价比它便宜的s3,我知道的有4家:

1. Backblaze
$0.005/GB
流量便宜,走合作CDN免费
操作收费,但比较划算(特别是Put免费)
稳定性一般,不时有异常
backblaze.com/b2/cloud-storage

2. Scaleway
Multi-AZ €0.0127/GB
Single-AZ €0.0098/GB 75GB免费
流量便宜,75GB免费,同厂有免流低价VPS mstdn.one/@lgE/106584007667468
操作免费
稳定性堪忧,不宜用于公共站点
- acg.mn/@Showfom/10554224606109
- yukieyun.net/tech/mastodon-med
- foxsay.southfox.me/@SouthFox/1
- mstdn.one/@lgE/108241016185617
scaleway.com/en/pricing/?tags=

3. Wasabi
$0.006/GB
流量免费、操作免费(fair use)
1TB起售,至少存放90天
稳定性尚可,偶见故障
- o3o.ca/@salt/10656993299600137
wasabi.com/cloud-storage-prici

4. Contabo
$0.012/GB
流量免费、操作免费
以 250 GB 为单位销售
稳定性不明
contabo.com/en/object-storage/

可见,R2存储价格中等+流量全免+操作数高免费额度+无门槛按量计费+大厂信誉的配方,对不少人是有吸引力的。

对于R2和其他s3的情况,欢迎补充。

#长毛象运维

Last updated 2 years ago

ImmunoglobulinE · @lgE
457 followers · 742 posts · Server mstdn.one

Cloudflare R2 初步测评
1.特性
近期R2支持公开存储桶后,其成为长毛象媒体对象存储的障碍基本被扫除:blog.cloudflare.com/zh-cn/r2-g
虽然s3的支持还不完整,但已经基本够用: developers.cloudflare.com/r2/d
有容量和操作数的统计图表,操作数精确到分钟(图1)。
R2延续cf传统全免流量费,此外可以直接集成CDN。考虑到cf还是域名注册商,续费价很多也是便宜的(图2),相当于是一站式服务了。
目前能想到的账单风险只有Class B的操作数,应该也能通过正确配置CDN缓存和WAF控制。因此媒体可以不用再本地反代。
当然,个人不推荐过度依赖单一服务商。(cf注册的域名不能在别家解析)

#长毛象运维

Last updated 2 years ago

· @storm
3471 followers · 2198 posts · Server me.ns.ci

@board 抱歉各位,中继relay.mastodon.fun已经恢复,一直没有抽出时间修复,前期因为机房更换新机器,硬盘直接迁移了过去,但是网络配置一直出问题,导致不得不使用KVM OVER IP来配置,但是不太好用,今天有时间从远程服务器做了配置,终于可用了~(中继依然被DNS污染,国内访问受阻,不过倒也无所谓)

#长毛象运维

Last updated 2 years ago

洗涤子💽 · @chasedream1129
232 followers · 1825 posts · Server mona.do

嗼站停滞在v3.4.6一年多了,但是按目前上游这个瞎改的情况...我合到哪个release/commit比较合适?
@board

#长毛象运维

Last updated 2 years ago

ImmunoglobulinE · @lgE
457 followers · 742 posts · Server mstdn.one

未来中文实例可能会流行配置3个不同的一级域,分别是:
1. 主域名:用于用户后缀和实例间通信。品相较好,续费价格可接受。
2. 媒体域名:用于分发媒体。为使跨站媒体缓存清理后能重新获取,需长期保持。品相不重要,续费价格便宜。
3. 镜像域名:用于特定地区的访问体验。不需长期保持,只要首次注册费用便宜即可。

#长毛象运维

Last updated 2 years ago

ImmunoglobulinE · @lgE
457 followers · 742 posts · Server mstdn.one

最近 Cloudflare R2 宣布支持公共存储桶,这使其更加适合作为长毛象的对象存储了。
blog.cloudflare.com/zh-cn/r2-g

但实测发现,后台paperclip的上传会报错:
Header 'x-amz-acl' with value 'public-read' not implemented

显然,是因为R2不支持文件级ACL(公开桶也只接受'private‘),也未见支持计划。然而,长毛象目前还不能调整ACL。在github上看到 @everpcpc 在年初就提议增加 S3_ACL_DISABLED 的选项,但暂时还未被发布。
github.com/mastodon/mastodon/p

#长毛象运维

Last updated 2 years ago

ImmunoglobulinE · @lgE
457 followers · 742 posts · Server mstdn.one

每次备份数据库都要整体压缩、上传s3,还是比较消耗资源的。最近发现pgBackRest之类的软件支持差分备份,也原生支持s3,不知道有没有人用过?

#长毛象运维

Last updated 2 years ago

ImmunoglobulinE · @lgE
457 followers · 742 posts · Server mstdn.one

个人感觉在做镜像时,把 https://新域名/原路径 的访问改为 https://新域名/自定义路径/原路径 ,可以减少被主动探测发现的概率。这样至少可以保证浏览器的访问。如果能成为通用的做法,那么App也可以跟进适配。(至于跨站访问,镜像就算了)

#长毛象运维

Last updated 2 years ago

ImmunoglobulinE · @lgE
457 followers · 742 posts · Server mstdn.one

有些长毛象镜像出现的媒体加载不出来的问题,可能是因为基于 sub_filter 的反向代理配置无法处理websocket主动推送嘟文的媒体URL。

#长毛象运维

Last updated 2 years ago

ImmunoglobulinE · @lgE
457 followers · 742 posts · Server mstdn.one

v3.5.3 加书签之后要过几分钟才能被全文搜索搜到。但是去 v3.5.2 的实例试了下,加完立马就能搜到。这是错觉么?

#长毛象运维

Last updated 2 years ago

Su • 最后一代 · @su
79 followers · 698 posts · Server mastodon.0ne.day


长毛象建站3个月的空间占用
加了基本所有中文的中继,一直都没清理过空间,备份用了 Backblaze B2 的免费10G空间,每日备份一次,保留10天的备份,目前还挺够用

#长毛象运维

Last updated 2 years ago

ImmunoglobulinE · @lgE
457 followers · 742 posts · Server mstdn.one

利用 proxy_redirect ,可以把长毛象后端对未登录用户 location =/ 的访问给重定向到新的位置(而非/about),从而避免域名所在站点的性质被轻易发现。

#长毛象运维

Last updated 2 years ago

ImmunoglobulinE · @lgE
457 followers · 742 posts · Server mstdn.one


备份数据库可以用:
docker-compose exec db pg_dumpall -U postgres > db.backup
全部重建的话, pg_dumpall 相比 pg_dump 更方便导入:
cat db.backup | docker-compose exec -T db psql -U postgres

压缩数据库可以直接用 pipe:
pg_dumpall -U postgres | zip -P 密码 -q $filename -
相比先导出文件再压缩的方案可以省掉一对数据库dump的读写,减少IO的阻塞。

pullopen.github.io/%E5%9F%BA%E
github.com/mastodon/mastodon/p

#长毛象运维

Last updated 3 years ago

· @storm
3471 followers · 2198 posts · Server me.ns.ci

原来对netcup的root server过于自信了,总觉得web的报错是因为ffmpeg的版本问题,sidekiq的报错是因为配置的问题,搬家后观察一天,什么都没了,果然一切的思考都不如直接堆配置有效。 :blobcatnomstrawberry: 另外,搜索功能下一步会再进行完善,可能要重建一下索引。总结一下,这台服务器是我在用的配置最好的了,虽然很贵,但是真的很舒爽。 :blobcatflower:

#长毛象运维

Last updated 3 years ago

Su • 最后一代 · @su
79 followers · 698 posts · Server mastodon.0ne.day


拦截日志,发现大量mastodon.social站点 和 misskey 站点的请求被拦截,原来是开了 Bot Fight Mode,有用 的可以注意一下🤣

social.mashed.cloud/@curtispf/

#长毛象运维 #cloudflare

Last updated 3 years ago

ImmunoglobulinE · @lgE
457 followers · 742 posts · Server mstdn.one

relay.mstdn.one 搭建经验

中继后端:
官方的安装教程算是相对清楚的 github.com/yukimochi/Activity-
Docker 端口映射等的设置可以参考长毛象的配置文件
Nginx 配置可以参考 github.com/mstdn-kr/activity-r

页面魔改:
Meow的原理是定期执行一个脚本,从中继redis里获知域名列表,通过API采集站点信息,转换成markdown。然后用ivy生成静态网页。
看懂这个python脚本是魔改关键 git.moe.cat/lynx/relay-page/sr
原版通过redis-cli获得KEYS,但也可用redis官方的pip包,以便在容器间直接通信。

实时日志:
Websocket 服务端魔改自一个简单的 python github.com/jizhang/logviewer
把 python 关进 docker 参考了 stackoverflow.com/questions/50
获取日志的原理是在 relay 的命令后面加 2>1& | tee DIR 导出到文件,再映射进ws的docker。

抛砖引玉,希望能有所启发。

#长毛象运维

Last updated 3 years ago

ImmunoglobulinE · @lgE
457 followers · 742 posts · Server mstdn.one


mstdn.1 Toot Relay 公开测试

主要特点:
1. 参考moew中继的优秀范例,进一步优化页面体验;
2. 后端从 pub-relay 改为了 Activity-Relay,功能更加完善;
3. 实时更新送信日志,高效排查站点互通问题。

relay.mstdn.one

公测期间服务稳定性无保证,实例政策也可能不断修订。
欢迎大站加入中继,通过压力测试检验后端的性能。未来正式运营时,计划固定为2~3个大站。

#长毛象运维

Last updated 3 years ago