### Create Installation Directory Source: https://docs.planka.cloud/docs/installation/docker/production-version Creates the directory where PLANKA will be installed. ```bash mkdir /opt/planka ``` -------------------------------- ### Example .env Configuration Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/windows Provides an example of essential configuration variables for the .env file, including BASE_URL, DATABASE_URL, and SECRET_KEY. ```dotenv ## Required BASE_URL=http://YOUR_DOMAIN_NAME:YOUR_PORT DATABASE_URL=postgresql://planka:YOUR_DATABASE_PASSWORD@localhost/planka SECRET_KEY=YOUR_GENERATED_KEY ## Optional ... ``` -------------------------------- ### Install Dependencies and Build Client Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/windows Installs Node.js dependencies and builds the client-side application. ```bash npm install cd client npm run build ``` -------------------------------- ### Install Dependencies Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual Navigate to the PLANKA directory and install project dependencies using npm. ```bash cd /var/www/planka npm install ``` -------------------------------- ### Install Node.js using NodeSource PPA Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/debian-and-ubuntu Installs Node.js by updating package lists, installing dependencies, adding the NodeSource GPG key, and enabling the Node.js repository. ```bash sudo apt-get update sudo apt-get install -y ca-certificates curl gnupg # Add NodeSource GPG key sudo mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg # Add the Node.js repository NODE_MAJOR=22 echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list # Install Node.js sudo apt-get update sudo apt-get install nodejs -y ``` -------------------------------- ### Start PLANKA with PM2 Source: https://docs.planka.cloud/docs/configuration/run-as-a-service Starts PLANKA as a PM2 process named 'planka'. It also initializes the database and starts the production server. ```bash pm2 start --name "planka" "npm run db:init && npm start --prod" ``` -------------------------------- ### Install Node.js using NodeSource PPA Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Installs Node.js version 22.x by adding the NodeSource repository and then installing the nodejs package. ```bash # Update packages and install dependencies sudo apt-get update sudo apt-get install -y ca-certificates curl gnupg # Add NodeSource GPG key sudo mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg # Add the Node.js repository NODE_MAJOR=22 echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list # Install Node.js sudo apt-get update sudo apt-get install nodejs -y ``` -------------------------------- ### Complete Example Terms Structure Source: https://docs.planka.cloud/docs/configuration/customizing-end-user-terms A full example demonstrating the structure of a custom End User Terms of Service file, including content and confirmation. ```markdown # End User Terms of Service – On-Premise Version **Effective: February 11, 2026 – v1.0** ## 1. Scope and Your Relationship with PLANKA ... [confirmations]:: --- ✔️ **I have read and accept these End User Terms of Service** ``` -------------------------------- ### Start Development Server Source: https://docs.planka.cloud/docs/development/set-up-environment Launch both the frontend and backend development servers simultaneously using this command. ```bash npm start ``` -------------------------------- ### Install Node.js Dependencies Source: https://docs.planka.cloud/docs/development/set-up-environment Navigate into the cloned repository and install the necessary Node.js dependencies for the project. ```bash cd planka npm install ``` -------------------------------- ### Example values.yaml for PLANKA Source: https://docs.planka.cloud/docs/installation/kubernetes/helm-chart A sample values.yaml file for configuring PLANKA installation. It includes settings for the secret key, admin user, and ingress (HTTP/HTTPS). This file simplifies managing configurations and upgrades. ```yaml secretkey: "" # The admin section needs to be present for new instances of PLANKA, after the first start you can remove the lines starting with admin_. If you want the admin user to be unchangeable admin_email: has to stay # After changing the config you have to run ```helm upgrade planka . -f values.yaml``` # Admin user admin_email: "demo@demo.demo" # Do not remove if you want to prevent this user from being edited/deleted admin_password: "demo" admin_name: "Demo Demo" admin_username: "demo" # Admin user ingress: enabled: true hosts: - host: planka.example.dev paths: - path: / pathType: ImplementationSpecific # Needed for HTTPS tls: - secretName: planka-tls # existing TLS secret in k8s hosts: - planka.example.dev ``` -------------------------------- ### Create Installation Directory and Navigate Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/windows Creates the main directory for PLANKA and changes the current directory to it. ```bash mkdir C:\planka cd C:\planka ``` -------------------------------- ### Start PLANKA Server Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/windows Starts the PLANKA server in production mode from the server directory. ```bash npm start --prod ``` -------------------------------- ### Install PostgreSQL Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Installs PostgreSQL and additional utilities required for the database. ```bash sudo apt install postgresql postgresql-contrib -y ``` -------------------------------- ### Start Full Stack Dev Environment with Docker Compose Source: https://docs.planka.cloud/docs/development/set-up-environment Build and start all required services, including client, server, and database, in development mode using Docker Compose. ```bash docker compose -f docker-compose-dev.yml up ``` -------------------------------- ### Initialize Database Source: https://docs.planka.cloud/docs/development/set-up-environment Run this command to initialize the database for the traditional Node.js development setup. ```bash npm run server:db:init ``` -------------------------------- ### Install plankapy Source: https://docs.planka.cloud/docs/api-reference/python Install the plankapy library using pip. ```bash pip install plankapy ``` -------------------------------- ### Navigate to PLANKA Directory Source: https://docs.planka.cloud/docs/configuration/run-as-a-service Changes the current directory to the PLANKA installation path. This is necessary before starting the application. ```bash cd /var/www/planka ``` -------------------------------- ### Start PLANKA with systemd Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual Use this command to start the PLANKA service if you are using systemd. ```bash exit sudo systemctl start planka ``` -------------------------------- ### Example PLANKA Environment Configuration Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Shows an example of how to configure the required environment variables in the .env file for PLANKA. ```dotenv ## Required BASE_URL=http://YOUR_DOMAIN_NAME:YOUR_PORT DATABASE_URL=postgresql://planka:YOUR_DATABASE_PASSWORD@localhost/planka SECRET_KEY=YOUR_GENERATED_KEY ## Optional ... ``` -------------------------------- ### Verify Node.js Installation Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Checks the installed Node.js version. ```bash node -v # Output: v22.x.x ``` -------------------------------- ### Copy Sample Environment File Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/debian-and-ubuntu Copies the sample environment configuration file to be used for the current installation. ```bash cd /var/www/planka/server cp .env.sample .env ``` -------------------------------- ### Copy Environment Sample Source: https://docs.planka.cloud/docs/development/set-up-environment Copy the sample environment file to create your own configuration. This is used for both traditional and Docker setups. ```bash cp server/.env.sample server/.env ``` -------------------------------- ### Download and Run Planka Installer Source: https://docs.planka.cloud/docs/installation/automated/getting-started Use this command to download the Planka installer script and execute it. Ensure your server meets the supported operating system requirements. ```bash wget https://raw.githubusercontent.com/plankanban/planka-installer/main/installer.sh -O /opt/planka_installer.sh && bash /opt/planka_installer.sh ``` -------------------------------- ### Install PLANKA Using values.yaml Source: https://docs.planka.cloud/docs/installation/kubernetes/helm-chart Installs PLANKA using a local values.yaml file. This method is recommended for managing configurations and simplifies the installation command by referencing the external configuration file. ```bash helm install planka planka/planka -f values.yaml ``` -------------------------------- ### Install Node.js Dependencies Source: https://docs.planka.cloud/docs/installation/manual/windows Installs the necessary Node.js packages for PLANKA. ```powershell npm install ``` -------------------------------- ### Start PLANKA in Production Mode Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Starts the PLANKA application using the production configuration. ```bash npm start --prod ``` -------------------------------- ### Basic Planka API Client Usage in PHP Source: https://docs.planka.cloud/docs/api-reference/php This example demonstrates how to initialize the PlankaClient, authenticate with the API, and fetch a list of projects. Ensure you have configured the correct user, password, and base URI for your Planka instance. ```php authenticate(); $result = $planka->project->list(); var_dump($result); ``` -------------------------------- ### Start PLANKA with PM2 Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual Use this command to start the PLANKA service if you are using PM2. ```bash exit pm2 start planka ``` -------------------------------- ### Clean Node Modules and Virtual Environments Source: https://docs.planka.cloud/docs/development/set-up-environment Remove existing Node.js modules and Python virtual environments before starting the Docker-based setup to avoid version conflicts. ```bash rm -rf node_modules client/node_modules server/node_modules server/.venv ``` -------------------------------- ### Create Custom Terms Directory (Manual Installation) Source: https://docs.planka.cloud/docs/configuration/customizing-end-user-terms Use this command to create the directory for custom terms files when performing a manual installation. ```bash mkdir -p /var/www/planka/terms/custom ``` -------------------------------- ### Install PLANKA Prerequisites Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Installs necessary packages for PLANKA, including unzip, build tools, and Python virtual environment support. ```bash sudo apt install unzip build-essential python3-venv -y ``` -------------------------------- ### Install PLANKA with Basic Configuration Source: https://docs.planka.cloud/docs/installation/kubernetes/helm-chart Installs the PLANKA Helm chart with essential configurations, including generating a secret key and setting up the initial admin user. The secret key is crucial for PLANKA's security. ```bash export SECRETKEY=$(openssl rand -hex 64) helm install planka planka/planka --set secretkey=$SECRETKEY \ --set admin_email="demo@demo.demo" \ --set admin_password="demo" \ --set admin_name="Demo Demo" \ --set admin_username="demo" ``` -------------------------------- ### Copy Sample Environment File Source: https://docs.planka.cloud/docs/installation/manual/windows Copies the sample environment configuration file to be used for the current installation. ```powershell cp .env.sample .env ``` -------------------------------- ### Install PLANKA Node.js Dependencies Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Installs the Node.js dependencies required for PLANKA to run. ```bash cd /var/www/planka npm install ``` -------------------------------- ### Create PLANKA Installation Directory and Set Ownership Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Creates the directory for PLANKA and assigns ownership to the 'planka' user. ```bash sudo mkdir -p /var/www/planka/ sudo chown -R planka:planka /var/www/planka/ cd /var/www/planka ``` -------------------------------- ### Example Confirmation Block Source: https://docs.planka.cloud/docs/configuration/customizing-end-user-terms A sample confirmation section that will be rendered as a checkbox for users to accept. ```markdown [confirmations]:: --- ✔️ **I have read and accept these End User Terms of Service** ``` -------------------------------- ### Install Required Packages for Planka Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/debian-and-ubuntu Installs necessary packages like unzip and build-essential, which are required for compiling and managing Planka. ```bash sudo apt install unzip build-essential -y ``` -------------------------------- ### Start PLANKA Service with Environment File Source: https://docs.planka.cloud/docs/installation/automated/how-to-update Starts the PLANKA services using Docker Compose, applying configurations from the specified '.env' file. The '-d' flag runs containers in detached mode. ```bash docker compose --env-file .env up -d ``` -------------------------------- ### Create PLANKA Directory Source: https://docs.planka.cloud/docs/installation/docker/nightly-version Create a dedicated folder for PLANKA installation. ```bash mkdir /opt/planka ``` -------------------------------- ### Install PM2 Globally Source: https://docs.planka.cloud/docs/configuration/run-as-a-service Installs the latest version of PM2 globally using npm. This is the first step to managing Node.js applications. ```bash sudo npm install pm2@latest -g ``` -------------------------------- ### Install planka-php-sdk using Composer Source: https://docs.planka.cloud/docs/api-reference/php Use Composer to install the planka-php-sdk package. This command adds the SDK as a dependency to your PHP project. ```bash composer require decole/planka-php-sdk ``` -------------------------------- ### Run Upgrade Script Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual Execute the database upgrade script before starting PLANKA for the first time after the upgrade. ```bash npm run db:upgrade ``` -------------------------------- ### Start Traefik Service Source: https://docs.planka.cloud/docs/configuration/reverse-proxy/traefik Starts the Traefik service in detached mode using Docker Compose. ```bash docker compose up -d ``` -------------------------------- ### Create and Set Ownership for Planka Directory Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/debian-and-ubuntu Creates the installation directory for Planka and sets the correct ownership to the 'planka' user and group. ```bash sudo mkdir -p /var/www/planka sudo chown -R planka:planka /var/www/planka cd /var/www/planka ``` -------------------------------- ### Configure PM2 to Launch on Boot Source: https://docs.planka.cloud/docs/configuration/run-as-a-service Sets up PM2 to automatically start PLANKA when the system boots up using systemd. Ensure the paths to PM2 and user details are correct. ```bash sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u planka --hp /home/planka ``` -------------------------------- ### Create New PLANKA Directory and Set Ownership Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual Creates the directory for the new PLANKA v2 installation and sets the correct ownership to the `planka` user and group. ```bash sudo mkdir -p /var/www/planka/ sudo chown -R planka:planka /var/www/planka/ cd /var/www/planka ``` -------------------------------- ### Install PLANKA with HTTP Ingress Source: https://docs.planka.cloud/docs/installation/kubernetes/helm-chart Installs PLANKA with ingress enabled for HTTP access. This configuration allows external access to PLANKA using a specified host. Ensure your DNS is configured to point to your ingress controller. ```bash helm install planka planka/planka --set secretkey=$SECRETKEY \ --set admin_email="demo@demo.demo" \ --set admin_password="demo" \ --set admin_name="Demo Demo" \ --set admin_username="demo" \ --set ingress.enabled=true \ --set ingress.hosts[0].host=planka.example.dev ``` -------------------------------- ### Start PLANKA Service Source: https://docs.planka.cloud/docs/installation/docker/how-to-update After updating, restart the PLANKA service in detached mode. ```bash docker compose up -d ``` -------------------------------- ### Run Planka Migration Script Source: https://docs.planka.cloud/docs/installation/automated/getting-started For users who installed Planka before October 11, 2023, this command downloads, runs, and then removes the migration script. This is crucial for updating older installations. ```bash wget https://raw.githubusercontent.com/plankanban/planka-installer/main/migration.sh -O /opt/installer_migration.sh && bash /opt/installer_migration.sh && rm -f /opt/installer_migration.sh ``` -------------------------------- ### Download and Extract PLANKA Prebuilt Version Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Downloads the latest prebuilt PLANKA release and extracts it into the installation directory, then removes the zip file. ```bash curl -fsSL -O https://github.com/plankanban/planka/releases/latest/download/planka-prebuild.zip unzip planka-prebuild.zip -d /var/www/ rm planka-prebuild.zip ``` -------------------------------- ### Complete Crontab Entry with Logging Source: https://docs.planka.cloud/docs/installation/docker/backup-and-restore Example of a crontab file including scheduled backup, old backup deletion, and old log file deletion jobs, all with logging enabled. ```bash ..... # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command 0 2 * * * cd /opt/planka/backup && bash /opt/planka/backup/backup.sh > /opt/planka/backup/logs/`date +%Y%m%d%H%M`-backup.log 2>&1 0 2 * * * find /opt/planka/backup/*.tgz -mtime +14 -delete > /opt/planka/backup/logs/`date +%Y%m%d%H%M`-delete-backup.log 2>&1 0 2 * * * find /opt/planka/backup/logs/*.log -mindepth 1 -mtime +14 -delete > /dev/null 2>&1 ``` -------------------------------- ### Update Package Index Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Refresh your local package index before installing new software. ```bash sudo apt update ``` -------------------------------- ### Run the PLANKA v2 Database Upgrade Script Source: https://docs.planka.cloud/docs/upgrade-to-v2/docker Execute the database upgrade script before starting PLANKA for the first time after the upgrade. This ensures the database schema is compatible with v2. ```bash docker compose run --rm planka npm run db:upgrade ``` -------------------------------- ### Copy Environment Sample and Navigate to Server Directory Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/windows Copies the sample environment file to .env and navigates to the server directory. ```bash cd C:\planka\server cp .env.sample .env ``` -------------------------------- ### Authentik OIDC Configuration Source: https://docs.planka.cloud/docs/configuration/oidc Example configuration for using Authentik as an OIDC provider. Ensure to replace placeholder values with your specific Authentik details. ```env OIDC_ISSUER=https://auth.local/application/o/planka/ OIDC_CLIENT_ID=sxxaAIAxVXlCxTmc1YLHBbQr8NL8MqLI2DUbt42d OIDC_CLIENT_SECRET=om4RTMRVHRszU7bqxB7RZNkHIzA8e4sGYWxeCwIMYQXPwEBWe4SY5a0wwCe9ltB3zrq5f0dnFnp34cEHD7QSMHsKvV9AiV5Z7eqDraMnv0I8IFivmuV5wovAECAYreSI OIDC_SCOPES=openid profile email OIDC_ADMIN_ROLES=planka-admin ``` -------------------------------- ### Basic Caddy Reverse Proxy Configuration Source: https://docs.planka.cloud/docs/configuration/reverse-proxy/caddy Example Caddyfile configuration to set up a reverse proxy for PLANKA. Replace placeholders with your actual email and domain. This configuration enables automatic HTTPS. ```caddy { email your@email.tld } your.domain.tld { reverse_proxy http://localhost:3000 { header_up X-Forwarded-Proto {scheme} } } ``` -------------------------------- ### Execute SQL Updates for Due Date Completion States Source: https://docs.planka.cloud/docs/upgrade-to-v2/docker Start the PostgreSQL container and pipe the generated SQL file into it to apply the due date completion state updates. This command waits for the database to be ready before executing the SQL. ```bash docker compose up -d postgres && cat due_completion_fix.sql | docker compose exec -T postgres bash -c 'until pg_isready -U postgres; do sleep 2; done; psql -U postgres -d planka' ``` -------------------------------- ### Keycloak OIDC Configuration Source: https://docs.planka.cloud/docs/configuration/oidc Adjusted configuration for using Keycloak as an OIDC provider. This example includes settings for admin and project owner roles. ```env OIDC_ISSUER=https://auth.local/realms/{realm-name} OIDC_CLIENT_ID=planka OIDC_CLIENT_SECRET={secretAutoGeneratedByKeycloak} OIDC_ADMIN_ROLES=planka-admin OIDC_PROJECT_OWNER_ROLES=planka-project-owner ``` -------------------------------- ### Copy Configuration and Data Files Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual Copies essential files and directories from the previous PLANKA v1 installation to the new v2 directory to retain configuration and user data. ```bash cp -av /var/www/planka-v1/.env /var/www/planka/ cp -av /var/www/planka-v1/public/user-avatars/. /var/www/planka/public/user-avatars/ cp -av /var/www/planka-v1/public/project-background-images/. /var/www/planka/public/background-images/ cp -av /var/www/planka-v1/private/attachments/. /var/www/planka/private/attachments/ ``` -------------------------------- ### Backup PLANKA Database Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual This command creates a SQL dump of your PLANKA database for backup purposes. Ensure you have PostgreSQL installed and configured. ```bash sudo -u postgres pg_dump planka > planka_backup_$(date +%Y%m%d).sql ``` -------------------------------- ### Add Helm Repository Source: https://docs.planka.cloud/docs/installation/kubernetes/helm-chart Adds the PLANKA Helm repository to your local configuration. This command is necessary before you can search for or install the PLANKA chart. ```bash helm repo add planka http://plankanban.github.io/planka helm search repo planka ``` -------------------------------- ### Copy Environment Sample File Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Copies the sample environment file to create a new environment file for configuration. ```bash cp .env.sample .env ``` -------------------------------- ### Set Up Symbolic Links for Assets and Views Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/windows Creates symbolic links to connect the client's build output to the server's public and views directories for easier updates. ```powershell New-Item -ItemType SymbolicLink -Path "C:\planka\server\public\favicon.ico" -Target "C:\planka\client\dist\favicon.ico" New-Item -ItemType SymbolicLink -Path "C:\planka\server\public\logo192.png" -Target "C:\planka\client\dist\logo192.png" New-Item -ItemType SymbolicLink -Path "C:\planka\server\public\logo512.png" -Target "C:\planka\client\dist\logo512.png" New-Item -ItemType SymbolicLink -Path "C:\planka\server\public\manifest.json" -Target "C:\planka\client\dist\manifest.json" New-Item -ItemType SymbolicLink -Path "C:\planka\server\public\robots.txt" -Target "C:\planka\client\dist\robots.txt" New-Item -ItemType SymbolicLink -Path "C:\planka\server\public\assets" -Target "C:\planka\client\dist\assets" New-Item -ItemType SymbolicLink -Path "C:\planka\server\views\index.html" -Target "C:\planka\client\dist\index.html" ``` -------------------------------- ### Complete Crontab Entry Without Logging Source: https://docs.planka.cloud/docs/installation/docker/backup-and-restore Example of a crontab file including scheduled backup and old backup deletion jobs, both without logging. This configuration is suitable for automated backups where log files are not needed. ```bash ..... # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command 0 2 * * * cd /opt/planka/backup && bash /opt/planka/backup/backup.sh > /dev/null 2>&1 0 2 * * * find /opt/planka/backup/*.tgz -mtime +14 -delete > /dev/null 2>&1 ``` -------------------------------- ### Set Up Symbolic Links for Static Assets Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/debian-and-ubuntu Creates symbolic links from the client's build output to the server's public directory for assets and HTML files. This is an alternative to copying files for easier updates. ```bash ln -s /var/www/planka/client/dist/favicon.ico /var/www/planka/server/public/favicon.ico ln -s /var/www/planka/client/dist/logo192.png /var/www/planka/server/public/logo192.png ln -s /var/www/planka/client/dist/logo512.png /var/www/planka/server/public/logo512.png ln -s /var/www/planka/client/dist/manifest.json /var/www/planka/server/public/manifest.json ln -s /var/www/planka/client/dist/robots.txt /var/www/planka/server/public/robots.txt ln -s /var/www/planka/client/dist/assets /var/www/planka/server/public/assets ln -s /var/www/planka/client/dist/index.html /var/www/planka/server/views/index.html ``` -------------------------------- ### Initialize PLANKA Database Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Runs the database initialization script for PLANKA. ```bash npm run db:init ``` -------------------------------- ### Initialize Database Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/windows Initializes the PostgreSQL database schema for PLANKA. ```bash npm run db:init ``` -------------------------------- ### Re-run Planka Installer for Admin Credentials Source: https://docs.planka.cloud/docs/configuration/admin-user If using the PLANKA Installer, re-run it to modify admin user credentials. Navigate through the configuration options to select 'Admin user'. ```bash bash /opt/planka_installer ``` ```text Configuration → Admin user ``` -------------------------------- ### Enter Backup Directory Source: https://docs.planka.cloud/docs/installation/docker/backup-and-restore Navigate into the directory where PLANKA backups are stored. ```bash cd /opt/planka/backup ``` -------------------------------- ### Install PLANKA with HTTPS Ingress Source: https://docs.planka.cloud/docs/installation/kubernetes/helm-chart Installs PLANKA with ingress enabled for HTTPS access. This requires a pre-existing TLS secret in Kubernetes. Configure your ingress controller to use this secret for secure connections. ```bash helm install planka planka/planka --set secretkey=$SECRETKEY \ --set admin_email="demo@demo.demo" \ --set admin_password="demo" \ --set admin_name="Demo Demo" \ --set admin_username="demo" \ --set ingress.enabled=true \ --set ingress.hosts[0].host=planka.example.dev \ --set ingress.tls[0].secretName=planka-tls \ --set ingress.tls[0].hosts[0]=planka.example.dev ``` -------------------------------- ### Create Log Directory for Backups Source: https://docs.planka.cloud/docs/installation/docker/backup-and-restore Create a directory to store logs generated by the backup process. ```bash mkdir /opt/planka/backup/logs ``` -------------------------------- ### Login with Terms Acceptance Source: https://docs.planka.cloud/docs/api-reference/python Log in while accepting the instance Terms of Service, with options for language and specific terms types. ```python planka.login(username=..., password=..., accept_terms=True) -- With Language -- planka.login(username=..., password=..., accept_terms=True, lang='ja-JP') -- Specific ToS -- planka.login(username=..., password=..., accept_terms=True, terms_type='extended') ``` -------------------------------- ### Clone Planka Repository Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/debian-and-ubuntu Clones the Planka source code from the official GitHub repository into the designated installation directory. ```bash cd /var/www/planka git clone https://github.com/plankanban/planka.git . ``` -------------------------------- ### Initialize Planka Instance Source: https://docs.planka.cloud/docs/api-reference/python Connect to a Planka instance by creating a Planka interface object. ```python from plankapy.v2 import Planka planka = Planka('https://planka.mydomain.com') ``` -------------------------------- ### Run Migration Script Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual Apply any additional database changes by running the migration script. ```bash npm run db:migrate ``` -------------------------------- ### Create Backup Directory Source: https://docs.planka.cloud/docs/installation/docker/backup-and-restore Create a dedicated folder to store your PLANKA backup files. ```bash mkdir /opt/planka/backup ``` -------------------------------- ### Rename PLANKA Directory Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual Renames the current PLANKA v1 directory to `planka-v1` to preserve the old installation before creating the new one. ```bash cd .. sudo mv /var/www/planka /var/www/planka-v1 ``` -------------------------------- ### Download and Extract PLANKA Prebuilt Archive Source: https://docs.planka.cloud/docs/installation/manual/windows Downloads the latest prebuilt PLANKA release, extracts it to the C:\ drive, and removes the downloaded zip file. ```powershell curl -O https://github.com/plankanban/planka/releases/latest/download/planka-prebuild.zip Expand-Archive planka-prebuild.zip -DestinationPath C:\ rm planka-prebuild.zip ``` -------------------------------- ### Create Admin User Script (Local) Source: https://docs.planka.cloud/docs/configuration/admin-user Run this npm script from the PLANKA folder to create an administrator user. ```bash npm run db:create-admin-user ``` -------------------------------- ### Download Docker Compose File Source: https://docs.planka.cloud/docs/installation/docker/nightly-version Download the docker-compose.yml file from the official GitHub repository. ```bash curl -L https://raw.githubusercontent.com/plankanban/planka/master/docker-compose.yml -o /opt/planka/docker-compose.yml ``` -------------------------------- ### Execute Restore Script with Backup File Source: https://docs.planka.cloud/docs/installation/docker/backup-and-restore Run the restore script, providing the specific backup file name to restore from. Ensure you have selected the correct backup file. ```bash bash restore.sh the_name_of_your_backup.tgz ``` -------------------------------- ### Check PLANKA logs with systemd Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual View live logs for PLANKA if you are using systemd. ```bash sudo journalctl -u planka -f ``` -------------------------------- ### Create Traefik Folder Source: https://docs.planka.cloud/docs/configuration/reverse-proxy/traefik Creates the directory for Traefik configuration files. ```bash mkdir -p /opt/traefik && cd /opt/traefik ``` -------------------------------- ### Accessing Card Name via Other Endpoints Source: https://docs.planka.cloud/docs/api-reference/python Shows how to maintain sync with the server by accessing cards through other endpoints, which reconstructs properties from responses. This example uses a lambda function for aliasing. ```python >>> card = lambda: board.cards[0] >>> card().name 'My Card' # Change Name on server to 'Not My Card' >>> card().name 'Not My Card' ``` -------------------------------- ### List Available Backups Source: https://docs.planka.cloud/docs/installation/docker/backup-and-restore List all available backup files with the .tgz extension in the current directory. ```bash ls *.tgz ``` -------------------------------- ### Open Caddyfile Source: https://docs.planka.cloud/docs/configuration/reverse-proxy/caddy Command to open the Caddy configuration file for editing. ```bash sudo nano /etc/caddy/Caddyfile ``` -------------------------------- ### Backup PLANKA Database Source: https://docs.planka.cloud/docs/upgrade-to-v2/docker Executes a database dump of the PLANKA instance to create a SQL backup file. Ensure the instance is running before executing. ```bash docker compose exec postgres pg_dump -U postgres planka > planka_backup_$(date +%Y%m%d).sql ``` -------------------------------- ### Check PLANKA logs with PM2 Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual View live logs for PLANKA if you are using PM2. ```bash pm2 logs planka ``` -------------------------------- ### Set Admin User Environment Variables (.env) Source: https://docs.planka.cloud/docs/configuration/admin-user Configure these environment variables in your .env file to set up an administrator user. Remove them after the first successful startup if desired. ```dotenv DEFAULT_ADMIN_EMAIL=demo@demo.demo DEFAULT_ADMIN_PASSWORD=demo DEFAULT_ADMIN_NAME=Demo Demo DEFAULT_ADMIN_USERNAME=demo ``` -------------------------------- ### Create PostgreSQL Database Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Creates the PLANKA database after navigating to a temporary directory to avoid permission issues. ```bash cd /tmp ``` ```bash sudo -u postgres createdb planka ``` -------------------------------- ### Caching All Card Names in a Loop Source: https://docs.planka.cloud/docs/api-reference/python Demonstrates how to efficiently collect all card names from visible projects into a ModelList using the schema cache to avoid multiple server requests within a loop. ```python >>> all_cards = ModelList() >>> for project in planka.projects: ... for board in project.boards: ... all_cards.extend(board.cards) >>> print(all_cards.extract('name')) ['My Card', ...] ``` -------------------------------- ### Generate SQL for Due Date Completion States Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual Generate an SQL file containing UPDATE statements to restore due date completion states by parsing a v1 SQL backup file. Replace the placeholder path with your actual backup file path. ```bash awk ( BEGIN { in_copy=0 } /^COPY public\.card/ { split($0, a, "\\(|\\)"); split(a[2], cols, ", "); for(i in cols) gsub("\"", "", cols[i]); for(i in cols) col_index[cols[i]]=i; in_copy=1; next } in_copy && $0=="\." ) { in_copy=0; next } in_copy { n=split($0, vals, "\t"); id=vals[col_index["id"]]; val=vals[col_index["is_due_date_completed"]]; if(val=="t") val="TRUE"; else if(val=="f") val="FALSE"; else next; printf "UPDATE card SET is_due_completed = %s WHERE id = \'%s\';\n", val, id } ) /var/www/planka-v1/planka_backup_20260212.sql > due_completion_fix.sql ``` -------------------------------- ### Run PLANKA Backup Script Source: https://docs.planka.cloud/docs/installation/docker/backup-and-restore Execute the backup script to create a compressed archive of your PLANKA data. This includes the database, user avatars, background images, and attachments. ```bash ./docker-backup.sh ``` -------------------------------- ### Download Docker Compose File Source: https://docs.planka.cloud/docs/installation/docker/production-version Downloads the official docker-compose.yml file for PLANKA. ```bash curl -L https://raw.githubusercontent.com/plankanban/planka/master/docker-compose.yml -o /opt/planka/docker-compose.yml ``` -------------------------------- ### Schedule Daily PLANKA Backup with Logging Source: https://docs.planka.cloud/docs/installation/docker/backup-and-restore Configure a cron job to automatically run the PLANKA backup script every night at 2 AM and log the output. This ensures regular backups are taken and their status is recorded. ```bash 0 2 * * * cd /opt/planka/backup && bash /opt/planka/backup/backup.sh > /opt/planka/backup/logs/`date +%Y%m%d%H%M`-backup.log 2>&1 ``` -------------------------------- ### Run v1 Backup Migration Script for Due Date Completion States Source: https://docs.planka.cloud/docs/upgrade-to-v2/docker This script processes a v1 SQL backup file to generate `UPDATE` statements for restoring the `is_due_date_completed` status. Replace `planka_backup_20260212.sql` with your actual backup file path. ```awk awk \ '\ BEGIN { in_copy=0 } \ /^COPY public\.card/ { \ split($0, a, "\\(""|\\)"" "); \ split(a[2], cols, ", "); \ for(i in cols) gsub(""""","",cols[i]); \ for(i in cols) col_index[cols[i]]=i; \ in_copy=1; next \ } \ in_copy && $0=="\\." { in_copy=0; next } \ in_copy { \ n=split($0, vals, "\t"); \ id=vals[col_index["id"]]; \ val=vals[col_index["is_due_date_completed"]]; \ if(val=="t") val="TRUE"; \ else if(val=="f") val="FALSE"; \ else next; \ printf "UPDATE card SET is_due_completed = %s WHERE id = ''%s'';\\n", val, id \ } \ ' planka_backup_20260212.sql > due_completion_fix.sql ``` -------------------------------- ### Download Backup and Restore Scripts Source: https://docs.planka.cloud/docs/installation/docker/backup-and-restore Download the official PLANKA backup and restore shell scripts from the GitHub repository. ```bash curl -L https://raw.githubusercontent.com/plankanban/planka/master/docker-backup.sh -o /opt/planka/backup/backup.sh ``` ```bash curl -L https://raw.githubusercontent.com/plankanban/planka/master/docker-restore.sh -o /opt/planka/backup/restore.sh ``` -------------------------------- ### Clone PLANKA Repository Source: https://docs.planka.cloud/docs/development/set-up-environment Clone the PLANKA repository to your local machine to begin development. ```git git clone https://github.com/plankanban/planka.git ``` -------------------------------- ### Login to PostgreSQL and Set Password Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Logs into the PostgreSQL prompt as the 'planka' user and sets a password for the user. ```bash sudo -u planka psql ``` ```bash ALTER USER planka PASSWORD 'YOUR_DATABASE_PASSWORD'; ``` ```bash \q ``` -------------------------------- ### Copy Data Files to New Unified Volume Source: https://docs.planka.cloud/docs/upgrade-to-v2/docker Prepare the data directories for v2 by copying existing data files to the new unified volume structure. This includes protected and private data. ```bash docker compose run --rm planka sh -c 'mkdir -p /app/data/protected /app/data/private && for folder in user-avatars background-images; do cp -av /app/public/$folder /app/data/protected; done && cp -av /app/private/attachments /app/data/private' ``` -------------------------------- ### Edit .env file Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual Open the .env file for editing using the nano text editor. ```bash nano /var/www/planka/.env ``` -------------------------------- ### Create Admin User Script (Docker) Source: https://docs.planka.cloud/docs/configuration/admin-user Execute this command to create an administrator user when using Docker Compose. ```bash docker compose run --rm planka npm run db:create-admin-user ``` -------------------------------- ### Login to PostgreSQL Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/debian-and-ubuntu Logs into the PostgreSQL prompt as the 'planka' user. This is necessary to set the user's password. ```bash sudo -u planka psql ``` -------------------------------- ### Create Admin User Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/windows Creates the initial administrator user for the PLANKA application. ```bash npm run db:create-admin-user ``` -------------------------------- ### Create PLANKA Backup Source: https://docs.planka.cloud/docs/installation/automated/how-to-update Executes a backup script to ensure data is saved before updating. This script is typically located in the 'cron' directory. ```bash bash cron/backup.sh ``` -------------------------------- ### Backup PLANKA Volumes Source: https://docs.planka.cloud/docs/upgrade-to-v2/docker Creates compressed tar archives for user avatars, attachments, and project background images. Replace placeholder volume names with your actual volume names. ```bash docker run --rm -v $(pwd):/backup -v planka_user-avatars:/data alpine tar -czvf /backup/user-avatars.tar.gz -C /data . ``` ```bash docker run --rm -v $(pwd):/backup -v planka_attachments:/data alpine tar -czvf /backup/attachments.tar.gz -C /data . ``` ```bash docker run --rm -v $(pwd):/backup -v planka_project-background-images:/data alpine tar -czvf /backup/project-background-images.tar.gz -C /data . ``` -------------------------------- ### Edit .env File Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/windows Opens the .env file in the default text editor for configuration. ```bash notepad.exe .env ``` -------------------------------- ### Move Data Files to New Directory Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual Relocate user avatar, background image, and attachment data files to their new unified directory structure. ```bash mkdir -p /var/www/planka/data/protected /var/www/planka/data/private mv /var/www/planka/public/user-avatars /var/www/planka/data/protected mv /var/www/planka/public/background-images /var/www/planka/data/protected mv /var/www/planka/private/attachments /var/www/planka/data/private ``` -------------------------------- ### Create Admin User Source: https://docs.planka.cloud/docs/installation/docker/production-version Runs a PLANKA Docker container to create an administrator user. You will be prompted for email, password, and name. ```bash docker compose run --rm planka npm run db:create-admin-user ``` -------------------------------- ### Execute SQL Updates for Due Date Completion Source: https://docs.planka.cloud/docs/upgrade-to-v2/manual Execute the generated SQL updates to restore due date completion states in the PLANKA database using psql. ```bash cat due_completion_fix.sql | sudo -u postgres psql -d planka ``` -------------------------------- ### Create Unix User for PLANKA Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Creates a dedicated Unix user account named 'planka' for running the PLANKA application. ```bash sudo adduser planka ``` -------------------------------- ### Clone PLANKA Repository Source: https://docs.planka.cloud/docs/installation/manual/nightly_version/windows Clones the PLANKA repository into the current directory. ```bash git clone https://github.com/plankanban/planka.git . ``` -------------------------------- ### Synchronizing Card Name with Schema Cache Source: https://docs.planka.cloud/docs/api-reference/python Demonstrates how to update a card's name using the schema cache and the sync() method. Accessing attributes directly caches values until sync() is called. ```python >>> card = board.cards[{'name': 'My Card'}].dpop() >>> card.name 'My Card' # Change Name on server to 'Not My Card' >>> card.name 'My Card' >>> card.sync() >>> card.name 'Not My Card' ``` -------------------------------- ### Configure logrotate for PLANKA Logs Source: https://docs.planka.cloud/docs/configuration/logging Create a logrotate configuration file to manage PLANKA log size and retention. Replace the placeholder path with your actual log file path. ```logrotate /path/to/planka/logs/planka.log { daily missingok rotate 14 compress delaycompress notifempty create 640 root adm sharedscripts } ``` -------------------------------- ### Create PostgreSQL User Source: https://docs.planka.cloud/docs/installation/manual/debian-and-ubuntu Interactively creates a new PostgreSQL role (user) for PLANKA. ```bash sudo -u postgres createuser --interactive ``` -------------------------------- ### Restart Planka with PM2 Source: https://docs.planka.cloud/docs/configuration/admin-user Restart PLANKA using PM2 after modifying environment variables. ```bash pm2 restart planka ``` -------------------------------- ### Run PLANKA v2 Database Migration Script Source: https://docs.planka.cloud/docs/upgrade-to-v2/docker Apply additional database changes required for v2 by running this migration script. This is part of restoring due date completion states. ```bash docker compose run --rm planka npm run db:migrate ``` -------------------------------- ### Copy Background Images to New Location Source: https://docs.planka.cloud/docs/upgrade-to-v2/docker Migrate existing background images to the new volume location required by v2. This command ensures correct permissions are set for the new location. ```bash docker compose run --rm --user root planka sh -c 'cp -av /app/public/project-background-images/. /app/public/background-images && chown -R node:node /app/public/background-images' ``` -------------------------------- ### Enable Detailed Authentication Errors Source: https://docs.planka.cloud/docs/configuration/security/detailed-authentication-errors Set the SHOW_DETAILED_AUTH_ERRORS environment variable to 'true' to enable more specific authentication error messages. Restart the application for the changes to take effect. ```env SHOW_DETAILED_AUTH_ERRORS=true ``` -------------------------------- ### Traefik Configuration File Source: https://docs.planka.cloud/docs/configuration/reverse-proxy/traefik Defines Traefik's global settings, API, entry points, certificate resolvers, and Docker provider configuration. Ensure to replace 'your@email-com' with your actual email address. ```yaml global: checkNewVersion: true sendAnonymousUsage: false api: dashboard: false # Set insecure to false for production! insecure: false entryPoints: web: address: ":80" http: redirections: entryPoint: to: websecure scheme: https websecure: address: ":443" http: tls: certResolver: default certificatesResolvers: default: acme: email: your@email-com storage: /ssl-certs/acme.json httpChallenge: entryPoint: web providers: docker: exposedByDefault: false ``` -------------------------------- ### Helm Chart Configuration for Custom Terms Source: https://docs.planka.cloud/docs/configuration/customizing-end-user-terms Define custom terms files directly within your values.yaml for deployment using the official Helm chart. ```yaml terms: enabled: true customFiles: en-US.md: | # End User Terms of Service ... [confirmations]:: --- ✔️ **I have read and accept these End User Terms of Service** de-DE.md: | # Nutzungsbedingungen ... [confirmations]:: --- ✔️ **Ich habe diese Nutzungsbedingungen gelesen und akzeptiere sie** ```