Socialhome is a free and open-source, decentralized social network server. This tutorial will guide you on how to install Socialhome on NixOS Latest.
Before you start the installation process, ensure you have the following:
By default, NixOS Latest comes with the latest stable version of Socialhome. For the latest version, you need to enable the NixOS UNSTABLE channel. Run the following command in your terminal:
sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos-unstable
sudo nix-channel --update
To install Socialhome, execute the following command:
sudo nix-env -iA nixos-unstable.socialhome
Next, we need to create a configuration file for Socialhome. Create a new file /etc/socialhome/configuration.nix
or edit the existing one and add the following lines:
{ config, pkgs, ... }:
{
services.socialhome = {
enable = true;
httpConfig.forceSSL = true; # Enable SSL (recommended)
# A list of domains that your Socialhome instance should respond to
# This should be your domain name or IP
domains = ["example.com"];
# The database configuration
database = {
enablePostgresql = true; # Use PostgreSQL as the backend
passwordFile = "/run/secrets/socialhome-postgres-pass"; # Set a password file
};
# Configure the SMTP server for outgoing mail
mail = {
# Enable SMTP
enable = true;
addresses = ["smtp.gmail.com"]; # Your SMTP server
port = 587;
authentication = "login";
username = "youremail@gmail.com";
passwordFile = "/run/secrets/socialhome-mail-pass"; # Set your own password file
fromAddress = "youremail@gmail.com"; # Your email address
fromName = "Your Name";
};
# The URL prefix for the Socialhome instance
baseurl = "/socialhome/";
# Socialhome authentication configuration
authentication = {
enableEmailSignIn = true;
};
};
}
Please remember to replace the values with your own SMTP server, email address, domain name, and password file.
Finally, restart the NixOS service with the following command:
sudo systemctl restart nixos.service
Once the installation and configuration process is complete, you can access the Socialhome web interface by visiting http://<IP_address>:8000/socialhome/
or https://<your_domain_name>/socialhome/
if you enabled SSL.
That's it! You have successfully installed Socialhome on NixOS Latest.
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!