Skip to content

Setup and Running

Azhar Zouhir edited this page Mar 22, 2026 · 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.12+: 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. The easiest way to install all dependencies is:

    # Install from requirements.txt
    pip install -r requirements.txt
    
    # Or install the package in development mode (recommended)
    pip install -e ".[dev]"

    Key dependencies include:

    • fastapi>=0.95.0 - Web framework
    • uvicorn[standard]>=0.22.0 - ASGI server
    • websockets>=12.0 - WebSocket support
    • psutil>=5.9.0 - System information
    • pynput>=1.7.6 - Input control
    • cryptography>=41.0.0 - SSL/TLS support
    • requests>=2.31.0 - HTTP client
    • pystray>=0.19.0 - System tray integration

    Note: Some dependencies like pywin32 are Windows-specific and will be installed automatically on Windows systems. On Linux, PyGObject is required for native tray support.

System Dependencies (Linux)

Before installing Python dependencies, you may need these system packages:

Ubuntu/Debian:

sudo apt install python3-gi gir1.2-appindicator3-0.1 libayatana-appindicator3-0.1 wl-clipboard gnome-screenshot

Fedora/RHEL:

sudo dnf install python3-gobject libayatana-appindicator-gtk3 wl-clipboard gnome-screenshot

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