Independent testing Updated April 2026 387 self-hosting guides 5 VPS providers tested

guide

How to Self-Host Grocy on a VPS (Complete Guide)

A complete step-by-step guide to self-hosting Grocy on a VPS in 2026, covering installation, configuration, securing Grocy, and the specs you need.

How to Self-Host Grocy on a VPS (Complete Guide)

Self-hosting Grocy, an open-source self-management grocery application, can significantly enhance your ability to manage grocery inventory, tasks, and recipes. In this guide, weโ€™ll walk you through the steps of installing Grocy on a Virtual Private Server (VPS). This setup is particularly vital for developers and homelab enthusiasts looking to enhance their self-hosting experience.

Why Choose a VPS for Grocy?

A VPS offers a more controlled environment compared to traditional hosting solutions. You have complete control over server resources and configurations, making it easier to customize your setup. Here are some benefits of using a VPS:

VPS ProviderPrice per MonthKey Features
Contabo VPS5.99 EURSSD storage, German data center
Hetzner Cloud4.15 EURHigh-capacity and performance
DigitalOcean6 USDSimple UI, scalable droplets
Vultr6 USDMultiple locations, hourly billing
Linode (Akamai Cloud)5 USDDeveloper-friendly tools, API access

Steps to Self-Host Grocy on a VPS

Step 1: Choose a VPS Provider

Select a VPS provider based on your budget and requirements. For basic Grocy use, the Hetzner Cloudโ€™s starting point at 4.15 EUR per month is an excellent choice for cost and performance. For more features, consider Contabo or DigitalOcean.

Step 2: Set Up Your VPS

  1. Sign Up: Go to your chosen VPS providerโ€™s website and create an account.
  2. Instance Creation: Launch a new VPS instance selecting your desired specifications (CPU, RAM, SSD).
  3. Operating System: For this guide, we recommend using Ubuntu 20.04 or later.

Step 3: Secure Your Server

  1. SSH Access: Use an SSH client to connect to your VPS. If you are on Windows, tools like PuTTY can be useful.
    ssh root@your-server-ip
  2. Update System: Ensure your system is updated:
    sudo apt update && sudo apt upgrade -y

Step 4: Install Docker

Grocy can be run in a Docker container, simplifying the process. Hereโ€™s how to install Docker on Ubuntu:

  1. Install Required Packages:
    sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
  2. Add Dockerโ€™s Official GPG Key:
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  3. Add Docker Repository:
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  4. Install Docker:
    sudo apt update
    sudo apt install docker-ce -y

Step 5: Install Docker Compose

Docker Compose helps manage multi-container Docker applications:

sudo apt install docker-compose -y

Step 6: Deploy Grocy Using Docker

  1. Create a Directory for Grocy:

    mkdir grocy
    cd grocy
  2. Create the Docker Compose File: Create a file named docker-compose.yml:

    version: '3'
    
    services:
      grocy:
        image: grocy/grocy
        restart: unless-stopped
        ports:
          - "9283:80"
        volumes:
          - /path/to/grocy-data:/var/www/grocydata

    Replace /path/to/grocy-data with a path on your VPS where you want to store Grocy data.

  3. Start the Container:

    docker-compose up -d

Step 7: Access Grocy

Open a web browser and navigate to http://your-server-ip:9283. Follow the on-screen instructions to complete your Grocy setup.

Step 8: Set Up a Database (optional)

For enhanced functionality, you can link Grocy to a database like MySQL or PostgreSQL. Adjust the docker-compose.yml file accordingly based on your database choice.

FAQs

1. Is there any cost associated with self-hosting Grocy on a VPS?

Yes, self-hosting Grocy does incur costs associated with VPS providers. The basic setup can start as low as 4.15 EUR with providers like Hetzner, while other providers may have competitive pricing. Additional costs may arise if you decide to use other services like managed databases or additional storage.

2. Can I scale my VPS resources if I need more performance with Grocy?

Definitely! Most VPS providers offer flexible plans allowing you to scale resources such as CPU, RAM, and storage. For instance, if you start with Hetzner and find that you need more CPU for better performance, you can upgrade your plan through your providerโ€™s dashboard without any downtime.

3. What are the security measures recommended for securing Grocy on a VPS?

To secure your Grocy instance on a VPS, consider the following measures:

By following this guide, you can successfully self-host Grocy on a VPS while ensuring optimal performance and security. For a comprehensive overview of available VPS providers, check our full VPS comparison. Happy self-hosting!