ShellHub is an open-source cloud service that allows you to manage and access multiple remote Linux shells in one place. This tutorial will guide you through the installation process of ShellHub on NixOS Latest.
Before you get started, make sure you have the following prerequisites:
Log in to your NixOS instance with root or sudo access.
Open a terminal emulator and run the following command to update the system:
sudo nix-channel --update
After the update, run the following command to install ShellHub:
sudo nix-env -i shellhub
Wait for the installation process to complete.
Now that you have installed ShellHub, it's time to configure it.
First, create the following directory to store the ShellHub configuration file:
sudo mkdir /etc/shellhub
Next, create the ShellHub configuration file:
sudo nano /etc/shellhub/config.toml
Paste the following content into the configuration file:
[server]
listen = ":8080"
domain = "<your domain>"
tls_cert = "/path/to/tls/cert"
tls_key = "/path/to/tls/key"
[auth]
jwt_secret = "<your jwt secret>"
[database]
mongodb_uri = "mongodb://localhost:27017/shellhub"
Note: Replace <your domain>
, <your jwt secret>
, and the paths to the TLS certificate and key with your own values.
Save and close the configuration file.
To start the ShellHub service, run the following command:
sudo systemctl start shellhub
To enable the service to start at boot time, run the following command:
sudo systemctl enable shellhub
To check the status of the ShellHub service, run the following command:
sudo systemctl status shellhub
If everything is working correctly, you should see a message indicating that the service is active and running.
In this tutorial, you learned how to install and configure ShellHub on NixOS Latest. With ShellHub, you can manage and access multiple remote Linux shells in one place. Enjoy using ShellHub for your shell management needs!
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!