Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Automated Python tool for renewing Xserver free VPS hosting service. Web scraping to prevent VPS expiration.

License

Notifications You must be signed in to change notification settings

fa0311/xserver-auto-renew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xserver Auto Renew

An automated tool for renewing Xserver's free VPS service to prevent expiration.

Overview

This Python application automatically renews your Xserver free VPS service by simulating the manual renewal process through web scraping. It uses session cookies to authenticate and perform the renewal operation, helping you maintain your free VPS without manual intervention.

Features

  • Automated Renewal: Automatically renews your Xserver free VPS service
  • Session Management: Uses browser cookies for authentication
  • Error Handling: Validates renewal success and provides clear error messages
  • Environment Configuration: Secure configuration through environment variables
  • User Agent Spoofing: Uses realistic browser headers to avoid detection

Installation

  1. Clone the repository:
git clone https://github.com/fa0311/xserver-auto-renew.git
cd xserver-auto-renew
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables: Create a .env file in the root directory:

Configuration

Environment Variables

Create a .env file with the following variables:

  • ID_VPS: Your VPS ID from Xserver (required)
  • USERNAME: Your Xserver account username (required for automatic login)
  • PASSWORD: Your Xserver account password (required for automatic login)
ID_VPS=your_vps_id_here
USERNAME=your_username_or_email_here
PASSWORD=your_password_here

image

Cookie Setup

You have two options for setting up cookies:

Option 1: Automatic Cookie Generation (Recommended)

Use the automated login script to generate cookies:

python -m xserver-auto-renew.login

This script will:

  • Open a Chrome browser window
  • Automatically log in using your credentials from .env
  • Generate the cookies.json file automatically

Note: Make sure you have Chrome installed and accessible in your PATH.

Option 2: Manual Cookie Export

  1. Log in to your Xserver account in your browser
  2. Navigate to the VPS management page
  3. Export cookies for the secure.xserver.ne.jp domain
  4. Save the cookies as cookies.json in JSON format

Example cookies.json structure:

[
  {
    "domain": "secure.xserver.ne.jp",
    "name": "X2SESSID",
    "path": "/",
    "value": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  {
    "domain": "secure.xserver.ne.jp",
    "name": "XSERVER_DEVICEKEY",
    "path": "/",
    "value": "xxxxxxx"
  }
]

File Structure

xserver-auto-renew/
├── xserver-auto-renew/
│   └── ...
├── .env                 # Environment variables
├── cookies.json        # Browser cookies
└── ...

Usage

Step 1: Generate Cookies (First Time Setup)

Generate authentication cookies using the automated login:

python -m xserver-auto-renew.login

Step 2: Run the Renewal Script

Run the renewal script:

python -m xserver-auto-renew.main

Automation

You can combine both steps for fully automated operation:

python -m xserver-auto-renew.login && python -m xserver-auto-renew.main

About

Automated Python tool for renewing Xserver free VPS hosting service. Web scraping to prevent VPS expiration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages