[ASP.NET 5] Production Ready Web Server on Linux. Kestrel + Supervisord

By | August 28, 2015

Advertisement from Google

vNextIn the previous article I’ve used nohup + su + init.d script to run kestrel in a background. But as Daniel Lo Nigro suggested in comments it’s much easier to do the same with Supervisor

And he was absolutelly right, config is much smaller, and you can easelly see status and output of a program.

First, install supervisor:

sudo apt-get install supervisor

Now you can create config for your application:

sudo nano /etc/supervisor/conf.d/kestrel_default.conf

With following content:

command=su -c "/home/username/.k/runtimes/kre-mono.1.0.0-beta3/bin/k kestrel" username

Specify path to your dnx and application, as well as username under which you want to run your application (usually user who has dnx installed)

Now you can tell supervisor to reread configurations:

Advertisement from Google

sudo supervisorctl reread
sudo supervisorctl update

This command will automaticaly start your application (we specified autostart=true in config).

To see current status and start\stop applications execute:

sudo supervisorctl

There you can stop application:

stop kestrel_default


start kestrel_default

Or check program’s output:

tail kestrel_default

2 thoughts on “[ASP.NET 5] Production Ready Web Server on Linux. Kestrel + Supervisord

  1. Brandon

    Hello Ivan,

    I’ve been browsing different blogs within the engineering, programming, and technology industries. Yours resonated with me, and seeing as you’re a small blogger, I’d like to support you in some fashion. Perhaps I could provide you with a complimentary dev kit for a project or review post, or provide you with a unique tutorial on any topic you’d like to cover?

    To introduce myself so you’re not mumbling, “Who’s this guy?”, my name is Brandon and I oversee digital outreach for Newark element14, one of the leading global electronic components distributors. We’ve been engaging with small bloggers quite a bit lately, trying to support their efforts and grow their communities of technology and engineering. We even recently started our own efforts to recognize these individuals on our site, http://www.imanengineer.com

    I feel that your blog is deserving of support, especially if you’re intending to grow it and reach a larger audience. So, let me know if you’d like to connect!


    Brandon Duchon
    Outreach Manager
    Newark element14

    T: +1 773 907 5401
    E: bduchon@newark.com
    300 South Riverside Plaza Suite 2200, Chicago, IL, 60606 USA


Leave a Reply

Your email address will not be published. Required fields are marked *