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:


  1. Log into cPanel
  2. Locate and check your PHP version - Leantime requires PHP 8.1 or higher (8.2 is recommended)
  3. 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:


  1. In cPanel, navigate to the MySQL Databases section
  2. Create a new database (e.g., "leantime")
  3. Create a database user (e.g., "leantime_user")
  4. Use the password generator to create a secure password
  5. 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:


  1. Open the File Manager in cPanel
  2. Navigate to your root directory
  3. Create a new folder named "leantime"
  4. Upload the Leantime zip file to this folder
  5. Extract the zip file
  6. 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:


  1. Go to the Domains section in cPanel
  2. Create a new subdomain (e.g., "projects.yourdomain.com")
  3. 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:


  1. Navigate to the config folder in your Leantime installation
  2. Find the "sample.env" file and rename it to ".env"
  • If the file disappears after renaming, enable "Show Hidden Files" in File Manager settings
  1. 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)
  1. 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:


  1. Visit your domain/subdomain in a web browser
  2. You should see the Leantime installation page
  3. Create your admin account
  4. Click "Install"
  5. After installation completes, you'll be redirected to the login page
  6. Log in with your admin credentials
  7. 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:


  1. 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


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


  1. 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:



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!