Skip to content

Setup and Running

Azhar Zouhir edited this page Nov 17, 2025 · 5 revisions

Setup and Running

Follow these instructions to get the PCLink server running on your local machine from the source code.

Prerequisites

  • Python 3.8+: Ensure you have a modern version of Python installed.
  • Pip: Python's package installer.

Installation

  1. Clone the Repository: If you have the project source, navigate to the root directory.

  2. Install Dependencies: The project uses several Python packages. While a requirements.txt file is standard, you can infer the dependencies from the source code's import statements. You will need to install the following key packages:

    pip install "fastapi<0.100" uvicorn "pydantic<2" python-multipart "aiofiles>=23.1.0" psutil pynput mss pyperclip getmac pycaw comtypes winsdk packaging requests Pillow cryptography

    Note: Some dependencies like pycaw, comtypes, and winsdk are specific to Windows for full functionality.

Running the Server

The server is designed to be run as a Python module from the root of the project directory.

  1. Navigate to the project's root directory (the one containing the src folder).

  2. Run the application using the following command:

    python -m src.pclink.main

    Alternatively, if the project is installed as a package, you can simply run:

    pclink

Upon first launch, the server will perform pre-flight checks, generate a self-signed SSL certificate, and create necessary configuration files in your user's application data directory.

The server will start, and you can access the Web UI by navigating to https://localhost:38080 in your web browser.

Command-Line Arguments

The server accepts a few command-line arguments to change its behavior:

  • --startup: Runs the application in headless/background mode. This is used when the application is configured to start automatically with the operating system.
  • --help or -h: Displays a help message with usage instructions.

The launcher.py script is intended for use in packaged, standalone executables (e.g., created with PyInstaller) and is not typically run directly during development. It handles special setup tasks for distributed applications, such as setting up Windows Firewall rules.

Clone this wiki locally