Host misskey

I would like to host misskey(GitHub - misskey-dev/misskey: 🌎 An interplanetary microblogging platform 🚀) on with a custom domain. As of now I would like to confine myself to the free tier, I might switch to paid tier later on if there is sufficient traction.
So I would like to host the PG database on a 256 MB VM with 1 GB persistent storage, use the free 100MB upstash redis, and host the misskey instance(nodejs app) on 512 MB VM with 2GB persistent storage(for file uploads).
Someone from, please guide me. It would be even better if and misskey admin join hands to implement this

I’ve hosted misskey myself, maybe I can help :slight_smile:

Worth mentioning this is above our free tier, free vms are 256MB only.

Here’s how to do it:

  1. Create the DB and save all credentials
  2. Create the redis and save credentials too
  3. clone misskey on you computer
  4. Copy .config/example.yml to .config/default.yml
  5. Change .config/default.yml to put your DB and redis settings. Also put your domain as the one you want

Let’s say your site is going to be and your fly app name is myapp. Configure the URL on default.yml as because misskey will read this once and done, if you change later it doesn’t work.

That being said, you can access just to configure your server, don’t worry.

  1. Add this Dockerfile:
FROM node:16.15.1-bullseye AS builder

ARG NODE_ENV=production

WORKDIR /misskey

COPY --chown=root . ./

RUN apt-get update
RUN apt-get install -y build-essential ffmpeg tini
RUN git submodule update --init
RUN yarn install
RUN yarn build
RUN rm -rf .git

FROM node:16.15.1-bullseye-slim AS runner

WORKDIR /misskey

RUN apt-get update
RUN apt-get install -y ffmpeg tini

COPY --chown=root --from=builder /misskey/node_modules ./node_modules
COPY --chown=root --from=builder /misskey/built ./built
COPY --chown=root --from=builder /misskey/packages/backend/node_modules ./packages/backend/node_modules
COPY --chown=root --from=builder /misskey/packages/backend/built ./packages/backend/built
COPY --chown=root --from=builder /misskey/packages/client/node_modules ./packages/client/node_modules
COPY --chown=root . ./

ENV NODE_ENV=production
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["npm", "run", "migrateandstart"]

This is not the best, but worked for me.

  1. Create this .dockerignore:
  1. Run fly launch but decline to deploy now. Since you already have a database, do not setup another one. It should generate your fly.toml
  2. Create a volume named uploaded_files.
  3. Add this to your fly.toml.

  destination = "/misskey/files"
  source = "uploaded_files"

You fly.toml should look almost like:

# fly.toml file generated for myapp on 2022-09-25T02:34:00-03:00

app = "myapp"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []


  destination = "/misskey/files"
  source = "uploaded_files"

  allowed_public_ports = []
  auto_rollback = true

  http_checks = []
  internal_port = 3000
  processes = ["app"]
  protocol = "tcp"
  script_checks = []
    hard_limit = 1000
    soft_limit = 500
    type = "connections"

    force_https = true
    handlers = ["http"]
    port = 80

    handlers = ["tls", "http"]
    port = 443

    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

Important: internal_port should be 3000.

  1. Run fly deploy and on another terminal run fly logs so you can see how the deployment is going and if there’s any issue. Important: misskey HAS to upload your entire .git dir so expect deployments to take several minutes. If you have Docker locally you can make this slightly faster by using fly deploy --local-only so your Docker build happens on your computer.

  2. Access and configure everything.

  3. Go to, find you app and setup your certificate for

  4. That’s it.

1 Like

Thanks for the help. Will try myself and let you know

1 Like

I am now getting the following error while deploying postgres-
For pricing information visit: Fly App Pricing · Fly Docs prompt: non interactive

A few months ago I ran postgres and it launched and ran well(It is deleted now). Btw, I am on windows and updated my flyctl to latest version today

Im not sure I understand what’s the error