Railway

Deploy InvenTree | Open-Source Inventory Management on Railway

Self-host InvenTree. Track parts, stock, orders, and suppliers .

Deploy InvenTree | Open-Source Inventory Management on Railway

Just deployed

/data

/home/inventree/data

/var/lib/postgresql/data

Just deployed

Just deployed

/data

InvenTree logo

Deploy and Host InvenTree on Railway

Deploy InvenTree on Railway to get a production-ready open-source inventory management system running in minutes. Self-host InvenTree with full control over your parts data, stock levels, and supply chain — no vendor lock-in, no seat fees.

This Railway template pre-configures InvenTree with PostgreSQL for data persistence, Redis for caching and task queuing, MinIO for shared media file storage between the web server and background worker, and a dedicated worker service for asynchronous tasks. The web service ships as a custom image that bundles InvenTree's Django app with an nginx front-end so the React SPA's static assets are served correctly out of the box.

InvenTree Railway architecture

Getting Started with InvenTree on Railway

After deployment completes, open your Railway-generated URL to reach the InvenTree web interface. Log in with the admin credentials you configured via INVENTREE_ADMIN_USER and INVENTREE_ADMIN_PASSWORD environment variables. Navigate to Settings > Server Configuration to verify all services are connected — the dashboard should show worker status as "Running" with 4 active workers.

Your first action should be creating a Part Category tree (e.g. Electronics > Capacitors > Ceramic) under the Parts tab. Then create your first Part with parameters like value, package size, and manufacturer. Add a Stock Location (e.g. Warehouse A > Shelf 1 > Bin 3) and record initial stock quantities. InvenTree's barcode scanning via the mobile companion app makes physical inventory workflows fast once your category structure is in place.

InvenTree dashboard screenshot

About Hosting InvenTree

InvenTree is an open-source inventory management system built with Python/Django, designed for tracking parts, managing stock, handling bills of materials (BOMs), and processing purchase and sales orders. It targets electronics manufacturers, hardware startups, maker spaces, and any organization that needs structured part tracking with supplier management.

Key features of self-hosted InvenTree include:

  • Hierarchical parts and stock locations with parametric data, attachments, and notes
  • Multi-level BOM management with substitution parts and validated consistency checks
  • Build/manufacturing orders tracking progress from allocation through completion
  • Purchase and sales order workflows with multi-currency and multi-supplier support
  • RESTful API with a Python client library for automation and integration
  • Plugin architecture supporting label printers (Brother, DYMO, Zebra), notification channels (Discord, Slack, Teams), and EDA tools (KiCad)
  • Mobile companion app (iOS/Android) for barcode scanning and stock adjustments

Why Deploy InvenTree on Railway

Railway simplifies the multi-service architecture InvenTree requires:

  • One-click deploy of server, worker, PostgreSQL, Redis, and MinIO — no Docker Compose wrangling
  • Custom image bundles nginx + gunicorn so static assets and API traffic both work out of the box
  • MinIO provides shared media storage between server and worker — both services see the same uploaded files
  • Automatic TLS and public domain via Railway's edge — no manual certificate management
  • Scale the worker independently when background task load increases

Common Use Cases for Self-Hosted InvenTree

  • Electronics manufacturing — track PCBs, resistors, capacitors across warehouses with lot traceability and BOM-driven builds
  • Hardware startup prototyping — manage sub-assemblies mixing custom PCBs, 3D-printed parts, and off-the-shelf components across engineering teams
  • Maker spaces and university labs — shared inventory with QR code check-in/check-out, low-stock alerts, and multi-user access control
  • Contract manufacturing — consignment vs. owned stock tracking with customer-specific reporting and purchase order management

Dependencies for InvenTree on Railway

This template deploys five services:

  • InvenTree (custom image from praveen-ks-2001/inventree-railway-template, based on inventree/inventree:stable) — nginx + Django/Gunicorn web server on port 8080
  • InvenTree-Worker (same custom image, startCommand invoke worker) — django-q background task processor
  • MinIO (minio/minio:latest) — S3-compatible object storage for media files (user uploads, generated reports, label templates)
  • PostgreSQL (ghcr.io/railwayapp-templates/postgres-ssl:18) — primary database
  • Redis (redis:8.2.1) — cache and task queue broker

Deployment Dependencies

Hardware Requirements for Self-Hosting InvenTree

