Simple Invoices works with MySQL, MariaDB, PostgreSQL, or SQLite. Create a database, point the app at it, then finish setup below.
On MySQL or MariaDB, create a database with a UTF-8 collation. On PostgreSQL, create a role and database. For SQLite, ensure the data directory is writable; the file name comes from the database name.
Set database.adapter and database.params in config/config.php, or set Docker environment variables (see below).
Check the connection summary, set your first administrator, then import the schema and essential data.
Set SI_DATABASE_ADAPTER to pdo_mysql, pdo_pgsql, or pdo_sqlite, together with SI_DB_HOST, SI_DB_PORT, SI_DB_USER, SI_DB_PASSWORD, SI_DB_NAME, and SI_DATABASE_UTF8 in your .env file or in the simpleinvoices service in docker-compose.yml. For PostgreSQL run: docker compose -f docker-compose.yml -f docker-compose.pgsql.yml up. For SQLite run: docker compose -f docker-compose.yml -f docker-compose.sqlite.yml up (the database file is stored in the sqlite_data volume).
Edit config/config.php in the [production] section. Set database.adapter to pdo_mysql, pdo_pgsql, or pdo_sqlite, and set database.params.host, port, username, password, and dbname to match your server. For SQLite, dbname is the filename (no path) under databases/sqlite/.
| Adapter | pdo_sqlite |
| Host | — |
| Port | — |
| Database | facdev |
| Username | |
| Password | •••••••••• |