#community-help

Running Typesense Server as a Daemon via Systemd

TLDR Albert struggled with keeping a Typesense service running after terminal closure. Jason clarified that this is normal behaviour and advised running the server as a daemon via systemd, subsequently linking the documentation for correct setup, which solved Albert's issue.

Powered by Struct AI
9
25mo
Solved
Join the chat
Dec 02, 2021 (25 months ago)
Albert
Photo of md5-d4f647fa935546a3389362003c4ea321
Albert
07:05 PM
When I type sudo typesense-server and close the terminal it looks like that kills services when I exit the terminal when setting up my nodes. Has anyone experience this?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:07 PM
That's expected. typesense-server runs in the foreground, and the terminal kills all processes that were started through it when you exit. You instead want to run typesense-server as a daeomon through a process manager like systemd (at least on Linux)
07:07
Jason
07:07 PM
Running it in the foreground in the terminal is mainly for quick dev purposes
07:16
Jason
07:16 PM
Btw, if you install the DEB or RPM packages those come built-in with systemd unit files, so you don't have to set this up yourself
Albert
Photo of md5-d4f647fa935546a3389362003c4ea321
Albert
07:18 PM
Jason how do you that? There is nothing in the doc that say how to it like that
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:18 PM
07:19
Jason
07:19 PM
And this is how you start the Typesense process after installation: https://typesense.org/docs/guide/install-typesense.html#from-deb-rpm-package
Albert
Photo of md5-d4f647fa935546a3389362003c4ea321
Albert
10:18 PM
Thank you for all your Jason I was able to get it up and running a cluster in production now.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
10:20 PM
🙌

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3011 threads (79% resolved)

Join Our Community

Similar Threads

Resolving Connection Issues on Ubuntu 21.10

Philipe faced a problem with TypeSense running on Ubuntu 21.10. After troubleshooting, Jason and Kishore Nallan suggested a binary to solve the compatibility issue, which resolved the issue.

4

38
25mo
Solved

Discussion About Typesense Nodes Not Synchronizing Correctly

Erick experienced an issue where documents weren't updated properly in a Typesense instance running on 3 nodes. Upon requesting debug logs and configs, Jason identified that these nodes weren't part of the same cluster. They couldn't resolve the nodes' failure to connect issue and recommended a fresh installation.

2

91
23mo

Problem with Loading Records on Typesense Server

Rafael had an issue with Typesense server loop during startup after loading 8M of 15M records. Kishore Nallan identified the issue as memory shortage and advised Rafael to allocate more server memory.

20
17mo

Installing and Running Typesense Server on Fedora 35

User Edson struggled to initiate Typesense server. Jason suggested using the RC build for Fedora 35. After troubleshooting and following instructions, Edson was finally able to start their server. They discussed the need for clearer installation documentation since it was an incompatibility issue with Fedora 35.

3

32
24mo
Solved

Debugging Typesense API Key Error

James is getting an error related to the `x-typesense-api-key` header in their Typesense project. Harrison suggests passing the API key in the HTTP header, and Jason advises checking the key via curl and possibly closing a duplicate Typesense server.

1

15
24mo