### Create Installation Directory and Navigate Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/nightly_version/windows.md Use PowerShell to create the installation directory and change into it. ```powershell mkdir C:\planka cd C:\planka ``` -------------------------------- ### Install Node.js Dependencies Source: https://github.com/plankanban/planka-docs/blob/main/docs/development/set-up-environment.md Navigate to the project directory and install all necessary Node.js packages for the traditional development setup. ```bash cd planka npm install ``` -------------------------------- ### Manual Installation of PLANKA on Debian/Ubuntu Source: https://context7.com/plankanban/planka-docs/llms.txt Installs PLANKA directly on a Linux host. Requires Node.js 22 and PostgreSQL. Steps include setting up the database, installing Node.js, downloading PLANKA, configuring environment variables, initializing the database, creating an admin user, and starting the application. ```bash # 1. Install PostgreSQL sudo apt update sudo apt install postgresql postgresql-contrib -y # 2. Create PostgreSQL user and database sudo -u postgres createuser --interactive # Enter name: planka # Superuser: y cd /tmp && sudo -u postgres createdb planka # 3. Create system user and set DB password sudo adduser planka sudo -u planka psql -c "ALTER USER planka PASSWORD 'your_db_password';" # 4. Install Node.js 22 NODE_MAJOR=22 curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \ | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg 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 sudo apt-get update && sudo apt-get install nodejs -y # 5. Download and install PLANKA sudo apt install unzip build-essential python3-venv -y sudo mkdir -p /var/www/planka && sudo chown -R planka:planka /var/www/planka sudo -i -u planka bash -c " 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 cd /var/www/planka && npm install " # 6. Configure environment cp /var/www/planka/.env.sample /var/www/planka/.env # Edit .env with required values: cat > /var/www/planka/.env < # BASE_URL=https://planka.yourdomain.com # Create initial admin user (interactive prompt) docker compose run --rm planka npm run db:create-admin-user # Email: admin@example.com # Password: securepassword # Name: Admin User # Username (optional): admin # Start all services in the background docker compose up -d # Access PLANKA at BASE_URL and log in with the admin credentials above ``` -------------------------------- ### Install PostgreSQL Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/debian-and-ubuntu.md Installs PostgreSQL and its contribution utilities. Press ENTER if prompted to restart services. ```bash sudo apt install postgresql postgresql-contrib -y ``` -------------------------------- ### Start Development Server with npm Source: https://github.com/plankanban/planka-docs/blob/main/README.md Starts the development server for local testing and development. This command is typically used during the development phase. ```bash npm start ``` -------------------------------- ### Start PLANKA Server Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/nightly_version/windows.md Start the PLANKA server in production mode from the server directory. ```powershell npm start --prod ``` -------------------------------- ### Run PLANKA as a Linux Service with PM2 Source: https://context7.com/plankanban/planka-docs/llms.txt Install PM2 globally and configure PLANKA to run persistently, starting automatically on system boot. Save the process list to ensure persistence after reboots. ```bash # Install PM2 globally sudo npm install pm2@latest -g # Start PLANKA under PM2 cd /var/www/planka pm2 start --name "planka" "npm run db:init && npm start --prod" # Configure PM2 to start on system boot sudo env PATH=$PATH:/usr/bin \ /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u planka --hp /home/planka # Save the current process list so it persists after reboot pm2 save # Useful PM2 commands: pm2 status # Check running processes pm2 logs planka # View logs pm2 restart planka # Restart after config changes pm2 stop planka # Stop the service ``` -------------------------------- ### Initialize Database Source: https://github.com/plankanban/planka-docs/blob/main/docs/development/set-up-environment.md Run this command to set up the database schema and initial data for the traditional development setup. ```bash npm run server:db:init ``` -------------------------------- ### Install Planka with Basic Configuration Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/kubernetes/helm-chart.md Install the Planka Helm chart, generating a secret key and setting initial admin user details. ```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" ``` -------------------------------- ### PHP SDK Example Source: https://context7.com/plankanban/planka-docs/llms.txt Demonstrates how to configure and use the PHP SDK to authenticate and list projects. ```APIDOC ## PHP API Client (planka-php-sdk) Use the PHP SDK to access PLANKA's REST API from PHP applications. ```bash composer require decole/planka-php-sdk ``` ```php authenticate(); // List all visible projects $projects = $planka->project->list(); var_dump($projects); // The SDK uses the authenticated user's permissions — // only projects/boards the user has access to will be returned. // See all available endpoints at: // https://github.com/plankanban/planka/blob/master/server/config/routes.js ``` ``` -------------------------------- ### Install Dependencies with npm Source: https://github.com/plankanban/planka-docs/blob/main/README.md Installs all necessary project dependencies. Run this command in the project's root directory. ```bash npm install ``` -------------------------------- ### Install Node.js Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/debian-and-ubuntu.md Installs Node.js from the NodeSource repository. ```bash sudo apt-get update ``` ```bash sudo apt-get install nodejs -y ``` -------------------------------- ### Start PLANKA with PM2 Source: https://github.com/plankanban/planka-docs/blob/main/docs/configuration/run-as-a-service.md Starts PLANKA as a PM2 process named 'planka'. It also initializes the database and starts the application in production mode. ```bash pm2 start --name "planka" "npm run db:init && npm start --prod" ``` -------------------------------- ### Planka values.yaml Configuration Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/kubernetes/helm-chart.md Example values.yaml file for configuring Planka installation, including secret key, admin user, and Ingress settings for HTTP/HTTPS. ```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 ``` -------------------------------- ### Start Full Stack Docker Environment Source: https://github.com/plankanban/planka-docs/blob/main/docs/development/set-up-environment.md Use Docker Compose to build and launch all PLANKA services (client, server, database) in development mode. This setup includes auto-reloading on file changes. ```bash docker compose -f docker-compose-dev.yml up ``` -------------------------------- ### Getting Started: Connecting and Authenticating Source: https://github.com/plankanban/planka-docs/blob/main/docs/api-reference/python.md Connect to a Planka instance and authenticate using either username/password or an API key. The `login` method also supports accepting terms of service and specifying a language. ```python from plankapy.v2 import Planka planka = Planka('https://planka.mydomain.com') # Authenticate with username and password planka.login(username='username', password='password') -- OR -- # Authenticate with API key planka.login(api_key='MY_API_KEY') # Authenticate and accept terms planka.login(username='...', password='...', accept_terms=True) # Authenticate with language and specific terms type planka.login(username='...', password='...', accept_terms=True, lang='ja-JP', terms_type='extended') ``` -------------------------------- ### Configure OIDC with Authentik Source: https://github.com/plankanban/planka-docs/blob/main/docs/configuration/oidc.md Example configuration for using Authentik as an OIDC provider. Modify the issuer URL, client ID, client secret, and admin role to match your Authentik setup. ```bash 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 ``` -------------------------------- ### Install plankapy Source: https://github.com/plankanban/planka-docs/blob/main/docs/api-reference/python.md Install the plankapy library using pip. ```bash pip install plankapy ``` -------------------------------- ### Install Planka Using values.yaml Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/kubernetes/helm-chart.md Install the Planka Helm chart using a local values.yaml file for configuration. ```bash helm install planka planka/planka -f values.yaml ``` -------------------------------- ### Install Node.js Prerequisites Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/debian-and-ubuntu.md Updates package lists and installs necessary dependencies for adding the NodeSource repository. ```bash sudo apt-get update ``` ```bash sudo apt-get install -y ca-certificates curl gnupg ``` -------------------------------- ### Install Node.js Dependencies Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/nightly_version/debian-and-ubuntu.md Installs necessary packages for adding the NodeSource repository and then installs Node.js version 22.x. ```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 ``` -------------------------------- ### Navigate to PLANKA Directory Source: https://github.com/plankanban/planka-docs/blob/main/docs/configuration/run-as-a-service.md Changes the current directory to the PLANKA installation path. This is necessary before starting the application with PM2. ```bash cd /var/www/planka ``` -------------------------------- ### Create Custom Terms Directory (Manual Installation) Source: https://github.com/plankanban/planka-docs/blob/main/docs/configuration/customizing-end-user-terms.md Use this command to create the directory where custom Terms files should be placed for manual installations. ```bash mkdir -p /var/www/planka/terms/custom ``` -------------------------------- ### Install PLANKA Build Dependencies Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/nightly_version/debian-and-ubuntu.md Installs 'unzip' and 'build-essential' which are required for compiling and building PLANKA. ```bash sudo apt install unzip build-essential -y ``` -------------------------------- ### Install Node.js Dependencies Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/debian-and-ubuntu.md Navigates to the PLANKA directory and installs the necessary Node.js dependencies using npm. ```bash cd /var/www/planka ``` ```bash npm install ``` -------------------------------- ### Start PLANKA with systemd Source: https://github.com/plankanban/planka-docs/blob/main/docs/upgrade-to-v2/manual.md Starts the PLANKA service using systemd after exiting the planka user session. ```bash exit sudo systemctl start planka ``` -------------------------------- ### Verify Node.js Installation Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/debian-and-ubuntu.md Checks the installed Node.js version. ```bash node -v ``` -------------------------------- ### Start PLANKA with PM2 Source: https://github.com/plankanban/planka-docs/blob/main/docs/upgrade-to-v2/manual.md Starts the PLANKA service using PM2 after exiting the planka user session. ```bash exit pm2 start planka ``` -------------------------------- ### Create PLANKA Installation Directory Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/debian-and-ubuntu.md Creates the directory for PLANKA and sets the ownership to the 'planka' user and group. ```bash sudo mkdir -p /var/www/planka/ ``` ```bash sudo chown -R planka:planka /var/www/planka/ ``` ```bash cd /var/www/planka ``` -------------------------------- ### Install Planka PHP SDK Source: https://github.com/plankanban/planka-docs/blob/main/docs/api-reference/php.md Install the Planka PHP SDK using Composer. This command adds the SDK as a dependency to your project. ```bash composer require decole/planka-php-sdk ``` -------------------------------- ### Install Planka with HTTP Ingress Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/kubernetes/helm-chart.md Install Planka with Ingress enabled for external HTTP access, specifying a host. ```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 ``` -------------------------------- ### Run Planka Automated Installer Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/automated/getting-started.md Execute this command to download and run the automated installation script for Planka. 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 ``` -------------------------------- ### Create Initial Admin User Source: https://context7.com/plankanban/planka-docs/llms.txt Configure the initial administrator account using either an interactive Docker script, environment variables in docker-compose.yml, a manual install script, or .env variables. ```bash # --- Docker: interactive script --- docker compose run --rm planka npm run db:create-admin-user # Prompts for email, password, name, and optional username ``` ```bash # --- Docker: environment variables in docker-compose.yml --- # Add to the environment section of the planka service: # - DEFAULT_ADMIN_EMAIL=admin@example.com # - DEFAULT_ADMIN_PASSWORD=securepassword # - DEFAULT_ADMIN_NAME=Admin User # - DEFAULT_ADMIN_USERNAME=admin # After first startup you can remove these lines (except DEFAULT_ADMIN_EMAIL # if you want to lock the account from being edited/deleted). docker compose up -d ``` ```bash # --- Manual install: script --- cd /var/www/planka npm run db:create-admin-user ``` ```bash # --- Manual install: .env variables --- # In /var/www/planka/.env: DEFAULT_ADMIN_EMAIL=admin@example.com DEFAULT_ADMIN_PASSWORD=securepassword DEFAULT_ADMIN_NAME=Admin User DEFAULT_ADMIN_USERNAME=admin # Restart with PM2: pm2 restart planka ``` -------------------------------- ### PlankaClient Usage Source: https://github.com/plankanban/planka-docs/blob/main/docs/api-reference/php.md This snippet demonstrates how to install the SDK using Composer, configure the client with your Planka instance details, authenticate, and make a basic API call to list projects. ```APIDOC ## Install ```bash composer require decole/planka-php-sdk ``` ## How to use Wrapper executes the requests that PLANKA makes over the web socket or hidden REST API. Wrapper use hidden REST API. See endpoints in https://github.com/plankanban/planka/blob/master/server/config/routes.js. To understand how to use the wrapper, you can go to the web socket and see how the web client of the web socket works with its server. Requests and responses are identical. I just standardized the answers in the DTO. The data inside the DTO is identical to the server responses. It is also not important to understand that you are working under a specific user. Accordingly, if you do not see a project or some board, this means that this user is prohibited from having access by access rights. You need to add a user. For which you come as a wrapper in the projects and boards you need. Wrapper endpoint - [PlankaClient.php](https://github.com/decole/planka-php-sdk/blob/master/src/PlankaClient.php) ```php authenticate(); $result = $planka->project->list(); var_dump($result); ``` ``` -------------------------------- ### Start PLANKA Service Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/automated/how-to-update.md Restart PLANKA using Docker Compose with your environment file after updating. ```bash docker compose --env-file .env up -d ``` -------------------------------- ### Install PLANKA Build Dependencies Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/debian-and-ubuntu.md Installs essential packages for building and running PLANKA, including unzip, build tools, and Python virtual environment support. ```bash sudo apt install unzip build-essential python3-venv -y ``` -------------------------------- ### Install PM2 Globally Source: https://github.com/plankanban/planka-docs/blob/main/docs/configuration/run-as-a-service.md Installs the latest version of PM2 globally using npm. This is a prerequisite for managing Node.js applications as services. ```bash sudo npm install pm2@latest -g ``` -------------------------------- ### Deploy PLANKA to Kubernetes with Helm Source: https://context7.com/plankanban/planka-docs/llms.txt Deploys PLANKA to a Kubernetes cluster using a community Helm chart. Includes steps for adding the Helm repository, performing a quick install for development, and a production install using a `values.yaml` file. Also shows how to port-forward for local access. ```bash # Add the PLANKA Helm repo helm repo add planka http://plankanban.github.io/planka helm search repo planka # Quick install (development/testing) export SECRETKEY=$(openssl rand -hex 64) helm install planka planka/planka \ --set secretkey=$SECRETKEY \ --set admin_email="admin@example.com" \ --set admin_password="securepassword" \ --set admin_name="Admin User" \ --set admin_username="admin" # Port-forward for local access kubectl port-forward $POD_NAME 3000:1337 # Production install using values.yaml cat > values.yaml < /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 ``` -------------------------------- ### Create Admin User Script (Local) Source: https://github.com/plankanban/planka-docs/blob/main/docs/configuration/admin-user.md Run this npm script from your PLANKA folder to create an administrator user during manual installation. ```bash npm run db:create-admin-user ``` -------------------------------- ### Download and Extract PLANKA Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/debian-and-ubuntu.md Downloads the latest prebuilt PLANKA release, extracts it to the installation directory, and removes the downloaded zip file. ```bash curl -fsSL -O https://github.com/plankanban/planka/releases/latest/download/planka-prebuild.zip ``` ```bash unzip planka-prebuild.zip -d /var/www/ ``` ```bash rm planka-prebuild.zip ``` -------------------------------- ### Copy Environment Sample and Configure Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/nightly_version/windows.md Copy the sample environment file and open it in Notepad for configuration. ```powershell cd C:\planka\server cp .env.sample .env notepad.exe .env ``` -------------------------------- ### Configure PM2 to Launch on Boot Source: https://github.com/plankanban/planka-docs/blob/main/docs/configuration/run-as-a-service.md Configures PM2 to automatically start PLANKA as a service on system boot using systemd. Ensure the user and home directory paths are correct for your system. ```bash sudo env PATH=$PATH:/usr/lib/node_modules/pm2/bin/pm2 startup systemd -u planka --hp /home/planka ``` -------------------------------- ### Run Planka Database Upgrade Script Source: https://github.com/plankanban/planka-docs/blob/main/docs/upgrade-to-v2/docker.md Execute this command to run the database upgrade script. This must be done before starting Planka for the first time after the upgrade. ```bash docker compose run --rm planka npm run db:upgrade ``` -------------------------------- ### REST API - Get Boards in Project Source: https://context7.com/plankanban/planka-docs/llms.txt Retrieves a list of boards within a specific project. ```APIDOC ### GET /api/projects/{PROJECT_ID}/boards #### Description Retrieves a list of boards within a specific project. #### Method GET #### Endpoint `https://planka.example.com/api/projects/PROJECT_ID/boards` #### Parameters ##### Path Parameters - **PROJECT_ID** (string) - Required - The ID of the project. ##### Headers - **Authorization** (string) - Required - Bearer token for authentication (e.g., `Bearer YOUR_TOKEN`). ### Request Example ```bash TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." curl -s https://planka.example.com/api/projects/PROJECT_ID/boards \ -H "Authorization: Bearer $TOKEN" | jq '.items[].name' ``` ### Response #### Success Response (200) - **items** (array) - An array of board objects. - **name** (string) - The name of the board. ``` -------------------------------- ### Example Crontab Entry for Automated Backups Without Logging Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/docker/backup-and-restore.md This illustrates the crontab configuration for automated daily backups and deletion of old backup files, with all script output suppressed. ```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 ``` -------------------------------- ### Copy Environment Sample Source: https://github.com/plankanban/planka-docs/blob/main/docs/development/set-up-environment.md Create a local .env file for server configuration by copying the provided sample. Ensure you edit this file with your specific database and admin credentials. ```bash cp server/.env.sample server/.env ``` -------------------------------- ### Authenticate and Get User via cURL Source: https://context7.com/plankanban/planka-docs/llms.txt Example of authenticating with PLANKA using cURL and retrieving the current user's token. Ensure the response is piped to jq for parsing. ```bash # Example: authenticate and get current user via curl curl -s -X POST https://planka.example.com/api/access-tokens \ -H "Content-Type: application/json" \ -d '{"emailOrUsername": "admin@example.com", "password": "securepassword"}' \ | jq '.item.token' # Output: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." ``` -------------------------------- ### Get All Projects via cURL Source: https://context7.com/plankanban/planka-docs/llms.txt Retrieve a list of all visible projects using cURL. Requires an Authorization header with a valid Bearer token. ```bash # Get all projects curl -s https://planka.example.com/api/projects \ -H "Authorization: Bearer $TOKEN" | jq '.items[].name' ``` -------------------------------- ### Docker-based Development Setup for PLANKA Source: https://context7.com/plankanban/planka-docs/llms.txt Set up a local PLANKA development environment using Docker Compose. This method runs all services in containers and provides auto-reloads on file changes. Ensure to remove pre-existing node_modules. ```bash # --- Docker-based dev setup (all services in containers) --- # Remove any pre-existing node_modules to avoid version conflicts rm -rf node_modules client/node_modules server/node_modules server/.venv cp server/.env.sample server/.env # Configure DEFAULT_ADMIN_* in server/.env # Start the full stack (auto-reloads on file changes) docker compose -f docker-compose-dev.yml up ``` -------------------------------- ### Terms File Structure Example Source: https://github.com/plankanban/planka-docs/blob/main/docs/configuration/customizing-end-user-terms.md A Terms file must be in Markdown, named using a language code, and include a confirmation section separated by '[confirmations]::---'. ```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** ``` -------------------------------- ### Download and Set Up Backup Scripts Source: https://context7.com/plankanban/planka-docs/llms.txt Download the backup and restore scripts to the designated backup directory. ```bash mkdir /opt/planka/backup curl -L https://raw.githubusercontent.com/plankanban/planka/master/docker-backup.sh \ -o /opt/planka/backup/backup.sh curl -L https://raw.githubusercontent.com/plankanban/planka/master/docker-restore.sh \ -o /opt/planka/backup/restore.sh ``` -------------------------------- ### Run Database Upgrade Script Source: https://github.com/plankanban/planka-docs/blob/main/docs/upgrade-to-v2/manual.md Execute the database upgrade script to apply necessary schema changes for PLANKA v2. This must be done before starting the service. ```bash npm run db:upgrade ``` -------------------------------- ### Admin User Environment Variables (.env) Source: https://github.com/plankanban/planka-docs/blob/main/docs/configuration/admin-user.md Define these environment variables in your .env file to set up an administrator user during manual installation. These can be removed after the first successful startup. ```env DEFAULT_ADMIN_EMAIL=demo@demo.demo DEFAULT_ADMIN_PASSWORD=demo DEFAULT_ADMIN_NAME=Demo Demo DEFAULT_ADMIN_USERNAME=demo ``` -------------------------------- ### Set Up Symbolic Links for Assets and Views Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/nightly_version/windows.md Create symbolic links to connect the built client assets and index.html 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" ``` -------------------------------- ### Set Up Symbolic Links for Assets Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/nightly_version/debian-and-ubuntu.md Creates symbolic links from the client's build output to the server's public directory for assets and static files. This avoids copying files and simplifies 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 ``` -------------------------------- ### Copy Environment Sample File Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/nightly_version/debian-and-ubuntu.md Copies the sample environment file to create a new '.env' file for configuration. ```bash cd /var/www/planka/server cp .env.sample .env ``` -------------------------------- ### Initialize Database and Create Admin User Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/nightly_version/windows.md Initialize the PostgreSQL database schema and create an administrator user account. ```powershell npm run db:init npm run db:create-admin-user ``` -------------------------------- ### Serve Built Website Locally with npm Source: https://github.com/plankanban/planka-docs/blob/main/README.md Serves the locally built static website. This command is useful for previewing the production build before deployment. ```bash npm run serve ``` -------------------------------- ### Build Website for Production with npm Source: https://github.com/plankanban/planka-docs/blob/main/README.md Bundles the website into static files suitable for production deployment. This command optimizes the project for performance. ```bash npm run build ``` -------------------------------- ### Add Helm Repo and Search Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/kubernetes/helm-chart.md Add the Planka Helm repository and check for its availability. ```bash helm repo add planka http://plankanban.github.io/planka helm search repo planka ``` -------------------------------- ### Create Log Directory for Backups Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/docker/backup-and-restore.md Set up a directory to store log files generated by the backup process, especially when using cron jobs. ```bash mkdir /opt/planka/backup/logs ``` -------------------------------- ### Copy Environment Sample Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/debian-and-ubuntu.md Copies the sample environment configuration file to be used for setting up PLANKA's environment variables. ```bash cp .env.sample .env ``` -------------------------------- ### Re-run PLANKA Installer Source: https://github.com/plankanban/planka-docs/blob/main/docs/configuration/admin-user.md If you used the PLANKA Installer, re-run the script to modify admin credentials. Navigate through the menu to 'Configuration' then 'Admin user'. ```bash bash /opt/planka_installer ``` -------------------------------- ### Clone PLANKA Repository Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/nightly_version/debian-and-ubuntu.md Clones the PLANKA repository into the current directory, which should be the installation directory. ```bash cd /var/www/planka git clone https://github.com/plankanban/planka.git . ``` -------------------------------- ### Configure Automated Nightly Backups with Cron Source: https://context7.com/plankanban/planka-docs/llms.txt Set up cron jobs for automated nightly backups and cleanup of old backup files and logs. ```bash crontab -e # Add the following cron jobs: # Backup every night at 2 AM with logging 0 2 * * * cd /opt/planka/backup && bash backup.sh > /opt/planka/backup/logs/$(date +\%Y\%m\%d\%H\%M)-backup.log 2>&1 # Delete backups older than 14 days 0 2 * * * find /opt/planka/backup/*.tgz -mindepth 1 -mtime +14 -delete > /dev/null 2>&1 # Delete log files older than 14 days 0 2 * * * find /opt/planka/backup/logs/*.log -mindepth 1 -mtime +14 -delete > /dev/null 2>&1 ``` -------------------------------- ### REST API - Get Projects Source: https://context7.com/plankanban/planka-docs/llms.txt Retrieves a list of all projects visible to the authenticated user. ```APIDOC ### GET /api/projects #### Description Retrieves a list of all projects visible to the authenticated user. #### Method GET #### Endpoint `https://planka.example.com/api/projects` #### Parameters ##### Headers - **Authorization** (string) - Required - Bearer token for authentication (e.g., `Bearer YOUR_TOKEN`). ### Request Example ```bash TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." curl -s https://planka.example.com/api/projects \ -H "Authorization: Bearer $TOKEN" | jq '.items[].name' ``` ### Response #### Success Response (200) - **items** (array) - An array of project objects. - **name** (string) - The name of the project. ``` -------------------------------- ### Initialize PLANKA Database Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/debian-and-ubuntu.md Initializes the PostgreSQL database schema for PLANKA. ```bash npm run db:init ``` -------------------------------- ### Download and Extract PLANKA Prebuilt Archive Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/windows.md Download the latest prebuilt PLANKA release using curl, extract it to the C:\ drive, and then remove 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 ``` -------------------------------- ### Copy Configuration and Data Files Source: https://github.com/plankanban/planka-docs/blob/main/docs/upgrade-to-v2/manual.md Copy essential files like the .env configuration, user avatars, project background images, and attachments from the v1 directory to the new v2 directory. ```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/ ``` -------------------------------- ### Create New PLANKA Directory and Set Ownership Source: https://github.com/plankanban/planka-docs/blob/main/docs/upgrade-to-v2/manual.md Create the new directory for PLANKA v2 and ensure the 'planka' user has ownership. ```bash sudo mkdir -p /var/www/planka/ sudo chown -R planka:planka /var/www/planka/ cd /var/www/planka ``` -------------------------------- ### Clone PLANKA Repository Source: https://github.com/plankanban/planka-docs/blob/main/docs/development/set-up-environment.md Use this command to get the latest PLANKA source code from GitHub. ```bash git clone https://github.com/plankanban/planka.git ``` -------------------------------- ### Update Package Index Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/manual/debian-and-ubuntu.md Run this command to refresh your local package index before installing new software. ```bash sudo apt update ``` -------------------------------- ### REST API - Authentication Source: https://context7.com/plankanban/planka-docs/llms.txt Example of how to authenticate with the PLANKA REST API using email and password to obtain an access token. ```APIDOC ## REST API Reference ### POST /api/access-tokens #### Description Authenticates a user and returns an access token. #### Method POST #### Endpoint `https://planka.example.com/api/access-tokens` #### Request Body - **emailOrUsername** (string) - Required - The user's email or username. - **password** (string) - Required - The user's password. ### Request Example ```bash curl -s -X POST https://planka.example.com/api/access-tokens \ -H "Content-Type: application/json" \ -d '{"emailOrUsername": "admin@example.com", "password": "securepassword"}' \ | jq '.item.token' ``` ### Response #### Success Response (200) - **token** (string) - The generated access token. ``` -------------------------------- ### Example New Environment Variables Source: https://github.com/plankanban/planka-docs/blob/main/docs/upgrade-to-v2/manual.md These are new environment variables that can be added to the .env file for PLANKA v2. Some are commented out by default. ```yaml # MAX_UPLOAD_FILE_SIZE= # STORAGE_LIMIT= # ACTIVE_USERS_LIMIT= # The default application language used as a fallback when a user's language is not set. # This language is also used for per-board notifications. # DEFAULT_LANGUAGE=en-US # All outgoing HTTP requests (SMTP, webhooks, Apprise notifications, favicon fetching, etc.) # will be sent through this proxy if set. # OUTGOING_PROXY=http://proxy:3128 # OIDC_USE_OAUTH_CALLBACK=true # OIDC_PROJECT_OWNER_ROLES=project_owner # OIDC_BOARD_USER_ROLES=board_user # OIDC_DEBUG=true # SMTP_NAME= # Using Gravatar directly exposes user IPs and hashed emails to a third party (GDPR risk). # Use a proxy you control for privacy, or leave commented out or empty to disable. # GRAVATAR_BASE_URL=https://www.gravatar.com/avatar/ ``` -------------------------------- ### Rename PLANKA Directory Source: https://github.com/plankanban/planka-docs/blob/main/docs/upgrade-to-v2/manual.md Rename the current PLANKA installation directory to preserve the v1 files before creating the new v2 directory. ```bash cd .. sudo mv /var/www/planka /var/www/planka-v1 ``` -------------------------------- ### Download and Extract PLANKA v2 Prebuilt Source: https://github.com/plankanban/planka-docs/blob/main/docs/upgrade-to-v2/manual.md Download the latest prebuilt version of PLANKA and extract it to the new directory. This command should be run as the 'planka' user. ```bash curl -fsSL -O https://github.com/plankanban/planka/releases/latest/download/planka-prebuild.zip unzip -o planka-prebuild.zip -d /var/www/ rm planka-prebuild.zip ``` -------------------------------- ### Mount Custom Terms Directory (Docker Installation) Source: https://github.com/plankanban/planka-docs/blob/main/docs/configuration/customizing-end-user-terms.md Configure your Docker Compose file to mount a local 'terms' directory to '/app/terms/custom' within the Planka container. ```yaml services: planka: ... volumes: - data:/app/data - ./terms:/app/terms/custom ... ``` -------------------------------- ### Initialize and Authenticate Planka Client Source: https://github.com/plankanban/planka-docs/blob/main/docs/api-reference/php.md Initialize the PlankaClient with configuration details and authenticate your session. Ensure the configuration includes correct user credentials, base URI, and port for your Planka instance. ```php authenticate(); $result = $planka->project->list(); var_dump($result); ``` -------------------------------- ### Admin User Environment Variables (Docker Compose) Source: https://github.com/plankanban/planka-docs/blob/main/docs/configuration/admin-user.md Uncomment or add these environment variables within your docker-compose.yml file to configure an administrator user for Docker installations. ```yaml - DEFAULT_ADMIN_EMAIL=demo@demo.demo - DEFAULT_ADMIN_PASSWORD=demo - DEFAULT_ADMIN_NAME=Demo Demo - DEFAULT_ADMIN_USERNAME=demo ``` -------------------------------- ### Download Backup and Restore Scripts Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/docker/backup-and-restore.md Download the official `docker-backup.sh` and `docker-restore.sh` scripts from the PLANKA GitHub repository to your designated backup directory. ```bash curl -L https://raw.githubusercontent.com/plankanban/planka/master/docker-backup.sh -o /opt/planka/backup/backup.sh curl -L https://raw.githubusercontent.com/plankanban/planka/master/docker-restore.sh -o /opt/planka/backup/restore.sh ``` -------------------------------- ### Run Planka Migration Script Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/automated/getting-started.md Use this command if you installed Planka before October 11, 2023, to apply necessary migration updates. The script is downloaded, executed, and then removed. ```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 ``` -------------------------------- ### Connect to Planka Instance Source: https://github.com/plankanban/planka-docs/blob/main/docs/api-reference/python.md Initialize a Planka interface object to connect to your Planka instance. Ensure the URL is correct. ```python from plankapy.v2 import Planka planka = Planka('https://planka.mydomain.com') ``` -------------------------------- ### Create Backup Directory Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/docker/backup-and-restore.md Before downloading the backup scripts, create a dedicated folder to store your PLANKA backups. ```bash mkdir /opt/planka/backup ``` -------------------------------- ### Create PLANKA Backup Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/automated/how-to-update.md Execute this script to create a backup of your PLANKA data before updating. ```bash bash cron/backup.sh ``` -------------------------------- ### Remove Local Node Modules and Virtual Environments Source: https://github.com/plankanban/planka-docs/blob/main/docs/development/set-up-environment.md Before using the Docker-based setup, remove any existing local Node.js modules or Python virtual environments to prevent version conflicts. ```bash rm -rf node_modules client/node_modules server/node_modules server/.venv ``` -------------------------------- ### Enter Backup Directory Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/docker/backup-and-restore.md Navigate to the directory where you have stored the PLANKA backup and restore scripts and backup files. ```bash cd /opt/planka/backup ``` -------------------------------- ### Automate Daily PLANKA Backups Without Logging Source: https://github.com/plankanban/planka-docs/blob/main/docs/installation/docker/backup-and-restore.md Set up a cron job to run the backup script daily at 2 AM, discarding all output to keep the system logs clean. Use this if detailed logging is not required. ```bash 0 2 * * * cd /opt/planka/backup && bash /opt/planka/backup/backup.sh > /dev/null 2>&1 ``` -------------------------------- ### Get Boards in a Project via cURL Source: https://context7.com/plankanban/planka-docs/llms.txt Fetch all boards within a specific project using cURL. Replace PROJECT_ID with the actual project identifier and ensure a valid Bearer token is provided. ```bash # Get boards in a project curl -s https://planka.example.com/api/projects/PROJECT_ID/boards \ -H "Authorization: Bearer $TOKEN" | jq '.items[].name' ``` -------------------------------- ### Execute SQL Updates for Due Date Completion Source: https://github.com/plankanban/planka-docs/blob/main/docs/upgrade-to-v2/docker.md This command starts the PostgreSQL container in detached mode, waits for it to be ready, and then pipes the generated SQL file (`due_completion_fix.sql`) into the `psql` client to update the database. Ensure your PostgreSQL service is named `postgres` in `docker-compose.yml`. ```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' ```