How to install planka on Ubuntu 20.04 without docker. Except I hit a snag, #146

Closed
opened 2026-02-04 17:30:11 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @Jieiku on GitHub (Nov 30, 2021).

I am up and running, and planned to share my notes as a quick guide, however I have hit a snag. I have never used sails.js before. I am more familiar with nginx and apache, so at the moment I am trying to figure out where the log files are so that I can hopefully get some feedback as to why this is not working.

2021-11-30_01-43

Ubuntu 20.04 Planka install

This will walk you through start to finish, for installing planka on Ubuntu 20.04 without using docker.
I am using an Unprivileged LXC container on Proxmox for this but it should be the same or similar for a bare metal Ubuntu install.
Proxmox makes restoring a container from backup easy in the event that an upgrade goes bad later down the road.
Planka is the only thing running in my container, if you have other web services running you should consider the permissions/user implications (www-data).

Install dependencies:

sudo apt install git curl postgresql
sudo apt install libgif-dev libglibd-2.0-dev liblcms2-dev libexif-dev libgsf-bin libturbojpeg libpng-dev librsvg2-dev libwebp-dev liborc-0.4-dev libsdl-pango-dev libtiff-dev
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt install -y nodejs

Clone the planka repository:

sudo mkdir -p /var/www && cd /var/www
sudo git clone https://github.com/plankanban/planka.git

create postgresql user, database, and access:

sudo -u postgres createuser --pwprompt www-data
MyLongObscureExamplePassword
sudo -u postgres createdb -O www-data planka
sudo -u postgres psql
GRANT ALL PRIVILEGES ON DATABASE planka TO "www-data";
\q

Generate SECRET_KEY:

openssl rand -base64 64 | tr -dc _A-Z-a-z-0-9 | head -c 64 ; echo

Configure .env DATABASE_URL and SECRET_KEY:

sudo nano /var/www/planka/server/.env
TZ=UTC
BASE_URL=http://localhost:1337
DATABASE_URL=postgresql://www-data:MyLongObscureExamplePassword@localhost/planka
SECRET_KEY=LongExampleSecretKeyReplaceMePlease

Set ownership and Install Planka:

sudo chown -R www-data:www-data /var/www
cd /var/www/planka
sudo -u www-data npm install

Update the client:

cd /var/www/planka/client
sudo -u www-data npx browserslist@latest --update-db

Initialize the database:

cd /var/www/planka
sudo -u www-data npm run server:db:init

Start the development server: (Demo user: demo@demo.demo demo)

cd /var/www/planka
sudo -u www-data npm start

Start the production server:

cd /var/www/planka
sudo -u www-data npm run build

Try and figure out the default login:

sudo -u postgres psql
\l
\c planka
\dt
SELECT * from user_account;

(appears to be username "demo" and password "demo")

you should be able to access the web ui of Planka now at the address shown in the terminal output.

Server Terminal at this point:

xekon@planka:/var/www/planka$ sudo -u www-data npm start

> planka@0.1.0 start /var/www/planka
> concurrently -n server,client "npm run server:start" "npm run client:start"

