Skip to content

Deploying Grocy

Introduction

Grocy is a comprehensive self-hosted grocery and household management solution. It helps you track what is in your pantry, manage shopping lists, plan meals, and keep on top of household chores. Think of it as an ERP system for your household.

Built with PHP, Grocy provides a web-based interface accessible from any device. It goes far beyond simple grocery lists by tracking quantities, expiration dates, prices, and nutritional information. The application also includes task management, equipment tracking, and recipe planning.

Key highlights of Grocy:

  • Stock Management: Track products with quantities, expiration dates, and locations
  • Shopping Lists: Create and manage shopping lists with automatic stock integration
  • Recipe Planning: Store recipes and plan meals
  • Meal Planning: Calendar-based meal scheduling
  • Chores Tracking: Manage household tasks and schedules
  • Battery Tracking: Track rechargeable battery cycles
  • Equipment Management: Record equipment and maintenance schedules
  • Barcode Support: Scan products for quick entry
  • Multi-User: Support for multiple household members
  • API Access: Full REST API for integrations
  • Mobile Apps: Third-party mobile applications available
  • Open Source: Licensed under MIT

This guide walks through deploying Grocy on Klutch.sh using Docker.

Why Deploy Grocy on Klutch.sh

Deploying Grocy on Klutch.sh provides several advantages:

Family Access: All household members can access from any device.

Always Available: Check your pantry or shopping list from anywhere.

Persistent Data: Your inventory and history survive updates.

HTTPS Security: Secure access to your household data.

No Infrastructure: No need to maintain home servers.

Prerequisites

Before deploying Grocy on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your configuration
  • Basic familiarity with Docker
  • (Optional) A custom domain for your Grocy instance

Understanding Grocy Architecture

Grocy consists of:

PHP Application: Core application logic and web interface.

SQLite Database: Stores all product, stock, and household data.

File Storage: Product images and attachments.

Web Server: Serves the PHP application.

Preparing Your Repository

Create a GitHub repository with your Grocy configuration.

Repository Structure

grocy-deploy/
├── Dockerfile
└── .dockerignore

Creating the Dockerfile

FROM linuxserver/grocy:latest
# Set environment variables
ENV PUID=1000
ENV PGID=1000
ENV TZ=America/New_York
# Expose web interface
EXPOSE 80
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD curl -f http://localhost:80 || exit 1

Environment Variables Reference

VariableRequiredDescription
PUIDNoUser ID for file ownership
PGIDNoGroup ID for file ownership
TZNoTimezone (e.g., America/New_York)
GROCY_CULTURENoLanguage/locale setting
GROCY_CURRENCYNoDefault currency

Deploying Grocy on Klutch.sh

    Push Your Repository to GitHub

    Commit your Dockerfile to GitHub.

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project named “grocy” or “household”.

    Create a New App

    Create a new app and connect your GitHub repository.

    Configure HTTP Traffic

    Set up HTTP traffic:

    • Select HTTP as the traffic type
    • Set the internal port to 80

    Set Environment Variables

    VariableValue
    TZYour timezone
    GROCY_CULTUREen (or your language)
    GROCY_CURRENCYUSD (or your currency)

    Attach Persistent Volumes

    Mount PathSizePurpose
    /config5 GBDatabase and configuration

    Deploy Your Application

    Click Deploy to build and launch Grocy.

    Complete Initial Login

    Access Grocy at your app URL. Default credentials:

    • Username: admin
    • Password: admin

    Change the default password immediately.

Initial Setup

System Configuration

  1. Go to Settings
  2. Configure:
    • Language
    • Currency
    • Date and time format
    • First day of week

Location Setup

Create storage locations:

  1. Go to Master Data > Locations
  2. Add locations like:
    • Pantry
    • Refrigerator
    • Freezer
    • Basement
    • Garage

Product Groups

Organize products by category:

  1. Go to Master Data > Product Groups
  2. Create groups like:
    • Dairy
    • Meat
    • Vegetables
    • Canned Goods
    • Snacks

Quantity Units

