Skip to main content

Debian & Ubuntu

danger

This version is not production-ready and may result in data loss. Use at your own risk.

No Backup - No Mercy!

System Requirements

  • Debian 11 or Ubuntu 22.04
  • PostgreSQL
  • Node.js

PostgreSQL

Installing PostgreSQL

Refresh your local package index:

sudo apt update

Install PostgreSQL and additional utilities:

sudo apt install postgresql postgresql-contrib -y

If prompted to restart any services, press ENTER to accept the defaults.

Create a PostgreSQL User and Database for Planka

Create a PostgreSQL user:

sudo -u postgres createuser --interactive

Sample output:

Enter name of role to add: planka
Shall the new role be a superuser? (y/n) y

Create the database:

To avoid sudo permission issues:

cd /tmp

Then run:

sudo -u postgres createdb planka

Create a Unix User and Set the Database Password

Create a Unix user named planka:

sudo adduser planka

Login to PostgreSQL as the planka user:

sudo -u planka psql

Change the password:

ALTER USER planka PASSWORD 'YOUR_DATABASE_PASSWORD';

Exit the PostgreSQL prompt:

\q

Node.js

Install Node.js using the NodeSource PPA:

# 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=18
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

Verify installation:

node -v
# Output: v18.x.x

Install Planka (Nightly)

Install required packages:

sudo apt install unzip build-essential -y

Create the installation directory and set ownership:

sudo mkdir -p /var/www/planka
sudo chown -R planka:planka /var/www/planka
cd /var/www/planka

Switch to the planka user:

sudo -i -u planka

Clone the repo:

git clone https://github.com/plankanban/planka.git .

Install dependencies and build the client:

npm install

cd client
npm run build

Instead of copying files, use symbolic links for easier updates:

ln -s /var/www/planka/client/build/asset-manifest.json /var/www/planka/server/public/asset-manifest.json
ln -s /var/www/planka/client/build/favicon.ico /var/www/planka/server/public/favicon.ico
ln -s /var/www/planka/client/build/logo192.png /var/www/planka/server/public/logo192.png
ln -s /var/www/planka/client/build/logo512.png /var/www/planka/server/public/logo512.png
ln -s /var/www/planka/client/build/manifest.json /var/www/planka/server/public/manifest.json
ln -s /var/www/planka/client/build/robots.txt /var/www/planka/server/public/robots.txt
ln -s /var/www/planka/client/build/static /var/www/planka/server/public/static
ln -s /var/www/planka/client/build/index.html /var/www/planka/server/views/index.ejs

Configure Environment Variables

Go to the server directory and copy the sample .env file:

cd /var/www/planka/server
cp .env.sample .env

Generate a secret key:

openssl rand -hex 64

Note the output - you'll need it for the .env file.

Edit the .env file:

nano .env

Example .env configuration:

## Required

BASE_URL=http://YOUR_DOMAIN_NAME:YOUR_PORT
DATABASE_URL=postgresql://planka:YOUR_DATABASE_PASSWORD@localhost/planka
SECRET_KEY=YOUR_GENERATED_KEY

## Optional

...

DEFAULT_ADMIN_EMAIL=YOUR_ADMIN_EMAIL
DEFAULT_ADMIN_PASSWORD=YOUR_ADMIN_PASSWORD
DEFAULT_ADMIN_NAME=YOUR_ADMIN_NAME
DEFAULT_ADMIN_USERNAME=YOUR_ADMIN_USERNAME

...

Start Planka

From the server directory, initialize the database and start Planka:

npm run db:init && npm start --prod

Access Planka

Once the services are running, browse to http://YOUR_DOMAIN_NAME:YOUR_PORT and log in as YOUR_ADMIN_EMAIL with the password YOUR_ADMIN_PASSWORD.