If you want to modify the code and you are new to C# or programming in general, the tutorials listed in [Creating Bots](creating-bots.md#requirements) are a good starting point.
**If you're using Linux we will assume that you should be able to install git on your own. If you don't know how, search it up for your distribution, it should be easy. (Debian based distros: `apt install git`, Arch based: `pacman -S git`)**
- On Ubuntu 24.04 LTS, use the built-in Ubuntu package feeds:
```bash
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-10.0
```
- On macOS, the normal path is to use the official installer from the [.NET download page](https://dotnet.microsoft.com/en-us/download). Pick `Arm64` for Apple Silicon and `x64` for Intel Macs.
5. If you want to download translation resources, please check out [Download translation resources](#download-translation-resources-optional)
6. Run the following command for a normal local build:
```bash
dotnet build MinecraftClient.sln -c Release
```
7. Run the following command if you want a release-like published binary that matches the repo's CI workflow:
**If you are using Linux on ARM, 32-bit, RHEL-based distributions, or Musl, [pick the appropriate RID](https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#linux-rids) for your platform and replace `-r linux-x64` with it, for example `-r linux-arm64`.**
**If you are not using an Intel Mac, [pick the appropriate RID](https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#macos-rids) for your processor and replace `-r osx-x64` with it, for example `-r osx-arm64`.**
**This section is for more advanced users, if you do not know how to install git or docker, you can take a look at other sections for Git, and search on how to install Docker on your system.**
**Because of a ConsoleInteractive issue, starting the container in headless mode can crash MCC. Start it with the interactive command below, then detach with `CTRL + P` followed by `CTRL + Q` if you want to leave it running in the background.**
# You can omit -v if you do not want a mounted volume. Keeping the volume makes it much easier to edit the TOML config stored in MinecraftClient.ini from the host.
Note that you won't be able to interact with the client using `docker-compose up`. If you want that functionality, please use the first method: `docker-compose run MCC`.
It is possible to run Minecraft Console Client on Android through Termux and Ubuntu 24.04, but it requires a manual setup with a lot of commands, so be careful not to skip any steps. Depending on your technical background, internet speed, and device speed, this can take anywhere from 10 to 20 minutes or more.
**You're required to have some bare basic knowledge of Linux, if you do not know anything about it, watch [this video](https://www.youtube.com/watch?v=SkB-eRCzWIU) to get familiar with basic commands.**
**Here we're installing everything on the root account for simplicity sake, if you want to make a user account, make sure you update the command which reference the `/root` directory with your home directory.**
**The Play Store version of Termux is outdated and not supported. Use the [GitHub release](https://github.com/termux/termux-app/releases/latest/) instead.**
Go to [the latest Termux GitHub release](https://github.com/termux/termux-app/releases/latest/), download the `debug_universal.apk`, unzip it, and run it.
**If your file manager does not let you run APK files, install and use `File Manager +` and give it a permission to install 3rd party applications when asked.**
**Once you have installed Termux, open it, bring down the Android menu for notifications, on Termux notification, drag down until you see the following options: `Exit | Acquire wakelock`, press on the `Acquire wakelock` and allow Termux to have a battery optimization exclusion permission when asked. If you do not do this, your performance will be poorer and the Termux might get killed by Android while running in the background!**
After you have installed the dependencies, install .NET either by following this guide or by using Microsoft's [manual install instructions](https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#manual-install).
Download a current .NET SDK tarball for your platform from Microsoft. Replace the placeholder below with the actual current download URL from the [.NET download page](https://dotnet.microsoft.com/en-us/download):
**This example assumes a 64-bit ARM processor. If you are using a different architecture, download the matching SDK archive for that platform instead.**
**This tutorial assumes Ubuntu 24.04. If you are using a different distro, get the current SDK archive for your platform from the [.NET download page](https://dotnet.microsoft.com/en-us/download).**
Now we need to tell our shell to know where the `dotnet` command is, for future sessions, since the commands above just tell this current session where the `dotnet` is located.
**You will need a basic knowledge of the Nano text editor. If you do not know how to use it, watch this [YouTube tutorial](https://www.youtube.com/watch?v=DLeATFgGM-A).**
**If you have a 32 ARM processor, you need to build the MCC yourself, take a look at the [Building From Source](#building-from-the-source-code) section. Also make sure to be using the appropriate `-r` parameter value for your architecture.**
You can remove the zip archive now, we do not need it anymore, with:
```bash
rm MinecraftClient-linux-arm64.zip
```
And finally run it with:
```
./MinecraftClient
```
#### After installation
When you run Termux next time, you need to start Ubuntu with: `./startubuntu.sh`
Then you can start the MCC again with `./MinecraftClient`
To stop MCC from running you can press `CTRL + C`
To edit the configuration/settings, you need a text editor, we recommend Nano, as it's very simple to use, if you have followed the installation steps above, you should be familiar with it, if not, check out [this tutorial](https://www.youtube.com/watch?v=DLeATFgGM-A).
For downloading files, you can use the `wget` file we have installed, simply run:
**This is a newer section. If you spot a mistake, please report it by opening an issue in our [GitHub repository](https://github.com/MCCTeam/Minecraft-Console-Client).**
- [Installing the Minecraft Console Client](#installing-mcc-on-a-vps)
### What is a VPS?
VPS stands for a **V**irtual **P**rivate **S**erver, it's basically a remote virtual PC that is running in the cloud, 24 hours a day, 7 days in week. To be precise, it's a virtual machine that runs on top of a host operating system (eg. Proxmox).
You can use a VPS for hosting a website, or a an app, or a game server, or your own VPN, or the Minecraft Console Client.
2.`ssh` and `ssh-keygen` commands (on Windows they are available with Git Bash; on macOS and Linux they should be available by default. If not, install them first.)
- [Getting an AWS EC2 VPS for free (12 months free trial)](#aws-ec2-vps)
#### Buying a VPS
If you do not want to give your info to Amazon or don't have a debit card, you can buy your own VPS.
**What hardware requirements I need for running the MCC?**
The MCC is not expensive to run, so it can run on basically any hardware, you do not need to spend a lot of money on a VPS if you are going to run just the MCC, go with the cheapest option.
**This will require you to have a valid debit card that can be used on internet and a mobile phone number, as well as giving that info to Amazon corporation.**
**Scammers often get AWS VPS and use it to mass login on to stolen Microsoft accounts, some AWS IP addresses might be blocked by Microsoft because of that, if so, you might need to switch regions or to use a Proxy. To debug if your IP has been banned by Microsoft, use the `ping <ip>` and `traceroute <ip>` commands.**
**Related to the warning above, if you have issues logging with Microsoft and you're not banned, you may want to check the Security center on your account and approve the login from the VPS, this can be the case for some users.**
**If you're not banned, sometimes fetching the keys can take some time, try giving it a minute or two, if it still hangs, hit some keys to refresh the screen, or try restarting and running again. If it still happens, use tmux instead of screen.**
For the **Key pair (login)** click on **Create new key pair** and name it `VpsRoot`, leave the rest of settings as default and click **Create key pair**, this will generate a RSA private key that will be automatically downloaded.
**Make sure that you save this file in a safe place and do not loose it, it's of an upmost importance since it's used to access the root/admin account of the VPS. Without it you will not be able to access the root account of the VPS! Also do not let it fall into wrong hands.**
**The SSH traffic from Anywhere is not the best thing for security, you might want to enter IP addresses of your devices from which you want to access the VPS manually.**
Finally, review the **Summary** confirm that everything is as in the tutorial and that you will not be charged and click on the **Launch instance**. Once you've clicked on the button, it will take a couple of minutes for the instance to be available up and running.
Once the instance is up and running, go to it's details and copy the `Public DNS v4 IP`.
You now need to login, go to your folder where you keep the private key you've generated and downloaded (make sure you make a new folder for it, do not keep in the downloads folder) and right click on the empty white space (not on files), if you're on Windows click **Git Bash here**, on mac OS and Linux click on **Open Terminal** (or whatever it is called).
In order to login with SSH, you are going to use the following command:
When you order the VPS, most likely you will be asked to provide the root account name and password, if it is the case, name the account as `root` and give it a password of your choice.
Other option is that you will get your login info in the email once the setup is done.
**If you're given a custom port other than `22` by your host, you should add `-p <port here>` before the username (eg. `ssh -p <port here> <username>@<ip>`) or `:<port>` after the ip (eg. `ssh <username>@<ip>:<port>`)**
**You may be wondering why we're creating a separate user account and making it be accessible over SSH only. This is for security reasons, if you do not want to do this, you're free to skip it, but be careful.**
Open the folder, and right click on the empty white space (not on files), if you're on Windows click **Git Bash here**, on mac OS and Linux click on **Open Terminal** (or whatever it is called).
Type the following command:
```bash
ssh-keygen -t RSA -b 4096
```
Enter the name of the key file to be: `MCC_Key`, press Enter.
When asked for a `passphrase`, enter a password of your choice and confirm it, make sure it's strong and that you remember it, best if you write it down on a piece of paper.
This will generate a private and a public key that you will use to log in to the VPS as a user that you've created.
Now open the `MCC_Key.pub` file with a text editor of your choice and copy it's contents to the clipboard.
Return to the Git Bash/Terminal emulator and execute the following command:
```bash
sudo apt install nano -y
```
This will install the Nano editor on your VPS.
Now we need to let the SSH service on your VPS know about your newly generated SSH key pair.
Make sure you are in the `/home/mcc/.ssh` folder, you can confirm this by executing:
```bash
pwd
```
If it does not print `/home/mcc/.ssh`, navigate to it with:
```bash
cd /home/mcc/.ssh
```
Now you need to open the `authorized_keys` file with the nano editor:
```bash
nano authorized_keys
```
Now paste the copied contents of the `MCC_Key.pub` into the nano editor by right clicking on it.
Save the file with `CTRL + O`, press Enter, and then exit it with `CTRL + X`.
Now we need to configure the SSHD service to let us login with the SSH key we have generated, for this we need to edit the `/etc/ssh/sshd_config` file with nano:
```bash
sudo nano /etc/ssh/sshd_config
```
Find the `#PubkeyAuthentication yes` line and remove the `#` in front to uncomment the line.
Then find the `#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2` line and remove the `#` to uncomment the line.
Additionally for better security you can do the following:
- Set `PermitRootLogin` to `yes`
- Change the `Port` to some number of your choice (22-65000) (Make sure it's at least 2 digits and avoid common ports used by other apps like: 21, 80, 35, 8080, 3000, etc...)
- Uncomment `#PasswordAuthentication yes` by removing the `#` in front and set it to `yes` (This will disable password login, you will be able to login with SSH keys only!)
Save the file with `CTRL + O`, hit Enter, close it with `CTRL + X`.
Now we need to restart the SSHD service with:
```bash
sudo systemctl restart sshd
```
Let's check if everything is working correctly:
```bash
sudo systemctl status sshd
```
If everything has been configured as it should be you should see `active (running)` as a status of the service.
**If you've changed the `Port`, make sure you add a `-p <your port here>` option after the `-i <key>` option (eg. `ssh -i MCC_Key -p 8973 mcc@3.71.108.69`)!**
On Ubuntu 24.04 LTS, the official Microsoft docs say .NET is available directly from the Ubuntu package feeds, so you do not need to add the old Microsoft package repository for .NET 10. Install the SDK with:
If you do not get this output and the installation was not successful, [try other methods](https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-install).
Now that you have the .NET SDK and a user account, install the `screen` utility. You will need it if you want MCC to keep running after you close the SSH session.
**If you have issues with Screen command, like output not being properly formatted or program handing/freezing, try using tmux, click [here](https://www.youtube.com/watch?v=Yl7NFenTgIo) to learn how to use it.**
**`mcc` here is the name of the screen, you can use whatever you like, but if you've used a different name, make sure you use that one instead of the `mcc` in the following commands.**