- Python 82.6%
- Shell 17.4%
Converted the project from fully bash to mostly python. The initial attempt over complicated the project for no reason when python is my main language and should've been the selected language from the start. The core checks are fully functional on the three main package managers: apt, dnf, and pacman. Functions completed in this merge includes: - Checking and installing python if required using bash - Checking and installing venv for python if required using python - Checking and installing docker if required. - Checking docker is running - Checking and installing docker compose if required. The setup (init) function is configured in a manner that can be reran to install any potential new packages added to requirements.txt Reviewed-on: #2 Co-authored-by: Marquel Rogers <rogers@marquel.xyz> Co-committed-by: Marquel Rogers <rogers@marquel.xyz> |
||
|---|---|---|
| commands | ||
| .gitignore | ||
| config.py | ||
| diycloud.sh | ||
| main.py | ||
| README.md | ||
| requirements.txt | ||
| variables.py | ||
diycloud
A command-line tool for setting up and managing self-hosted services on your own hardware. diycloud automates the installation and configuration of Docker and your chosen services so you can get up and running without touching code.
Requirements
- A Linux machine running Ubuntu, Arch, or Fedora based distro
git- Internet access for package installation
Everything else — Python, Docker, and required packages — is handled automatically.
Installation
git clone https://git.quailnest.cloud/msrogers2015/diy-cloud.git
cd diy-cloud
chmod +x diycloud.sh
./diycloud.sh
diycloud.sh will:
- Check for Python 3.14 and install it if not found
- Create a
/usr/local/bin/diycloudsymlink so you can rundiycloudfrom anywhere - Automatically run
diycloud initto complete setup
First Time Setup
After running diycloud.sh, the init command runs automatically.:
diycloud init
init will:
- Create a Python virtual environment at
.venv/ - Install all required Python packages from
requirements.txt - Check for Docker and install it if not found
- Verify the Docker daemon is running and start it if needed
- Verify Docker Compose is available
If anything fails during init, fix the issue and re-run diycloud init to pick up where it left off. In the case future
updates require new packages or change the core function, diycloud init can and should be ran manually after a new git pull
to ensure everything is updated.
Supported Distros
| Distro | Package Manager | Tested |
|---|---|---|
| Ubuntu / Debian | apt | ✓ |
| Arch / EndeavourOS | pacman | ✓ |
| Fedora / RHEL / AlmaLinux / Rocky | dnf | ✓ |
Commands
diycloud init # First time setup — venv, packages, Docker
diycloud --help # Show available commands
diycloud --version # Show current version
Project Structure
diy-cloud/
├── diycloud.sh # Bash launcher — checks Python, creates symlink
├── main.py # CLI entry point, argument routing
├── config.py # Command registry
├── variables.py # Path and version variables (standard library only)
├── requirements.txt # Python package dependencies
└── commands/
├── __init__.py
└── setup.py # init command — venv, packages, Docker checks
Contributing
Currently, this Forgejo instance isn't configured to accept feedback or issues. In the future, a workflow will be added for feedback and feature or service request. Sorry for the inconvenience.
Version
1.0-beta