misskey2020
Misskey

Gyazo

Misskey Advent Calendar 2020 17

SNSfediverse, 使SNS使

https://misskey.mametsuko.net/

1.
2. Google
3. Misskey
4.
5. 502 Bad Gateway
6. nodenv
7. Let's Encrypt Expiry Bot
8.

1.
JDcdlsgit使

2. Google
鹿

使Discord


TL....

Special thanks :

3. Misskey
Misskeyv11

v11

Vultr2GBSSD55GBUbuntu 20.04 x64使


使🙄


Let's Encryptnginx👏

Misskey

(vultr.com)10
(vultr.com)5
15190
(mametsuko.net)1,628

4.
沿使

systemctl stop misskey

NodeNode5

env
export NODE_OPTIONS=--max_old_space_size=4096


使8GB2GB

free

Gyazo

swap
sudo fallocate -l 8G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo -e /etc/fstab
/swapfile none swap sw 0 0

Gyazo

使 free

sudo -e /etc/fstab /swapfile none swap sw 0 0 使

swap
sudo swapoff /swapfile
sudo rm /swapfile

🙏


5. 502 Bad Gateway
2020.12.17502 Bad Gateway systemclt status misskey nginx active

error
sudo journalctl -xu misskey

yarn --force

> installnode_modules (sharp) sharpinstall

🙏

6. nodenv
yarn使 nodenv: version vxx.xx.x is not installed

nodenv versions xx.xx.x 14.15.0

nodenv
nodenv update
nodenv install xx.xx.x

🙏

7. Let's Encrypt Expiry Bot
使

> Your certificate (or certificates) for the names listed below will expire in 10 days (on 18 Dec 20 20:59 +0000). Please make sure to renew your certificate before then, or visitors to your website will encounter errors.

Let's Encrypt Expiry Bot

sudo certbot renew

certbort
sudo -e /etc/letsencrypt/renewal/misskey.mametsuko.net.conf

dns_cloudflare_credentials = /etc/letsencrypt/.cloudflare_credentials
dns_cloudflare_credentials = .cloudflare_credentials

Cloudflare使

sudo certbot certificates
🙏


8.
調


SNSMisskey

2020.12.17