Effective communication and collaboration are so important for teams. They enable team members or a community to work together, share information, exchange ideas, and make informed decisions as they handle a project. Tools like Discord, Appwrite, Slack, matrix-public-archive, Sonar, Klotho and similar platforms help enhance these essential aspects of teamwork.
Today, we will learn how to install Linen – Slack Alternative Searchable from Google. But before we plunge in, we need to know what this tool is all about!
What is Linen?
Linen is open-source software that aims to be an open alternative to Slack and Discord. Its main focus is making it easier to get real-time answers from teams and hence reduce the support burden
There are many core features and benefits of Linen, some of them are:
- Import communities: With Linen, you can import data from all public Slack/Discord members, conversations, attachments, and emojis.
- Search engine friendly: Many available chat apps are not search engine friendly this is because they are very JS-heavy. Linen was made search engine friendly by submitting a sitemap, conditionally rendering a static version of their page to search engines, and using cursor-based pagination to make pages consistent. Currently, are over 50,000 pages indexed on Google with over 10,000,000 search impressions for Linen communities.
- Single account across multiple communities: you are able to access multiple communities using a single account without multiple emails and passwords
- Private communities: Apart from the public communities Linen also supports private communities that require a password login to access the content. This feature is so vital for internal team discussions.
- Customer support tooling: On Linen, there is a feed where you can browse all open/closed conversations. This eliminates the worry about which channels and conversations your team have missed.
- Async first: Whenever communities become large, chats become noisy. To eliminate this, Linen provides a feed of conversations that you are participating in. Also, @mentions has been repurposed from a notification and replaced with !mention which sends a push notification to you.
- Discord Forum Support: Linen syncs Discord and makes it search engine friendly
- Move threads and messages: You can drag and drop messages and merge them into one thread and even move threads between channels.
- Private Channels: With private channels, you can have the invites only within the community
- Desktop/Mobile client: Linen supports desktop and mobile clients. You can get push notifications whenever there is an urgency.
- Github integration: It is common for open-source communities to use GitHub issues to manage their tickets. With Linen, you are able to tag a conversation with a GitHub issue and it automatically posts a message when the ticket is closed or has been updated.
- Botting: Line aims to support botting and automation to allow users to build and add their custom bots
Follow this guide to learn how to install Linen – Slack Alternative Searchable from Google.
Install Pre-requisites
There are several packages and tools required by Linen. These are:
- Nodejs v16 and above. This can be installed by following any of the below guides:
### On RHEL, CentOS or Fedora ###
sudo yum install gcc-c++ make
curl --silent --location https://rpm.nodesource.com/setup_20.x | sudo bash -
sudo yum -y install nodejs
### On Debian, Ubuntu ###
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
- yarn which can be installed with the command:
sudo npm install -g yarn
- PostgreSQL 13. This can be installed using the aid in the guides below:
### On RHEL, CentOS 8 ###
sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum -y install epel-release yum-utils
sudo yum-config-manager --enable pgdg13
sudo yum install postgresql13-server postgresql13
### On RHEL, CentOS 7 ###
sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum -y install epel-release yum-utils
sudo yum-config-manager --enable pgdg13
sudo yum install postgresql13-server postgresql13
### Ubuntu / Debian ###
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
RELEASE=$(lsb_release -cs)
echo "deb http://apt.postgresql.org/pub/repos/apt/ ${RELEASE}"-pgdg main | sudo tee /etc/apt/sources.list.d/pgdg.list
sudo apt update
sudo apt -y install postgresql-13
Edit the hba.conf file as shown.
### Ubuntu / Debian ###
echo "host linen linen 127.0.0.1/32 md5" | sudo tee -a /etc/postgresql/13/main/pg_hba.conf
### On RHEL, CentOS, Rocky , Alma ###
echo "host linen linen 127.0.0.1/32 md5" | sudo tee -a /var/lib/pgsql/13/data/pg_hba.conf
Allow password login to the PostgreSQL database.
### Ubuntu / Debian ###
sudo sed -i 's/ident/trust/' /etc/postgresql/13/main/pg_hba.conf
sudo sed -i 's/md5/trust/' /etc/postgresql/13/main/pg_hba.conf
sudo sed -i 's/peer/trust/' /etc/postgresql/13/main/pg_hba.conf
### On RHEL, CentOS, Rocky , Alma ###
sudo sed -i 's/ident/trust/g' /var/lib/pgsql/13/data/pg_hba.conf
sudo sed -i 's/md5/trust/g' /var/lib/pgsql/13/data/pg_hba.conf
sudo sed -i 's/peer/trust/g' /var/lib/pgsql/13/data/pg_hba.conf
Switch to the Postgres user
sudo su - postgres
Create a password for the Postgres User if you haven’t.
psql -c "alter user postgres with password 'StrongAdminP@ssw0rd'"
Exit the Postgres user shell
exit
Now restart the service:
### Ubuntu / Debian ###
sudo systemctl restart postgresql
### On RHEL, CentOS, Rocky , Alma ###
sudo systemctl restart postgresql-13
Once all the required packages have been installed, proceed with the below steps.
Download and Configure Linen
We will download Linen by cloning the GitHub repository. So ensure you have git
installed before you proceed.
git clone https://github.com/Linen-dev/linen.dev.git
Navigate into the directory:
cd linen.dev
Now we will create an environment file with the required variables:
cp apps/web/.env.example .env
Open the file for editing:
vim .env
In the variables file, there are several variables we need to update. Here, we will update the database connection string and the NEXTAUTH_SECRET as shown:
# Database for development
DATABASE_URL=postgresql://postgres:StrongAdminP@ssw0rd@localhost:5432/postgres
...
NEXTAUTH_SECRET="EO0l5is+zqUGMNzD/xyFknO+ieUu0VQQTqaklNfzKRc="
...
The secret can be generated with the command:
$ openssl rand -base64 32
EO0l5is+zqUGMNzD/xyFknO+ieUu0VQQTqaklNfzKRc=
Install Linen on your System
Now we can proceed and install Linen. First, instal all the required dependencies:
yarn install
Sample Output:

Next, build the dependencies:
yarn build:deps
Run database migrations:
yarn migrate:db
Sample output:

Now you can start the web with the command:
yarn dev:web
This will start a Linen web on localhost port 3000:

Verify if you can access Linen on your browser.

Manage the Linen Service
It is easier to manage the Linen service and enable it to run automatically on boot using PM2. First, install PM2 using the command:
sudo npm install -g pm2
Now in the dev directory, there is an ecosystem.config.js which is used to manage the application. To start the application, we will use the command:
pm2 start ecosystem.config.js
Sample Output:

To enable the service to start on boot run:
$ pm2 startup
[PM2] Init System found: systemd
[PM2] To setup the Startup Script, copy/paste the following command:
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u thor --hp /home/thor
Run the provided command. For example:
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u your_username --hp /home/your_username
Save the changes:
pm2 save
For Rhel-based systems, you need to configure SELinux contents. First, install all the required packages:
sudo dnf install policycoreutils policycoreutils-python-utils setools setroubleshoot setroubleshoot-server
Set SELinux in permissive mode first:
sudo setenforce 0
Now set the SELinux policy module:
sudo setsebool -P domain_can_mmap_files 1
Switch back the enforcing mode:
sudo setenforce 1
Now your application will start automatically on system boot.
Configure Nginx Proxy For Linen
Now, we need to access Linen remotely using the server IP address or domain name. To achieve that, you need to create a reverse proxy. Here, we will use the Nginx web server.
First, install it:
## Debian/Ubuntu
sudo apt install nginx -y
##On Rocky/Alma Linux/CentOS/Fedora
sudo yum install nginx -y
Once installed, create a virtual host file:
sudo vim /etc/nginx/conf.d/linen-ui.conf
In the file, add the lines below:
server {
listen 80;
server_name YOUR-SERVER-DOMAIN-NAME;
access_log /var/log/nginx/linen_access.log;
error_log /var/log/nginx/linen_error.log;
location / {
proxy_pass http://localhost:3000;
}
}
In the file above, replace YOUR-SERVER-DOMAIN-NAME appropriately then restart nginx:
sudo systemctl restart nginx
If you have a firewall enabled, allow the HTTP port through it.
##For UFW
sudo ufw allow 80/tcp
##For Firewalld
sudo firewall-cmd --add-port=80/tcp --permanent
sudo firewall-cmd --reload
Access Linen Web UI
Now you can access the Linen web UI using the URL http://IP_Address or http://domain-name.

Now we need to create a new account to use on Linen. Click on Get Started

While here, click on “Sign up” to create your new account.

Once the account has been created, you will have the option to import or create a new community. Here, we will just create a new community:

Provide the required information for the community as shown:

Voila! You will have Linen ready for use. You can now see the community is set up, you can see the channels and various other settings:

Just to verify if everything is working, you can navigate to the channel and share a post a shown:

The end!
Verdict
That is it for today on how to install Linen – Slack Alternative Searchable from Google. I hope you found this guide of great importance.
Interested in more?
- Zulip – Best Open Source Slack Alternative
- How To Install Slack on Fedora
- How To Install Slack on CentOS 8 / RHEL 8
- GitLab and Slack Integration for notifications