How to Get Commune Running on Your Windows Computer
Hi everyone! Today we're going to do a quick rundown on how to get Commune running on your Windows computer. Let's go!
Step 1: Open the Setup Guide
Let's start by opening up a web browser and navigating to the setup guide. The link is in the description below. I'm going to go through everything pretty quickly in this video, so if you want more details, just follow the written guide.
Step 2: Set Up Windows Subsystem for Linux (WSL)
First, we're going to set up WSL, which is the Windows Subsystem for Linux. This sets up a Linux environment for you in Windows, making things easier. Right-click on your Start menu and open up PowerShell. From here, I recommend resizing your browser window to make it easier to copy and paste commands.
- Set version 2 as the default for WSL:
wsl --set-default-version 2
- Update WSL:
wsl --update
- Install Ubuntu:
wsl --install -d Ubuntu
During the installation, you'll need to set a username and password. Remember these credentials for future use.
Step 3: Install Pip and Set Up the Environment
Next, we're going to open Ubuntu from the Start menu. Then, we'll install Pip and set up the environment:
- Update package lists:
sudo apt update
- Install Pip:
sudo apt install python3-pip
Step 4: Update Your Path
Now, we need to update your path. This step is easier if you follow the written guide on GitHub, but you can see what I do here and how to do it.
Step 5: Install Dependencies
Once the path is updated, we can install the necessary dependencies:
- Install dependencies:
sudo apt install -y build-essential libssl-dev libffi-dev python3-dev
Step 6: Start the Shell
Now that the dependencies are installed, we're going to fire up the shell:
- Start the shell:
/bin/bash
Step 7: Clone and Set Up Commune
Now we have the shell running, and we can proceed to clone the Commune repository and set it up:
- Clone the repository:
git clone https://github.com/commune-a/commune.git
cd commune
- Pull the latest files:
git pull
- Run the Commune install script:
./install.sh
Step 8: Install and Configure Rust
Next, we're going to install and configure Rust:
- Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
- Update the ownership of the Commune directory:
sudo chown -R $(whoami) /path/to/commune
Step 9: Verify Installation
To see if Commune is running, you can run:
- Run Commune Modules:
./commune modules
If it gives you a list of modules, as you can see here, that means it's running.
Step 10: Running Commune After Reboot
If you reboot your PC, you don’t need to reinstall everything. Just:
- Open Ubuntu from the Start menu.
- Change to the Commune directory.
- Make sure the shell is running.
Step 11: Setting Up Docker (Optional for Local Node)
If you want to run a local node on Commune, you will need to set up Docker and add your user to the Docker group:
- Install Docker.
- Add your user to the Docker group:
sudo usermod -aG docker $(whoami)
You might run into an error trying to start up a local node. This happens because you need to log out and log back in again for your user to be added to the Docker group. Once you do that, everything should work fine.
Alright, perfect! Thank you and have fun!