> ## Documentation Index
> Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Spree Multi Vendor Installation

> Install and configure Spree Multi-Vendor to launch a marketplace with multiple vendors, including prerequisites, gem setup, license keys, and vendor onboarding.

<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 theme={"theme":"night-owl"}
   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) theme={"theme":"night-owl"}
     spree bundle install
     ```

     ```bash Without Spree CLI theme={"theme":"night-owl"}
     bundle install
     ```
   </CodeGroup>

3. Run generators:

   <CodeGroup>
     ```bash Spree CLI (Docker) theme={"theme":"night-owl"}
     spree generate spree_enterprise:install && spree generate spree_multi_vendor:install
     ```

     ```bash Without Spree CLI theme={"theme":"night-owl"}
     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>
