All pages
Powered by GitBook
1 of 8

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Installation

Instructions on installing Umbraco on various platforms using various tools.

Install Umbraco using CLI

The fastest way to get the latest version of Umbraco up and running is using the command line (CLI).

  1. Open your command line.

  2. Install the Umbraco templates:

Replace 13.* with the specific version you want to install.

Example:

  1. Create a new project:

  1. Navigate to the newly created project folder. It will be the folder containing the .csproj file:

  1. Build and run the newly created Umbraco site:

  1. The console will output a message similar to: [10:57:39 INF] Now listening on: https://localhost:44388

  2. Open your browser and navigate to that URL.

  3. Follow the instructions to finish up the installation of Umbraco.

Members of the Umbraco Community have created a website that makes the installation of Umbraco a lot easier for you. You can find the website at . On the website, you can configure your options to generate the required script to run. Click on the Install Script tab to get the commands you need to paste into the terminal. This tab also includes the commands for adding a starter kit or unattended install which creates the database for you.

Alternative Methods for Installing Umbraco

There are numerous ways to install Umbraco. Below, you can find links to different installation methods that will help you easily install and set up Umbraco projects.

.NET CLI, included with the .NET Software Development Kit (SDK), can be used to install or uninstall .NET templates from NuGet. This can be done by using the dotnet new command on any OS. The underlying Template Engine enables the creation of custom templates which make new project bootstrapping much faster. With a few steps you can have an Umbraco project running without the need for a code editor.

Visual Studio is used to write native code and managed code supported by .NET and many others. Its built-in tools provide the ability to develop and execute applications for any platform. Developers will be able to install Umbraco without ever having to leave Visual Studio.

Learn how to run an already installed local installation of Umbraco.

Visual Studio Code is an editor with an embedded webserver (through the IIS Express extension). A fast way to get you up and running with Umbraco.

From Umbraco v9 and above you can use the Nightly Builds to get the latest version to use and test before it is released. Learn how to install the Nightly builds to get started.

Since Umbraco 9 it has been possible to run Umbraco CMS natively on Linux or macOS High Sierra. To get Umbraco running you will need to follow some steps.

Use the Unattended installs when spinning up Umbraco instances on something like Azure Web Apps to avoid having to run through the installation wizard.

https://psw.codeshare.co.uk
.NET CLI installation
Visual Studio installation
Run Umbraco on IIS
VS Code installation
Installing Nightly Builds
Running Umbraco on Linux/macOS
Install Umbraco unattended
dotnet new install Umbraco.Templates::13.*
dotnet new install Umbraco.Templates::13.8.1
dotnet new umbraco --name MyProject
cd MyProject
dotnet run

Install using Visual Studio

A guide to install Umbraco CMS using Visual Studio.

Prerequisites

  • Install the newest Umbraco dotnet templates.

    • In Visual Studio 2022, the .NET CLI templates are enabled to appear, by default. For information on how to enable .NET CLI templates in Visual Studio 2019, see the article.

  • Check the to ensure you have everything you need to start your Umbraco project.

Quick Start

This is an abbreviated version of the installation steps. Jump to the section for a more thorough guide.

  • Open Visual Studio.

  • Go to File > New > Project, search for Umbraco.

  • Choose Umbraco Project (Umbraco HQ) then click Next.

Video Tutorial

Create a new Umbraco project

To install Umbraco we first need to install Umbraco's dotnet new templates.

For more information check the first 2 steps of .

Create the Visual Studio project

Go to File > New > Project and search for Umbraco in the Search for templates field.

Once you select Umbraco Project (Umbraco HQ) navigate to the next step by clicking Next.

Configure project

In this step, you will be able to give your project a name specific to the project you are creating.

Refrain from changing the Solution name, as this will cause a namespace conflict with the CMS itself.

Additional information

In the next step, you are able to specify some additional parameters like the Target framework. The rest are optional.

You can then click the Create button and your Umbraco Project will be ready for you.

Running the site

You can now run the site through Visual Studio using F5 or the Debug button.

Follow the installation wizard and after a few steps, you will get a message saying the installation was a success.

Next steps

You are now ready to start building your Umbraco project. Have a look below for different resources on the next steps.

Install using .NET CLI

