Skip to content

Sterbweise/plutonium-key-generator-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plutonium Key Generator API

Docker License: MIT Python Flask GitHub repo size GitHub stars GitHub forks GitHub issues GitHub last commit

Plutonium Logo

API for generating server keys for Plutonium. This API automates the process of creating and retrieving server keys required to host Plutonium game servers, streamlining server setup and management for game administrators. It interfaces directly with the Plutonium platform, handling authentication and key lifecycle management.

Overview

This API is designed to work in tandem with the plutonium-key-generator client project developed in Rust. The combined system is used to bypass game ownership verification for Call of Duty titles on the Plutonium platform, enabling server hosting without traditional game ownership requirements.

Key features of the integrated system:

  • Automated key generation for Plutonium servers
  • Seamless integration between the API and Rust client
  • Bypasses standard game ownership checks for Call of Duty titles
  • Facilitates easier setup and management of Plutonium game servers

Note: This project is intended for educational and development purposes only. Users should comply with all applicable laws and terms of service for the games and platforms involved.

Table of Contents

Features

  • Generate unique keys
  • Manage key lifecycle (activation, deactivation, expiration)
  • Easy integration with existing game systems via RESTful API

Prerequisites

  • Docker 20.10.x or higher
  • Docker Compose 1.29.x or higher (optional, for easy deployment)

Installation

Docker Installation

This project supports both Docker and Docker Compose for easy deployment and management.

Using Docker

  1. Clone the repository:

    git clone https://github.com/sterbweise/plutonium-key-generator-api.git
  2. Navigate to the project directory:

    cd plutonium-key-generator-api
  3. Build the Docker image:

    docker build -t plutonium-key-generator-api .
  4. Run the container:

    docker run -d \
      --name plutonium-key-generator \
      -p 5000:5000 \
      -e BASE_URL=https://platform.plutonium.pw/serverkeys/ \
      -e COOKIE=your_cookie_value \
      -v $(pwd)/data:/data \
      plutonium-key-generator-api

    Replace your_cookie_value with your actual Plutonium platform cookie.

Using Docker Compose

  1. Clone the repository (if you haven't already):

    git clone https://github.com/sterbweise/plutonium-key-generator-api.git
    cd plutonium-key-generator-api
  2. Create a .env file in the project root and add your Plutonium platform cookie:

    PLUTONIUM_COOKIE=your_cookie_value
    
  3. Ensure your docker-compose.yml file is correctly configured:

    version: '3.8'
    services:
      plutonium-key-generator:
        build: .
        environment:
          - BASE_URL=https://platform.plutonium.pw/serverkeys/
          - COOKIE=${PLUTONIUM_COOKIE}
        volumes:
          - ./data:/data
        ports:
          - "5000:5000"
  4. Run the service using Docker Compose:

    docker-compose up -d

    This command will build the image if it doesn't exist and start the container.

  5. To stop the service:

    docker-compose down

The API will be accessible at https://localhost:5000/plutonium-key-generator.

Note: The data directory is mounted as a volume to persist generated keys between container restarts.

For security reasons, never share your cookie value or include it in version control systems. Always use environment variables or secure secret management for sensitive information in production environments.

To view logs:

Local Development

  1. Install dependencies:

    npm install
  2. Set up environment variables:

    cp .env.example .env
    # Edit .env file with your configuration
  3. Start the development server:

    npm run dev

Configuration

The following environment variables can be configured:

Variable Description Default
PORT Port on which the API listens 3000
DATABASE_URL Connection URL for the database -
SECRET_KEY Secret key for encrypting sensitive data -
API_RATE_LIMIT Rate limit for API requests (requests per minute) 100
KEY_EXPIRATION Default key expiration time 48h

Security

  • All communications must be done over HTTPS in production
  • API token authentication is required for all endpoints
  • Regular security audits are conducted

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support, please contact:

You can also open an issue on this repository for bug reports or feature requests.


Developed with ❤️ by Sterbweise