Shaarli is an open source, self-hosted bookmarking service that allows you to save and share links with others. In this tutorial, we will guide you on how to install Shaarli on OpenBSD.
Before we begin, please make sure that you have the following:
To install Shaarli on OpenBSD, we need to install some required packages first. Open the terminal and run the following command:
$ sudo pkg_add php php-fpm nginx unzip
Next, we need to download the Shaarli package from the official Github repository. Run the following command to download the latest version of Shaarli:
$ sudo wget https://github.com/shaarli/Shaarli/archive/master.zip -O shaarli.zip
Once the download is complete, extract the contents of the zip file using the following command:
$ sudo unzip shaarli.zip -d /var/www
We need to configure the nginx web server to host Shaarli. Open the /etc/nginx/nginx.conf
file using your favorite text editor (nano or vi) and add the following code to it:
server {
listen 80;
root /var/www/Shaarli-master;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
Next, we need to configure PHP-FPM settings. Open the /etc/php-fpm.conf
file using your favorite text editor and add the following code to it:
listen = 127.0.0.1:9000
Start the nginx and PHP-FPM services using the following commands:
$ sudo rcctl enable nginx
$ sudo rcctl enable php70_fpm
$ sudo rcctl start nginx
$ sudo rcctl start php70_fpm
Now that we have configured everything, let's proceed with accessing the Shaarli installation wizard. Open your favorite web browser and type in:
http://your-server-ip/
You will be greeted with the Shaarli installation wizard. Follow the on-screen instructions to complete the installation process.
After installing Shaarli, it is important to secure your Shaarli instance by enabling HTTPS and setting up authentication.
Congratulations! You have successfully installed Shaarli on OpenBSD. You can now save and share your bookmarks with others. Don't forget to secure your Shaarli installation using HTTPS and authentication.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!