Skip to content

Instantly share code, notes, and snippets.

@facundobianco
Created July 12, 2021 23:55
Show Gist options
  • Save facundobianco/d9518a9d2e86ab98cd9fd982a215ad37 to your computer and use it in GitHub Desktop.
Save facundobianco/d9518a9d2e86ab98cd9fd982a215ad37 to your computer and use it in GitHub Desktop.
Install latest version of grocy.org

Install Grocy 3.0.1 on Debian Buster

Install PHP 7.4

First of all, install/upgrade to PHP 7.4 that is required for Groocy 3.0.1

wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add  -
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/source.list.d/php.list
apt update && apt -y install php7.4

Then, install NGinx

systemctl disable --now apache2
apt install -y nginx php7.4-fpm php7.4-fpm php7.4-cli php7.4-curl php7.4-json php7.4-sqlite php7.4-gd

Download Grocy

mkdir /var/www/html/grocy
wget -O /usr/local/src/grocy.zip https://releases.grocy.info/latest
unzip /usr/local/src/grocy.zip -d /var/www/html/grocy
cp /var/www/html/grocy/config-dist.php /var/www/html/grocy/data/config.php
chown -R www-data:www-data /var/www/html/grocy

Configure NGinx

Add next entry in your file at /etc/nginx/sites-enabled/default

server {
    listen 80 default_server;
    root /var/www/html/grocy/public;
    index index.php;
    location / {
                try_files $uri /index.php;
        }
        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment