Skip to content

๐Ÿ“ฆ Host Installation (Pipenv)

Install LibreFolio on your machine without Docker, with Python, Node.js and Pipenv: handy with few resources, and the first step towards a development environment.

For Docker, see the User Manual Installation or the Advanced Docker Guide.


โœ… Prerequisites

Install these three tools first.

๐Ÿ Python 3.13

The version set in the project's Pipfile.

  • macOS, with Homebrew:
    brew install python@3.13
    
  • Windows: download the installer from python.org and check "Add Python to PATH".
  • Linux (Ubuntu/Debian):
    sudo apt update
    sudo apt install python3.13 python3.13-venv python3.13-dev
    
๐Ÿ“ฆ Node.js 24+

Builds the web interface.

  • macOS, with Homebrew:
    brew install node@24
    
  • Windows/Linux: with nvm (Linux/macOS) or nvm-windows (Windows), or download from nodejs.org.
๐Ÿ“‹ Pipenv

Manages the Python virtual environment and its packages.

  • All platforms:
    pip install --user pipenv
    
    Add the user binaries folder (~/.local/bin on Linux/macOS, %APPDATA%\Python on Windows) to the shell's PATH.

๐Ÿ“‹ Setup Instructions

Commands run in the Pipenv environment

The dev.py commands start with pipenv run, which runs them in the project's virtual environment. Or enter it once with pipenv shell, then type ./dev.py โ€ฆ without the prefix.

๐Ÿ“ฅ 1. Download the Project

Where: terminal, in the folder where you want the project.

git clone https://github.com/Librefolio/LibreFolio.git
cd LibreFolio

Result: the LibreFolio/ folder. Or download and unzip the latest release from GitHub Releases.

๐Ÿ 2. Create the Python Environment

Where: terminal, LibreFolio/ folder.

pipenv install --dev

Result: the virtual environment with the Python packages. Do this before any dev.py command: without it, it stops with ModuleNotFoundError.

๐Ÿ“ฆ 3. Install the Other Dependencies

Where: terminal, LibreFolio/ folder.

pipenv run ./dev.py install

Result, in order:

  1. the Python packages again (pipenv install --dev);
  2. the project tools (npm ci);
  3. the web interface dependencies (npm ci in frontend/);
  4. the Chromium browser of Playwright, for the end-to-end tests and the documentation screenshots. If only this download fails, the installation still completes.

โš™๏ธ 4. Configure the Environment

Where: terminal, LibreFolio/ folder; then the .env file just created.

cp .env.example .env

Result: the .env file with defaults that work as they are. The main variables:

Variable Default Description
PORT 6040 Server bind port.
LIBREFOLIO_DATA_DIR ./backend/data/prod Directory of the database, uploaded files and logs (see Filesystem Structure).
LOG_LEVEL INFO Logging verbosity.

The other variables: Environment Variables Guide.

๐Ÿš€ 5. Start the Server

Where: terminal, LibreFolio/ folder.

pipenv run ./dev.py server

Result: LibreFolio answers on http://localhost:6040. The first start builds the web interface and the documentation: a few minutes. Workers, another port, the other options: Command-Line Tools.

๐Ÿ‘ค 6. Create Your Account

Where: browser, http://localhost:6040, link Register here below the login form.

Result: the first account registered becomes the administrator. To manage users from the terminal, see Command-Line Tools. To have LibreFolio create the administrator at its first start, see The Initial Administrator.


๐Ÿ—ƒ๏ธ Database Initialization & Reset

There is nothing to initialise: at every start the server creates the database if it is missing and applies the pending migrations.

To start again from an empty database, use one of the two ways below.

All data is lost

Both ways delete the database for good: users, brokers, transactions and settings. Make a backup first (see Backup).

๐Ÿงน With dev.py

Where: terminal, LibreFolio/ folder, with the server stopped (the command refuses to run while the server is up).

pipenv run ./dev.py db create-clean

Result: a new, empty database.

๐Ÿ—‘๏ธ By Hand

Where: the data directory, by default backend/data/prod/.

  1. Stop the server if it is running.
  2. Delete the SQLite database file, by default backend/data/prod/sqlite/app.db.
  3. Start the server: it creates a new one.

Both ways replace only the database: uploaded files, broker reports and logs stay in the data directory. For a completely fresh start, stop the server and delete the whole data directory: the next start recreates it.