Newspipe is a self-hosted news aggregator that can be installed on NixOS with ease. However, for those who are new to NixOS, the installation process can seem a bit overwhelming. This tutorial offers a simple guide on how to install Newspipe on NixOS Latest.
Before we begin with the installation process, we need to make sure our system has some essential packages. Run the following command to install them:
sudo nix-env -i git openssl sqlite
Next, we need to clone the Newspipe repository to our system. Run the following command:
git clone https://git.sr.ht/~cedric/newspipe.git
This command will download the Newspipe source code to the current working directory.
We will now create a system service for Newspipe using a systemd unit file. Use your favorite text editor to create a file called newspipe.service
in /etc/systemd/system/
directory:
sudo nano /etc/systemd/system/newspipe.service
Copy the following code to the file:
[Unit]
Description=Newspipe service
After=network.target
[Service]
User=newspipe
WorkingDirectory=/opt/newspipe
ExecStart=/usr/bin/newspipe serve --bind-address 0.0.0.0 --bind-port 8000
Restart=always
[Install]
WantedBy=multi-user.target
Save the file and exit the text editor.
We need to create a user for Newspipe. This user will be used to run the service we created in the previous step. Run the following command:
sudo useradd -r -s /bin/false -d /var/lib/newspipe newspipe
sudo mkdir /var/lib/newspipe
Finally, we will build and install the Newspipe package. Run the following command:
nix-env -f ./newspipe -iA newspipe
This command will download the required packages, build, and install Newspipe.
Before we can start the service, we need to reload systemd to pick up the new unit file:
sudo systemctl daemon-reload
Then, start the Newspipe service:
sudo systemctl start newspipe.service
We can also enable the service to automatically start at boot:
sudo systemctl enable newspipe.service
Congratulations! You have successfully installed Newspipe on NixOS Latest. You can now access your Newspipe instance at http://<your_server_ip>:8000/
.
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!