Configure measurement units:

  1. Go to Master Data > Quantity Units
  2. Add units like:
    • Pieces
    • Pounds
    • Ounces
    • Liters
    • Packages

Stock Management

Adding Products

  1. Go to Master Data > Products
  2. Click “Add”
  3. Fill in:
    • Name
    • Product group
    • Default location
    • Minimum stock amount
    • Default expiration days
  4. Save the product

Stock Entries

Record what you have:

  1. Go to Stock > Purchase
  2. Select product
  3. Enter:
    • Amount
    • Best before date
    • Price (optional)
    • Location
  4. Add to stock

Consuming Stock

Record usage:

  1. Go to Stock > Consume
  2. Select product
  3. Enter amount consumed
  4. Specify if opened

Stock Overview

View current inventory:

  • Products at location
  • Items expiring soon
  • Below minimum stock
  • Total stock value

Shopping Lists

Creating Lists

  1. Go to Shopping List
  2. Add items:
    • From products below minimum
    • Manually
    • From recipes
  3. Print or use on mobile

Automatic Additions

Configure automatic shopping list additions:

  • Products below minimum stock
  • Recipe ingredients
  • Scheduled additions

Recipe Management

Adding Recipes

  1. Go to Recipes
  2. Click “Add”
  3. Enter:
    • Name
    • Description
    • Servings
    • Instructions
  4. Add ingredients from products
  5. Save recipe

Recipe Features

  • Scale servings
  • Calculate costs
  • Check stock for ingredients
  • Add missing items to shopping list

Meal Planning

Calendar

  1. Go to Meal Plan
  2. Click on a day
  3. Select:
    • Recipe
    • Section (Breakfast, Lunch, Dinner)
  4. Plan meals for the week

Shopping Integration

Generate shopping lists from meal plans with missing ingredients.

Chores Tracking

Setting Up Chores

  1. Go to Chores
  2. Add chores like:
    • Clean kitchen
    • Vacuum living room
    • Take out trash
  3. Set:
    • Frequency
    • Assigned user
    • Track date

Tracking Completion

Mark chores as done and track history.

User Management

Adding Users

  1. Go to User Management
  2. Create users for household members
  3. Set permissions:
    • Admin
    • Normal user

User Features

  • Personal shopping lists
  • Assigned chores
  • Activity tracking

Barcode Scanning

Product Lookup

Grocy can look up products by barcode:

  1. Enable product lookup service
  2. Scan barcodes to find products
  3. Add to your database

Mobile Scanning

Use mobile apps:

  • Grocy Mobile (iOS)
  • Pantry Party (Android)
  • Grocy Barcode Scanner

API Integration

REST API

Grocy provides a full REST API:

Terminal window
# Get all products
curl -H "GROCY-API-KEY: your-api-key" \
https://your-app.klutch.sh/api/objects/products
# Add stock
curl -X POST \
-H "GROCY-API-KEY: your-api-key" \
-d '{"amount": 5}' \
https://your-app.klutch.sh/api/stock/products/1/add

API Key

Generate API keys in Settings > API Keys.

Backup Strategy

Database Backup

Back up the SQLite database regularly:

  • /config/data/grocy.db

Export Features

Grocy can export:

  • Products (CSV)
  • Stock entries (CSV)
  • Recipes

Mobile Access

Responsive Design

The web interface works on mobile browsers.

Third-Party Apps

Dedicated mobile apps provide:

  • Barcode scanning
  • Quick consumption
  • Shopping list access

Troubleshooting

Login Issues

  • Verify credentials
  • Clear browser cache
  • Check session settings

Stock Discrepancies

  • Perform inventory
  • Check consumption logs
  • Review stock corrections

Performance Issues

  • Optimize database
  • Review product count
  • Check server resources

Additional Resources

Conclusion

Deploying Grocy on Klutch.sh provides a comprehensive household management solution accessible from anywhere. From pantry tracking to meal planning and chore management, Grocy helps bring organization to daily household tasks.

The combination of Grocy’s extensive features and Klutch.sh’s reliable hosting creates an ideal platform for household management.