Overview
Invenicum is designed to be self-hosted and can be deployed in several ways. This guide covers all deployment methods, from the simplest Docker Compose setup to standalone Docker containers.Recommended Method: We recommend using Docker Compose for most users, as it handles both the application and database setup automatically.
Prerequisites
Before installing Invenicum, ensure you have:- Docker (version 20.10 or higher) and Docker Compose (version 2.0 or higher)
- Google Gemini API Key - Get one free here
- At least 2GB of RAM and 5GB of disk space
- A supported platform: Linux, macOS, or Windows with WSL2
Installation Methods
- Docker Compose (Recommended)
- Docker Standalone
- From Source (Development)
Docker Compose Setup
This is the easiest and recommended method for most users.Create Docker Compose File
Create a
docker-compose.yml file with the following content:docker-compose.yml
Configure Environment Variables
Update the environment variables in your
docker-compose.yml:GEMINI_API_KEY: Your Google Gemini API keyDB_URL: PostgreSQL connection string (update credentials if changed)API_URL: The URL where Invenicum will be accessible
Updating
To update to the latest version:Stopping and Removing
To stop Invenicum:Environment Variables
Here’s a complete reference of all environment variables used by Invenicum:| Variable | Required | Default | Description |
|---|---|---|---|
DB_URL | Yes | - | PostgreSQL connection string (format: postgres://user:pass@host:port/dbname) |
AI_PROVIDER | Yes | gemini | AI provider (currently only gemini is supported) |
GEMINI_API_KEY | Yes | - | Your Google Gemini API key for AI features |
API_URL | Yes | http://localhost:3000 | Base URL where the API is accessible |
PORT | No | 3000 | Port the application listens on |
NODE_ENV | No | production | Environment mode (development or production) |
Frontend Environment Variables
When building the Flutter app, you can configure:| Variable | Default | Description |
|---|---|---|
API_URL | http://192.168.1.43:3000 | Backend API URL (set via --dart-define) |
For production deployments, always override the default
API_URL to point to your actual server.Database Setup
PostgreSQL Requirements
- Version: PostgreSQL 12 or higher (15 recommended)
- Storage: At least 1GB free space (grows with your collection)
- Encoding: UTF-8
Manual Database Setup
If you’re using an external PostgreSQL server:Gemini API Configuration
Getting Your API Key
- Visit Google AI Studio
- Sign in with your Google account
- Click “Create API Key”
- Copy the key and add it to your environment variables
API Key Limits
The free tier includes:- 15 requests per minute
- 1,500 requests per day
- Suitable for personal use and small teams
Network Configuration
Accessing from Other Devices
To access Invenicum from other devices on your network:-
Update the
API_URLenvironment variable to use your server’s IP: -
Ensure port 3000 is accessible through your firewall:
Reverse Proxy Setup
For production deployments with HTTPS, use a reverse proxy like Nginx or Traefik:Troubleshooting
Database Connection Failed
If you see database connection errors:- Verify the
DB_URLformat is correct - Check that PostgreSQL is running:
docker-compose ps - Ensure the database user has proper permissions
- Check the logs:
docker-compose logs db
AI Features Not Working
If AI features aren’t responding:- Verify your
GEMINI_API_KEYis correct - Check you haven’t exceeded rate limits
- Ensure your API key is active in Google AI Studio
- Review application logs for specific error messages
Port Already in Use
If port 3000 is already occupied:-
Change the port mapping in
docker-compose.yml: -
Update your
API_URLaccordingly:
Next Steps
Now that Invenicum is installed:Quick Start
Create your first collection and add items
Configuration
Customize Invenicum to fit your needs
