• Resolved Ahmet

    (@ahmetp83)


    I tried on Google Could but could not make it work. Is it possible to install on Google Cloud as self-hosted?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor digamberpradhan

    (@digamberpradhan)

    Hi @ahmetp83

    Can you let us know what exactly your error is ?
    Are you having trouble setting up – typesense server on google cloud ?
    If you are then – you can ask the Typesense Slack community – https://typesense-community.slack.com/ssb/redirect to get some assistance.

    Thread Starter Ahmet

    (@ahmetp83)

    I installed the typesense. (I think 🙂 )

    I check the status, it is running and active.

    I found the key in the file etc/typesense/typesense-server.ini

    I tried http – localhost and 0.0.0.0 with the key inside the typesense-server.ini file

    Indexing looks successful but when searching nothing found. I tried with typesense cluster, it works.

    I think the setting is not right.

    I have found only 1 key but in the setting there are admin key and search key.

    Plugin Contributor digamberpradhan

    (@digamberpradhan)

    Hi @ahmetp83 ,

    I’m assuming you website is also hosted on google cloud ?
    Sorry – but as I haven’t used google cloud for hosting myself – i may not know all the answers.

    Adding localhost as the URL wouldn’t work on a production server – you would need a publicly reachable address – this is because while the indexing code is run on your server and localhost would correctly translate to your typesense server.

    But if an end user is searching on the frontend – then – localhost will not correctly resolve to your server.

    I hope this answer helps.

    Thread Starter Ahmet

    (@ahmetp83)

    Hi,

    Thank you. Yes, the website is also on google cloud.

    I tried with the public website ip but in that case indexing fails.

    Indexing only works with localhost or 0.0.0.0.

    Do I need to add public ip to anywhere else, so indexing will not fail?

    Plugin Author CodeManas

    (@codemanas)

    Hello @ahmetp83 ,

    It would be easier to get faster replies if you post your question in the community forum here: https://typesense-community.slack.com/ssb/redirect

    To make the self hosted server work, i used a reverse proxy on my domain. When the TYPESENSE-API-KEY is present, the requests are redirected to typesense.

    RewriteEngine On
    RewriteCond %{HTTP:X-TYPESENSE-API-KEY} !^$ [OR]
    RewriteCond %{QUERY_STRING} (^|&)x-typesense-api-key=.+(&|$)
    RewriteRule ^(.*)$ http://127.0.0.1:8108/$1 [P,L]
    
    Header set Access-Control-Allow-Origin "*"
    • This reply was modified 2 years, 4 months ago by sannin. Reason: Improve code to include query parameters

    Btw, when using a self hosted typesense server, the collections that are being created should be prefixed by the sitename.

    Something like example.com.post, example.com.product etc.

    Plugin Author CodeManas

    (@codemanas)

    Hello @ahmetp83 ,

    Please let us know if the solution by @sannin had worked for you.

    • This reply was modified 2 years, 4 months ago by CodeManas.
    Thread Starter Ahmet

    (@ahmetp83)

    Hi,

    I set a firewall rule that allows port 8108 (protocol TCP). Then it worked.

    Kishore suggested that in the community forum.

    • This reply was modified 2 years, 4 months ago by Ahmet.
    Plugin Contributor digamberpradhan

    (@digamberpradhan)

    Hi @ahmetp83 ,

    Glad Kishore was able to help and you’ve got it going.
    Cheers.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘On Google Cloud’ is closed to new replies.