How to Install Grocy Using Docker

Install Grocy Using Docker

Grocy Overview

Grocy is an open-source, web based application that you can self-host at home. You can easily install Grocy using Docker. Grocy calls itself a groceries & household management solution for your home. It works like enterprise resource planning (ERP) software for your home. The application tracks inventory in your kitchen, helps plan your shopping list based on available inventory, plans meals and serves as a recipe database.

This article will walk you through how to install Grocy using Docker.

Create your Grocy Docker Volume

You will need to create a volume on your system by using the docker volume create command in your terminal to map to the /config folder in the Grocy container. You can use the following command to create the Grocy Volume:

You can also choose to map the /config folder to a folder on your system.

docker volume create grocy

Install Grocy Using a Docker Run Command

The Docker container used in this article is provided by the team at linuxserver.io. You can easily run the container in the terminal of your docker host by using the following Docker Run command. Be sure to change the TZ variable in the command to match your current time zone. You can view the TZ database from Wikipedia at this link.

docker run -d \
  --name=grocy \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Europe/London \
  -p 9283:80 \
  -v grocy:/config \
  --restart unless-stopped \
  lscr.io/linuxserver/grocy

Using the above command you will be able to access your Grocy installation by visiting http://<docker_host_IP>:9283. Be sure to replace <docker_host_IP> with the IP address of your docker host machine.

Install Grocy Using a Docker-Compose File

If you prefer to use a docker-compose file to install Grocy you can use the below docker-compose file.

---
version: "2.1"
services:
  grocy:
    image: lscr.io/linuxserver/grocy
    container_name: grocy
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - /path/to/data:/config
    ports:
      - 9283:80
    restart: unless-stopped

This docker-compose file mirrors the previous docker run command. Like the docker run command, remember to adjust the TZ variable and the volume to match your conditions. After running the above docker-compose file you will be able to access your Grocy installation by visiting http://<docker_host_IP>:9283. Be sure to replace <docker_host_IP> with the IP address of your docker host machine.

Install Grocy using Portainer

Using Portainer to run Docker containers provides a more visual approach to managing your docker containers. If you would like to install Portainer on your Docker host, check out this article.

Add Grocy Volume on Portainer

The first thing you need to do in Portainer is add the volume that you will be using for Grocy. Once logged into Portainer, click on “Volumes” on the left sidebar.

How to Install Grocy Using Docker 1

Once you are at the Volume List in Portainer, click on the “+ Add Volume” button.

How to Install Grocy Using Docker 2

Next, create a volume called “Grocy” as shown below and then click “Create the volume”.

How to Install Grocy Using Docker 3
Add a Volume

Create Grocy Docker Container on Portainer

Once you have your volume created. Click on “containers” in the left hand sidebar.

How to Install Grocy Using Docker 4

Next select “+ Add container”.

How to Install Grocy Using Docker 5

Once you are at the create a container screen, name the container as you see fit.

Then in the “Image” field, type in the following image lscr.io/linuxserver/grocy:latest.

Then click “+ publish a new network port”. Type in the port number that you would like to use to access the container in the host port field. In the container field, type in port 80 as seen below:

How to Install Grocy Using Docker 6
Create a Container

Scroll to the bottom of the page and click on volumes. Click on “+ map additional volume”. When the fields pop up, type in /config in the container field. Then, select the volume that you created earlier in the volumes screen in the dropdown menu as shown below:

How to Install Grocy Using Docker 7
Volumes Tab

Next, click on the “Env” tab and add the following three environmental variables:

How to Install Grocy Using Docker 8
Env Tab

Finally, select the “Restart Policy” tab and select unless stopped. After that, you can click on “Deploy the container”

When the container is running, you will be able to access your Grocy installation by visiting http://<docker_host_IP>:9283. Be sure to replace <docker_host_IP> with the IP address of your docker host machine.

Installation Video

Conclusion

Thats it! Now you can use Grocy to track and maintain your household records. Grocy has a growing community of developers who have created open-source add-ons that you can explore. If you are looking for other applications to install, try installing Monica CRM on Docker.

Be the first to comment

Leave a Reply

Your email address will not be published.


*