Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uixss/autoweb
automates the setup and configuration of a VPS for web services.
https://github.com/uixss/autoweb
python vps website
Last synced: about 21 hours ago
JSON representation
automates the setup and configuration of a VPS for web services.
- Host: GitHub
- URL: https://github.com/uixss/autoweb
- Owner: uixss
- Created: 2024-10-20T18:48:55.000Z (19 days ago)
- Default Branch: main
- Last Pushed: 2024-10-20T18:52:45.000Z (19 days ago)
- Last Synced: 2024-10-20T23:26:35.098Z (19 days ago)
- Topics: python, vps, website
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🎫 Coding Services SEND DM 🎫
# VPS Setup Automation Script 🚀
This Python script automates the setup and configuration of a VPS for web services. It uses `paramiko` for SSH connection, `colorama` for terminal customization, and `pyfiglet` for text banner rendering. It enables the installation of Apache, PHP, Certbot, and the option to upload a `.zip` file to configure a website.
## Features ✨
- Connect to a VPS via SSH 🔒
- Automatically detect the operating system of the VPS (Debian/Ubuntu or RedHat/CentOS) 🖥️
- Automatically install Apache, PHP, and Certbot ⚙️
- Option to upload and extract a `.zip` file on the server 📁
- Configure SSL certificates with Certbot and Apache 🔐
- Customizable terminal banners for aesthetics 🎨## Requirements 📋
- Python 3.x 🐍
- Python libraries:
- `paramiko` 🔑
- `colorama` 🎨
- `pyfiglet` 🖼️Install them using `pip`:
```bash
pip install paramiko colorama pyfiglet
```## Usage 🛠️
```python
vps_ip = "109.x.218" # VPS IP address
vps_user = "" # VPS username
vps_pass = "" # VPS passwordemailmain = "" # Email for Certbot 📧
domain = ".ru" # Domain for SSL certificate 🌐install_apache = True # Install Apache (True or False) 🏗️
install_php = True # Install PHP (True or False) 💻
install_certbot = True # Install Certbot (True or False) 🔐
configure_certbot = False # Auto configure Certbot (True or False) 🤖
upload_zip = False # Upload a ZIP file (True or False) 📦
zip_file = "C:/a.zip" # Local path of the ZIP file to upload 🗂️
```### Execution ▶️
To run the script, execute the following command in the terminal:
```bash
python script_name.py
```The script will automatically perform the following steps:
1. Connect to the VPS via SSH 🔌
2. Detect the VPS operating system 🖥️
3. Install Apache, PHP, and Certbot based on the configuration ⚙️
4. Upload a `.zip` file and extract it into the `/var/www/html/main` directory (if enabled) 📂
5. Configure Apache to use Certbot and enable SSL 🔐### Installation Options ⚙️
- `install_apache`: Installs Apache on the VPS 🏗️
- `install_php`: Installs PHP and configures it with Apache 💻
- `install_certbot`: Installs Certbot for SSL certificate management 🔐
- `configure_certbot`: Automatically configures Certbot with the specified domain 🌐
- `upload_zip`: Upload and extract a `.zip` file on the server 📦