How to Install Teedy on NixOS
Teedy is a self-hosted knowledge management service that enables text and file storage, organization, and access in a single place. If you want to install and run Teedy on NixOS, follow the steps below:
Step 1: Install NixOS
If you don't have NixOS installed on your system, you need to install it first. Refer to the official NixOS installation guide for details.
Step 2: Update NixOS
Make sure your NixOS system is up-to-date by executing the following command:
sudo nixos-rebuild switch
This command will update your system configuration to the latest version.
Step 3: Install Teedy
Now that your system is up-to-date, you can install Teedy by adding it to the environment.systemPackages list in /etc/nixos/configuration.nix:
environment.systemPackages = with pkgs; [
# ... your packages ...
teedy
];
Save the changes and run the following command to apply the new configuration:
sudo nixos-rebuild switch
This command will download and install Teedy along with its dependencies.
Step 4: Configure Teedy
To configure Teedy, you need to create a teedy.toml file in /etc/teedy/. You can use the following template as a starting point:
[server]
bind_addr = "0.0.0.0"
listen_port = 8080
protocol = "http"
workers = 10
max_connections = 1000
base_url = "http://localhost:8080"
session_key = "CHANGE_ME"
[database]
dialect = "sqlite3"
connection_uri = "/var/lib/teedy/teedy.sqlite3"
[storage]
base_path = "/var/lib/teedy/storage"
[admin]
username = "admin"
password = "CHANGE_ME"
email = "[email protected]"
[mailer]
enabled = false
[ldap]
enabled = false
Save the changes and run the following command to create the necessary directories and files:
sudo mkdir -p /var/lib/teedy/storage /var/lib/teedy/backups
sudo touch /var/lib/teedy/teedy.sqlite3
You can then start Teedy using the following command:
sudo systemctl start teedy
Step 5: Access Teedy
Once Teedy is running, you can access it using your web browser at http://localhost:8080. You should see the login page where you can log in using the credentials you set in Step 4. Congratulations, you have successfully installed and configured Teedy on NixOS!