# nopCommerce

> .NET based open-source e-commerce.

- Category: E-Commerce & Business
- Difficulty: intermediate
- Components: nopcommerce, mssql
- Tags: nopcommerce, dotnet, ecommerce, aspnet
- Source: https://docker.recipes/ecommerce/nopcommerce

## Overview

nopCommerce is a leading open-source e-commerce platform built on ASP.NET Core that has powered over 60,000 online stores since 2008. Developed with enterprise-grade architecture, it offers multi-store management, extensive plugin ecosystem, and mobile-responsive themes while maintaining complete source code access for unlimited customization. The platform supports complex B2B and B2C scenarios with features like multi-vendor marketplaces, subscription products, and advanced inventory management.

nopCommerce requires Microsoft SQL Server as its primary database engine, making this containerized stack particularly valuable for development teams and businesses wanting enterprise-level e-commerce capabilities without Windows server licensing costs. The SQL Server 2022 container provides full database functionality including stored procedures, triggers, and advanced indexing that nopCommerce leverages for product catalog management, order processing, and customer data analytics.

This configuration targets mid-market retailers, software agencies building client solutions, and developers creating custom e-commerce applications who need the power of .NET ecosystem with professional database backing. Unlike PHP-based alternatives, this stack delivers superior performance for catalog-heavy sites and integrates naturally with Microsoft business applications like Dynamics, Office 365, and Azure services.

## Features

- Multi-store management with shared customer base and separate product catalogs
- Advanced product attribute system supporting unlimited custom fields and variants
- Built-in multi-vendor marketplace functionality with commission tracking
- Sophisticated pricing engine with customer roles, discounts, and tier-based pricing
- Comprehensive order management with partial shipping and return processing
- Plugin architecture with 1,500+ marketplace extensions for payment gateways and integrations
- Mobile-first responsive themes with drag-and-drop page builder
- Advanced SEO tools including URL rewriting, meta tag management, and sitemap generation

## Use cases

- Enterprise retailers migrating from legacy .NET applications to modern containerized infrastructure
- Digital agencies developing custom e-commerce solutions for clients in manufacturing or wholesale
- B2B companies requiring complex pricing structures and customer-specific catalogs
- Multi-brand retailers managing separate storefronts with centralized inventory
- Software vendors building white-label e-commerce platforms with extensive customization
- Educational institutions creating online bookstores or merchandise shops with student discounts
- Subscription box services requiring recurring billing and inventory automation

## Prerequisites

- Minimum 4GB RAM allocated to Docker (nopCommerce requires 2GB, SQL Server needs 2GB)
- Strong SQL Server Administrator password meeting complexity requirements (8+ chars, uppercase, number, special character)
- Port 8080 available on host system for nopCommerce web interface
- Basic understanding of ASP.NET Core application configuration and IIS concepts
- Familiarity with SQL Server Management Studio or Azure Data Studio for database administration
- SSL certificate knowledge for production deployments requiring HTTPS termination

## docker-compose.yml

```yaml
services:
  nopcommerce:
    image: nopcommerceteam/nopcommerce:latest
    container_name: nopcommerce
    restart: unless-stopped
    environment:
      ASPNETCORE_ENVIRONMENT: Production
    volumes:
      - nopcommerce_data:/app/App_Data
    ports:
      - "8080:80"
    depends_on:
      - mssql
    networks:
      - nopcommerce

  mssql:
    image: mcr.microsoft.com/mssql/server:2022-latest
    container_name: nopcommerce-mssql
    environment:
      ACCEPT_EULA: "Y"
      MSSQL_SA_PASSWORD: ${SA_PASSWORD}
    volumes:
      - mssql_data:/var/opt/mssql
    networks:
      - nopcommerce

volumes:
  nopcommerce_data:
  mssql_data:

networks:
  nopcommerce:
    driver: bridge
```

## .env

```bash
SA_PASSWORD=YourStrong@Password123
```

## Usage notes

- Docs: https://docs.nopcommerce.com/
- Access at http://localhost:8080 - complete installation wizard
- Built on ASP.NET Core - requires SQL Server (MSSQL)
- SA_PASSWORD must meet complexity requirements (uppercase, number, special)
- Admin panel created during installation wizard
- Plugin marketplace at nopcommerce.com for extensions

## Troubleshooting

- Login failed for user 'sa': Verify SA_PASSWORD environment variable meets SQL Server complexity requirements and container has fully started
- nopCommerce installation wizard shows database connection error: Wait 60-90 seconds for SQL Server container initialization before accessing http://localhost:8080
- Application returns 500 errors after installation: Check nopcommerce_data volume permissions and ensure ASPNETCORE_ENVIRONMENT is set correctly
- Performance issues with large catalogs: Increase SQL Server memory allocation and enable SQL Server Agent for automated maintenance tasks
- Plugin installation fails: Verify nopcommerce_data volume is writable and restart nopCommerce container after plugin uploads
- Theme changes not reflected: Clear nopCommerce cache through admin panel and check if custom CSS files are properly uploaded to App_Data/Themes