[client] 
[client] > planka@0.1.0 client:start /var/www/planka
[client] > npm start --prefix client
[client] 
[server] 
[server] > planka@0.1.0 server:start /var/www/planka
[server] > npm start --prefix server
[server] 
[client] 
[client] > planka-client@ start /var/www/planka/client
[client] > react-scripts start
[client] 
[server] 
[server] > planka-server@ start /var/www/planka/server
[server] > nodemon
[server] 
[server] [nodemon] 2.0.12
[server] [nodemon] to restart at any time, enter `rs`
[server] [nodemon] watching path(s): *.*
[server] [nodemon] watching extensions: js,mjs,json
[server] [nodemon] starting `node app.js`
[server]  info: Initializing custom hook (`current-user`)
[server] error: Ignoring attempt to bind route (`/*`) to unknown view: `index`
[server]  info: 
[server]  info:                .-..-.
[server]  info: 
[server]  info:    Sails              <|    .-..-.
[server]  info:    v1.4.4              |\
[server]  info:                       /|.\
[server]  info:                      / || \
[server]  info:                    ,'  |'  \
[server]  info:                 .-'.-==|/_--'
[server]  info:                 `--'-------' 
[server]  info:    __---___--___---___--___---___--___
[server]  info:  ____---___--___---___--___---___--___-__
[server]  info: 
[server]  info: Server lifted in `/var/www/planka/server`
[server]  info: To shut down Sails, press <CTRL> + C at any time.
[server]  info: Read more at https://sailsjs.com/support.
[server] 
[server] debug: -------------------------------------------------------
[server] debug: :: Tue Nov 30 2021 09:24:13 GMT+0000 (Coordinated Universal Time)
[server] debug: Environment : development
[server] debug: Port        : 1337
[server] 
[server] debug: -------------------------------------------------------
[client] ℹ 「wds」: Project is running at http://10.7.2.29/
[client] ℹ 「wds」: webpack output is served from 
[client] ℹ 「wds」: Content not from webpack is served from /var/www/planka/client/public
[client] ℹ 「wds」: 404s will fallback to /
[client] Starting the development server...
[client] 
[client] Compiled successfully!
[client] 
[client] You can now view planka-client in the browser.
[client] 
[client]   Local:            http://localhost:3000
[client]   On Your Network:  http://10.7.2.29:3000
[client] 
[client] Note that the development build is not optimized.
[client] To create a production build, use npm run build.
[client]
Originally created by @Jieiku on GitHub (Nov 30, 2021). I am up and running, and planned to share my notes as a quick guide, however I have hit a snag. I have never used sails.js before. I am more familiar with nginx and apache, so at the moment I am trying to figure out where the log files are so that I can hopefully get some feedback as to why this is not working. ![2021-11-30_01-43](https://user-images.githubusercontent.com/106644/144023986-73d42f8c-a25a-44e3-9b28-971a670482e0.png) # Ubuntu 20.04 Planka install This will walk you through start to finish, for installing planka on Ubuntu 20.04 without using docker. I am using an Unprivileged LXC container on Proxmox for this but it should be the same or similar for a bare metal Ubuntu install. Proxmox makes restoring a container from backup easy in the event that an upgrade goes bad later down the road. Planka is the only thing running in my container, if you have other web services running you should consider the permissions/user implications (www-data). ## Install dependencies: ``` sudo apt install git curl postgresql sudo apt install libgif-dev libglibd-2.0-dev liblcms2-dev libexif-dev libgsf-bin libturbojpeg libpng-dev librsvg2-dev libwebp-dev liborc-0.4-dev libsdl-pango-dev libtiff-dev curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - sudo apt install -y nodejs ``` ## Clone the planka repository: ``` sudo mkdir -p /var/www && cd /var/www sudo git clone https://github.com/plankanban/planka.git ``` ## create postgresql user, database, and access: ``` sudo -u postgres createuser --pwprompt www-data MyLongObscureExamplePassword sudo -u postgres createdb -O www-data planka sudo -u postgres psql GRANT ALL PRIVILEGES ON DATABASE planka TO "www-data"; \q ``` ## Generate SECRET_KEY: ``` openssl rand -base64 64 | tr -dc _A-Z-a-z-0-9 | head -c 64 ; echo ``` ## Configure .env DATABASE_URL and SECRET_KEY: ``` sudo nano /var/www/planka/server/.env TZ=UTC BASE_URL=http://localhost:1337 DATABASE_URL=postgresql://www-data:MyLongObscureExamplePassword@localhost/planka SECRET_KEY=LongExampleSecretKeyReplaceMePlease ``` ## Set ownership and Install Planka: ``` sudo chown -R www-data:www-data /var/www cd /var/www/planka sudo -u www-data npm install ``` ## Update the client: ``` cd /var/www/planka/client sudo -u www-data npx browserslist@latest --update-db ``` ## Initialize the database: ``` cd /var/www/planka sudo -u www-data npm run server:db:init ``` ## Start the development server: (Demo user: demo@demo.demo demo) ``` cd /var/www/planka sudo -u www-data npm start ``` ## Start the production server: ``` cd /var/www/planka sudo -u www-data npm run build ``` ## Try and figure out the default login: ``` sudo -u postgres psql \l \c planka \dt SELECT * from user_account; ``` (appears to be username "demo" and password "demo") you should be able to access the web ui of Planka now at the address shown in the terminal output. ## Server Terminal at this point: ```shell xekon@planka:/var/www/planka$ sudo -u www-data npm start > planka@0.1.0 start /var/www/planka > concurrently -n server,client "npm run server:start" "npm run client:start" [client] [client] > planka@0.1.0 client:start /var/www/planka [client] > npm start --prefix client [client] [server] [server] > planka@0.1.0 server:start /var/www/planka [server] > npm start --prefix server [server] [client] [client] > planka-client@ start /var/www/planka/client [client] > react-scripts start [client] [server] [server] > planka-server@ start /var/www/planka/server [server] > nodemon [server] [server] [nodemon] 2.0.12 [server] [nodemon] to restart at any time, enter `rs` [server] [nodemon] watching path(s): *.* [server] [nodemon] watching extensions: js,mjs,json [server] [nodemon] starting `node app.js` [server] info: Initializing custom hook (`current-user`) [server] error: Ignoring attempt to bind route (`/*`) to unknown view: `index` [server] info: [server] info: .-..-. [server] info: [server] info: Sails <| .-..-. [server] info: v1.4.4 |\ [server] info: /|.\ [server] info: / || \ [server] info: ,' |' \ [server] info: .-'.-==|/_--' [server] info: `--'-------' [server] info: __---___--___---___--___---___--___ [server] info: ____---___--___---___--___---___--___-__ [server] info: [server] info: Server lifted in `/var/www/planka/server` [server] info: To shut down Sails, press <CTRL> + C at any time. [server] info: Read more at https://sailsjs.com/support. [server] [server] debug: ------------------------------------------------------- [server] debug: :: Tue Nov 30 2021 09:24:13 GMT+0000 (Coordinated Universal Time) [server] debug: Environment : development [server] debug: Port : 1337 [server] [server] debug: ------------------------------------------------------- [client] ℹ 「wds」: Project is running at http://10.7.2.29/ [client] ℹ 「wds」: webpack output is served from [client] ℹ 「wds」: Content not from webpack is served from /var/www/planka/client/public [client] ℹ 「wds」: 404s will fallback to / [client] Starting the development server... [client] [client] Compiled successfully! [client] [client] You can now view planka-client in the browser. [client] [client] Local: http://localhost:3000 [client] On Your Network: http://10.7.2.29:3000 [client] [client] Note that the development build is not optimized. [client] To create a production build, use npm run build. [client] ```
Author
Owner

