Grow Tracker of Everything Non-Trivial
Recommended setup using auto-updating: https://www.portent.com/blog/design-dev/github-auto-deploy-setup-guide.htm
Configuration in tpl/config.php, tpl/sql.php and tpl/auth.php , rename auth-example.php and sql-example.php for examples You'll also want to create "uploads", "qrcodes" and "backups" directories
These instructions have been based around a DigitalOcean VPS, but should work similarly with Vultr, SiteHost etc
Start by creating a new VPS by choosing Create -> Droplet:
Choose your location closest to you, select Ubuntu 24.04 LTS to install, and then select the cheapest / most cost-effective option there is:
Enter your desired password (or select your SSH key), and click on "Create Droplet". You can optionally enable backups if you wish, though there is a backup function inside of GrowTENT
After a brief wait while it is created, you can choose "More -> Access Console", or alternatively log in through SSH if you are familiar with the process.
Now jot down the IPv4 address for eth0 that is provided. This will need to be setup by your domain / website provider as an A-record similar to growtent.yourdomain.co.nz
We first want to install nginx, php and mariadb-server as prerequisites, you can do this by copy and pasting:
apt-get install nginx mariadb-server php-fpm php-mysql
Next we want to enable SSL for secure access, which will be done with:
snap install --classic certbot && ln -s /snap/bin/certbot /usr/bin/certbot
If you have provided your IP address to your domain / website registrar (and they have setup the A-record DNS entry for you), then you should be ready to obtain the SSL certificate with:
certbot --nginx
Follow the prompts and enter the domain that has been setup for you when requested, such as growtent.yourdomain.co.nz
Next we will enable php from nginx. Start with:
nano -w +44 /etc/nginx/sites-enabled/default
Add "index.php" to the end of the line as instructed:
Next modify the php settings by removing the applicable hashes as shown, and changing the fastcgi_pass path too:
You will also need to scroll further down and repeat this under the SSL / Port 443 section.
Ctrl + X, Y, to save and quit. Test that the syntax is OK with:
nginx -t
If successful run:
systemctl reload nginx
We now need to make a database for it to use. Start with:
mariadb
Then run:
CREATE DATABASE growTENT;
Next, you'll need to modify this when you copy / paste it to have your own growtent user and password. We suggest choosing a strong password, as this is only ever used once during the setup process and so you won't need to memorize it:
CREATE USER 'growtent'@'%' IDENTIFIED BY 'P@ssw0rd';
Replacing the "P@ssw0rd" part specifically. If you need a password suggestion, use The Bitmill Random Password Generator
Then provide access to your newly created "growtent" user to the database:
GRANT ALL PRIVILEGES ON *.* TO 'growtent'@localhost IDENTIFIED BY 'P@ssw0rd';
Again changing the password to whatever you previously set it to. Then to exit, run:
\q
Next we need to set up GrowTENT configuration and connect it to the database we just made.
We'll start by removing the demo files from nginx that we no longer need:
rm -rf /var/www/html/*
And then copy the GrowTENT code:
git clone https://github.com/Chill-Division/growTENT.git /var/www/html/
Run the following command to copy all of the example configuration files:
cd /var/www/html/tpl/ && cp config-example.php config.php && cp auth-example.php auth.php && cp sql-example.php sql.php
Edit the SQL configuration with:
nano -w sql.php
Changing the username / password / server details as follows:
Setting your password as you did previously.
Next we'll import the database structure with:
mariadb growtent < /var/www/html/structure.sql
Next we'll setup the main configuration:
nano -w config.php
Change the domainURL and installdir as follows:
And change your Escorting Staff names too if you'll be using this to track guest access.
Lastly, the authentication is very basic, edit your auth.php file and set some valid passwords:
nano -w auth.php
You should now be ready to visit growtent.yourdomain.co.nz/admin.php and be ready to log in.