Installation
Comprehensive installation guide for Invenicum with multiple deployment options.
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 20.10+
And Docker Compose v2.0 or higher
Google Gemini API Key
2GB RAM / 5GB Disk
Minimum system requirements
Supported Platform
Linux, macOS, or Windows with WSL2
Installation Methods
Docker Compose
RecommendedDocker Standalone
From Source
Dev onlyDocker Compose Setup Recommended
Create Project Directory
Create Docker Compose File
Create a docker-compose.yml file with the following content:
services:
app:
image: ghcr.io/lopiv2/invenicum:latest
ports:
- "3000:3000"
environment:
- DB_URL=postgres://user:pass@db:5432/invenicum
- AI_PROVIDER=gemini
- GEMINI_API_KEY=your_google_gemini_key_here
- API_URL=http://localhost:3000
depends_on:
- db
restart: unless-stopped
db:
image: postgres:15-alpine
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
- POSTGRES_DB=invenicum
restart: unless-stoppeduser and pass) to strong, unique values before deploying to production.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
Example for remote access:
- API_URL=http://192.168.1.100:3000
Start the Services
Launch Invenicum with:
Check the logs to ensure everything started correctly:
Access the Application
Open your browser and navigate to:
You’ll be prompted to create an admin account on first launch.
Updating
Stopping
Standalone Docker Setup
If you prefer to manage the database separately or use an existing PostgreSQL instance:
Set Up PostgreSQL
docker run -d \ --name invenicum-db \ -e POSTGRES_USER=invenicum \ -e POSTGRES_PASSWORD=secure_password_here \ -e POSTGRES_DB=invenicum \ -v invenicum-db-data:/var/lib/postgresql/data \ -p 5432:5432 \ postgres:15-alpine
Run Invenicum Container
docker run -d \ --name invenicum-app \ -p 3000:3000 \ -e DB_URL="postgres://invenicum:secure_password_here@localhost:5432/invenicum" \ -e AI_PROVIDER=gemini \ -e GEMINI_API_KEY="your_gemini_api_key" \ -e API_URL="http://localhost:3000" \ --restart unless-stopped \ ghcr.io/lopiv2/invenicum:latest
If the database is running in another Docker container, use —link invenicum-db or put both on the same Docker network.
Verify Installation
Building from Source Dev only
For developers or those who want to customize Invenicum:
Install Dependencies
Make sure you have Flutter SDK installed (version 3.9.0 or higher):
Configure Environment
Update the API URL in lib/config/environment.dart:
static const String apiUrl = String.fromEnvironment( 'API_URL', defaultValue: 'http://localhost:3000', );
Build for Production
The built files will be in the build/web directory.
Building from source requires a backend server. The Flutter app is the frontend only — make sure you have the backend API running separately.
Environment Variables
Complete reference of all environment variables used by Invenicum:
| Variable | Required | Default | Description |
|---|---|---|---|
| DB_URL | Yes | — | PostgreSQL connection string |
| AI_PROVIDER | Yes | gemini | AI provider (only gemini supported) |
| GEMINI_API_KEY | Yes | — | Your Google Gemini API key |
| API_URL | Yes | localhost:3000 | Base URL where the API is accessible |
| PORT | No | 3000 | Port the application listens on |
| NODE_ENV | No | production | Environment mode |
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 12 or higher (15 recommended)
- At least 1GB free space
- UTF-8 encoding
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
Free Tier Limits
For higher limits, check Google’s pricing page.
Keep Your API Key Secret: Never commit your API key to version control or share it publicly. Anyone with your key can use your Gemini quota.
Network Configuration
Accessing from Other Devices
To access Invenicum from other devices on your network:
1. Update API_URL to use your server’s IP:
2. Allow port 3000 through your firewall (Ubuntu/Debian):
Reverse Proxy Setup (HTTPS)
For production deployments with HTTPS, use a reverse proxy like Nginx:
server {
listen 80;
server_name invenicum.example.com;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}Troubleshooting
Database connection failed
- 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
- 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
Change the port mapping in docker-compose.yml:
Update your API_URL accordingly:
- API_URL=http://localhost:8080
Next Steps
Now that Invenicum is installed: