{"id":568142,"date":"2013-08-16T03:00:00","date_gmt":"2013-08-16T07:00:00","guid":{"rendered":""},"modified":"2013-09-10T02:27:18","modified_gmt":"2013-09-10T06:27:18","slug":"how-to-setup-a-free-pgp-key-server-in-ubuntu","status":"publish","type":"post","link":"https:\/\/mereja.media\/index\/568142","title":{"rendered":"How To Setup A Free PGP Key Server in Ubuntu"},"content":{"rendered":"<p>There are a number of public PGP key servers out there, but if we wanted to make sure we had some level of trust, we wanted to maintain and control our own key server. Well it turns out that in Ubuntu, setting up a PGP\/GPG key server is just as easy as setting up PGP\/GPG in general.Just do the following:<\/p>\n<ol>\n<li><b>Install the sks package<\/b><b><span style=\"color: #000066;\"><i>&gt;sudo apt-get install sks<\/i><\/span><\/b><\/li>\n<li><b>Build the key database<\/b><i><span style=\"color: #000066;\"><b>&gt;sudo sks build<\/b><\/span><\/i><\/li>\n<li><b>Set database permissions<\/b><i><span style=\"color: #000066;\"><i><b>&gt;sudo chown -Rc debian-sks:debian-sks \/var\/lib\/sks\/DB<\/b><\/i><\/span><br \/>\n<b><\/b><\/i><\/li>\n<li><b>Set the server to start automatically at boot<\/b><b><span style=\"color: #000066;\"><i>set initstart=yes in \/etc\/default\/sks<\/i><\/span><\/b><\/li>\n<li><b>Start the service <\/b><i><span style=\"color: #000066;\"><i><b>&gt;sudo \/etc\/init.d\/sks start<\/b><\/i><\/span><\/i><\/li>\n<\/ol>\n<p>That is it! Now your server is listening on port 11371 for key requests. You can now send and retrieve keys to and from the server using your favorite key manager!<\/p>\n<p>If that is not good enough for you, then you can also add a web interface to handle your key searches and requests. To do that you will need to install Apache:<\/p>\n<blockquote><p><i><span style=\"color: #000066;\"><b>&gt;sudo apt-get install apache2<\/b><\/span><\/i><\/p><\/blockquote>\n<p>Once installed create a directory called www in \/var\/lib\/sks\/. Download the index.html and keys.jpg file you will need here: (<a href=\"ftp:\/\/ftp.bauer-power.net\/misc\/gpg\/sks\/\">OpenSKS Web Interface<\/a>)<\/p>\n<p>Extract the contents to \/var\/lib\/sks\/www\/. Edit index.html and change the three references to your.site.name (<b>currently at lines 20, 36 &amp; 62<\/b>) to the url of your keyserver, for example keys.bauer-power.net. Now set the correct permissions on that directory: <span style=\"color: #000066;\"><i><b>&gt;sudo chown -R debian-sks:debian-sks \/var\/lib\/sks\/www<\/b><\/i><\/span><\/p>\n<p>Now if you browse to <i><b>http:\/\/your.server.name:11371<\/b><\/i> you will see a nice, user-friendly web interface for doing public key exchanges!<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>There are a number of public PGP key servers out there, but if we wanted to make sure we had some level of trust, we wanted to maintain and control our own key server. Well it turns out that in Ubuntu, setting up a PGP\/GPG key server is just as easy as setting up PGP\/GPG [&hellip;]<\/p>\n","protected":false},"author":1521,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[40,48],"class_list":["post-568142","post","type-post","status-publish","format-standard","hentry","category-it","tag-pgp-key-server","tag-sks-package"],"_links":{"self":[{"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/posts\/568142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/users\/1521"}],"replies":[{"embeddable":true,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/comments?post=568142"}],"version-history":[{"count":0,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/posts\/568142\/revisions"}],"wp:attachment":[{"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/media?parent=568142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/categories?post=568142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/tags?post=568142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}