Skip to content

Server Installation

The Pankha Fan Control server is deployed with Docker Compose: one app container (dashboard + control logic) and one PostgreSQL container (history). This page is the full setup reference - if you just want fans spinning, the Quick Start covers the fast path.

  • Docker Engine with the Docker Compose plugin.
  • A machine that’s always on - the server is the brain; when it’s down, agents fall back to their failsafe speed.
  • Resources are modest: a few hundred MB of RAM; disk grows with your data-retention setting.

Every release ships the production compose.yml and an example.env. Use them as-is:

Terminal window
mkdir pankha && cd pankha
wget https://github.com/Anexgohan/pankha/releases/latest/download/compose.yml
wget https://github.com/Anexgohan/pankha/releases/latest/download/example.env -O .env

Don’t hand-edit compose.yml - all normal customization happens in .env. The one exception is the image tag (see Release Channels).

Open .env in an editor. The top section is marked REQUIRED CONFIGURATION:

VariableRequired?What it does
PANKHA_HUB_IPYesThis server’s LAN IP or hostname (e.g. 192.168.1.100). Agent install commands are built from it - the shipped placeholder will not work.
POSTGRES_USER / POSTGRES_PASSWORDYesYour database credentials - pick your own.
PANKHA_PORTNo (default 3143)The port the dashboard and agents connect to.
TIMEZONENo (default UTC)Uncomment and set (e.g. Asia/Kolkata) so dashboard times and logs match your clock.
LOG_LEVELNo (default info)Server log verbosity - also changeable later from the dashboard’s Settings.
POSTGRES_DB / POSTGRES_HOST / POSTGRES_PORTNoLeave at defaults for the bundled database container.
PANKHA_STAGING_DIRNoWhere staged agent binaries live inside the container - leave as-is.
POSTGRES_MAX_WAL_SIZE and friendsNoPostgreSQL disk-usage tuning - leave as-is unless you know why.

External PostgreSQL (advanced): the backend builds its database connection from the POSTGRES_* variables, so pointing POSTGRES_HOST/POSTGRES_PORT at an existing PostgreSQL instance works - load backend/src/database/schema.sql into it yourself, and don’t start the bundled pankha-postgres service.

Terminal window
docker compose pull && docker compose up -d

The dashboard is at http://<server-ip>:3143 (or your PANKHA_PORT).

graph TD
    User([You]) -->|docker compose up -d| Docker[Docker Compose]

    subgraph "Server machine"
        Docker --> App["pankha_app (:3143)<br/>dashboard + control logic"]
        Docker --> DB[("pankha_postgres<br/>history")]
        App <--> DB
    end

    User -.->|browser| App
Terminal window
docker compose ps # both containers Up (healthy)
curl http://localhost:3143/health

Both services have healthchecks - the app waits for the database to be healthy before starting.

The image tag in compose.yml picks your channel - this is the one line in the compose file you may want to edit:

TagMeaning
anexgohan/pankha:latestStable releases (default)
anexgohan/pankha:betaAbsolute latest
anexgohan/pankha:testingPre-releases

Everything persistent sits next to your compose.yml, so backing up the folder backs up the system:

pankha/
├── compose.yml
├── .env
└── docker-data/
├── backend/database/postgres_data/ # PostgreSQL data
└── staging/ # Staged agent binaries (Deployment Center)

The PostgreSQL container’s ports are deliberately not exposed to the network - only the app talks to it.

Terminal window
docker compose down && docker compose pull && docker compose up -d

Your .env, database, and staged binaries are untouched by updates.