How to Set Up and Use the Plant-it Gardening Companion App

Jul 11, 2023 | Programming

Welcome to this guide on Plant-it, a self-hosted gardening companion app that assists users in tracking plant care activities. Here, you’ll learn how to install, configure, and make the most of Plant-it in your gardening journey.

Why Choose Plant-it?

Plant-it serves as your reliable gardening assistant. It focuses on logging your activities rather than dictating what to do, making it a personal tool tailored to your gardening needs. You’ll never forget when you last watered or fertilized your plants, and you’ll have a complete repository of photos documenting your gardening journey.

Key Features of Plant-it

  • Add existing plants or user-created plants to your collection.
  • Log events like watering, fertilizing, and biostimulating.
  • View all logged events, filtering by plant and event type.
  • Upload photos of your plants.
  • Set reminders for actions required for your plants, such as watering notifications every four days.

However, please note that the Trefle service is currently out of operation. As a response, a temporary solution has integrated the FloraCodex dataset.

Quickstart: Installing Plant-it

Installing Plant-it is a straightforward process. Follow the steps below to get started:

Step 1: Create Installation Folder

First, create a folder dedicated to your Plant-it files.

Step 2: Set Up Configuration Files

Inside your new folder, create a file named docker-compose.yml and paste the following content:

version: '3.8'
services:
  server:
    image: msdeluise/plant-it-server:latest
    env_file: server.env
    depends_on:
      - db
      - cache
    restart: unless-stopped
    volumes:
      - .upload-dir:upload-dir
      - .certs:certificates
    ports:
      - 8080:8080
      - 3000:3000

  db:
    image: mysql:8.0
    restart: always
    env_file: server.env
    volumes:
      - .db:/var/lib/mysql

  cache:
    image: redis:7.2.1
    restart: always

This setup resembles a recipe—each section corresponds to an ingredient that makes Plant-it run smoothly. The server, db, and cache services are like the key components of a well-cooked dish. If any one ingredient is missing, the end result may be unsatisfactory.

Step 3: Create Environment Variables

Next, create a file named server.env with the following content:

# DB
MYSQL_HOST=db
MYSQL_PORT=3306
MYSQL_USERNAME=root
MYSQL_PSW=root
MYSQL_DATABASE=bootdb
MYSQL_ROOT_PASSWORD=root

# JWT
JWT_SECRET=putTheSecretHere
JWT_EXP=1

# Server config
USERS_LIMIT=-1
UPLOAD_DIR=upload-dir
API_PORT=8080
FLORACODEX_KEY=
LOG_LEVEL=DEBUG
ALLOWED_ORIGINS=*

# Cache
CACHE_TTL=86400
CACHE_HOST=cache
CACHE_PORT=6379

Much like setting your kitchen temperature and time for baking a cake, these parameters ensure that Plant-it operates optimally and securely.

Step 4: Deploy the Application

Run the command below to start the Plant-it service:

docker compose -f docker-compose.yml up -d

Your service will now be available at localhost:3000, while the REST API can be accessed at localhost:8080/api—documented comprehensively at the documentation page.

Using the Plant-it Web App

To access the Plant-it service, navigate to http://server_ip:3000 in your web browser. Android users can also download the app as an APK from the GitHub releases page or from F-Droid.

Troubleshooting Common Issues

In case you encounter any issues during installation or usage, here are a few troubleshooting tips:

  • Make sure Docker is correctly installed and running.
  • Confirm that you have the right permissions for the folders and files created.
  • If the service doesn’t start, check the logs using docker compose logs for potential errors.
  • Ensure all your environment variables in server.env are correctly set.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Continue Your Gardening Journey with Plant-it

Plant-it puts you in charge of your gardening activities, allowing you to customize your experience. From logging watering schedules to keeping track of photos, you’re empowered to take care of your green friends efficiently.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox