Install Crafty on macOS
These instructions will guide you to install Crafty on macOS.
Requirements & Assumptions
- You will need brew.sh installed in your mac. Get it from https://brew.sh
- This guide assumes you have a decent understanding of the macOS Terminal environment and are comfortable with the command line.
This guide assumes you will be installing Crafty into
This guide assumes your server.jar is located in
- We also assume the user account running crafty will have full read/write/execute permissions on these folders.
1. Install Pre-Requisites
macOS lacks a proper package manager and in order to install a couple of the required software via the command line you will need Brew.sh.
Go to your
/Applications/Utilities and launch Terminal.app or press Command+Space and type Terminal.app and hit return/enter key. Then paste the line below:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
The command above runs and you will see the installation progress. It will inform you that the Command Line Tools for Xcode will get installed.
Towards the end you will be asked to enter your account password then the installation will continue.
You will be notified when Brew begins downloading the Command Line Tools for Xcode and depending on your connection the download will take about 5 minutes. Once the tools have downloaded, they will install on your mac and the installation of Brew will be completed.
Installing Pre-Requisite Packages
This guide assumes you have the following software installed and up to date: Git, Python 3.7, and Java (Open JDK is fine).
First, install Git and Python 3.75
brew install git python3
brew cask install java
then upgrade pip
pip install --upgrade pip
2. Installing Crafty
Create a directory for Crafty
Let's make crafty a place to live on your server. This guide will use
/var/opt/minecraft/crafty as it's example:
sudo mkdir -p /var/opt/minecraft/crafty
Setup permissions for the folder
sudo chown <your_username>:admin /var/opt/minecraft/crafty
For Example If your username on your mac is Totoro then the command will be:
sudo chown totoro:admin /var/opt/minecraft/crafty
Change to the Crafty dir
Create a virtual environment "venv"
python3 -m venv venv
Clone Crafty Repo
Please be sure to be in the
crafty folder before cloning the repo. To check type
pwd and make sure it says
/var/opt/minecraft/crafty before you continue.
git clone https://gitlab.com/crafty-controller/crafty-4.git
Switch to the
Then lets make sure we are on the latest snapshot and lets checkout
git pull git checkout master
Let's go up one directory
Activate the Virtual Environment
Lets activate the Virtual Environment
your prompt will change to
(venv) whateveryourprompt is:
Go into the crafty-4 folder that was cloned down
Install all the things / requirements
pip install -r requirements.txt
How to Update
For updating you are going to repeat some steps listed above, but since you already must have done this before, the steps are listed below, just do them in that order. Please be sure to be in the
craftyfolder before cloning the repo. To check type
pwdand make sure it says
/var/opt/minecraft/craftybefore you continue.
git clone https://gitlab.com/crafty-controller/crafty-4.git cd /var/opt/minecraft/crafty/crafty-4 git pull git checkout master cd .. source venv/bin/activate cd /var/opt/minecraft/crafty-4 pip install -r requirements.txt python crafty.py
Check out the Getting Started page.