ResourceMinimumRecommended
CPU1 vCPU2 vCPU
RAM1 GB2 GB
Storage2 GB10 GB+ (scales with media uploads)
RuntimeDocker 20+Docker 24+ with Compose v2

InvenTree is lightweight — community reports show ~750 MB RAM usage across all containers. Suitable for Raspberry Pi-class hardware for small inventories.

Self-Hosting InvenTree with Docker Compose

Clone the repository and start the stack:

git clone https://github.com/inventree/InvenTree.git
cd InvenTree
docker compose up -d

The default Compose file starts all five services. Access the web UI at http://localhost:1337. For a minimal single-container test:

docker run -d \
  -p 8000:8000 \
  -e INVENTREE_DB_ENGINE=sqlite3 \
  -e INVENTREE_ADMIN_USER=admin \
  -e INVENTREE_ADMIN_PASSWORD=changeme123 \
  -e [email protected] \
  inventree/inventree:stable

This uses SQLite for quick testing — not recommended for production. The Railway template uses PostgreSQL, Redis, MinIO, and a bundled nginx + gunicorn image for a production-grade setup.

How Much Does InvenTree Cost to Self-Host?

InvenTree is completely free and open-source under the MIT License. There are no paid tiers, no seat fees, and no feature gating. All features — including the plugin system, API, mobile app, and SSO — are available in the open-source version.

InvenTree vs Odoo vs PartKeepr

FeatureInvenTreeOdoo CommunityPartKeepr
FocusParts & stock managementFull ERP suiteElectronics inventory
LicenseMITLGPL-3.0GPL-3.0
Self-host complexityLow (5 containers)High (10+ modules)Low (legacy, unmaintained)
Mobile appYes (iOS/Android)Yes (paid)No
BOM managementMulti-level with substitutionsFull MRPBasic
Plugin ecosystemGrowing (50+ plugins)Massive (30k+ apps)Minimal
APIFull REST API + Python SDKXML-RPC / JSON-RPCLimited
Active developmentYes (monthly releases)YesNo (archived)

InvenTree hits the sweet spot between PartKeepr's simplicity and Odoo's complexity — purpose-built for parts inventory without the overhead of a full ERP system.

FAQ

What is InvenTree and why self-host it? InvenTree is an open-source inventory management system for tracking parts, stock, BOMs, and orders. Self-hosting gives you full data ownership, no recurring SaaS fees, and the ability to customize via plugins.

Why does the Railway template use a custom InvenTree image instead of the official one? InvenTree's modern frontend is a React SPA whose static assets must be served by a dedicated web server — the official Docker setup uses Caddy in a separate container with a shared volume. Railway's 1:1 service-to-volume rule prevents that pattern, so the template bundles nginx and gunicorn into a single image. nginx serves /static/ directly from the local volume and proxies application traffic to gunicorn on the loopback interface.

Why is MinIO included in the InvenTree Railway template? The web server and the background worker need to share access to the same media files (user uploads, generated reports, label templates). Railway only allows one volume per service, so a shared filesystem isn't possible. MinIO provides S3-compatible object storage that both services can read and write through standard S3 APIs. The inventree bucket is configured with anonymous read for media URLs that browsers fetch directly, while uploads and admin operations require the MinIO root credentials.

How do I import parts into self-hosted InvenTree from suppliers like DigiKey or Mouser? Use the Ki-n-Tree plugin or InvenTree Part Import tool — both can pull part data directly from DigiKey, LCSC, and Mouser APIs into your InvenTree instance. Install them via InvenTree's plugin manager in Settings > Plugins.

Can I use InvenTree's mobile app with a Railway deployment? Yes. The InvenTree companion app (available on iOS and Android) connects to any InvenTree instance via its REST API. Point the app at your Railway URL and log in with your credentials. Barcode scanning, stock adjustments, and part lookups all work over HTTPS.

How do I enable SSO/OIDC authentication in InvenTree on Railway? Set INVENTREE_SOCIAL_BACKENDS to your OIDC provider and configure the provider-specific variables (client ID, secret, URLs). InvenTree supports Google, GitHub, Microsoft, and generic OIDC providers through django-allauth.


Template Content

More templates in this category

View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
View Template
(v1) Simple Medusa Backend
Deploy an ecommerce backend and admin using Medusa

Shahed Nasser