---
title: "Deploy Kept"
description: "Home inventory: where everything is, with photos, QR labels, AI and MCP"
category: "Other"
url: https://railway.com/deploy/kept
---

# Deploy Kept

Home inventory: where everything is, with photos, QR labels, AI and MCP

**[Deploy Kept on Railway](https://railway.com/template/kept)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/kept/manifest.json

- **Creator:** Auromations
- **Category:** Other
- **Total deploys:** 1

## Template content

### Kept https://raw.githubusercontent.com/keptinventory/kept/v1.12.5/apps/web/public/icon-512.png

- **Image:** ghcr.io/keptinventory/kept:1.12.5
- **Start command:** `/bin/sh -c "until kept migrate; do echo kept migrate failed, retrying in 5s; sleep 5; done; exec node --import /app/apps/server/dist/observability/tracing.js /app/apps/server/dist/main.js"`
- **Health check:** /readyz
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** pgvector/pgvector:0.8.6-pg18-bookworm
- **Start command:** `/bin/sh -c "mkdir -p /docker-entrypoint-initdb.d && printenv KEPT_INIT_SQL > /docker-entrypoint-initdb.d/01-kept-roles.sql && exec docker-entrypoint.sh postgres"`

## Documentation

# Deploy and Host Kept on Railway

Kept is a self-hosted home inventory: everything you own, where it is, what it cost, its warranty and its manuals. Rooms, shelves and boxes nest as deep as you like, printable QR labels link a box to its contents, and a built-in AI assistant and MCP server answer "where did I put the drill?" from your own data.

## About Hosting Kept

Kept runs as one Node.js service (web app, API, background jobs and the MCP server) backed by PostgreSQL with the pgvector extension. This template deploys the official `ghcr.io/keptinventory/kept` image pinned to v1.12.5 and a pgvector Postgres 18 database, with everything wired over Railway's private network. Database migrations run automatically on every boot before the server starts. Photos and attachments are stored on a Railway volume.

Nothing to fill in at deploy time: the four database passwords, both encryption keys and the first-run setup code are generated for your deployment.

## Common Use Cases

- Home inventory for insurance: photos, purchase prices, serial numbers and receipts per item, exportable as a report
- Finding things: search by name, place or meaning, or ask the AI assistant where something is
- Storage and moving boxes: print QR labels and scan a box to see what is inside
- Warranties, maintenance reminders and manuals kept with the item they belong to
- Shared household inventory with several members and roles
- Let your own AI agent (Claude, ChatGPT, any MCP client) read and update your inventory through Kept's MCP server at `/mcp`
- Moving from Homebox, LubeLogger or a spreadsheet: Kept imports them

## Dependencies for Kept Hosting

- PostgreSQL 18 with pgvector (included)
- A volume for uploaded photos and files (included)

### Deployment Dependencies

- Kept source: https://github.com/keptinventory/kept
- Documentation: https://keptinventory.info/
- Image: https://github.com/keptinventory/kept/pkgs/container/kept

### Implementation Details

**First login.** After the deploy turns green, open the Kept service's Variables tab and copy `KEPT_SETUP_CODE` (six characters; it is also printed in the deploy logs as `KEPT SETUP CODE`). Open your Kept URL, enter the code, and create your admin account. Only someone holding that code can create the first admin, so the instance is never open to whoever finds the URL first.

**Sign-ups.** After setup, sign-up is controlled in Admin settings. To lock it regardless of the setting, add `KEPT_SIGNUP_OPEN=false` to the Kept service.

**Back up your keys.** `KEPT_SECRET_KEY` and `KEPT_AUTH_SECRET` on the Kept service encrypt stored secrets such as AI provider keys and backup settings. Copy them somewhere safe. If they are lost or changed, those values cannot be decrypted.

**AI assistant.** Add a provider (OpenAI, Anthropic, Google, Groq, OpenRouter or any OpenAI-compatible server) under Settings, AI, with your own API key. Without one, everything except the assistant and photo extraction works.

**Optional settings** (add them to the Kept service any time, then redeploy):

- Email: `KEPT_SMTP_URL` (for example `smtps://user:password@smtp.example.com:465`) and `KEPT_SMTP_FROM`. Without it, invites and password resets are only logged.
- Custom domain: add it in the service's Networking settings, then set `KEPT_PUBLIC_URL` to `https://your.domain` so links and QR labels use it.
- Sign-in with your own identity provider: `KEPT_OIDC_ISSUER`, `KEPT_OIDC_CLIENT_ID`, `KEPT_OIDC_CLIENT_SECRET`, or Google with `KEPT_GOOGLE_CLIENT_ID` and `KEPT_GOOGLE_CLIENT_SECRET`.
- Object storage instead of the volume: `KEPT_STORAGE=s3` plus `KEPT_S3_BUCKET`, `KEPT_S3_ENDPOINT`, `KEPT_S3_REGION`, `KEPT_S3_ACCESS_KEY_ID`, `KEPT_S3_SECRET_ACCESS_KEY` (and `KEPT_S3_FORCE_PATH_STYLE=true` for most non-AWS stores). Moving existing files is a CLI migration, not a switch, so decide early.
- Nightly encrypted backups (restic) to S3 or SFTP: `KEPT_BACKUP_PASSWORD` plus the `KEPT_BACKUP_S3_*` variables, or configure them in Admin, Backups.

**First boot.** The Kept service may log `the database system is starting up` and `kept migrate failed, retrying in 5s` a few times while Postgres initializes. That is expected; it starts as soon as the database accepts connections.

**Do not change the database passwords** on the Postgres service after the first deploy. They are written into the database once, when it is created.

**Upgrading.** Change the Kept service's image tag to a newer release (for example `ghcr.io/keptinventory/kept:1.13.0`) and redeploy. Migrations run automatically on boot. Kept does not support skipping back to an older image on a newer database.

**Scaling.** This template runs Kept as a single process with local file storage, which suits a household. Splitting web and worker requires S3 storage first, because a Railway volume attaches to one service only.

## Why Deploy Kept 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 Kept 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.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/kept
