diff --git a/_sidebar.md b/_sidebar.md index d15d223..96a68ed 100644 --- a/_sidebar.md +++ b/_sidebar.md @@ -17,7 +17,8 @@ - [Synology NAS](installation/synology.md) - [Kubernetes (Helm)](installation/kubernetes.md) - [Shared hosting (cPanel)](installation/shared-hosting.md) - - [Other](installation/other-methods.md) + - [Portainer, TrueNAS, Unraid](installation/other-methods.md) + - [One-click installs](installation/one-click-installs.md) - [Configuration](installation/configuration.md) - [Email](installation/email-configuration.md) - [Plugin](installation/plugin-installation.md) diff --git a/installation/frequently-asked-questions.md b/installation/frequently-asked-questions.md index 399f968..673956b 100644 --- a/installation/frequently-asked-questions.md +++ b/installation/frequently-asked-questions.md @@ -38,7 +38,7 @@ Leantime officially supports: - Docker Compose installations - Standard PHP installations -**Note:** Cloudron, Elestio, Turnkey, and other external distribution platforms are not officially supported. +**Note:** Cloudron, Elestio, Turnkey, Coolify and other platforms that install Leantime from their own templates are not officially supported: support comes from each platform. See [One-click installs](installation/one-click-installs.md) for what to check after installing from one. ### How do I set the correct file permissions? diff --git a/installation/installation-types.md b/installation/installation-types.md index 2cf7533..1ccea21 100644 --- a/installation/installation-types.md +++ b/installation/installation-types.md @@ -7,4 +7,5 @@ Leantime can be installed in different ways. The following are few options of in - [Docker based installation](installation/docker.md) - [Synology NAS](installation/synology.md) - [Kubernetes (Helm)](installation/kubernetes.md) -- [Other](installation/other-methods.md) +- [Portainer, TrueNAS, Unraid and Raspberry Pi](installation/other-methods.md) +- [One-click installs (Coolify, Dokploy, Easypanel and others)](installation/one-click-installs.md) diff --git a/installation/one-click-installs.md b/installation/one-click-installs.md new file mode 100644 index 0000000..60cc1b8 --- /dev/null +++ b/installation/one-click-installs.md @@ -0,0 +1,57 @@ +# One-click installs + +Some hosting platforms install Leantime for you from a template of their own: Coolify, Dokploy, Easypanel, Hostinger, Railway and others. This page lists what to check after such an install, so your Leantime is safe, keeps its data and stays up to date. + +> **Warning:** Leantime doesn't maintain these templates and doesn't support them. Support comes from each platform. We can't guarantee that a template installs the latest Leantime version, or that every feature works on it. For Leantime that we run and support for you, see [Leantime Cloud](https://leantime.io/pricing/). + +All the templates on this page use the official [`leantime/leantime`](https://hub.docker.com/r/leantime/leantime) Docker image, so the settings are the same as in [Install Leantime with Docker](installation/docker.md). Where the platform shows the template's settings (often called environment variables), you can change them. + +## What should I check after a one-click install? + +1. **The Leantime version.** Open the help menu (the question mark icon at the top right). The version is under **System**, for example **Leantime V3.16.0**. Compare it with the [latest release](https://github.com/Leantime/leantime/releases). If it's older, change the image tag in the platform, for example to `leantime/leantime:3.16.0`, and redeploy. Then open Leantime and click **Update Now!** if it asks (see [Upgrade Leantime](installation/upgrade-guide.md)). A template set to `latest` updates whenever the platform pulls the image again, so set a version number to update when you choose. +2. **The secret key, `LEAN_SESSION_PASSWORD`.** It has to be a long random value of your own. If the template doesn't set it, or sets the value from Leantime's sample file, set your own (make one with `openssl rand -base64 32`). Set it before your team starts: changing it later changes everyone's calendar (iCal) links. +3. **How long sign-ins last, `LEAN_SESSION_EXPIRATION`.** It's in minutes. 480 keeps people signed in for 8 hours without activity. Some templates set 28800, which is 20 days. +4. **The address, `LEAN_APP_URL`.** It has to be the `https://` address people open, so links in emails work. With HTTPS, also set `LEAN_SESSION_SECURE = true`. +5. **Volumes for your files.** Leantime keeps uploaded files in `/var/www/html/userfiles` and `/var/www/html/public/userfiles`, and plugins in `/var/www/html/app/Plugins`. Each needs a volume, or the files are gone when the platform redeploys the container. The database needs one too. +6. **Email.** Templates don't set up email, so Leantime can't send invitations, password resets or notifications. Add your mail server's settings (see [Email configuration](installation/email-configuration.md)). +7. **Backups.** Check what the platform backs up. You need the database, the file volumes, and your settings with the secret key (see [Backup and restore](installation/backup-restore.md)). + +Leantime's scheduled jobs, like sending notification emails, run inside the official image, so there's nothing to set up for them. + +## What do I change on Coolify? + +Coolify has Leantime in its services list. Its template sets up Leantime with MySQL and Redis, volumes for files and plugins, and its own secret key. Change two things: + +- **The version:** the template installs a fixed Leantime version, which can be older than the latest release. Change the image tag of the Leantime service. +- **`SESSION_EXPIRATION`:** set it to `480`. The template's default, 28800, keeps people signed in for 20 days. + +## What do I change on Dokploy? + +Dokploy's Leantime template sets up Leantime with MariaDB, volumes for uploaded files, and its own secret key. Change three things: + +- **The version:** the template uses `latest`. Set a version number, like `leantime/leantime:3.16.0`, so updates only happen when you choose. +- **`LEAN_APP_URL`:** the template sets an `http://` address. Change it to `https://` once your domain has a certificate. +- **A volume for plugins:** add one for `/var/www/html/app/Plugins`, or plugins you install are gone after a redeploy. + +## What do I change on Easypanel? + +Easypanel's Leantime template sets up Leantime with MySQL, but not the secret key or any volumes for files. Change three things: + +- **The image:** when you create the app, Easypanel asks for the image. Enter the latest version, like `leantime/leantime:3.16.0`. +- **`LEAN_SESSION_PASSWORD`:** add it to the environment, with your own long random value. +- **Volumes:** add mounts for `/var/www/html/userfiles`, `/var/www/html/public/userfiles` and `/var/www/html/app/Plugins`. Without them, uploaded files and plugins are gone after a redeploy. + +## What about Hostinger, Railway and other platforms? + +Hostinger offers Leantime on its VPS plans, and Railway has several Leantime templates made by its community. Their templates can change, so go through [What should I check after a one-click install?](#what-should-i-check-after-a-one-click-install) after you install, and ask the platform's support if a setting isn't there. + +## Where do I get help? + +For the template, the platform's own settings and its servers, ask the platform's support. For Leantime itself, see [Common issues](installation/common-issues.md) and [Docker troubleshooting](installation/docker-troubleshooting.md), or ask in the [community chat](https://discord.gg/4zMzJtAq9z). Say which platform you installed from. + +## Related + +- [Install Leantime with Docker](installation/docker.md) +- [Other ways to install Leantime](installation/other-methods.md) +- [Upgrade Leantime](installation/upgrade-guide.md) +- [Backup and restore](installation/backup-restore.md) diff --git a/installation/other-methods.md b/installation/other-methods.md index 4476eb7..3e53dc3 100644 --- a/installation/other-methods.md +++ b/installation/other-methods.md @@ -1,17 +1,134 @@ -## Shared hosting (cPanel) +# Other ways to install Leantime -To install Leantime on a shared hosting plan with cPanel, see [Shared hosting (cPanel)](installation/shared-hosting.md). +Leantime runs anywhere Docker runs. This page covers Portainer, TrueNAS, Unraid and a Raspberry Pi, plus installs in a subfolder or on shared hosting. All of them use the official [`leantime/leantime`](https://hub.docker.com/r/leantime/leantime) image, or the release package for shared hosting. -## Subfolder installation +For a Synology NAS, see [Synology NAS](installation/synology.md). For Kubernetes, see [Install Leantime on Kubernetes](installation/kubernetes.md). For platforms that install Leantime from their own template, like Coolify, see [One-click installs](installation/one-click-installs.md). -To run Leantime in a subfolder (for example `yourcompany.com/leantime`), see [Subfolder Installation](installation/subfolder.md). +## Which Compose file do I use? -## Getting Leantime onto a Raspberry Pi +Portainer and TrueNAS both take a Docker Compose file that you paste in. Use this one, and replace each value in angle brackets: -The official [`leantime/leantime`](https://hub.docker.com/r/leantime/leantime) image runs on ARM (arm64 and 32-bit arm), so a Raspberry Pi uses the normal [Docker based installation](installation/docker.md). You don't need to build the image yourself. +```yaml +services: + leantime_db: + image: mysql:8.4 + restart: unless-stopped + environment: + MYSQL_ROOT_PASSWORD: "" + MYSQL_DATABASE: "leantime" + MYSQL_USER: "leantime" + MYSQL_PASSWORD: "" + command: --character-set-server=UTF8MB4 --collation-server=UTF8MB4_unicode_ci + volumes: + - db_data:/var/lib/mysql + healthcheck: + test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "--silent"] + interval: 10s + timeout: 10s + retries: 10 + start_period: 300s + + leantime: + image: leantime/leantime:3.16.0 + restart: unless-stopped + ports: + - "8080:8080" + environment: + LEAN_APP_URL: "http://:8080" + LEAN_DB_HOST: "leantime_db" + LEAN_DB_USER: "leantime" + LEAN_DB_PASSWORD: "" + LEAN_DB_DATABASE: "leantime" + LEAN_SESSION_PASSWORD: "" + LEAN_SESSION_EXPIRATION: "480" + LEAN_DEFAULT_TIMEZONE: "America/New_York" + volumes: + - userfiles:/var/www/html/userfiles + - public_userfiles:/var/www/html/public/userfiles + - plugins:/var/www/html/app/Plugins + - logs:/var/www/html/storage/logs + depends_on: + leantime_db: + condition: service_healthy + +volumes: + db_data: + userfiles: + public_userfiles: + plugins: + logs: +``` + +- **``** appears twice. Use the same password in both places. +- **``** is Leantime's secret key. Make one with `openssl rand -base64 32`, or any password generator, at least 32 characters long. +- **``** is the address you open Leantime at, like `192.168.1.20`. Once you put Leantime behind HTTPS, change `LEAN_APP_URL` to the `https://` address (see [Run Leantime behind a reverse proxy](installation/reverse-proxy.md)). +- **`3.16.0`** is the Leantime version. Check the [releases](https://github.com/Leantime/leantime/releases) for the newest one. +- **`America/New_York`** is the default time zone, as a [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). +- **Port 8080 already in use?** Change the first number, for example `"8090:8080"`, and use that port in `LEAN_APP_URL`. + +Once Leantime is running, open `http://:8080`. Enter your email address, name and company name and click **Install**, then set your password and click through the welcome steps. + +## How do I install Leantime with Portainer? + +1. In Portainer, open your environment and go to **Stacks** → **Add stack**. +2. Name the stack `leantime`, choose **Web editor**, and paste the [Compose file](#which-compose-file-do-i-use) with your values. +3. Click **Deploy the stack**. The first start takes a few minutes while the database sets itself up. +4. Open Leantime and run the installer. + +**To update:** open the stack, click **Editor**, change the version in `leantime/leantime:3.16.0`, and click **Update the stack**. Your data stays in the stack's volumes. Then open Leantime and click **Update Now!** if it asks (see [Upgrade Leantime](installation/upgrade-guide.md)). + +## How do I install Leantime on TrueNAS? + +TrueNAS 24.10 and later run apps with Docker. Leantime isn't in the TrueNAS app catalog, so you install it as a custom app from the Compose file: + +1. Go to **Apps** → **Discover Apps**. +2. Click the ⋮ menu next to **Custom App**, then **Install via YAML**. +3. Name the app `leantime`, and paste the [Compose file](#which-compose-file-do-i-use) with your values into **Custom Config**. +4. Click **Save**. When the app shows **Running**, open Leantime and run the installer. + +The volumes in the Compose file live in TrueNAS's apps dataset. To keep the files on a dataset of your own instead, replace each volume with a path, like `/mnt/tank/leantime/userfiles:/var/www/html/userfiles`, and let user 1000 write to those folders (see [File permissions on volumes](installation/docker-troubleshooting.md)). + +**To update:** edit the app, change the version in the Compose file, and save. + +## How do I install Leantime on Unraid? + +Unraid's **Apps** tab (Community Applications) has a Leantime template. A community member maintains it, not Leantime. It uses the official image, but needs a database you install separately. + +1. **Install MariaDB** from the **Apps** tab, and create a database and a user for Leantime in it. +2. **Install Leantime:** search the **Apps** tab for `leantime` and open the template. +3. **Change these values** before you click **Apply**: + + | Setting | What to put there | + | --- | --- | + | `LEAN_DB_HOST`, `LEAN_DB_USER`, `LEAN_DB_PASSWORD`, `LEAN_DB_DATABASE` | Your MariaDB server's address, and the user, password and database you created | + | `LEAN_APP_URL` | The address you open Leantime at, like `http://192.168.1.20:8080` | + | `LEAN_SESSION_PASSWORD` | Your own long random value. The template's default is a public sample value. | + | `LEAN_TRUSTED_PROXIES` | Clear it. The template's default trusts every visitor, so anyone could fake their address and get around the sign-in limits. Empty, Leantime trusts proxies on your own network. | + | `LEAN_DEFAULT_TIMEZONE` | Your time zone | + +4. Open Leantime and run the installer. + +If uploads fail, the folders under `appdata` probably belong to root. Leantime's image runs as user 1000, so give it those folders, for example `chown -R 1000:0 /mnt/user/appdata/leantime` (see [Docker troubleshooting](installation/docker-troubleshooting.md)). + +## Can I run Leantime on a Raspberry Pi? + +Yes. The official image runs on ARM (arm64 and 32-bit arm), so a Raspberry Pi uses the normal [Docker based installation](installation/docker.md). You don't need to build the image yourself. - **Use a 64-bit OS** (Raspberry Pi OS 64-bit or Ubuntu Server for arm64) if you can. The official `mysql:8.4` and `mariadb` images are available for arm64 but not for 32-bit arm. - **On a 32-bit OS**, install MariaDB 10.6 or later on the Pi itself (`sudo apt install mariadb-server`) and point Leantime at it. Create the database user for `'%'` (or the container's IP) rather than `'localhost'`, and remove `bind-address = 127.0.0.1` from the MariaDB config (usually `/etc/mysql/mariadb.conf.d/50-server.cnf`) so the container can connect, then restart MariaDB: `sudo systemctl restart mariadb`. Then set `LEAN_DB_HOST` to the Pi's IP address, or add `--add-host=host.docker.internal:host-gateway` and use `host.docker.internal`. Thanks to @lamping7 for the original Raspberry Pi guide. +## Can I run Leantime in a subfolder? + +Yes, for example at `yourcompany.com/leantime`. See [Subfolder Installation](installation/subfolder.md). + +## Can I install Leantime on shared hosting? + +Yes, on a plan with cPanel, PHP 8.2 and cron jobs. See [Shared hosting (cPanel)](installation/shared-hosting.md). + +## What should I do after installing? + +- Put Leantime behind HTTPS before your team uses it (see [Run Leantime behind a reverse proxy](installation/reverse-proxy.md)). +- Set up [email](installation/email-configuration.md), so invitations and notifications go out. +- Plan your [backups](installation/backup-restore.md).