This tutorial provides step-by-step instructions on how to install Typesense on NixOS, the Linux distribution.
Before you begin, make sure that you have:
Open a terminal on your NixOS system with administrator access.
Update the package lists by running the following command:
sudo nix-channel --update
Install Typesense from the Typesense.org package repository by running the following command:
sudo nix-env -iA typesense -f https://packages.typesense.org/nix/typesense.nix
Once installation is complete, start the Typesense server by running the following command:
sudo systemctl start typesense
To check if Typesense is running, run the following command:
sudo systemctl status typesense
This command should return outputs like this -
typesense.service - Typesense
Loaded: loaded (/nix/store/0n1yv2zzlzpjjr24z96fzymwf9afn0ya-typesense-0.19.0/lib/systemd/system/typesense.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-04-25 13:00:18 UTC; 1s ago
Main PID: 134992 (typesense)
Tasks: 6 (limit: 534)
Memory: 7.2M
CGroup: /system.slice/typesense.service
└─134992 /nix/store/0n1yv2zzlzpjjr24z96fzymwf9afn0ya-typesense-0.19.0/bin/typesense --data-dir /var/lib/typesense --api-key=xyz --enable-mentions
Apr 25 13:00:18 test-nixos systemd[1]: Started Typesense.
If Typesense is not running, start it manually by running the following command:
sudo /nix/store/0n1yv2zzlzpjjr24z96fzymwf9afn0ya-typesense-0.19.0/bin/typesense --data-dir /var/lib/typesense --api-key=xyz --enable-mentions
Once Typesense is running, open a web browser and go to http://localhost:8108. This should load the Typesense dashboard where you can start creating and managing your collections.
In this tutorial, we have covered the steps required to install Typesense on NixOS. If you have encountered any issues during the installation process, please refer to the Typesense documentation or community forums for additional support.
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!