General Installation Notes
- You will need to install java before starting any Minecraft servers.
Install Script
- Run these commands first to update your packages.
sudo apt update
sudo apt upgrade
- You may need to install git using the following command:
sudo apt install git
- One line installer
git clone https://gitlab.com/crafty-controller/crafty-installer-4.0.git && cd crafty-installer-4.0 && sudo ./install_crafty.sh
-
Once installation is complete to run Crafty manually run the following. Note that if you used a directory other then the default to install Crafty you will need to
cd
into that directory.
sudo su crafty
cd /var/opt/minecraft/crafty
./run_crafty.sh
Crafty Service File
If you said yes to adding a service file you may run the following to start Crafty
sudo systemctl start crafty
If you added a service file and want to have Crafty start automatically on system boot please run the following:
sudo systemctl enable crafty
Manual installation steps (for Ubuntu/Debian, CentOS)
Requirements & Assumptions
- You have sudo and can install software
- This guide assumes you have a decent understanding of a Linux environment and are comfortable with the command line.
-
This guide also assumes you will be installing Crafty into
/var/opt/minecraft/crafty
. -
We also assume your server will be at
/var/opt/minecraft/server
. - We also assume the user account running crafty will have full read/write/execute permissions on these folders.
- This guide will instruct you how to setup a service account for Crafty as well.
- Finally this guide assumes you have the following software installed and up to date: Git, Python 3.8+, Python 3.8-dev+, python3-pip.
Installation
Install Required Software
On Ubuntu/Debian variants, you can install required software via the command line by typing:
sudo apt install git python3 python3-dev python3-pip software-properties-common openjdk-8-jdk openjdk-8-jre
On CentOS variants:
sudo dnf groupinstall "Development tools"
sudo dnf install python3 python3-devel java-1.8.0-openjdk java-1.8.0-openjdk-devel
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
sudo mkdir -p /var/opt/minecraft/server
Create a Crafty User Account
sudo useradd crafty -s /bin/bash
Change to the Crafty dir
cd /var/opt/minecraft/crafty
Clone Crafty Repo
Please be sure to be in the crafty
folder before cloning the repo.
sudo git clone https://gitlab.com/crafty-controller/crafty-4.git
Create a Virtual Environment
sudo python3 -m venv venv
Setup permissions for the folders
sudo chown crafty:crafty -R /var/opt/minecraft
SWITCH TO USER CRAFTY
sudo su crafty -
Activate the Virtual Environment
source venv/bin/activate
Go into the crafty-4 folder that was cloned down
cd crafty-4
Install all the things / requirements
pip3 install --no-cache-dir -r requirements.txt
Run Crafty:
Make sure you're still in the crafty-4 directory.
python3 main.py
That's it! Crafty should now be running and asking some install questions. If you get stuck or Need help? Click here!
Updating Crafty
Make sure to stop Crafty before updating.
-
If you are on linux running as a systemd service type
sudo systemctl stop crafty
-
If you are running Crafty in a terminal or CMD window just type
ctrl + c
Update After Install Script
cd /var/opt/minecraft/crafty
sudo su crafty
./update_crafty.sh
Warning
If you experience git telling you to commit or stash local changes and you have not made any changes run git reset --hard origin/master in the crafty-4 directory. If you have made changes you might want to stash them, but popping them could cause adverse effects. Make sure to run the script again after running this command.
If you experience git telling you to commit or stash local changes and you have not made any changes run git reset --hard origin/master in the crafty-4 directory. If you have made changes you might want to stash them, but popping them could cause adverse effects. Make sure to run the script again after running this command.
Update After Manual Install
cd /var/opt/minecraft/crafty/crafty-4
sudo su crafty
git pull
cd ../
source venv/bin/activate
cd crafty-4
pip3 install -r requirements.txt --no-cache-dir
Warning
If you experience git telling you to commit or stash local changes and you have not made any changes run git reset --hard origin/master in the crafty-4 directory. If you have made changes you might want to stash them, but popping them could cause adverse effects. Make sure to run the rest of the commands after running this.
If you experience git telling you to commit or stash local changes and you have not made any changes run git reset --hard origin/master in the crafty-4 directory. If you have made changes you might want to stash them, but popping them could cause adverse effects. Make sure to run the rest of the commands after running this.
Post-Install
Check out the Getting Started page.