Deploy InvenTree
Open-source inventory and parts management: stock, orders, BOMs, API
Redis
Just deployed
/data
Just deployed
/var/lib/postgresql/data
InvenTree
Just deployed
/home/inventree/data
Deploy and Host InvenTree on Railway
InvenTree is an open-source inventory and parts management system. It tracks parts, stock items and locations, suppliers and manufacturers, purchase and sales orders, build orders and bills of materials, with barcode support, label and report printing, a plugin system and a full REST API. It is MIT licensed and written in Python with Django.
About Hosting InvenTree
InvenTree needs a web server, a background worker for scheduled and long-running tasks, PostgreSQL and Redis, plus a file server for static files and uploads. This template deploys InvenTree 1.7.3 from the official image, pinned by digest, and runs the web server, the worker and Caddy in one service so they share one volume at /home/inventree/data. Railway Postgres and Redis are included and connected over the private network. Migrations run on every start. The first start takes about two minutes. Then sign in as admin with the generated INVENTREE_ADMIN_PASSWORD from the InvenTree service's Variables tab, and change it.
Common Use Cases
- Track electronic components, spare parts or lab supplies across shelves, rooms and sites
- Manage suppliers, purchase orders and stock levels for a small manufacturer or maker space
- Plan build orders from bills of materials and print barcode labels and reports
Dependencies for InvenTree Hosting
- PostgreSQL (included: Railway Postgres, on its own volume)
- Redis (included: Railway Redis, for the cache and the background worker)
Deployment Dependencies
- InvenTree documentation: https://docs.inventree.org/en/stable/
- InvenTree Docker setup: https://docs.inventree.org/en/stable/start/docker/
- InvenTree 1.7.3 release: https://github.com/inventree/InvenTree/releases/tag/1.7.3
- Template repository: https://github.com/aalfath/inventree-railway-template
Implementation Details
Services in this template:
- InvenTree: the web server (Gunicorn), the background worker (
invoke worker) and Caddy, which serves/static, serves/mediaonly to signed-in users and proxies the rest. Health check:/api/system/health/. Volume:/home/inventree/data(uploads, static files, plugins, backups,config.yaml). - Postgres: the database.
- Redis: cache and worker coordination.
Only the admin password and the secret key are generated; nothing needs to be filled in at deploy time. To use a custom domain, add it to the InvenTree service and set INVENTREE_SITE_URL=https://YOUR-DOMAIN. For outgoing mail (password resets, notifications), add the INVENTREE_EMAIL_HOST, INVENTREE_EMAIL_PORT, INVENTREE_EMAIL_USERNAME, INVENTREE_EMAIL_PASSWORD, INVENTREE_EMAIL_SENDER and INVENTREE_EMAIL_TLS variables. Updates: the service builds from the template repository, so when we publish a new InvenTree version Railway shows an "update available" notice and you choose when to apply it; read CHANGELOG.md first and back up Postgres before a major version.
Why Deploy InvenTree on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying InvenTree on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
Redis
redis:8.2InvenTree
aalfath/inventree-railway-template