banner
老孙

老孙博客

资深网民孙先生
mastodon
email

Quickly deploy Misskey instances

Install with a clean Ubuntu system, and it is recommended to configure it with dual-core and four threads.

Update Software#

sudo apt update; sudo apt full-upgrade -y; sudo reboot

One-Click Script#

wget https://raw.githubusercontent.com/joinmisskey/bash-install/main/ubuntu.sh -O ubuntu.sh; sudo bash ubuntu.sh

Follow the prompts to enter the content.

Update Misskey Script#

Updating the Misskey script will not upgrade the runtime environment. For the update content of the script, please refer to the "Change Log".

wget https://raw.githubusercontent.com/joinmisskey/bash-install/main/update.ubuntu.sh -O update.sh
sudo bash update.sh
  • For buddies using systemd, adding -r can update and restart the system.
  • For buddies using docker, you can update with specific software package version repository.

Deploying with Docker Compose#

Environment#

  • git
  • docker
  • nginx

Steps#

Clone the Repository with git#

cd /opt
git clone -b master https://github.com/misskey-dev/misskey.git
cd misskey
git checkout master

Copy Configuration Files:#

cp .config/example.yml .config/default.yml
cp .config/docker_example.env .config/docker.env
cp docker-compose.yml.example docker-compose.yml

Edit default.yml#

Set url to the instance domain name
Set db:host to db
Set redis:host to redis

Build the Image#

docker compose build
docker compose run --rm web yarn run init

After completion

Start the Containers#

docker compose up -d

Reverse Proxy#

Refer to the following

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

proxy_cache_path /tmp/nginx_cache levels=1:2 keys_zone=cache1:16m max_size=1g inactive=720m use_temp_path=off;

server {
    listen 80;
    listen [::]:80;
    server_name misskey.example.com;
    client_max_body_size 0;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_set_header Host $host;
        proxy_http_version 1.1;
        proxy_redirect off;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;

        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;

        proxy_cache cache1;
        proxy_cache_lock on;
        proxy_cache_use_stale updating;
        add_header X-Cache $upstream_cache_status;
    }
}
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.