Install Grocy Inside Docker Container in Linux

Install Grocy Inside Docker Container in Linux

Grocy is a web-based management application for purchases, shopping list, household devices, and more. Grocy is an open-source project released under the MIT license.

This tutorial explains how to install Grocy inside a Docker container in the Linux. Commands have been tested on Ubuntu.

Prepare environment

Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.

Install Grocy

  • Host network

Run the following command to create a container for Grocy that uses host network:

docker run -d --name=grocy --restart=always --network=host \
    -v /opt/grocy/config:/config \
    linuxserver/grocy
  • User-defined bridge network

User-defined bridge network can be used for listening on different port. By default, Grocy service is listening on port 80. It can be changed with -p option.

docker network create app-net
docker run -d --name=grocy --restart=always --network=app-net \
    -p 8080:80 \
    -v /opt/grocy/config:/config \
    linuxserver/grocy

Testing Grocy

Open a web browser and go to http://<IP_ADDRESS>, where <IP_ADDRESS> is the IP address of the system. Log in to the dashboard with the default username (admin) and password (admin).

Grocy Inside Docker Container in Linux

Uninstall Grocy

To completely remove Grocy, remove its container:

docker rm --force grocy

Remove Grocy image:

docker rmi linuxserver/grocy

You can also remove Grocy data:

sudo rm -rf /opt/grocy

If a user-defined bridge network was created, you can delete it as follows:

docker network rm app-net

Leave a Comment

Cancel reply

Your email address will not be published.