How to Install Teedy on Ubuntu Server

Teedy is a self-hosted document management system that allows you to store, manage and organize your documents, notes, and tasks. In this tutorial, we will learn how to install Teedy on an Ubuntu server.

Prerequisites

Before starting, you need to make sure that you have the following software and components installed on your server:

Step 1: Install Nginx Web Server

To install Nginx web server, run the following command:

sudo apt update
sudo apt install nginx

Once the installation is finished, start the Nginx service and enable it to start on boot:

sudo systemctl start nginx
sudo systemctl enable nginx

Step 2: Install MariaDB

Teedy requires a database to store its data. We will use MariaDB, a fork of MySQL, for this purpose. To install MariaDB, run the following commands:

sudo apt install mariadb-server
sudo systemctl start mariadb
sudo systemctl enable mariadb

Once the installation is finished, run the following command to secure your MariaDB installation:

sudo mysql_secure_installation

Step 3: Create a Database and User

After securing your installation, log in to the MariaDB shell as the root user:

sudo mysql -u root -p

Create a new database for Teedy:

CREATE DATABASE teedydb;

Create a new user and grant all privileges on the teedydb database:

CREATE USER 'teedyuser'@'localhost' IDENTIFIED BY 'your_password_here';
GRANT ALL PRIVILEGES ON teedydb.* TO 'teedyuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 4: Install PHP and Dependencies

Teedy requires PHP 7.4 and some PHP extensions to run properly. To install PHP and its dependencies, run the following command:

sudo apt install php7.4 php7.4-fpm php7.4-mysql php7.4-curl php7.4-xml php7.4-mbstring php7.4-gd

After the installation is finished, restart the PHP-FPM service:

sudo systemctl restart php7.4-fpm

Step 5: Install Composer

Teedy uses the Composer dependency manager to install its packages. To install Composer, run the following commands:

sudo apt install curl php-cli php-mbstring git unzip
cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer

Verify the installation by running the following command:

composer --version

Step 6: Install Teedy

To install Teedy, first, clone its repository:

cd /var/www
sudo git clone https://github.com/sismics/docs-management.git teedy

Change the owner of the /var/www/teedy directory to the Nginx user and group:

sudo chown -R www-data:www-data /var/www/teedy

Then, install the Teedy packages:

cd /var/www/teedy
sudo composer install --no-dev

Step 7: Configure Nginx

To configure Nginx to serve the Teedy site, create a new Nginx configuration file for Teedy:

sudo nano /etc/nginx/sites-available/teedy

Add the following content:

server {
    listen 80;
    server_name your_domain;
    access_log /var/log/nginx/teedy.access.log;
    error_log /var/log/nginx/teedy.error.log;

    root /var/www/teedy/public;

    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.4-fpm.sock;
    }

    location ~ /\.(?!well-known).* {
        deny all;
    }
}

Change the your_domain value to your domain name or IP address.

Save and close the file, then enable the new configuration:

sudo ln -s /etc/nginx/sites-available/teedy /etc/nginx/sites-enabled/

Test the Nginx configuration:

sudo nginx -t

If there are no errors, restart the Nginx service:

sudo systemctl restart nginx

Step 8: Set Up Teedy

Now that Teedy is installed and the web server is configured, we need to complete the installation by accessing it from a web browser.

Open your web browser and go to http://your_domain (or http://your_server_IP if you don't have a domain name). Follow the Teedy installation wizard to create an admin user and select the MariaDB database we created earlier.

You should now have Teedy installed and ready to use.

Conclusion

We have learned how to install Teedy on an Ubuntu server. You can now use this self-hosted document management system to store, organize, and manage your documents, notes, and tasks.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!