Selfoss is a web-based RSS reader and multi-source news reader for Linux. In this tutorial, we will walk you through the steps needed to install Selfoss on nixOS Latest.
Before we start, make sure that you have nixOS Latest installed on your system.
The first step is to update your nixOS system to the latest version. To do that, open the terminal and run the following command:
sudo nix-channel --update && sudo nixos-rebuild switch
This will update your nixOS system to the latest version.
To install Selfoss, we will create a new .nix file with the Selfoss dependencies and install it using the nix package manager.
nano ~/selfoss.nix
{ pkgs ? import <nixpkgs> {} }:
pkgs.dockerTools.buildImage {
name = "selfoss";
tag = "latest";
contents = [
pkgs.curl
pkgs.mediainfo
pkgs.nano
pkgs.nodejs-12_x
pkgs.php
pkgs.phpPackages.php-mcrypt
pkgs.phpPackages.php-sqlite3
pkgs.phpPackages.php-xml
pkgs.phpPackages.php-zip
pkgs.phpPackages.twig
];
config.Cmd = [ "php" "index.php" "-c" "/etc/php.ini" ];
}
Save and close the file.
To build the Selfoss image, run the following command:
nix-build ~/selfoss.nix -A buildImage
docker run --name selfoss -p 80:80 selfoss:latest
This will start the Selfoss daemon. You can now access the Selfoss web interface by navigating to http://localhost/ on your web browser.
Selfoss configuration file is located in the root directory of the Selfoss installation. To access it, run the following command:
docker exec -it selfoss bash
This will take you to the Selfoss container's command line.
Once you're in the container's command line, run the following command to configure the Selfoss settings:
php index.php settings --set base_url http://localhost
This will set the Selfoss base URL to http://localhost. You can customize other settings by running the same command and changing the base_url argument.
In this tutorial, we walked through the steps required to install Selfoss on nixOS Latest. We created a .nix file with the Selfoss dependencies and installed it using the nix package manager. We also showed you how to configure Selfoss settings to set the base URL. If you encounter any errors during the installation process, be sure to check the Selfoss documentation for troubleshooting advice.
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!