How to install Elasticsearch on Mastodon?
-
Do I need an external server, or should I install an elasticsearch app on Cloudron, or can I install it directly from the Ubuntu via code.
https://docs.joinmastodon.org/admin/optional/elasticsearch/
I'll describe my installation process and the problems I encountered.
First connect to the VPS using Terminal on Mac.
type:
apt install openjdk-8-jre-headless
The result is
Then I deleted the file according to the path. This code works again.
Enter code:
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
Message:
gpg: failed to start agent '/usr/bin/gpg-agent': No such file or directory gpg: can't connect to the agent: No such file or directory
To solve the above problem, I use
apt install gpg-agent
.again
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
Enter code:
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
apt update && apt install elasticsearch
Then turn Mastodon off and on again in Cloudron.
Modify the
.env.production
file.ES_ENABLED=true ES_HOST=localhost ES_PORT=9200
Turn Mastodon off and on again in Cloudron.
Finally at this step it does not work.
RAILS_ENV=production bundle exec rake chewy:upgrade
Terminal Tips
-bash: bundle: command not found
-
@username said in How to install Elasticsearch on Mastodon?:
Do I need an external server, or should I install an elasticsearch app on Cloudron, or can I install it directly from the Ubuntu via code.
You will need an external server because we don't support installing additional packages on the server since it might break updates. At some point we do plan to integrate ElasticSearch into Cloudron. I think some other apps like nextcloud require this as well. For the moment, just install it on a ubuntu or equivalent outside Cloudron.
-
@girish any time frame for that, additional packages
Would be great -
@girish said in How to install Elasticsearch on Mastodon?:
At some point we do plan to integrate ElasticSearch into Cloudron.
That would be very helpful and useful.
@girish said in How to install Elasticsearch on Mastodon?:
apps like nextcloud require this as well
yeah Elasticsearch is needed to get proper full text search working on Nextcloud.