@Jieiku commented on GitHub (Dec 2, 2021):

I never did figure out why logging in did not work, decided to just stick with kanboard for now.

If anyone has any idea how to fix this or even get some debug log info for more clues then please let me know.

@Jieiku commented on GitHub (Dec 2, 2021): I never did figure out why logging in did not work, decided to just stick with kanboard for now. If anyone has any idea how to fix this or even get some debug log info for more clues then please let me know.
Author
Owner

@bdeak4 commented on GitHub (Dec 21, 2021):

hi @Jieiku,
I've encountered same problem and the problem was that API url (localhost:1337) was not accessible from client.
If you are using nginx in front of planka you need to forward both ports: 3000 (for client) and 1337 (for server).

@bdeak4 commented on GitHub (Dec 21, 2021): hi @Jieiku, I've encountered same problem and the problem was that API url (`localhost:1337`) was not accessible from client. If you are using nginx in front of planka you need to forward both ports: 3000 (for client) and 1337 (for server).
Author
Owner

@Jieiku commented on GitHub (Dec 21, 2021):

Thanks! I will give it a shot when i get a little spare time! (I cannot even remember if I tried that or not, too many projects lately.)

@Jieiku commented on GitHub (Dec 21, 2021): Thanks! I will give it a shot when i get a little spare time! (I cannot even remember if I tried that or not, too many projects lately.)
Author
Owner

@SakerSalama commented on GitHub (Aug 19, 2022):

Hello ,, i try to deploy mentioned steps and everything seems fine except last step related to Start Production ,, i get the following error :
`root@planka:/var/www/planka# sudo -u www-data npm run build
npm ERR! Missing script: "build"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run

npm ERR! A complete log of this run can be found in:
npm ERR! /var/www/.npm/_logs/2022-08-19T08_54_52_559Z-debug-0.log
root@planka:/var/www/planka#
`

,, anyone face this issue ?

@SakerSalama commented on GitHub (Aug 19, 2022): Hello ,, i try to deploy mentioned steps and everything seems fine except last step related to Start Production ,, i get the following error : `root@planka:/var/www/planka# sudo -u www-data npm run build npm ERR! Missing script: "build" npm ERR! npm ERR! To see a list of scripts, run: npm ERR! npm run npm ERR! A complete log of this run can be found in: npm ERR! /var/www/.npm/_logs/2022-08-19T08_54_52_559Z-debug-0.log root@planka:/var/www/planka# ` ,, anyone face this issue ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#146