Docs · Deploying

Deploying to your own server.

The kit includes a step-by-step guide to put the app you built on your own VPS, with a domain, HTTPS, scheduled jobs and nightly backups.

InvoiceKit Pro 1.0Based on docs/DEPLOY.md and VERIFICATION.md in the download

This page is an overview. The commands, the service file and the Caddy configuration are in docs/DEPLOY.md in your download. It takes about 45 minutes the first time.

What you end up with

  • The app runs as a background service that restarts on crash and on reboot.
  • Caddy serves it over HTTPS with an automatic Let's Encrypt certificate.
  • Your database and uploaded files (logos, receipts) live in fixed folders outside the code, so updates never touch them.
  • A jobs run every 15 minutes: recurring invoices, payment reminders and email retries.
  • A nightly backup of the database and the uploaded files, with rotation and a tested restore procedure.

Why a VPS

InvoiceKit Pro stores its data in one SQLite file plus an uploads folder, so it needs a server with a normal disk. Serverless hosts that wipe the disk (Vercel, Netlify and similar) are not supported by this kit. The guide uses Ubuntu 24.04 LTS on any provider; see requirements for the server size.

The guide, section by section

  1. 00
    What you needVPS, domain, DNS record, your app in a Git repository, optional SMTP and Stripe.
  2. 01
    Prepare the serverUpdates, firewall (SSH, HTTP, HTTPS only), Node.js 22, an optional swap file, a dedicated user and data folders.
  3. 02
    Install the appClone, install exact versions, the production environment file, migrate and build.
  4. 03
    Run it as a serviceA systemd service that restarts on crash and on reboot.
  5. 04
    HTTPS with CaddyAn automatic certificate, and what to do if your server already runs a reverse proxy.
  6. 05
    Jobs every 15 minutesRecurring invoices, payment reminders and email retries, on a schedule.
  7. 06
    Email (optional)Your SMTP provider and a test email.
  8. 07
    Card payments with Stripe (optional)Test mode first, the signed webhook, then live keys.
  9. 08
    BackupsSafe while the app runs, include uploaded files, nightly with rotation, plus a copy off the server.
  10. 09
    RestoreA step-by-step restore you practice once right after setup.
  11. 10
    Updating the appBack up, pause jobs, pull, install, migrate, build, start.
  12. 11
    Checklist after deployTen checks, from the padlock and security headers to a reboot test.
  13. 12
    Optional: a public live demoA separate service with its own database, where every visitor gets a sample workspace deleted after 24 hours.

The guide ends with the commands to read the app, HTTPS and jobs logs, and a table of the most common deployment problems.

Already running other sites?

If your server already serves other sites on ports 80 and 443, for example with Docker or another web server, the guide explains how to run the app behind your existing reverse proxy instead of a new Caddy.

How we tested the guide

We followed docs/DEPLOY.md word for word in a disposable Ubuntu 24.04 container, with the app built in our verification run: install, the service, HTTPS with Caddy, jobs, backup, restore, update and demo mode. We corrected the guide where the test showed gaps, then tested the corrected parts again. A production build can need more than 2 GB of memory: an earlier test on one CPU stopped at a 2 GB limit and finished at 3 GB. That is why the guide recommends 4 GB, or 2 GB plus swap.

Not tested: scheduling the jobs with cron on a real server, and running behind a real reverse proxy on the internet. See the verification report.