Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

1.9 KB
Raw Blame
---
title: Spree Multi Vendor Installation
sidebarTitle: Installation
description: Install and configure Spree Multi-Vendor to launch a marketplace with multiple vendors, including prerequisites, gem setup, license keys, and vendor onboarding.
canonical: "https://spreecommerce.org/docs/v5/developer/multi-vendor/installation"
---

<Warning>
  This installation instructions assume you have purchased the [Spree Enterprise Edition license](https://spreecommerce.org/pricing).
</Warning>

## Prerequisites

* You need to be on Spree 5.1+, we recommend using [spree_starter](https://github.com/spree/spree_starter) as a base for your application
* You need to have 2 environment variables set:
  * `KEYGEN_ACCOUNT_ID`
  * `KEYGEN_LICENSE_KEY`
* We support both PostgreSQL and MySQL databases
* Redis/Valkey for background jobs

<Info>
  Environment variables will be provided to you after purchasing the [Spree Enterprise Edition license](https://spreecommerce.org/pricing).
</Info>

<Warning>
  You will need to add these environment variables to your CI/CD pipeline and production environments.
</Warning>

## Installing gems

1. Add the following code to your `Gemfile`:

    ```ruby
    source "https://license:#{ENV['KEYGEN_LICENSE_KEY']}@rubygems.pkg.keygen.sh/#{ENV['KEYGEN_ACCOUNT_ID']}" do
      gem 'spree_enterprise'
      gem 'spree_multi_vendor'
    end
    ```

2. Install gems:

    <CodeGroup>

    ```bash Spree CLI (Docker)
    spree bundle install
    ```

    ```bash Without Spree CLI
    bundle install
    ```

    </CodeGroup>

3. Run generators:

    <CodeGroup>

    ```bash Spree CLI (Docker)
    spree generate spree_enterprise:install && spree generate spree_multi_vendor:install
    ```

    ```bash Without Spree CLI
    bin/rails g spree_enterprise:install && bin/rails g spree_multi_vendor:install
    ```

    </CodeGroup>

    <Info>
      This will copy and run migrations for `spree_enterprise` and `spree_multi_vendor` gems.
    </Info>