Vultr DocsLatest Content

How to Deploy Vultr's ASP.NET Marketplace Application

Updated on 04 December, 2025
Guide
Deploy an .NET 8 web app from the Vultr Marketplace, reverse proxy with Nginx, secure HTTPS via Let's Encrypt.
How to Deploy Vultr's ASP.NET Marketplace Application header image

ASP.NET is a cross-platform, high-performance framework developed by Microsoft for building web applications, APIs, and microservices. It includes features such as Razor Pages for streamlined server-side rendering, gRPC for fast inter-service communication, and minimal APIs for lightweight endpoints. Vultr's ASP.NET Marketplace Application provides a pre-configured ASP.NET environment, allowing developers to deploy and run .NET applications on Vultr servers.

This article explains deploying and using Vultr's ASP.NET Marketplace Application. You will set up an ASP.NET instance, create and deploy a sample application, configure Nginx as a reverse proxy, and secure the application with TLS certificates.

Deploy ASP.NET from Vultr Marketplace

  1. Login to your Vultr Customer Portal and click the Deploy Server button.
  2. Select your preferred server type.
  3. Choose a server location.
  4. Select a server plan as per your needs.
  5. Click the Configure Software button to proceed.
  6. Under Marketplace Apps, search for ASP.NET and select it as the Marketplace Application.
  7. Select the Limited User Login option under Additional Features to create a non-root user with sudo access.
  8. Review your configurations and click the Deploy button to start deployment.

Initial Server Setup and Configuration

  1. Create a DNS A record pointing to your server's IP address, such as app.example.com.

  2. Connect to your Vultr server instance via SSH with the credentials from the Server Information page.

  3. Verify the ASP.NET installation by checking the installed .NET SDK version.

    console
    $ dotnet --version
    

    You should see the installed .NET version, such as 8.0.415 or similar.

Create and Deploy an ASP.NET Project

This section covers creating an ASP.NET web application.

Create an ASP.NET Application

  1. Create a directory for your application.

    console
    $ mkdir ~/aspnet-app
    
  2. Navigate to the application directory.

    console
    $ cd ~/aspnet-app
    
  3. Create a new ASP.NET web application using the .NET CLI.

    console
    $ dotnet new webapp -n MyVultrApp
    
  4. Navigate to the project directory.

    console
    $ cd MyVultrApp
    

Publish the Application

  1. Build the application in Release mode.

    console
    $ sudo dotnet publish -c Release -o /var/www/aspnet-app
    

    This command compiles the application and outputs the files to /var/www/aspnet-app.

  2. Set the correct permissions for the application directory.

    console
    $ sudo chown -R www-data:www-data /var/www/aspnet-app
    

Create a systemd Service

To ensure your ASP.NET application runs continuously and starts automatically on boot, create a systemd service.

  1. Create a new service file.

    console
    $ sudo nano /etc/systemd/system/aspnet-app.service
    
  2. Add the following configuration.

    ini
    [Unit]
    Description=ASP.NET Web Application
    After=network.target
    
    [Service]
    WorkingDirectory=/var/www/aspnet-app
    ExecStart=/usr/bin/dotnet /var/www/aspnet-app/MyVultrApp.dll
    Restart=always
    RestartSec=10
    KillSignal=SIGINT
    SyslogIdentifier=aspnet-app
    User=www-data
    Environment=ASPNETCORE_ENVIRONMENT=Production
    Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
    Environment=ASPNETCORE_URLS=http://localhost:5000
    
    [Install]
    WantedBy=multi-user.target
    

    Save and exit the file.

  3. Reload the systemd daemon to recognize the new service.

    console
    $ sudo systemctl daemon-reload
    
  4. Start the ASP.NET application service.

    console
    $ sudo systemctl start aspnet-app
    
  5. Enable the service to start on boot.

    console
    $ sudo systemctl enable aspnet-app
    
  6. Check the service status to confirm it's running.

    console
    $ sudo systemctl status aspnet-app
    

Configure Nginx as a Reverse Proxy

