Articles on: Open Source & Self Hosting

Install Leantime's Open Source system on a Shared Host via cPanel


Installing Leantime on Shared Hosting: A Complete Guide



Leantime's flexibility is one of its core strengths - you can install it virtually anywhere. In this guide, we'll walk through installing Leantime on shared hosting using cPanel, making this powerful project management tool accessible whether you're using GoDaddy, Hostinger, or any other shared hosting provider.

Prerequisites



Before we begin, make sure you have:
- An active shared hosting account with cPanel access
- A domain or subdomain connected to your hosting
- The latest version of Leantime downloaded
- Basic familiarity with FTP or file managers
- A text editor for saving configuration details

Step 1: Checking PHP Configuration



Before diving into the installation, it's important to verify your PHP environment:

Log into cPanel
Locate and check your PHP version - Leantime requires PHP 8.1 or higher (8.2 is recommended)
Verify that required PHP extensions are enabled (you can find the complete list in Leantime's GitHub repository or documentation)

Step 2: Creating the Database



Leantime needs a database to store your project data. Here's how to set one up:

In cPanel, navigate to the MySQL Databases section
Create a new database (e.g., "leantime")
Create a database user (e.g., "leantime_user")
Use the password generator to create a secure password
Add the user to the database with "ALL PRIVILEGES"

Important: Save your database name, username, and password in a text file - you'll need these later for configuration.

Step 3: File Structure Setup



Setting up the correct file structure is crucial for security:

Open the File Manager in cPanel
Navigate to your root directory
Create a new folder named "leantime"
Upload the Leantime zip file to this folder
Extract the zip file
Delete the zip file after extraction is complete

Notice that Leantime has a "public" directory within the main folder - this separation is intentional and helps protect sensitive configuration files.

Step 4: Domain Configuration



Now we'll point your domain or subdomain to the correct directory:

Go to the Domains section in cPanel
Create a new subdomain (e.g., "projects.yourdomain.com")
Set the document root to "/leantime/public"

This configuration ensures that only the public directory is accessible through the web, keeping your configuration and uploaded files secure.

Step 5: Environment Configuration



Time to set up Leantime's configuration:

Navigate to the config folder in your Leantime installation
Find the "sample.env" file and rename it to ".env"
- If the file disappears after renaming, enable "Show Hidden Files" in File Manager settings
Edit the .env file and update these crucial settings:
- DB_HOST (usually "localhost" for shared hosting)
- DB_USER (your database username)
- DB_PASSWORD (your database password)
- DB_DATABASE (your database name)
Optional: Configure additional settings like:
- Default language
- Time zone (use official timezone formats)

Step 6: Installation Wizard



You're now ready to complete the installation:

Visit your domain/subdomain in a web browser
You should see the Leantime installation page
Create your admin account
Click "Install"
After installation completes, you'll be redirected to the login page
Log in with your admin credentials
Follow the initial setup wizard to create your first project

FYI: You will have to configure SMTP in order to invite your teammates.

Troubleshooting Common Issues



If you encounter problems during installation:

Page Not Loading or Redirect Issues:
- Verify that mod_rewrite is enabled
- Check that your PHP version is 8.1 or higher
- Confirm all required PHP extensions are enabled

Style/Display Problems:
- Check folder permissions (755 is typically correct)
- Verify that the .htaccess file exists in the public directory

For Other Issues:
- Check the storage/logs directory for error logs
- These logs are valuable when seeking help from the Leantime community

Getting Help



The Leantime community is ready to help if you need assistance:

- Visit our documentation at docs.leantime.io
- Join our Discord community for real-time support
- Check our GitHub repository for known issues and solutions

Remember to provide your error logs when seeking help - this significantly speeds up the troubleshooting process.

Next Steps



Once your installation is complete:
- Explore Leantime's features and check out our Plugin marketplace
- Set up your first project
- Set up SMTP and then invite your team members
- Configure your workspace to match your team's workflow

Looking to upgrade your Leantime features? Check out our plugin bundles where you can get all the plugins for one low cost and a year's worth of plugin support.

Updated on: 26/01/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!