This guide walks through a self-hosted installation of Inventaire. The recommended approach is using Docker Compose, which handles the complex multi-container setup including CouchDB, Elasticsearch, and the main application.
For Docker installation, see Docker.
# On Debian/Ubuntu
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget git ca-certificates gnupg lsb-release
# On RHEL/CentOS/Fedora
sudo dnf update -y
sudo dnf install -y curl wget git ca-certificates
# Download and run Docker installation script
curl -fsSL https://get.docker.com | sh
sudo systemctl enable docker --now
# Add current user to docker group (optional)
sudo usermod -aG docker $USER
mkdir -p ~/inventaire && cd ~/inventaire
version: '3.8'
services:
couchdb:
image: couchdb:3.3
restart: unless-stopped
volumes:
- couchdb_data:/opt/couchdb/data
environment:
- COUCHDB_USER=admin
- COUCHDB_PASSWORD=replace_with_secure_password
networks:
- inventaire_net
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.24
restart: unless-stopped
volumes:
- es_data:/usr/share/elasticsearch/data
- ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- xpack.security.enabled=false
ulimits:
memlock:
soft: -1
hard: -1
networks:
- inventaire_net
server:
image: codeberg.org/inventaire/inventaire:latest
restart: unless-stopped
depends_on:
- couchdb
- elasticsearch
ports:
- "3000:3000"
environment:
- INV_DATABASE_COUCHDB_URL=http://admin:replace_with_secure_password@couchdb:5984
- INV_ELASTICSEARCH_HOST=elasticsearch
- INV_ELASTICSEARCH_PORT=9200
- INV_APP_HOSTNAME=localhost
- INV_EMAIL_ALERTS_TO=admin@localhost
- INV_SMTP_HOST=localhost
- INV_SMTP_PORT=587
- INV_SMTP_SECURE=false
networks:
- inventaire_net
volumes:
couchdb_data:
es_data:
networks:
inventaire_net:
driver: bridge
cat > elasticsearch.yml << EOF
cluster.name: "inventaire-cluster"
node.name: "es-node1"
network.host: 0.0.0.0
http.port: 9200
discovery.type: single-node
action.auto_create_index: false
EOF
docker compose up -d
docker compose ps
docker compose logs -f
For production use, set up a reverse proxy with nginx and SSL:
sudo apt install -y nginx
Create /etc/nginx/sites-available/inventaire:
server {
listen 80;
server_name inventaire.yourdomain.com;
location /.well-known/acme-challenge {
root /var/www/html;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
server_name inventaire.yourdomain.com;
ssl_certificate /path/to/your/certificate.crt;
ssl_certificate_key /path/to/your/private.key;
location / {
proxy_pass http://127.0.0.1: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;
}
}
sudo ln -s /etc/nginx/sites-available/inventaire /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Prefer automation? See Inventaire Ansible Setup for an example playbook.
Prefer containers? See Inventaire Docker Setup.
Any questions?
Feel free to contact us. Find all contact information on our contact page.