Skip to content

Configuration

Inkvoice is configured through environment variables. Copy .env.example to .env to get started.

Required

VariableDefaultDescription
ADMIN_USERadminInitial admin username (demo when demo mode is on)
ADMIN_PASSchangemeInitial admin password (demo when demo mode is on)
JWT_SECRETJWT signing secret (min 32 characters)

WARNING

Always set a strong JWT_SECRET in production. The default is only suitable for development.

Database

VariableDefaultDescription
DATABASE_PATH./data/invoice.dbPath to the SQLite database file

The database is created automatically on first run. Back it up by copying this file.

Server

VariableDefaultDescription
PORT3000Server port
HOST0.0.0.0Server bind address

Security

VariableDefaultDescription
SESSION_TTL3600JWT token lifetime in seconds
COOKIE_SECUREtrueUse secure cookies (set to false for HTTP in development)
ENABLE_HSTSfalseEnable HSTS header
RATE_LIMIT_ENABLEDtrueEnable login rate limiting
RATE_LIMIT_MAX_ATTEMPTS5Max failed login attempts before lockout
RATE_LIMIT_WINDOW900Rate limit window in seconds (15 min)

CORS

VariableDefaultDescription
ALLOWED_ORIGINShttp://localhost:5173,http://localhost:3000Comma-separated allowed origins

Only needed if running the frontend dev server separately from the backend.

Email (SMTP)

Optional. Enables sending invoices and quotes by email.

VariableDefaultDescription
SMTP_HOSTSMTP server hostname
SMTP_PORT587SMTP server port
SMTP_USERSMTP username
SMTP_PASSSMTP password
SMTP_FROMSender email address
SMTP_SECUREfalseUse TLS (set to true for port 465)

Online Payments (Stripe & PayPal)

Optional. Enables customers to pay invoices online from the public invoice link. Configure either gateway or both; each is enabled per workspace under Settings → Payments once its credentials (including the webhook secret/ID) are set. A gateway without its webhook credential will not appear as an option, because payments are confirmed server-side via webhooks.

Stripe

VariableDefaultDescription
STRIPE_SECRET_KEYStripe secret key (sk_...)
STRIPE_PUBLISHABLE_KEYStripe publishable key (pk_...)
STRIPE_WEBHOOK_SECRETStripe webhook signing secret (whsec_...) — required

PayPal

VariableDefaultDescription
PAYPAL_CLIENT_IDPayPal REST app client ID
PAYPAL_SECRETPayPal REST app secret
PAYPAL_WEBHOOK_IDPayPal webhook ID (for signature verification) — required
PAYPAL_ENVsandboxsandbox or live

See Online Payments for setup instructions.

PDF Generation

Nothing to configure. Inkvoice renders invoices and quotes as HTML and the browser's print dialog turns them into PDFs, so there is no Chrome or Chromium to install, bundle or point at. The CHROME_PATH variable used by older versions is gone and is ignored if still set.

Demo Mode

VariableDefaultDescription
DEMO_MODEfalseEnable demo mode with sample data and periodic resets
DEMO_RESET_INTERVAL86400000Reset interval in milliseconds (default 24 hours)

With DEMO_MODE=true the admin defaults change from admin / changeme to demo / demo, and the login page shows those credentials so visitors can get in. Leave ADMIN_USER and ADMIN_PASS unset to pick up that default. The repo's docker-compose.yml passes them through empty so the app decides, but .env.example and the compose snippet in Getting Started set them explicitly, so clear them if you copied either.

The login page only ever advertises the literal demo / demo pair. If you set your own ADMIN_PASS alongside DEMO_MODE=true, no credentials are shown, so enabling demo mode on an instance that holds real data can never publish its password.

Released under the MIT License.