{"id":10,"date":"2023-01-12T23:52:32","date_gmt":"2023-01-13T04:52:32","guid":{"rendered":"https:\/\/www.5amsoftware.com\/blog\/?p=10"},"modified":"2023-01-12T23:52:32","modified_gmt":"2023-01-13T04:52:32","slug":"installing-radicale-on-freebsd-13-1","status":"publish","type":"post","link":"https:\/\/www.5amsoftware.com\/blog\/2023\/01\/12\/installing-radicale-on-freebsd-13-1\/","title":{"rendered":"Installing Radicale on FreeBSD 13.1"},"content":{"rendered":"\n<p>This document contains instructions on installing Radicale on FreeBSD. It is aimed at a simple base install, and does not include reverse proxing or other hardening suitable for direct connection on the Internet.<\/p>\n\n\n\n<p>All configuration in this guide is done as root or sudo root.<\/p>\n\n\n\n<p>Credits to <a href=\"https:\/\/wiki.freebsd.org\/Ports\/www\/radicale\">this page<\/a> for information and configuration file settings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing FreeBSD<\/h2>\n\n\n\n<p>For this trial, I used FreeBSD 13.1 with all default settings during the installation process.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing Radicale<\/h2>\n\n\n\n<p>Configure <code>pkg<\/code> for us:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-cyan-bluish-gray-background-color has-background\">pkg update<\/pre>\n\n\n\n<p>Install Radicale:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-cyan-bluish-gray-background-color has-background\">pkg install www\/radicale<\/pre>\n\n\n\n<p>Edit <code>\/usr\/local\/etc\/radicale\/config<\/code> as follows below. Note that below is not the entire configuration file, only the relevant parts edited in the default file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-cyan-bluish-gray-background-color has-background\">[server]<br># Enable connections from anywhere. Later if putting this<br># behind a reverse proxy, you would want to restrict it to<br># localhost only.<br>hosts = 0.0.0.0:5232<br>\u200b<br>[auth]<br>type = htpasswd<br>htpasswd_filename = \/usr\/local\/etc\/radicale\/users<br>htpasswd_encryption = bcrypt<br>\u200b<br>[rights]<br>type = owner_only<br>\u200b<br>[storage]<br>filesystem_folder = \/var\/db\/radicale\/collections<\/pre>\n\n\n\n<p>Save the file and quit the editor.<\/p>\n\n\n\n<p>Next, install Apache 2.4. We are really only doing this to get <code>htpasswd<\/code>, other approaches could be used such as <code>py39-htpasswd<\/code>, but that does not support bcrypt.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-cyan-bluish-gray-background-color has-background\">pkg install apache24<\/pre>\n\n\n\n<p>Next, create the password file and add any required users:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-cyan-bluish-gray-background-color has-background\">htpasswd&nbsp;-Bc&nbsp;\/usr\/local\/etc\/radicale\/users firstuser<br>htpasswd&nbsp;-B&nbsp;\/usr\/local\/etc\/radicale\/users subsequentuser<\/pre>\n\n\n\n<p>And set permissions on it so that the Radicale server can access it, but other logged in users cannot.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-cyan-bluish-gray-background-color has-background\">chown&nbsp;root:radicale \/usr\/local\/etc\/radicale\/users<br>chmod&nbsp;640&nbsp;\/usr\/local\/etc\/radicale\/users<\/pre>\n\n\n\n<p>And finally, start it:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-cyan-bluish-gray-background-color has-background\">sysrc&nbsp;radicale_enable=YES<br>service&nbsp;radicale&nbsp;start<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This document contains instructions on installing Radicale on FreeBSD. It is aimed at a simple base install, and does not include reverse proxing or other hardening&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[4,5,6],"class_list":["post-10","post","type-post","status-publish","format-standard","hentry","category-administration","tag-administration","tag-freebsd","tag-radicale"],"_links":{"self":[{"href":"https:\/\/www.5amsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.5amsoftware.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.5amsoftware.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.5amsoftware.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.5amsoftware.com\/blog\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":0,"href":"https:\/\/www.5amsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.5amsoftware.com\/blog\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.5amsoftware.com\/blog\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.5amsoftware.com\/blog\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}