Installation Guide: Installing Umbraco Using CLI

Eshan Dilmina
3 min readJan 4, 2025

--

Umbraco is a powerful and flexible CMS, and the fastest way to get it running on your local machine is by using the Command Line Interface (CLI). Whether you are using Windows, macOS, or Linux, the CLI provides a streamlined way to install Umbraco and start building your site.

In this guide, we’ll walk through the necessary steps for installing Umbraco CMS using the CLI on your machine. By the end, you’ll have a new Umbraco project set up and running.

Source: Official Umbraco CMS Installation Guide

Step 1: Install the Umbraco Templates

To create an Umbraco project using the CLI, you must first install the Umbraco project templates. This enables you to create a new Umbraco site quickly using the .NET CLI.

dotnet new install Umbraco.Templates

This installs the Umbraco templates on your machine, which is a one-time setup. Once installed, you can use these templates to generate new Umbraco projects whenever you need them.

Step 2: Create a New Umbraco Project

With the templates installed, you can now create a new Umbraco project. This can be done in just one command.

dotnet new umbraco --name MyProject

This will create a new project called MyProject (replace MyProject with your preferred project name). The project is structured and ready for you to start building your Umbraco-based site. The command will create a folder with the necessary files, including the .csproj file, which is crucial for .NET projects.

Step 3: Navigate to the Project Folder

Once the project is created, you’ll need to navigate into the newly created project directory, where all the project files are located, including the .csproj file.

cd MyProject

This will take you into the directory of the project you just created.

Step 4: Build and Run the Umbraco Site

After navigating to the project folder, you need to build and run the Umbraco site locally. The dotnet run command is used to build and launch the site.

dotnet run

After running this command, the console will output a message similar to the following:

[10:57:39 INF] Now listening on: https://localhost:44388

This indicates that the Umbraco site is now running locally onhttps://localhost:44388.

Step 5: Set Up a Developer Certificate for HTTPS (Optional)

Umbraco, like many modern web applications, recommends running under HTTPS for security reasons. If you haven’t yet configured a developer certificate, you can do so using the following command. This will set up and trust the SSL certificate for local development:

dotnet dev-certs https --trust

This command generates a local HTTPS certificate for development purposes and trusts it on your system. After running this, your Umbraco site will be available at https://localhost:44388 over HTTPS.

Conclusion

By following these steps, you’ll have Umbraco CMS up and running locally using the .NET CLI. The process is quick and efficient, making it perfect for developers who want to quickly set up a development environment.

Once your project is running, you can begin building your site, extending functionality, and customizing it to fit your needs. The flexibility and scalability of Umbraco provide you with the tools to create powerful websites and applications.

If you’re looking for more detailed instructions or further assistance, feel free to check out the official Umbraco Installation Guide.

Happy coding!

--

--

No responses yet