Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publish Net Core Web API in NAS Synology

I have a requirement to publish a Net Core Web API on a Synology NAS server. I do not have the faintest idea how to do this. Any help you can give me in this regard?

like image 557
Octavio David Peñuela Muñoz Avatar asked Oct 21 '25 16:10

Octavio David Peñuela Muñoz


1 Answers

Thanks to contributor hgy59, Dot net runtime is now available in package center - community section.

  1. If you don't have community section displayed in package center. Add it from Package Center - Settings - Package sources - Add - http://packages.synocommunity.com/

  2. Install Dotnet 6 runtime in "Package center - Community" just like other packages.

  3. Publish your Web API or app as Folder, compress the folder and upload to your NAS, and unzip it. Say the unzipped path is /var/services/homes/admin/webapps/SampleAPI

  4. Control Panel - Task Scheduler - Create - Triggered Task - User defined script - Ensure Event is "Boot-up". In "Task Settings" - "Run command", type the command which will start your app. E.g.

    /usr/local/bin/dotnet /var/services/homes/admin/webapps/SampleAPI/SampleAPI.dll --urls "http://192.168.50.10:5100" &

  5. Click "OK", enable this task, and run the task. Now access the URL you defined above.

like image 81
Moses Avatar answered Oct 26 '25 20:10

Moses