Skip to content
Last update: September 26, 2024

Deploy on Windows

Use this guide to deploy and configure precompiled Virto Commerce Platform V3.

Prerequisites

Note

After installing MS SQL server, switch its authentication to mixed mode, as described here. Selecting server authentication mode

  • For VirtoCommerce 3.800 or higher, install MS Visual Studio 2022 (version 17.8 or higher).
  • To edit the source code, install .NET 8 SDK.
  • For better search capabilities, install Elastic search 8.12.

    Note

    By default, VirtoCommerce uses Lucene .NET. However, it cannot be used in production due to its limited functionality.

Install Platform

The platform can be installed:

Download precompiled binaries

  1. Open the Releases section of the Virto Commerce Platform in GitHub.

  2. Find VirtoCommerce.Platform.3.x.x.zip file. This file contains the prebuilt site and can be executed without additional compilation. The source code is not included.

  3. Unpack the downloaded file to the local directory /vc-platform-3. After that you will have the directory with Platform precompiled files.

Now you have the directory with the precompiled files of the Virto Commerce Platform.

Use Virto Commerce CLI

To use Virto Commerce CLI (vc-build):

  1. Install vc-build using the command:

    dotnet tool install -g VirtoCommerce.GlobalTool
    
  2. Install the Platform and the modules using the command:

    vc-build install
    
  3. Specify the platform version (if required) using the command:

    vc-build install -version 3.800.0
    

Readmore Vc-build for packages management

Setup Platform

To set up the Platform:

  1. Configure application strings.
  2. Run the Platform.
  3. Perform initial sign in.

Configure application strings

To configure application strings:

  1. Open the appsettings.json file in a text editor.
  2. In the ConnectionStrings section, modify the VirtoCommerce node as follows:

        "ConnectionStrings": {
            "VirtoCommerce" : "Data Source={SQL Server URL};Initial Catalog={Database name};Persist Security Info=True;User ID={User name};Password={User password};MultipleActiveResultSets=True;Connect Timeout=30"
        },
    

    Info

    You can either replace the username and password with your own in the ConnectionStrings, or add virto as the username and virto as the password in the database (SQL, PostgreSQL, MySQL).

    Note

    Make sure the user has permission to create new databases.

  3. To display images, specify the public url for assets by updating Assets:FileSystem:PublicUrl in the Assets section:

    "Assets": {
            "Provider": "FileSystem",
            "FileSystem": {
                "RootPath": "~/assets",
                "PublicUrl": "https://localhost:5001/assets/" <-- Set your platform application url with port localhost:5001
            },
        },
    
  4. To configure CMS content storage, specify the public url for content for content by updating Content:FileSystem:PublicUrl in the Content section:

    "Content*": {
            "Provider": "FileSystem",
            "FileSystem": {
                "RootPath": "~/cms-content",
                "PublicUrl": "https://localhost:5001/cms-content/" <-- Set your platform application url with port localhost:5001
            },
        },
    
  5. Save the appsettings.json file to apply the configurations.

Run Platform

You can run the Platform:

  • On HTTPS schema (Preferred).
  • On HTTP schema.
  1. Install and trust HTTPS certificate. Trust the .NET Core SDK HTTPS development certificate on Windows.

    Readmore Enforcing HTTPS in ASP.NET Core

  2. Run the Platform using the following command:

    cd C:\vc-platform-3\
    dotnet.exe VirtoCommerce.Platform.Web.dll
    
  3. When the process is complete, you will see an output in the console similar to this:

    Now listening on: http://localhost:5000
    Now listening on: https://localhost:5001
    

To run the Platform only at HTTP schema in production mode, it is sufficient to specify only HTTP URLs in --urls argument of the dotnet command.

dotnet VirtoCommerce.Platform.Web.dll --urls=http://localhost:5000

Perform initial sign-in

To access the Platform and perform initial sign-in:

  1. Open your browser and type https://localhost:5001.
  2. If you encounter the Your connection is not private error, click Advanced → Proceed to.... This option allows you to proceed to the website even though the browser has detected an issue with the SSL certificate.

    Note

    For additional details on addressing this error and using a self-signed certificate, refer to Trust the ASP.NET Core HTTPS development certificate.

  3. Upon the first request, the application will create and initialize the database.

  4. Once completed, you will be redirected to the sign-in page. Use the following credentials to sign in:

    • Login: admin
    • Password: store
  5. The installation wizard starts downloading default modules and sample data:

    Installation wizard screen

  6. After installation, reset default credentials:

    Resetting default credentials

Your platform is ready to go.