{"id":14,"date":"2023-01-15T01:56:59","date_gmt":"2023-01-15T06:56:59","guid":{"rendered":"https:\/\/www.5amsoftware.com\/blog\/?p=14"},"modified":"2023-01-15T01:56:59","modified_gmt":"2023-01-15T06:56:59","slug":"installing-baikal-on-freebsd-13-1","status":"publish","type":"post","link":"https:\/\/www.5amsoftware.com\/blog\/2023\/01\/15\/installing-baikal-on-freebsd-13-1\/","title":{"rendered":"Installing Baikal 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.<\/p>\n\n\n\n<p>Credits to <a href=\"https:\/\/www.maketecheasier.com\/create-calendar-server-baikal\/\">this page<\/a> for 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 Baikal<\/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 Baikal:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-cyan-bluish-gray-background-color has-background\">pkg install www\/baikal<\/pre>\n\n\n\n<p>Install nginx:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-cyan-bluish-gray-background-color has-background\">pkg install www\/nginx<\/pre>\n\n\n\n<p>Open <code>\/usr\/local\/etc\/nginx\/nginx.conf<\/code>, scroll down to the <code>server<\/code> section, and replace the entire section with:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-cyan-bluish-gray-background-color has-background\">server {\n  listen         80 default_server;\n  server_name    _;\n&nbsp;\n  root           \/usr\/local\/www\/baikal\/html;\n  index          index.php;\n&nbsp;\n  rewrite        ^\/.well-known\/caldav  \/dav.php redirect;\n  rewrite        ^\/.well-known\/carddav \/dav.php redirect;\n&nbsp;\n  charset utf-8;\n&nbsp;\n  location ~ \/(\\.ht|Core|Specific|config) {\n    deny all;\n    return 404;\n  }\n&nbsp;\n  location ~ ^(.+\\.php)(.*)$ {\n    try_files $fastcgi_script_name = 404;\n    include \/usr\/local\/etc\/nginx\/fastcgi_params;\n    fastcgi_split_path_info ^(.+\\.php)(.*)$;\n    fastcgi_pass unix:\/var\/run\/php-fpm.sock;\n    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n    fastcgi_param PATH_INFO $fastcgi_path_info;\n  }\n}<\/pre>\n\n\n\n<p>Open <code>\/usr\/local\/etc\/php-fpm.d\/www.config<\/code> and change the <code>listen<\/code> directive to:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-cyan-bluish-gray-background-color has-background\">listen = \/var\/run\/php-fpm.sock<\/pre>\n\n\n\n<p>Then, uncomment the following lines:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-cyan-bluish-gray-background-color has-background\">listen.owner = www<br>listen.group = www<br>listen.mode = 0660<\/pre>\n\n\n\n<p>Correct file permissions for Baikal running as <code>www<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-cyan-bluish-gray-background-color has-background\">chown&nbsp;-R&nbsp;www:www \/usr\/local\/www\/baikal\/Specific \/usr\/local\/www\/baikal\/config<\/pre>\n\n\n\n<p>Start FPM and nginx:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-cyan-bluish-gray-background-color has-background\">sysrc&nbsp;php_fpm_enable=YES<br>service&nbsp;php-fpm&nbsp;start<br>sysrc&nbsp;nginx_enable=YES<br>service&nbsp;nginx&nbsp;start<\/pre>\n\n\n\n<p>Finally, browse to the new install and follow the on-screen instructions to finalize configuration. For my testing, I simply used the sqlite backend.<\/p>\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,7,5],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-administration","tag-administration","tag-baikal","tag-freebsd"],"_links":{"self":[{"href":"https:\/\/www.5amsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/14","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=14"}],"version-history":[{"count":0,"href":"https:\/\/www.5amsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/14\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.5amsoftware.com\/blog\/wp-json\/wp\/v2\/media?parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.5amsoftware.com\/blog\/wp-json\/wp\/v2\/categories?post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.5amsoftware.com\/blog\/wp-json\/wp\/v2\/tags?post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}