Wekan Kanban Install: Difference between revisions

From Traxel Wiki
Jump to navigation Jump to search
 
(15 intermediate revisions by the same user not shown)
Line 2: Line 2:


https://wekan.github.io/
https://wekan.github.io/
See Also: [[Wekan_Install_Archive]]


= Snap Take 3: Herd Securities =
= Snap Take 3: Herd Securities =
Line 42: Line 44:
</pre>
</pre>


= Snap Take 2 =
== SSL & NGINX ==
 
The only manual install docs I could find (below) were based on version zero-dot-something of Wekan.
 
Here's the main Snap one I'm following now: https://www.howtoforge.com/how-to-install-wekan-kanban-on-debian-10/
 
It includes setting up the reverse proxy with SSL.
 
Others:
# https://blog.eldernode.com/install-wekan-kanban-server-on-ubuntu-20-04/
# https://linuxize.com/post/how-to-install-mongodb-on-debian-10/
 
=== System Basics ===
<pre>
sudo apt update -y && sudo apt upgrade -y
sudo apt install -y emacs-nox
</pre>
 
=== Snap, Wekan ===
<pre>
sudo apt install -y snapd
sudo snap install wekan
systemctl status snap.wekan.wekan
</pre>
 
=== NGINX ===
 
=== SSL: Let's Encrypt ===
 
 
= Older Tries =
 
== Snap Take 1 ==
 
<pre>
sudo apt update -y && sudo apt upgrade -y
sudo apt install snapd -y
sudo apt install nginx -y
sudo snap install wekan
sudo snap set wekan port="6080"
sudo systemctl restart snap.wekan.mongodb
sudo systemctl restart snap.wekan.wekan
</pre>
 
Aborted: Too much magic, not enough control.


== Low Level Install ==
Low-level install instructions:
https://websiteforstudents.com/how-to-install-wekan-on-ubuntu-18-04-16-04/
=== System Update ===
<pre>
<pre>
sudo apt update
$ sudo emacs -nw /etc/apt/sources.list
sudo apt upgrade -y
> deb http://ftp.debian.org/debian buster-backports main
sudo apt install -y emacs-nox
$ sudo apt update -y
$ sudo apt install -y python-certbot-nginx -t buster-backports
</pre>
</pre>
=== Wekan User ===


<pre>
<pre>
sudo useradd -m -s /bin/bash wekan
$ sudo emacs -nw /etc/nginx/nginx.conf
sudo passwd wekan
# uncomment the following:
>        server_names_hash_bucket_size 64;
$ sudo systemctl restart nginx
</pre>
</pre>
Full Entertainment
=== Node.JS + NVM ===
Node Package Manager, Node Version Manager
Find the latest here:
https://github.com/nvm-sh/nvm#installing-and-updating
<pre>
sudo apt install nodejs -y
su - wekan
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source ~/.bashrc
nvm install v4.8
nvm use node
exit # exit wekan account, back to admin
</pre>
=== MongoDB ===


<pre>
<pre>
sudo apt install dirmngr gnupg apt-transport-https software-properties-common ca-certificates curl
$ sudo emacs -nw /etc/nginx/sites-available/wekan.conf
curl -fsSL https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
sudo add-apt-repository 'deb https://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main'
sudo apt update
sudo apt install mongodb-org -y
</pre>
</pre>
<pre>
<pre>
sudo systemctl enable mongod --now # note "mongod" not "mongodb"
map $http_upgrade $connection_upgrade {
</pre>
    default upgrade;
    ''      close;
}


<pre>
server {
$ mongo --host 127.0.0.1:27017
    listen 443;
> use admin
    server_name kanban.herdsecurities.com;
> db.createUser({user:"admin", pwd:"new_password_here", roles:[{role:"root", db:"admin"}]})
    if ($http_user_agent ~ "MSIE") {
> exit
        return 303 https://browser-update.org/update.html;
    }
    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade; # allow websockets
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header X-Forwarded-For $remote_addr; # preserve client IP
    }
}
</pre>
</pre>


<pre>
<pre>
$ sudo emacs -nw /etc/mongod.conf
sudo nginx -t
> security:
sudo systemctl restart nginx
>  authorization: enable
$ sudo systemctl restart mongod
</pre>
</pre>


<pre>
<pre>
$ mongo -u admin -p
$ sudo ln -s /etc/nginx/sites-available/wekan.conf /etc/nginx/sites-enabled/
> use wekan
> db.createUser({user: "wekan",pwd: "new_password_here",roles: ["readWrite"]})
> exit
</pre>
</pre>


=== Wekan ===
Create email address herdsecurities@traxel.com as admin address for cert.


<pre>
<pre>
su - wekan
sudo certbot --nginx -d kanban.herdsecurities.com
</pre>
</pre>


Fair warning: The above documentation (just the NGINX and SSL section) is not an exact match for what I did. My sequence biffed and I had to manually fix it. It's a bit messy. I may start over, but it's working, so probably not.


[[Category:Hacking]]
[[Category:Hacking]]
[[Category:OpenDevOps]]
[[Category:OpenDevOps]]

Latest revision as of 19:28, 17 April 2021

Document an install of this:

https://wekan.github.io/

See Also: Wekan_Install_Archive

Snap Take 3: Herd Securities

Grab a Domain Name

Registered herdsecurities.com on NameCheap

  • kanban.herdsecurities.com -> WeKan
  • wiki.herdsecurities.com -> Mediawiki

Create an Instance

Create a Lightsail instance, OS Only, Debian latest.

Initialization Script:

apt update -y
apt upgrade -y
apt install -y emacs-nox
apt install -y snapd
snap install wekan

Attach a static IP (52.38.144.14)

Assign that IP to kanban.herdsecurities.com

That will take a while to propagate through DNS, so add it to your local hosts file too.

$ sudo emacs -nw /etc/hosts
> 52.38.144.14 kanban.herdsecurities.com

Connect to console

ssh -i ~/.ssh/id_rsa_social001 admin@kanban.herdsecurities.com

SSL & NGINX

$ sudo emacs -nw /etc/apt/sources.list
> deb http://ftp.debian.org/debian buster-backports main
$ sudo apt update -y
$ sudo apt install -y python-certbot-nginx -t buster-backports
$ sudo emacs -nw /etc/nginx/nginx.conf
# uncomment the following:
>         server_names_hash_bucket_size 64;
$ sudo systemctl restart nginx
$ sudo emacs -nw /etc/nginx/sites-available/wekan.conf
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
    listen 443;
    server_name kanban.herdsecurities.com;
    if ($http_user_agent ~ "MSIE") {
        return 303 https://browser-update.org/update.html;
    }
    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade; # allow websockets
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header X-Forwarded-For $remote_addr; # preserve client IP
    }
}
sudo nginx -t
sudo systemctl restart nginx
$ sudo ln -s /etc/nginx/sites-available/wekan.conf /etc/nginx/sites-enabled/

Create email address herdsecurities@traxel.com as admin address for cert.

sudo certbot --nginx -d kanban.herdsecurities.com

Fair warning: The above documentation (just the NGINX and SSL section) is not an exact match for what I did. My sequence biffed and I had to manually fix it. It's a bit messy. I may start over, but it's working, so probably not.