Shaarli is a minimalist link sharing service that allows you to save bookmarks to URLs, videos, or images on a self-hosted server. In this tutorial, we will walk through the steps to install Shaarli on nixOS.
Before we start, make sure you have the following:
sudo nixos-rebuild switch --upgrade
sudo useradd -m -s /bin/bash shaarli
sudo nix-env --install php
sudo nix-env --install lighttpd
sudo git clone https://github.com/shaarli/Shaarli.git /var/www/shaarli
shaarli
usersudo chown -R shaarli:shaarli /var/www/shaarli
sudo nano /etc/lighttpd/conf.d/shaarli.conf
$HTTP["host"] =~ "shaarli.example.com" {
server.document-root = "/var/www/shaarli"
url.rewrite-if-not-file = (
"^/.(.+)$" => "/index.php?$1"
)
fastcgi.server = (".php" =>
((
"socket" => "/run/php-fpm.sock",
"bin-path" => "/run/current-system/sw/bin/php-cgi"
))
)
}
sudo systemctl restart lighttpd.service
You can now access Shaarli by entering the URL http://shaarli.example.com
on your web browser. Note that you need to substitute shaarli.example.com
with your own domain or IP address.
In this tutorial, we have installed Shaarli, a minimalist link sharing service, on nixOS. By self-hosting Shaarli, you can avoid giving away your browsing data to third-party services and have full control over your bookmarks.
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!