Installation Guide
This guide will walk you through various methods of installing and using Moonbeam.
Prerequisites
Before you begin, ensure that you have:
- Linux operating system
- Nix package manager with Flakes enabled
- Sunshine installed and configured
Installing Nix and Setting Up Flakes
If you haven’t installed Nix or set up Flakes yet, follow the Nix Installation and Flakes Setup Guide. This guide will walk you through:
- Installing the Nix package manager
- Configuring Nix for your system
- Enabling and setting up Nix Flakes
Once you’ve completed these steps, return here to continue with Moonbeam installation or usage.
Installation Options
You can run Moonbeam directly without installing it using:
nix run github:simonwjackson/elevate/stable/moonbeam#moonbeam
nix run github:simonwjackson/elevate/main#moonbeam
To pass options to Moonbeam when using this method, simply add them after the package name:
nix run github:simonwjackson/elevate/stable/moonbeam#moonbeam -- --help
nix run github:simonwjackson/elevate/main#moonbeam -- --help
This method is perfect for trying out Moonbeam without making any changes to your system.
To install Moonbeam for the current user:
nix profile install github:simonwjackson/elevate/stable/moonbeam#moonbeam
nix profile install github:simonwjackson/elevate/main#moonbeam
For NixOS users, you can add Moonbeam to your system configuration using Flakes:
-
Edit your
flake.nix
file in your NixOS configuration directory:Terminal window sudo nano /etc/nixos/flake.nix -
Add Moonbeam to your inputs and include it in your system configuration:
{inputs = {nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";moonbeam.url = "github:simonwjackson/elevate/stable/moonbeam";};outputs = { self, nixpkgs, moonbeam }: {nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem {system = "x86_64-linux";modules = [./configuration.nix({ pkgs, ... }: {environment.systemPackages = [ moonbeam.packages.x86_64-linux.moonbeam ];})];};};}{inputs = {nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";moonbeam.url = "github:simonwjackson/elevate/main";};outputs = { self, nixpkgs, moonbeam }: {nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem {system = "x86_64-linux";modules = [./configuration.nix({ pkgs, ... }: {environment.systemPackages = [ moonbeam.packages.x86_64-linux.moonbeam ];})];};};}Replace
your-hostname
with your actual hostname. -
Rebuild your NixOS configuration:
Terminal window sudo nixos-rebuild switch --flake /etc/nixos
To build from source:
-
Clone the Elevate repository:
Terminal window git clone -b stable/moonbeam --single-branch --depth 1 https://github.com/simonwjackson/elevate.gitTerminal window git clone -b main --single-branch --depth 1 https://github.com/simonwjackson/elevate.git -
Change to the
elevate
directory:Terminal window cd elevate -
Build and install Moonbeam.
Building and installing Moonbeam... nix profile install .#moonbeam -
Verify the installation:
Terminal window moonbeam --version
Verifying the Installation
Regardless of the installation method, you can verify Moonbeam is correctly installed by running:
moonbeam --version
You should see output indicating the version of Moonbeam you’ve installed.
Shell Completion
To enable shell completion for Moonbeam, follow these steps:
-
Locate the Moonbeam completion script. If you installed Moonbeam using
nix profile
, the script should be located at:~/.nix-profile/share/bash-completion/completions/moonbeam -
For Bash: Add the following line to your
~/.bashrc
file:Terminal window source ~/.nix-profile/share/bash-completion/completions/moonbeam -
For Zsh: Add the following lines to your
~/.zshrc
file:Terminal window autoload -U +X bashcompinit && bashcompinitsource ~/.nix-profile/share/bash-completion/completions/moonbeam -
Restart your shell or run
source ~/.bashrc
(for Bash) orsource ~/.zshrc
(for Zsh) to apply the changes.
Now you can use tab completion with Moonbeam commands and options.
Upgrading Moonbeam
To upgrade Moonbeam to the latest version, follow the method you used for installation:
When using nix run
, you might need to refresh the cache to obtain the latest version:
nix run --refresh github:simonwjackson/elevate/stable/moonbeam#moonbeam
nix run --refresh github:simonwjackson/elevate/main#moonbeam
If you installed using nix profile
, upgrade with:
nix profile upgrade moonbeam
For NixOS users, update your flake inputs and rebuild:
sudo nix flake update moonbeam /etc/nixossudo nixos-rebuild switch --flake /etc/nixos
To upgrade a source installation:
cd elevategit pullnix profile upgrade .#moonbeam
Uninstalling Moonbeam
To remove Moonbeam from your system:
No uninstallation is necessary when using nix run
.
If installed with nix profile
, uninstall using:
nix profile remove moonbeam
Remove Moonbeam from your NixOS configuration, then rebuild:
sudo nixos-rebuild switch --flake /etc/nixos
To uninstall a source installation:
nix profile remove github:simonwjackson/elevate#moonbeam
Congratulations! You have successfully installed or set up Moonbeam on your Linux system. You’re now ready to start optimizing your Moonlight game streaming experience.
Next Steps Proceed to the Core Settings section to learn how to use Moonbeam for streaming games and applications.