{"id":5335,"date":"2023-07-22T16:06:43","date_gmt":"2023-07-22T21:06:43","guid":{"rendered":"https:\/\/www.incredigeek.com\/home\/?p=5335"},"modified":"2023-07-24T12:40:11","modified_gmt":"2023-07-24T17:40:11","slug":"install-guide-for-pangolin-whisper-web-interface-on-linux","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/install-guide-for-pangolin-whisper-web-interface-on-linux\/","title":{"rendered":"Install Guide for Pangolin Whisper Web Interface on Linux"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/07\/image-7.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"558\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/07\/image-7-1024x558.png\" alt=\"\" class=\"wp-image-5338\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/07\/image-7-1024x558.png 1024w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/07\/image-7-300x163.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/07\/image-7-768x418.png 768w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/07\/image-7-500x272.png 500w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/07\/image-7.png 1336w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Pangolin is a simple web interface for OpenAI&#8217;s Whisper system.  Very easy and simple to use.  <\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/incredig33k\/pangolin\/releases\/download\/pre-release\/pangolin-web.zip\">https:\/\/github.com\/incredig33k\/pangolin\/<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add User<\/h2>\n\n\n\n<p>We&#8217;ll setup a new unprivileged user called pangolin.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo useradd -m pangolin\nsudo passwd pangolin<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">su pangolin\ncd\npip3 install whisper-ctranslate2\n  or \npip3.9 install whisper-ctranslate2<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">npm install https formidable@2.1.1 fs path url<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">wget <a href=\"https:\/\/github.com\/incredig33k\/pangolin\/releases\/download\/release\/pangolin_web.zip\">https:\/\/github.com\/incredig33k\/pangolin\/releases\/download\/pre-release\/pangolin-web.zip<\/a><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">unzip .\/pangolin_web.zip\ncd pangolin_web\nmkdir uploads\n<\/pre>\n\n\n\n<p>Change default port to 8443.  It is possible to use 443, but we would need to run privileged<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sed -i \"s\/443\/8443\/g\" .\/pangolin_server.js<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Setup SSL Certificate<\/h2>\n\n\n\n<p>This assumes you already have Let&#8217;s Encrypt setup.  We&#8217;ll create a certificate directory for Pangolin to use and then copy the certs there.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mkdir \/home\/pangolin\/ssl\nsudo cp \/etc\/letsencrypt\/live\/DOMAINNAME.COM\/fullchain.pem \/home\/pangolin\/ssl\/\nsudo cp \/etc\/letsencrypt\/live\/DOMAINNAME.COM\/privkey.pem \/home\/pangolin\/ssl\/\nsudo chown pangolin:pangolin \/home\/pangolin\/ssl\/fullchain.pem\nsudo chown pangolin:pangolin \/home\/pangolin\/ssl\/privkey.pem<\/pre>\n\n\n\n<p>Now back in our web directory we can update the vars.js file like the following.  <br><em>Note that we do need the full file path.  Can&#8217;t use ~\/<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">module.exports = {\nkey: '\/home\/pangolin\/ssl\/privkey.pem',\ncert: '\/home\/pangolin\/ssl\/fullchain.pem'\n}<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Firewall rules<\/h2>\n\n\n\n<p><em>We can change the port Pangolin runs on by editing the listen port at the bottom of the pangolin_server.js file.<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo firewall-cmd --add-port=443\/tcp<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Setting up systemd Service <\/h2>\n\n\n\n<p>Now we need to copy our service file and enable the Pangolin service.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo cp \/home\/pangolin\/pangolin_web\/pangolin.service \/usr\/lib\/systemd\/system\/pangolin.service<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl enable pangolin.service<\/pre>\n\n\n\n<p>Start the service<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl start pangolin<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/07\/image-8.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"792\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/07\/image-8-1024x792.png\" alt=\"\" class=\"wp-image-5339\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/07\/image-8-1024x792.png 1024w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/07\/image-8-300x232.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/07\/image-8-768x594.png 768w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/07\/image-8-388x300.png 388w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/07\/image-8.png 1299w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Pangolin is a simple web interface for OpenAI&#8217;s Whisper system. Very easy and simple to use. https:\/\/github.com\/incredig33k\/pangolin\/ Add User We&#8217;ll setup a new unprivileged user called pangolin. sudo useradd -m pangolin sudo passwd pangolin su pangolin cd pip3 install whisper-ctranslate2 &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/install-guide-for-pangolin-whisper-web-interface-on-linux\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[792],"tags":[1454,1023,1466,1538,606,1537,1467],"class_list":["post-5335","post","type-post","status-publish","format-standard","hentry","category-programming","tag-ai","tag-audio","tag-openai","tag-pangolin","tag-programming","tag-projects","tag-whisper"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5335","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=5335"}],"version-history":[{"count":8,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5335\/revisions"}],"predecessor-version":[{"id":5357,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5335\/revisions\/5357"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=5335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=5335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=5335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}