Self-Hosting

How to Self-Host Inventory on a VPS (and Skip the SaaS Tax)

•6 min read•By Inventoros Team
How to Self-Host Inventory on a VPS (and Skip the SaaS Tax)

A VPS gives you a flat monthly bill and every row of your stock data on hardware you control. To self-host inventory on a VPS you pick a server size, lock the box down, deploy the app, and keep it backed up. The steps are below.

Why a VPS beats shared hosting and SaaS

Shared cPanel hosting is fine to start, but you hit walls fast: capped PHP memory, no root access, no long-running queue workers, and shared CPU that throttles under a busy sync. SaaS solves the ops problem but charges per seat and parks your data on someone else's account, which gets expensive and awkward the moment you add warehouse staff or want a raw database export.

A VPS sits in the middle and, for most small-to-mid operations, wins outright. You get root, a predictable monthly bill that does not scale with headcount, and the freedom to run whatever stack you like. The tradeoff is that you own the maintenance. That is a real cost, but a smaller one than most people assume once the initial setup is done.

Sizing the VPS

Inventoros needs 1 GB of memory at minimum and recommends 2 GB, with 5 GB of free disk. That covers the web app, the queue worker, the scheduler and the database on one machine. Most people either over-buy an 8 GB box "to be safe" or cram everything onto a 1 GB instance that swaps during a bulk import. Start at 2 GB, watch memory during your largest import, and resize if it swaps. Resizing a VPS is usually a reboot, not a migration.

Disk grows with your movement history, product images and local backups before they ship off-server. Leave room for all three.

Cost comparison

Option What you get
VPS Root access, unlimited users, full data control, you run ops
Shared cPanel Easy start, capped PHP memory, no root, no persistent workers
SaaS inventory Managed and hands-off, per-seat pricing, data lives on their account

The gap widens with every person you add. Five warehouse users on a $40 per seat plan is $200 a month, and a sixth makes it $240. On a VPS the bill stays flat as you add users.

How to self-host inventory on a VPS in 8 steps

These steps assume Ubuntu 22.04 or 24.04, which covers most providers.

  1. Spin up the server. Pick your provider, choose a nearby region for latency, and create a plain Ubuntu instance with at least 2 GB of memory.
  2. Create a non-root user. Add a sudo user, upload your SSH key, then disable root login and password auth in sshd_config. Key-only access removes the single biggest attack surface on a public VPS.
  3. Set the firewall. ufw allow OpenSSH, ufw allow 80, ufw allow 443, then ufw enable. Nothing else should be reachable from the internet.
  4. Install the stack. The one-command installer (scripts/install.sh, served from inventoros.com/install.sh) installs Docker if needed, downloads the release, generates the secrets, and starts the app, queue worker, scheduler and PostgreSQL. Download it, read it, then run sudo bash install.sh, or add --domain your.domain to get a Let's Encrypt certificate. To install from source instead, you need Nginx, PHP 8.4.1 or newer, MySQL or PostgreSQL, Composer and Node.js 22.12 or newer. Ubuntu's own repositories do not ship PHP 8.4, so add the ondrej/php PPA first. The Inventoros docs have a step-by-step guide for each route.
  5. Point DNS and get TLS. Add an A record for your subdomain, then issue a free Let's Encrypt certificate with Certbot or your reverse proxy's built-in ACME. The one-command installer handles this itself with --domain. Make sure renewal is automatic so it never lapses.
  6. Deploy the app and migrate. With the installer, finish in the web installer it points you to. From source, set your environment file and run the database migrations. Confirm the app answers on HTTPS before moving on.
  7. Run a queue worker and the scheduler. The scheduler runs low-stock checks, cycle counts and report emails, and the worker sends webhook deliveries and queued email. The installer starts both. On a source install, the repository ships systemd units in deploy/systemd/ so they restart on crash and on reboot.
  8. Automate backups. A nightly database dump plus a files snapshot, pushed off the server. Details below, because this is the step people skip and regret.

Backups, updates, and staying alive

Follow the 3-2-1 rule: three copies, two media, one off-site. On a VPS that translates to a nightly mysqldump (or pg_dump), an archive of your uploads directory, and a push to object storage in a different region. A tool like restic handles deduplication and encryption in one command, and you can wire it to cron in ten minutes.

Test a restore before you need one. A backup you have never restored is a hope, not a backup. Once a quarter, pull the latest snapshot onto a throwaway instance and confirm the app boots against it.

For updates, put OS security patches on unattended-upgrades and handle app upgrades deliberately: snapshot the VPS first, then upgrade. Source installs can use the in-app update manager. On Docker, do not use it, because the files it replaces are lost when the container is recreated. Switch to the new release's image instead, and rolling back is pointing at the previous image tag.

Where Inventoros fits

If you would rather not hand-roll the application layer, Inventoros is built for exactly this setup. It is free, open source (AGPL-3.0), and self-hosted, with multi-location stock, plugins, webhooks, and a REST and GraphQL API. It installs on a VPS, cPanel, or Docker, and the documentation covers each deploy path.

FAQ

How much RAM do I need to self-host an inventory system? Inventoros needs 1 GB at minimum and recommends 2 GB. Start there and move up a tier if bulk imports push the box into swap.

Is it safe to self-host inventory data on a VPS? Yes, if you do the basics: SSH keys only with password login disabled, a firewall that exposes just 22, 80, and 443, TLS on every request, and automated off-site backups. A locked-down VPS is arguably safer than a SaaS account, because the only people with access are the ones you gave keys to, and there is no shared control plane to breach.

Can I move from cPanel to a VPS later? Yes, but it is a migration, not a setting. Export your database and files from the shared host, provision the VPS, import them, then repoint DNS. A source install on the VPS can keep MySQL. The one-command installer and the Docker image use PostgreSQL by default, so a MySQL dump cannot simply be loaded into them. Do a trial import onto the new server before you cut over.

VPS or Docker, which should I pick for self-hosting inventory? Docker runs on the VPS, so the choice is containers versus installing the stack directly on the host. Containers make upgrades, rollbacks, and clean reinstalls easier. Use the one-command installer unless you have a reason to run bare packages.