Skip to content

Installation guide

aunghtetnay edited this page Oct 8, 2025 · 1 revision

Patchwork is a framework to add a suite of plug-ins to a Mastodon server, creating layers between the underlying plumbing of Mastodon and the frontend app used by a user to access it (usually also Mastodon).

Before running Patchwork, please ensure you have set up a Mastodon server and it is running properly.

You can find the instructions to set up a Mastodon server here.

Patchwork begins with the Dashboard.

Once your Mastodon server is up and running, please begin with this repository to set up the Patchwork Dashboard.

This is the core of Patchwork’s frame, introducing new features itself to make your server more powerful, and allowing you to install additional Patchwork plug-ins with ease.

Dashboard installation guide

1. Installing Patchwork Dashboard from source-code

1.1 Project setup

Pre-requisites

  • Up & running a Mastodon instance
  • Ruby v3.3.0
  1. Download Patchwork Dashboard repository:

    There are two flavors of Patchwork Dashboard: Basic and MVP.
    Download the latest release of Patchwork Dashboard Basic from this link.
    or
    Download the latest release of Patchwork Dashboard MVP from this link.

  2. Create .env file by copying the .env.sample file:

cp .env.sample .env
  1. Read the comments mentioned in the ENV file thoroughly and configure the environment accordingly.

  2. Install the gems:

bundle install
  1. Run database migrations:
bundle exec rails db:migrate
  1. Import required data and create a master admin account:
bundle exec rails db:seed
  1. Start your server(change the port number according to your need):
bundle exec rails s -p 3002

1.2 Activate Patchwork Dashboard

To fully activate your Patchwork Dashboard, add an API key by following below steps:

  1. Generate an API key

    1. Go to Patchwork Hub, register a new account and verify it.
    2. Once you have verified it, generate an API key on the landing page of the Patchwork Hub.
  2. Add the generated API key in your Patchwork Dashboard

    1. Login to your Patchwork Dashboard with the master admin account.
    2. On the left-side menu, click the "API key".
    3. In the API key page, add the Key and Secret values generated from the Patchwork Hub.
    4. After entering the credential, the Patchwork Dashboard is fully activated.

1.3 Plug-ins installation

Next, expand your server’s capabilities by installing the following plug-ins in your Mastodon instance. This setup assumes that you have installed Mastodon from source. All four plug-ins are mandatory for your instance.

  • Accounts
    A Ruby on Rails plugin that adds custom account management, push notifications, and authentication overrides to Mastodon instance.

  • Content filters
    A Ruby on Rails plugin that filters Mastodon timelines by defined keywords and hashtags.

  • Conversations
    A Ruby on Rails plugin that extends Mastodon conversations with custom API endpoints and mobile app functionality.

  • Posts
    A Ruby on Rails plugin that enhances Mastodon’s posting features with customizable character limits, draft management, quote posts, and automatic ALT text generation.

  1. Add the ruby gems in the Gemfile of your Mastodon instance:
gem "accounts", git: "https://github.com/patchwork-hub/accounts/"
gem "content_filters", git: "https://github.com/patchwork-hub/content_filters"
gem "conversations", git: "https://github.com/patchwork-hub/conversations"
gem "posts", git: "https://github.com/patchwork-hub/posts"
  1. Run the bundle command to install the gems:
$ bundle install
  1. Run migration command:
$ bundle exec rails db:migrate
  1. Run the gem setup command for the necessary setup:
bundle exec rake content_filters:install
  1. Add below environment keys to your Mastodon instance:
AUTO_FOLLOW_ENABLED=false
ALT_TEXT_ENABLED=false
BOOST_POST_ENABLED=false 
  1. After then, restart your application to load the gems.

2. Installing Patchwork Dashboard using a Docker image

2.1 Installing the Patchwork Dashboard (Basic) using a Docker image

Please follow this guide to install Patchwork Dashboard Basic.

2.2 Installing the Patchwork Dashboard (MVP) using a Docker image

Please follow this guide to install Patchwork Dashboard MVP.

Clone this wiki locally