Install and configure Nginx as a reverse proxy to handle web traffic and forward requests to your ASP.NET application.

  1. Install Nginx.

    console
    $ sudo apt install nginx -y
    
  2. Start the Nginx service.

    console
    $ sudo systemctl start nginx
    
  3. Enable Nginx to start on boot.

    console
    $ sudo systemctl enable nginx
    
  4. Allow HTTP traffic through the firewall.

    console
    $ sudo ufw allow 80/tcp
    
  5. Allow HTTPS traffic through the firewall.

    console
    $ sudo ufw allow 443/tcp
    
  6. Create a new Nginx configuration file for your ASP.NET application.

    console
    $ sudo nano /etc/nginx/sites-available/aspnet-app
    
  7. Add the following configuration, replacing app.example.com with your domain name.

    ini
    server {
        listen 80;
        server_name app.example.com;
    
        location / {
            proxy_pass http://localhost:5000;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection keep-alive;
            proxy_set_header Host $host;
            proxy_cache_bypass $http_upgrade;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }
    }
    

    Save and exit the file.

  8. Create a symbolic link to enable the site.

    console
    $ sudo ln -s /etc/nginx/sites-available/aspnet-app /etc/nginx/sites-enabled/
    
  9. Test the Nginx configuration for errors.

    console
    $ sudo nginx -t
    
  10. Reload Nginx to apply the changes.

    console
    $ sudo systemctl reload nginx
    
  11. Open a web browser and navigate to http://app.example.com to verify your application is accessible.

    webpage

Secure the Application with Let's Encrypt

Secure your ASP.NET application with HTTPS using free TLS certificates from Let's Encrypt, managed by Certbot.

  1. Install Certbot and the Nginx plugin.

    console
    $ sudo apt install certbot python3-certbot-nginx -y
    
  2. Set up a TLS certificate for your domain. Replace app.example.com with your actual domain name and admin@example.com with your email address.

    console
    $ sudo certbot --nginx -d app.example.com -m admin@example.com --no-eff --agree-tos
    
  3. Certbot will automatically update your Nginx configuration to use HTTPS and install the TLS certificate.

  4. Verify TLS certificate auto-renewal by running a dry run.

    console
    $ sudo certbot renew --dry-run
    
  5. Your ASP.NET application should now be accessible via https://app.example.com with a valid TLS certificate.

Manage and Update the Application

This section demonstrates how to make updates to your application and redeploy them.

Update and Redeploy the Application

To apply updates, make necessary code changes and redeploy the application.

  1. Navigate to your source code directory.

    console
    $ cd ~/aspnet-app/MyVultrApp
    
  2. Modify the home page to verify the update process.

    console
    $ nano Pages/Index.cshtml
    
  3. Replace the content with a simple update.

    html
    @page
    @model IndexModel
    @{
        ViewData["Title"] = "Home page";
    }
    
    <div class="text-center">
        <h1 class="display-4">Welcome to My Vultr App</h1>
        <p>Your ASP.NET application is successfully running on Vultr!</p>
        <p>Version: 2.0</p>
    </div>
    

    Save and exit the file.

  4. Rebuild and republish the application.

    console
    $ sudo dotnet publish -c Release -o /var/www/aspnet-app
    
  5. Restart the service.

    console
    $ sudo systemctl restart aspnet-app
    
  6. Verify the update by accessing https://app.example.com in your browser.

Common Management Commands

Below are common commands for managing your ASP.NET application.

  1. Stop the application.

    console
    $ sudo systemctl stop aspnet-app
    
  2. View application logs.

    console
    $ sudo journalctl -u aspnet-app
    
  3. View real-time logs.

    console
    $ sudo journalctl -u aspnet-app -f
    

Conclusion

In this article, you deployed Vultr's ASP.NET Marketplace Application. You created and deployed an ASP.NET project, configured Nginx as a reverse proxy, secured the application with TLS certificates, and learned how to manage and update the application. With ASP.NET's robust framework and Vultr's optimized infrastructure, you can build and deploy scalable web applications efficiently. The pre-configured Marketplace Application simplifies the initial setup, enabling a faster and more streamlined deployment process.

Tags:

Comments