Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Mastodon
  3. How to install Elasticsearch on Mastodon?

How to install Elasticsearch on Mastodon?

Scheduled Pinned Locked Moved Mastodon
42 Posts 13 Posters 4.7k Views 13 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • nichu42N nichu42

    The demand for ElasticSearch is about to increase rapidly very soon:
    Full text search has just been merged in Mastodon main branch, and will be in the next version 4.2.0 (planned release date: 1st half of September).

    https://github.com/mastodon/mastodon/pull/26344

    shanelord01S Offline
    shanelord01S Offline
    shanelord01
    wrote on last edited by
    #11

    @nichu42 Completely agree. Perhaps it’s time for a package including both (or at least instructions on hire to set it up).

    Personally I’d prefer a one stop all in one install.

    1 Reply Last reply
    2
    • nichu42N Offline
      nichu42N Offline
      nichu42
      wrote on last edited by
      #12

      Now that 4.2.0 has been released, what's the plan / progress with ElasticSearch, @girish?

      Matrix: @nichu42:blueplanet.social

      R 1 Reply Last reply
      1
      • nichu42N nichu42

        Now that 4.2.0 has been released, what's the plan / progress with ElasticSearch, @girish?

        R Offline
        R Offline
        redegelde
        wrote on last edited by
        #13

        @nichu42 and when does 4,2 become available .
        Great new updates

        nichu42N 1 Reply Last reply
        0
        • R redegelde

          @nichu42 and when does 4,2 become available .
          Great new updates

          nichu42N Offline
          nichu42N Offline
          nichu42
          wrote on last edited by
          #14

          @redegelde It already is available on Github. I suppose the Cloudron package will follow shortly. The Cloudron team is usually very quick with providing updates.

          Matrix: @nichu42:blueplanet.social

          1 Reply Last reply
          1
          • scookeS Offline
            scookeS Offline
            scooke
            wrote on last edited by
            #15

            I don't blame the Staff for not implementing this (yet). The RAM requirements are simply huge. Even as an add-on, how many users are going to "add this on" and then watch their Cloudron go down in flames. Imagine the Forum then! And then we'll all be asking/demanding/pleading with the Staff to fix it, tweak it, optimize it, "it should be clearer that I need a 16GB ram machine for Cloudron" complaints that will probably even turn into "don't use CLourdon, it's a memory beast" posts here and there. If anything, it would be nice if Cloudron just made it simpler to connect to an ES install.

            A life lived in fear is a life half-lived

            nichu42N 1 Reply Last reply
            3
            • scookeS scooke

              I don't blame the Staff for not implementing this (yet). The RAM requirements are simply huge. Even as an add-on, how many users are going to "add this on" and then watch their Cloudron go down in flames. Imagine the Forum then! And then we'll all be asking/demanding/pleading with the Staff to fix it, tweak it, optimize it, "it should be clearer that I need a 16GB ram machine for Cloudron" complaints that will probably even turn into "don't use CLourdon, it's a memory beast" posts here and there. If anything, it would be nice if Cloudron just made it simpler to connect to an ES install.

              nichu42N Offline
              nichu42N Offline
              nichu42
              wrote on last edited by nichu42
              #16

              @scooke Thanks for the insights. I use Cloudron because it's very easy to use, not to save money. So I'm open to whichever solution they work out. If there won't be a solution from Cloudron, I'd appreciate if the team would let us know. I'd start finding one myself in that case, though that's an adventure I try to avoid.

              Matrix: @nichu42:blueplanet.social

              girishG 1 Reply Last reply
              1
              • nichu42N nichu42

                @scooke Thanks for the insights. I use Cloudron because it's very easy to use, not to save money. So I'm open to whichever solution they work out. If there won't be a solution from Cloudron, I'd appreciate if the team would let us know. I'd start finding one myself in that case, though that's an adventure I try to avoid.

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #17

                @nichu42 you should already be able to connect an external ES instance. I think this is the best way if you badly need this now.

                For integrating with cloudron, ES is a beast with its memory requirements as @scooke pointed out. It will take us a while to get to it and needs much thought. It's not in immediate roadmap.

                nichu42N 1 Reply Last reply
                2
                • girishG girish

                  @nichu42 you should already be able to connect an external ES instance. I think this is the best way if you badly need this now.

                  For integrating with cloudron, ES is a beast with its memory requirements as @scooke pointed out. It will take us a while to get to it and needs much thought. It's not in immediate roadmap.

                  nichu42N Offline
                  nichu42N Offline
                  nichu42
                  wrote on last edited by
                  #18

                  @girish Thanks for the clarification!

                  Matrix: @nichu42:blueplanet.social

                  girishG 1 Reply Last reply
                  1
                  • nichu42N nichu42

                    @girish Thanks for the clarification!

                    girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by girish
                    #19

                    @nichu42 I was just looking at it briefly. In case you go down this route... For some reason, they only support ES7 per https://github.com/mastodon/mastodon/issues/26544#issuecomment-1684005007 which is almost https://www.elastic.co/support/eol .

                    Also, Nextcloud ES integration now requires ES8 which could conflict with the previous ES7 requirement.

                    Finally, https://github.com/mastodon/mastodon/issues/18535 suggests OpenSearch 2.4.x might be supported.

                    Let me if you come up with something!

                    jdaviescoatesJ 1 Reply Last reply
                    2
                    • R Offline
                      R Offline
                      redegelde
                      wrote on last edited by
                      #20

                      great work.
                      For the time frame, when will Elasticsearch become avaible or not
                      i understand this is needed with the 4.2 version

                      jdaviescoatesJ 1 Reply Last reply
                      0
                      • R redegelde

                        great work.
                        For the time frame, when will Elasticsearch become avaible or not
                        i understand this is needed with the 4.2 version

                        jdaviescoatesJ Offline
                        jdaviescoatesJ Offline
                        jdaviescoates
                        wrote on last edited by
                        #21

                        @redegelde said in How to install Elasticsearch on Mastodon?:

                        For the time frame, when will Elasticsearch become avaible or not

                        As @girish said it's not yet on the roadmap, so I don't think it'll really be possible to guesitmate the time frame.

                        @redegelde said in How to install Elasticsearch on Mastodon?:

                        i understand this is needed with the 4.2 version

                        To be clear, it is not required by 4.2 (as in you can use 4.2 without it). But yes, it can be used with 4.2 and the Cloudron package for 4.2 is already available.

                        I use Cloudron with Gandi & Hetzner

                        1 Reply Last reply
                        1
                        • girishG girish

                          @nichu42 I was just looking at it briefly. In case you go down this route... For some reason, they only support ES7 per https://github.com/mastodon/mastodon/issues/26544#issuecomment-1684005007 which is almost https://www.elastic.co/support/eol .

                          Also, Nextcloud ES integration now requires ES8 which could conflict with the previous ES7 requirement.

                          Finally, https://github.com/mastodon/mastodon/issues/18535 suggests OpenSearch 2.4.x might be supported.

                          Let me if you come up with something!

                          jdaviescoatesJ Offline
                          jdaviescoatesJ Offline
                          jdaviescoates
                          wrote on last edited by
                          #22

                          @girish said in How to install Elasticsearch on Mastodon?:

                          @nichu42 I was just looking at it briefly. In case you go down this route... For some reason, they only support ES7 per https://github.com/mastodon/mastodon/issues/26544#issuecomment-1684005007 which is almost https://www.elastic.co/support/eol .

                          Also, Nextcloud ES integration now requires ES8 which could conflict with the previous ES7 requirement.

                          Finally, https://github.com/mastodon/mastodon/issues/18535 suggests OpenSearch 2.4.x might be supported.

                          I note that the Mastodon docs do now say:

                          Mastodon is tested with ElasticSearch version 7. It should support OpenSearch, as well as ElectisSearch versions 6 and 8, but those setups are not officially supported.

                          (also, I've just submitted a pull request to fix their tiny Elastis typo πŸ™‚ )

                          I use Cloudron with Gandi & Hetzner

                          M jdaviescoatesJ 2 Replies Last reply
                          1
                          • jdaviescoatesJ jdaviescoates

                            @girish said in How to install Elasticsearch on Mastodon?:

                            @nichu42 I was just looking at it briefly. In case you go down this route... For some reason, they only support ES7 per https://github.com/mastodon/mastodon/issues/26544#issuecomment-1684005007 which is almost https://www.elastic.co/support/eol .

                            Also, Nextcloud ES integration now requires ES8 which could conflict with the previous ES7 requirement.

                            Finally, https://github.com/mastodon/mastodon/issues/18535 suggests OpenSearch 2.4.x might be supported.

                            I note that the Mastodon docs do now say:

                            Mastodon is tested with ElasticSearch version 7. It should support OpenSearch, as well as ElectisSearch versions 6 and 8, but those setups are not officially supported.

                            (also, I've just submitted a pull request to fix their tiny Elastis typo πŸ™‚ )

                            M Offline
                            M Offline
                            msbt
                            App Dev
                            wrote on last edited by
                            #23

                            @jdaviescoates in that PR is room for improvement πŸ˜„

                            1 Reply Last reply
                            0
                            • nichu42N Offline
                              nichu42N Offline
                              nichu42
                              wrote on last edited by
                              #24

                              Got my ES up and running on a second VPS. In case you want to do the same, this guide was extremely helpful: https://blog.thms.uk/2023/09/mastodon-elasticsearch

                              Matrix: @nichu42:blueplanet.social

                              jdaviescoatesJ shanelord01S 2 Replies Last reply
                              2
                              • nichu42N nichu42

                                Got my ES up and running on a second VPS. In case you want to do the same, this guide was extremely helpful: https://blog.thms.uk/2023/09/mastodon-elasticsearch

                                jdaviescoatesJ Offline
                                jdaviescoatesJ Offline
                                jdaviescoates
                                wrote on last edited by
                                #25

                                @nichu42 nice one, thanks for sharing!

                                I use Cloudron with Gandi & Hetzner

                                1 Reply Last reply
                                1
                                • nichu42N nichu42

                                  Got my ES up and running on a second VPS. In case you want to do the same, this guide was extremely helpful: https://blog.thms.uk/2023/09/mastodon-elasticsearch

                                  shanelord01S Offline
                                  shanelord01S Offline
                                  shanelord01
                                  wrote on last edited by shanelord01
                                  #26

                                  @nichu42 Brilliant stuff.

                                  For me on Linode, all I did extra was to create a VLAN and connect eth1 on my Cloudron to it, as well as eth1 on my Elasticsearch server. Then used this private link to connect the two.

                                  Edit : Actually damn while troublshooting why I was having an issue getting it to work, it seems Cloudron does not recognise multiple NIC/eth interfaces. So I can't have eth1 on a VLAN with a 10.0.0.x/24 address.

                                  See Linode setup here: https://www.linode.com/docs/products/networking/vlans/get-started/

                                  Cloudron via "ip link show" isn't showing the eth1 interface at all. @girish any way to fix this toi make it work?

                                  Edit 2: Make sure to troubleshoot the network.host on the Elasticsearch server and port 9200 is open in iptables - mine was refusing connections for some reason. Working on VLAN now.

                                  girishG 1 Reply Last reply
                                  1
                                  • shanelord01S shanelord01

                                    @nichu42 Brilliant stuff.

                                    For me on Linode, all I did extra was to create a VLAN and connect eth1 on my Cloudron to it, as well as eth1 on my Elasticsearch server. Then used this private link to connect the two.

                                    Edit : Actually damn while troublshooting why I was having an issue getting it to work, it seems Cloudron does not recognise multiple NIC/eth interfaces. So I can't have eth1 on a VLAN with a 10.0.0.x/24 address.

                                    See Linode setup here: https://www.linode.com/docs/products/networking/vlans/get-started/

                                    Cloudron via "ip link show" isn't showing the eth1 interface at all. @girish any way to fix this toi make it work?

                                    Edit 2: Make sure to troubleshoot the network.host on the Elasticsearch server and port 9200 is open in iptables - mine was refusing connections for some reason. Working on VLAN now.

                                    girishG Offline
                                    girishG Offline
                                    girish
                                    Staff
                                    wrote on last edited by
                                    #27

                                    @shanelord01 Cloudron is just built on top of Ubuntu. We don't do anything to change visibility of network interfaces . All this to say "Cloudron does not recognize multiple NIC" is actually "Linux does recognize multiple NIC" . The issue is either in your networking setup or VM setup or VPS setup . Just giving you some ideas to debug πŸ™‚

                                    shanelord01S 1 Reply Last reply
                                    2
                                    • girishG girish

                                      @shanelord01 Cloudron is just built on top of Ubuntu. We don't do anything to change visibility of network interfaces . All this to say "Cloudron does not recognize multiple NIC" is actually "Linux does recognize multiple NIC" . The issue is either in your networking setup or VM setup or VPS setup . Just giving you some ideas to debug πŸ™‚

                                      shanelord01S Offline
                                      shanelord01S Offline
                                      shanelord01
                                      wrote on last edited by shanelord01
                                      #28

                                      @girish My VM host (when I SSH into it) is showing the eth1 interface correctly via "ip link show"

                                      When I use the Cloudron Terminal under my Mastodon app, it does not show the eth1 interface, only loopback and eth0.

                                      So it is not my host.

                                      Outcome is, Cloudron can't see the VLAN network on Linode - at least nothing is showing in the UI, and I am unable to use ping in the Cloudron terminal for some reason.

                                      I'll keep testing.

                                      girishG 1 Reply Last reply
                                      0
                                      • shanelord01S shanelord01

                                        @girish My VM host (when I SSH into it) is showing the eth1 interface correctly via "ip link show"

                                        When I use the Cloudron Terminal under my Mastodon app, it does not show the eth1 interface, only loopback and eth0.

                                        So it is not my host.

                                        Outcome is, Cloudron can't see the VLAN network on Linode - at least nothing is showing in the UI, and I am unable to use ping in the Cloudron terminal for some reason.

                                        I'll keep testing.

                                        girishG Offline
                                        girishG Offline
                                        girish
                                        Staff
                                        wrote on last edited by
                                        #29

                                        @shanelord01 ah, I understood what you are saying now! The Cloudron Web Terminal is a terminal into the container. The container's network interfaces are completely different from those on the host. So, what you are seeing ins expected.

                                        If I understand correctly now: you put your ES and Cloudron on the same VLAN. You are able to ping the ES from Cloudron host machine but unable to do so from the web terminal. Correct?

                                        1 Reply Last reply
                                        1
                                        • girishG Offline
                                          girishG Offline
                                          girish
                                          Staff
                                          wrote on last edited by
                                          #30

                                          I tried this out of curiosity.

                                          I installed Cloudron and attached a VLAN. Then, from a web terminal of an app

                                          root@3270ef46-f6cc-463a-bff2-33062223f536:/app/code# ip addr
                                          1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
                                              link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
                                              inet 127.0.0.1/8 scope host lo
                                                 valid_lft forever preferred_lft forever
                                              inet6 ::1/128 scope host 
                                                 valid_lft forever preferred_lft forever
                                          23: eth0@if24: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
                                              link/ether 02:42:ac:12:13:23 brd ff:ff:ff:ff:ff:ff link-netnsid 0
                                              inet 172.18.19.35/16 brd 172.18.255.255 scope global eth0
                                                 valid_lft forever preferred_lft forever
                                              inet6 fd00:c107:d509::8/64 scope global nodad 
                                                 valid_lft forever preferred_lft forever
                                              inet6 fe80::42:acff:fe12:1323/64 scope link 
                                                 valid_lft forever preferred_lft forever
                                          

                                          I ran nc -l 3000 on another server which is also in same LAN. Then, I can connect from app terminal:

                                          root@3270ef46-f6cc-463a-bff2-33062223f536:/app/code# telnet 192.0.2.3 3000
                                          Trying 192.0.2.3...
                                          Connected to 192.0.2.3.
                                          Escape character is '^]'.
                                          
                                          
                                          1 Reply Last reply
                                          2
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search