dotnet-deploy 0.10.1

dotnet tool install --global dotnet-deploy --version 0.10.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local dotnet-deploy --version 0.10.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-deploy&version=0.10.1
                    
nuke :add-package dotnet-deploy --version 0.10.1
                    

Dotnet Deploy Tool

NuGet

A lightweight deployment tool that simplifies publishing .NET applications to remote Linux hosts over SSH and optionally managing their systemd services.


Installation

Global installation

dotnet tool install dotnet-deploy -g

Local installation

cd ./your_solution_directory
dotnet new tool-manifest
dotnet tool install dotnet-deploy

Quick Start

Publish to a remote host

dotnet deploy publish --host 127.0.0.1 --username root --password abc123

Install as a systemd service

Running dotnet deploy publish will automatically restart the service if the systemd service is already installed.

dotnet deploy systemd install --host 127.0.0.1 --username root --password abc123

Using appsettings.json and User Secrets to simplify commands

You can avoid repeatedly typing host and authentication parameters by defining a Deploy section in your configuration.

appsettings.json

{
  "Deploy": {
    "Host": "127.0.0.1",
    "Username": "root"
  }
}

Protect password using User Secrets

dotnet user-secrets set Deploy:Password abc123

Publish using configuration

dotnet deploy publish

The tool will automatically read values from configuration and user-secrets.


Commands

publish

Publishes the project to a remote host.

dotnet deploy publish

info

Displays current deployment configuration.

dotnet deploy info

systemd

Manage systemd service on the remote host.

Install:

dotnet deploy systemd install

Uninstall:

dotnet deploy systemd uninstall

Restart:

dotnet deploy systemd restart

Status:

dotnet deploy systemd status

FAQ

Directory contains multiple projects

Specify the project directory:

dotnet deploy publish --project ./src/my_project

Directory contains multiple csproj files

Specify the exact project file:

dotnet deploy publish --project ./src/my_project/my_project.csproj

Supported Operating Systems

The current version has been tested on Ubuntu. Other Linux distributions may work but are not yet fully validated.

Default resource paths on remote host

Published files:

/var/dotnet-apps/[project_name]

Systemd service file:

/etc/systemd/system/[project_name].service

Command Reference

Use -h on any command to view its description.

Example:

dotnet deploy publish -h
Description:
  Publish project to remote host

Usage:
  DotnetDeploy publish [options]

Options:
  --host            Target host name or domain
  --username        SSH username
  --password        SSH password
  --private-key     SSH private key
  --project         Project path
  --include-files   Copy the specified file or directory into the output directory
  --all-hosts       Publish to all configured hosts
  --before-command  Command to run before dotnet publish
  --after-command   Command to run after dotnet publish
  -?, -h, --help    Show help and usage information
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.10.1 98 2/10/2026
0.9.1 144 12/12/2025
0.9.0 191 2/7/2025
0.8.0 164 2/6/2025
0.7.2 156 1/24/2025
0.7.1 157 1/24/2025
0.7.0 165 1/24/2025
0.6.1 165 1/24/2025
0.6.0 155 1/24/2025
0.5.1 174 1/22/2025
0.5.0 153 1/22/2025
0.4.0 156 1/21/2025
0.3.1 139 1/15/2025
0.2.1 178 11/20/2024
0.2.0 184 9/23/2024
Loading failed