Documentation

Find your answer

Searching InvoiceShelf 2

AI answers cover the latest version. Open v3 documentation.

Browse documentation
v2 docsInstall & develop

Development with Nginx and PHP-FPM

v2 — StableVerified against 2.4.6
On this page

Use PHP 8.4+, Composer 2, Node.js 24+, pnpm and a database driver matching this release. The commands below create a new disposable source workspace.

Prepare the application

git clone --branch 2.4.6 --depth 1 https://github.com/InvoiceShelf/InvoiceShelf.git invoiceshelf-v2
cd invoiceshelf-v2
cp .env.example .env
composer install
corepack enable
pnpm install --frozen-lockfile
php artisan key:generate

Set the local APP_URL and database settings in .env. For SQLite, create database/database.sqlite and use its absolute path. Keep the same key when restarting this workspace.

Configure Nginx

Adapt the paths and PHP socket to your machine:

server {
    listen 80;
    server_name invoiceshelf-v2.test;
    root /path/to/invoiceshelf-v2/public;
    index index.php;
    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }
    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php/php8.4-fpm.sock;
    }
    location ~ /\. {
        deny all;
    }
}

Map the chosen .test hostname to loopback and validate Nginx configuration before reloading it. Ensure the PHP service user can write storage/ and bootstrap/cache/.

Build and install

Run pnpm build for static assets or keep pnpm dev running for frontend development. Open the local URL and complete the installer. For an existing initialized development database, use php artisan migrate for pending migrations rather than repeating the setup wizard.

Verify login, an invoice PDF and local mail delivery. Use php artisan schedule:work only when testing scheduled behavior in this disposable environment.

Edit this page on GitHubDocs published Nov 23, 2026