Build Your Homelab: 37 – Configuring Plant-it

Homelab 37 - Plant-it Configure

Now that we have Plant-it installed, either as a LXC Container in our Proxmox, or in our Docker environment with the help of Portainer, it is time to get it configured and set up so that we can have access to it’s vast knowledge base of plants. We also need a way to send out notifications, so we will use our self-hosted ntfy instance to send out notifications for the actions we set up in Plant-it. We would also like to access (and thus use) our Plant-it when we are not at home, so we will need to set up a reverse proxy as well.


Step 1: Get a FloraCodex key

The first thing we need to do, is get a FloraCodex key to use in our Plant-it server to access the database of thousands of plants and information. First go to the FloraCodex website to create an account. You are welcome to perus the Pricing section, but in short, FloraCodex is free with very generous usage limits. Their mission is to stay free, but they might introduce a paid tier at a later stage. After all, running a service like FloraCodex does have costs, so if in the future you would like to support them, this can be done via a paid tier API access account.

For our use now, we are just going to click on Get Started to start creating our account. Click on Create an Account to create a new account. Fill in your email address and select a password. Click Sign Up for your account to be created. You will be required to check your email and confirm your account setup before your account will be active. Once active, log in and you will be taken to your dashboard that contains your API Key. This is the key we need to use via Plant-it.


Step 2: Update Plant-it Server Configuration

Depending on whether you installed Plant-it as a separate LXC container in Proxmox or in your Docker environment via Portainer, follow the steps to get to the configuration:

LXC Container

Open your Proxmox in a new browser window and log in. In the left navigation pane, expand Datacenter and then expand the Proxmox node that contains Plant-it. Select the Plant-it LXC container and in the middle navigation pane click on Proxmox Console Button. From the console, we need to navigate to the folder where the config is stored:

cd /opt/plant-it/backend/

Then open the file for editing:

nano server.env

We are ready to add the new values.

Docker via Portainer

Open Portainer in a new window and log in. Select the environment where you installed the Plant-it stack. Select Stacks and then the plant-it stack you created. This will open the Plant-it installation stack where we can update our config. At the top of the page, there is two sections. By default, we are in the Stack view. Select the Editor tab to open the editor. Below the compose file, expand the Environment variables section to see a key-value list of the environment variables. Select the advanced mode to see it as a text file again.


Step 3: Add the new values

If you have followed the install steps in our previous articles, your config file should already have a section for FLORACODEX_KEY. From step 1, add the API Key we created in this value (replace the abc123abc123 with your API Key):

FLORACODEX_KEY=abc123abc123

The second value we want to change is the value that will disable new user accounts to be created. Look for the key called USERS_LIMIT. The default value of -1 means that there is no limit. We are going to limit this to just our user, so change the value:

USERS_LIMIT=1

Thirdly, we want to be able to send notifications via ntfy, so we are going to enable nty by adding a new key just before we get to the Cache section:

NTFY_ENABLED=true

Updated Config in LXC Container – Click to enlarge

Updated Config - Portainer

Updated config in Portainer – Click to enlarge

Now all that is necessary is to save the config and restart Plant-it. For the LXC setup, press Ctrl+S to save, Ctrl+X to close the file. Restart Plant-it with the following command:

systemctl restart plant-it.service

For Portainer, click the Portainer Update This Stack Button button.

Access your Plant-at again as you did in the previous articles. You will now be able to see all the other species of plants being displayed in your search list:

Plant-it Search with FloraCodex

After adding your FloraCodex key, Plant-it has access to the entire catalogue of plants, giving users information on a wide variety of plants.


Conclusion

Plant-it now has access to one of the biggest plant databases in the world. We have updated our configuration in such a way that we can now set up Plant-it for use. In our next article, we will set up ntfy notifications as well as a reverse proxy enabling us to access and use Plant-it when we are not at home. Yes, we can still access it with the use of a VPN setup, or with our Headscale/Tailscale setup from our Build your own homelab series, but if we don’t want to connect to our VPN every time we want to look up a plant’s details, we can just use our nginx proxy to enable connections from the outside web.