We have made custom Umbraco templates that are available for use with dotnet new. The steps below will demonstrate the minimum amount of actions required to get you going and set up an Umbraco project from the command line using .NET templates.

Video Tutorial

Choose or specify the parameters, leave the default or leave them all empty.

  • Click Create.

  • Use CTRL+F5 to run the project and start the Umbraco installer.

  • .NET CLI Templates in Visual Studio
    Requirements
    Create a new project
    Install Umbraco with .NET CLI
    Getting Started with Umbraco
    Tutorial: Create a website from scratch
    Find different options for hosting your Umbraco website
    Learn about configuration in Umbraco CMS
    The Create a new project dialog in Visual Studio.
    The Configure your new project dialog in Visual Studio.
    The Additional information dialog in Visual Studio.
    Overview of files in the project solution
    Install the template
    1. Install the latest .NET SDK.

    2. Run dotnet new install Umbraco.Templates to install the project templates. &#xNAN;The solution is packaged up into the NuGet package Umbraco.Templates and can be installed into the dotnet CLI.

    Once that is complete, you can see that Umbraco was added to the list of available projects types by running dotnet new --list:

    In some cases the templates may silently fail to install (usually this is an issue with NuGet sources). If this occurs you can try specifying the NuGet source in the command by running dotnet new install Umbraco.Templates --nuget-source "https://api.nuget.org/v3/index.json".

    To get help on a project template with dotnet new run the following command:

    dotnet new umbraco -h

    From that command's output, you will get a better understanding of what are the default template options, as well as those command-line flags specific to Umbraco that you can use (as seen below):

    Create an Umbraco project

    1. Create a new empty Umbraco solution: dotnet new umbraco -n MyCustomUmbracoProject

    You will now have a new project with the name MyCustomUmbracoProject, or the name you chose to use. The new project can be opened and run using your favorite IDE or you can continue using the CLI commands.

    If you want to create a solution file as well you can run the commands below. dotnet new sln dotnet sln add MyCustomUmbracoProject

    Run Umbraco

    1. Navigate to the newly created project folder: cd MyCustomUmbracoProject

    2. Build and run the new Umbraco .Net Core project: dotnet build dotnet run

    The project is now running on the Kestrel server and has assigned a free available port to run it on. Look in the terminal window after the dotnet run command to see the URLs.

    The next step is to run through the Umbraco CMS installation. If you chose to use MS SQL Server/Azure you will need to add your connection string during this setup process to get access to the Umbraco backoffice.

    Running Umbraco on Linux/macOS

    Since Umbraco 9 it has been possible to run Umbraco CMS natively on Linux or macOS High Sierra 10.13 and newer.

    With Umbraco CMS on .NET Core, Linux and macOS is natively supported with SQLite as the database.

    In the below section, we describe how to get started with running Umbraco CMS on Linux or macOS.

    How to get started running Umbraco CMS on Linux or macOS

    To get started with Umbraco CMS first have a look at the requirements for running Umbraco CMS.

    Once you've made sure you meet the requirements it is time to install the Umbraco Templates on your system.

    To do this follow the guide.

    With the templates installed on your system, it is now possible to create Umbraco projects.

    To create a project, there are two options:

    • Continue creating projects using the .NET CLI.

    • Create new projects using Visual Studio (only macOS).

    To create new projects using Visual Studio, you can use the guide.

    Once you create a new project it will use SQLite by default on Linux/macOS.

    If you prefer using SQL Server as your database, you can either install it locally or run it via .

    Templates                    Short Name               Language          Tags
    ------------------------------------------------------------------------------------------------------
    Umbraco Project              umbraco                  [C#]              Web/CMS/Umbraco
    Umbraco Package              umbracopackage           [C#]              Web/CMS/Umbraco/Package/Plugin
    Umbraco Project (C#)
    Author: Umbraco HQ
    Description: An empty Umbraco project ready to get started.
    Options:
      -v|--version                       The version of Umbraco.Cms to add as PackageReference.
                                         string - Optional
                                         Default: 10.0.0
    
      --use-https-redirect               Adds code to Program.cs to redirect HTTP to HTTPS and enables the UseHttps setting.
                                         bool - Optional
                                         Default: false
    
      --no-restore                       If specified, skips the automatic restore of the project on create.
                                         bool - Optional
                                         Default: false
    
      --exclude-gitignore                Whether to exclude .gitignore from the generated template.
                                         bool - Optional
                                         Default: false
    
      --minimal-gitignore                Whether to only include minimal (Umbraco specific) rules in the .gitignore.
                                         bool - Optional
                                         Default: false
    
      --connection-string                Database connection string used by Umbraco.
                                         string - Optional
    
      --connection-string-provider-name  Database connection string provider name used by Umbraco.
                                         string - Optional
                                         Default: Microsoft.Data.SqlClient
    
      --development-database-type        Database type used by Umbraco for development.
                                             None       - Do not configure a database for development.
                                             SQLite     - Use embedded SQLite database.
                                             LocalDB    - Use embedded LocalDB database (requires SQL Server Express with Advanced Services).
                                         Default: None
    
      --friendly-name                    Used to specify the name of the default admin user when using unattended install on development (stored as plain text).
                                         string - Optional
    
      --email                            Used to specify the email of the default admin user when using unattended install on development (stored as plain text).
                                         string - Optional
    
      --password                         Used to specify the password of the default admin user when using unattended install on development (stored as plain text).
                                         string - Optional
    
      --no-nodes-view-path               Path to a custom view presented with the Umbraco installation contains no published content.
                                         string - Optional
    
      -p|--PackageTestSiteName           The name of the package project this should be a test site for.
                                         string - Optional
    Install using .NET CLI
    Install using Visual Studio
    Docker

    Installing Nightly Builds

    Instructions on installing nightly builds of Umbraco.

    In this article, we'll explain how you can get the latest builds of Umbraco. You can do this in three steps:

    1. Adding the nightly feed as a NuGet source

    2. Finding the latest nightly version

    3. Installing the latest nightly version template

    Adding the nightly feed as a NuGet source

    The NuGet feed containing the nightly builds is https://www.myget.org/F/umbraconightly/api/v3/index.json.

    You can either add this feed through the command line or use an IDE of your choice. In this article, we'll provide steps for:

    Option 1: Using the command line

    To add the nightly feed using the command line:

    1. Open a command prompt of your choice.

    2. Run the following command:

    Now the feed is added as a source named Umbraco Nightly.

    Option 2: Using Visual Studio

    To add the nightly feed using Visual Studio:

    1. Open Visual Studio.

    2. Go to Tools > NuGet Package Manager > Package Manager Settings.

    1. The Options window open.

    2. Select the Package Sources option in the NuGet Package Manager section.

    3. Click the + icon.

    4. A new Package source will be added automatically and highlighted.

    Now the feed is added as a source named Umbraco Nightly.

    Option 3: Using Rider

    To add the nightly feed using Rider:

    1. Open Rider.

    2. Go to View > Tool Windows > NuGet.

    3. Go to Sources tab.

    4. Choose the C:\Users\Úmbraco\AppData\Roaming\NuGet\NuGet.Config to add the feed globally.

    1. The New feed dialog opens.

    2. Enter the desired name in the Name field.

    3. Enter https://www.myget.org/F/umbraconightly/api/v3/index.json in the URL field.

    Leave the User, Password fields empty, and the Enabled checkbox ticked.

    1. Click OK.

    Now the feed is added as a source named Umbraco Nightly.

    Finding the latest nightly version

    In the previous steps, we've added the feed and are now ready to install the nightly build.

    However, which version should we install? This is, in particular, an issue if we want to create a new site using the dotnet template. The dotnet command does not allow us to use wildcard characters to install the newest version.

    Using IDE, we can see a list of available versions in both Visual Studio and Rider. We can then use that version to install the template.

    Here we're going to assume that you want to create a brand new site with the dotnet template. The approach is the same if you're updating an existing site. You'll click the Update button for the Umbraco.Cms package instead of installing the template through the terminal.

    Let's look at how we can find the latest version of the nightly build:

    Option 1: Using Visual Studio

    You can use the package manager in Visual Studio to browse the available template versions.

    1. Open Visual Studio.

    2. Go to Tools > NuGet Package Manager > Manage NuGet Packages For Solution...

    1. Select Umbraco Nightly from the Package source dropdown in the NuGet - Solution window.

    1. Check the Include prerelease checkbox.

    2. Search for Umbraco.Templates in the Browse field.

    3. Choose that package.

    4. Click on the Version dropdown and see the available nightly builds.

    Option 2: Using Rider

    You can use the NuGet window in Rider to browse the available template versions.

    1. Open Rider.

    2. Go to the Packages tab in the NuGet window..

    3. Select Umbraco Nightly from the All Feeds dropdown.

    1. Check the Prerelase checkbox.

    2. Search for Umbraco.Templates in the Search field.

    3. Choose that package.

    4. Click on the Version drop down and see the available nightly builds.

    Installing the latest nightly version template

    Now that our feed is added and we know the exact version we're ready to install our template.

    To install the latest nightly version template:

    1. Open your command prompt.

    2. Run the following command using the latest version:

    With that, we've successfully installed the latest nightly build of Umbraco.

    All we have to do now is to create a site using the dotnet new umbraco -n MyAwesomeNightlySite command.

    For more information about installing Umbraco, see the article.

  • Enter the desired name for the feed in the Name field.

  • Enter the link https://www.myget.org/F/umbraconightly/api/v3/index.json into the Source field.

  • Click OK.

  • Click the green + button in the New Feed field.

  • Choose the applicable version and note down the version number.

    Choose the applicable version and note down the version number

    Using the command line
    Using Visual Studio
    Using Rider
    Using Visual Studio
    Using Rider
    Installation
    Package Manager Settings
    Register the nightly feed
    Open the new feed menu
    Adding the feed
    Opening the Nuget Package Manager
    Select the nightly NuGet feed
    Find the version
    Choose the feed
    Find the version
    dotnet nuget add source "https://www.myget.org/F/umbraconightly/api/v3/index.json" -n "Umbraco Nightly"
    dotnet new install Umbraco.Templates

    Local IIS With Umbraco

    This article describes how to run an Umbraco 9 site on a local IIS server.

    This is a quick guide on getting your Umbraco website running locally on IIS.

    The guide will assume you already have IIS configured and know your way around it, as well as having a local website you wish to host.

    Setting up prerequisites

    First, you need to ensure you have "Development time IIS support installed". To check this, go to the Visual Studio installer, click modify and check on the right side under "ASP.NET and web development":

    Checking the IIS module exists

    Once that is installed you should set up a new IIS site - and make sure to add the hostname to your hosts file as well. Here is my setup for an example:

    For the path you want to point it at the root of your site - where the .csproj file is.

    Add permissions to NuGet cache folder

    You might need to change permissions for the NuGet cache folder - C:\users\<username>\.nuget\packages. The user or group (IIS_IUSRS) that the IIS site is running on requires Read permissions on this folder because this is where some of the files for Umbraco and Umbraco packages are being served from during development. If the IIS user or group does not have permission to read from the NuGet cache folder, you could run into a DirectoryNotFoundException while running the site.

    When the site is published these files are copied from the NuGet cache folder to wwwroot/umbraco and wwwroot/App_Plugins and these folders will typically have the correct permissions. For more information on setting permissions, see the article.

    Add new launch profile

    At this point you can go to your Visual Studio solution of the site and in the Properties folder there is a launchSettings.json file, that looks like this:

    You can add a new profile called IIS, and point it at your local domain. Here it is with my example domain:

    At this point IIS will be added to the launch profiles, and you can run the site from Visual Studio by choosing IIS in the dropdown:

    And finally the site is running from your local IIS:

    Unattended Installs

    In some cases, you might need to install Umbraco instances automatically without having to run through the installation wizard to configure the instance.

    You can use the Unattended installs feature to allow for quick installation and set up of Umbraco instances on something like Azure Web Apps.

    This article will give you the details you need to install Umbraco unattended.

    Get clean install of Umbraco

    In order to get a clean instance of Umbraco, follow our installation guide for how to .

    Install using Visual Studio Code

    Follow these steps to set up an Umbraco project with Visual Studio Code. The benefit of using Visual Studio Code is that it is super quick to get up and running.

    Installing and setting up Visual Studio Code

    1. Go to and download Visual Studio Code for free.

    File and folder permissions
    IIS site example
    Launch profiles
    Local IIS site
    {
      "iisSettings": {
        "windowsAuthentication": false,
        "anonymousAuthentication": true,
        "iisExpress": {
          "applicationUrl": "http://localhost:40264",
          "sslPort": 44360
        }
      },
      "profiles": {
        "IIS Express": {
          "commandName": "IISExpress",
          "launchBrowser": true,
          "environmentVariables": {
            "ASPNETCORE_ENVIRONMENT": "Development"
          }
        },
        "Umbraco.Web.UI.NetCore": {
          "commandName": "Project",
          "environmentVariables": {
            "ASPNETCORE_ENVIRONMENT": "Development"
          },
          "applicationUrl": "https://localhost:44360;http://localhost:40264"
        }
      }
    }
    {
      "iisSettings": {
        "windowsAuthentication": false,
        "anonymousAuthentication": true,
        "iis": {
          "applicationUrl": "https://testsite.local",
          "sslPort": 0
        },
        "iisExpress": {
          "applicationUrl": "http://localhost:40264",
          "sslPort": 44360
        }
      },
      "profiles": {
        "IIS Express": {
          "commandName": "IISExpress",
          "launchBrowser": true,
          "environmentVariables": {
            "ASPNETCORE_ENVIRONMENT": "Development"
          }
        },
        "IIS": {
          "commandName": "IIS",
          "launchBrowser": true,
          "launchUrl": "https://testsite.local",
          "environmentVariables": {
            "ASPNETCORE_ENVIRONMENT": "Development"
          }
        },
        "Umbraco.Web.UI.NetCore": {
          "commandName": "Project",
          "environmentVariables": {
            "ASPNETCORE_ENVIRONMENT": "Development"
          },
          "applicationUrl": "https://localhost:44360;http://localhost:40264"
        }
      }
    }
    Configure your database

    As you will not be running through the installation wizard when using this feature, you need to manually tell Umbraco which database to use.

    • Set up and configure a new database - see Requirements for details.

    • Add the connection string using configuration.

    Umbraco can create an SQL Server database for you during the unattended install process. The user specified by the credentials in your connection string needs to have the CREATE DATABASE permission granted and the global setting InstallMissingDatabase is set to true.

    If your connection string is for SQLite or SQL Server Express LocalDB it is assumed that a database should be created when missing. This is regardless of the value of the InstallMissingDatabase setting.

    SQL Server Example in appsettings.json

    The 'umbracoDbDSN_ProviderName' attribute sets the .NET Framework data provider name for the DataSource control's connection. For more information on the data providers included in the .Net Framework, see the Microsoft Documentation.

    SQLite Example in appsettings.json

    A value is configured for the keyumbracoDbDSN_ProviderName to ensure usage of the Microsoft.Data.SQLite ADO.NET provider.

    It is recommended that you make use of the values shown below for the Cache, Foreign Keys and Pooling keywords on your connection string.

    Enable the unattended installs feature

    The unattended installs feature is disabled by default. In order to enable it, you need to add the following JSON object to a JSON configuration source.

    Remember to set the value of InstallUnattended to true.

    Alternatively you may set your configuration with Environment Variables or other means. Learn more about this in the Microsoft .Net Core config documentation.

    The keys for this would then be as follows:

    Initialize the unattended install

    After completing the steps above you can now initialize the installation by booting up the Umbraco instance.

    Once it has completed, you should see the following when visiting the frontend of the site.

    Configuration options

    Depending on your preferences, you can use any type of configuration to specify the connection string and login information, as well as enable unattended install. With the extending configuration functionality, it is possible to read from all kinds of sources. One example can be using a JSON file or environment variables.

    Program.cs has a condition, which if met, an appsettings.Local.json file will be added and configured as a configuration source.

    Having intellisense will help you to add your connection string and information needed for the unattended install.

    More support

    We have added support for unattended installs with Name, Email and Password, and Connection String as CLI params, which are also available in Visual Studio. There you can fill in your information as follows:

    CLI

    Visual Studio

    Install an Umbraco project template

    Once installed, launch Visual Studio Code.

  • Click the extensions menu at the bottom on the left side. Then search for C# and install it.

    Visual Studio Code install extension
  • Creating your Umbraco project

    Follow the Templates Guide to create your project folder.

    Configure Visual Studio Code to run the Umbraco project

    Open your project folder in Visual Studio Code, your project will look something like this:

    Fresh Umbraco installation

    Now we need to tell Visual Studio Code how to run your project.

    Open the command palette, you can use the shortcut Ctrl+Shift+P, and type in Tasks: Configure and select the Tasks: Configure Task option:

    Configure task option

    Select "Create task.json from template"

    Create task from template

    Now select ".NET Core" as your template.

    Create .NET Core Template

    Visual Studio Code creates a folder called .vscode that contains a file called tasks.json. The tasks.json file tells Visual Studio Code how to build your project.

    Now that we've told Visual Studio Code how to build your project, we need to tell it how to launch it. Visual Studio Code can do this for you. First, select the little play button in the left side menu, and then select the "create a launch.json file" link.

    Creating launch.json file

    This will prompt a menu to appear, select .NET 5+ and .NET Core:

    Prompt Menu

    If .NET 5+ and .NET Core is missing in the drop-down menu:

    1. Press Ctrl + Shift + P (on Windows/Linux) or Cmd + Shift + P (on macOS) to open the Command Palette.

    2. Search for the command .NET: Generate Assets for Build and Debug. This command will generate the necessary assets for building and debugging your .NET application.

    Now you'll see a green play button appear with a dropdown where ".NET Core Launch (web)" is selected.

    Green Play button options

    If you navigate to the Files section, a new launch.json file is created in the .vscode folder. When you press F5, the launch.json file tells Visual Studio Code to build your project, run it, and then open a browser .

    With that, you're ready to run the project! Press F5, or click the little green play button in the Run and Debug section to run your brand new Umbraco site locally.

    Umbraco Web Installer

    This section covers the installation and configuration of Umbraco inside your web browser when you run Umbraco for the first time.

    You will see the install screen where you will need to fill in some data before Umbraco can be installed.

    Web Installer - Lets Get Started

    When the installer is done, you will be logged into the backoffice.

    Congratulations, you have installed an Umbraco site!

    You can log into your Umbraco site by entering the following into your browser: http://yoursite.com/umbraco/.

    https://code.visualstudio.com/
    {
      "ConnectionStrings": {
        "umbracoDbDSN": "server=localhost;database=UmbracoUnicore;user id=sa;password='P@ssw0rd'",
        "umbracoDbDSN_ProviderName": "System.Data.SqlClient"
      }
    }
    {
      "ConnectionStrings": {
        "umbracoDbDSN": "Data Source=|DataDirectory|/Umbraco.sqlite.db;Cache=Shared;Foreign Keys=True;Pooling=True",
        "umbracoDbDSN_ProviderName": "Microsoft.Data.SQLite"
      }
    }
    {
      "Umbraco": {
        "CMS": {
          "Unattended": {
            "InstallUnattended": true,
            "UnattendedUserName": "FRIENDLY_NAME",
            "UnattendedUserEmail": "EMAIL",
            "UnattendedUserPassword": "PASSWORD"
          }
        }
      }
    }
    Umbraco__CMS__Unattended__InstallUnattended
    Umbraco__CMS__Unattended__UnattendedUserName
    Umbraco__CMS__Unattended__UnattendedUserEmail
    Umbraco__CMS__Unattended__UnattendedUserPassword
    #if DEBUG
      .ConfigureAppConfiguration(config
        => config.AddJsonFile(
          "appsettings.Local.json",
          optional: true,
          reloadOnChange: true))
    #endif
    {
        "ConnectionStrings": {
            "umbracoDbDSN": "server=localhost;database=UmbracoUnicore;user id=sa;password='P@ssw0rd'"
        },
        "Umbraco": {
            "CMS": {
                "Unattended": {
                    "InstallUnattended": true,
                    "UnattendedUserName": "FRIENDLY_NAME",
                    "UnattendedUserEmail": "EMAIL",
                    "UnattendedUserPassword": "PASSWORD"
                }
            }
        }
    }
    dotnet new umbraco -n MyNewProject --friendly-name "Friendly User" --email [email protected] --password password1234 --connection-string "Server=(localdb)\Umbraco;Database=MyDatabase;Integrated Security=true" --version 10.0.0
    How to install Umbraco using NuGet and Visual Studio
    Video Tutorial