Persistent local SearX

Basically the same.

What I like about the service (not the service with a script, the service that start docker directly.), it acts like an old real service application. You can use the same tools, you would use to control a webserver or something like that. You even get the logs in you journal. You can have service dependencies. No need to run any docker commands. Also the image can be updated automatically. You can remove the container on stop, but it is not a requirement, it is if you update the image automatically.

Since it is with a service more like a normal application you install, you don’t need to know anything about docker, you can even use podman.

In your container, but with the contend you mount from your System into the container. The path that is used on your system depends on your command.

For example

-v ${PWD}/searx:/etc/searx

Depends on the folder from which you started the commands. You should know that pwd does. If not, you might want run echo ${PWD} from different folders to see what it does.

Well thank you for all this : this thread is a University degree to me !

@linux-aarhus : I installed all this system wide, was I wrong, should I reinstall on my user ? (I’m the only user, here, but I could, later on, self-host and share my searX with my Manjaro, my Debian, My CalyxOS & my son’s MacOS & iOS)

You can selfhost it and setting it up on a local debian based server is piece of cake.

I started out with a Manjaro instance on my Pi but it was a pain - so I switched the Pi to Raspian and - 1-2-3 - running.

At this stage I’m training on a 1984 VPS in Iceland with Yunohost (Debian based) :wink:

So for now I can stay with the --restart=always ?

Both approaches (should at least :wink: ) start the docker container on boot.

It is more a philosophical and administrative question: Who should be responsible for long-running processes? Is it systemd that does this for all other daemons/service on your system, or does docker itself handle the starting policies of itself.
It’s up to you.

1 Like

I have been playing with oracle cloud on free tier.

It is solely created for one pupose - running a searx engine in a docker instance - it works well.

Try it out if you like a short url sx.nix.dk

Hope you don’t mind I checked out the link and it works pretty well.I’d never heard of searx before.

I don’t mind - despite creating it for my own usage - anyone is welcome use it - hence the domain - I have been running it on a local domain out of raspberry pi and decided to move it to a public.

Let me know when/if it gets throttled - after all - searx is - sort of - leeching on existing search engines.

It is easy to move to a new virtual machine.

1 Like

Hi ! I wanted to update my install, everything seems fine, I can use my updated SearX on localhost:8888 but I can’t use it from Firefox’s search bar anymore : it leads me to https://localhost/search which gives me a connection error…

➜  ~ docker ps

CONTAINER ID   IMAGE         COMMAND                  CREATED       STATUS       PORTS                                       NAMES
cc81c8f86f5c   searx/searx   "/sbin/tini -- /usr/…"   2 hours ago   Up 2 hours   0.0.0.0:8888->8080/tcp, :::8888->8080/tcp   0823_searx
➜  ~ curl -I http://localhost:8888

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 10458
Server-Timing: total;dur=3.871
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Download-Options: noopen
X-Robots-Tag: noindex, nofollow
Referrer-Policy: no-referrer
Connection: close

➜  ~ 

To create the new instance I did
docker run --restart=always -d -v ${PWD}/searx/settings.yml:/etc/searx/settings.yml -v ${PWD}/searx:/etc/searx -p 8888:8080 -e BASE_URL=http://localhost:8888/ --name 0823_searx searx/searx

You will have to recreate your Search Engine to be

http://localhost:8888/search?q=%s

Hi, thank you for caring.

Firefox didn’t want to use this as a new engine, but you reminded me of Mycroft

Using the searx (localhost:8888 POST) one did the trick.

Thank you !

1 Like

With firefox this usually works

Customize your toolbar (rightclick → Customize Toolbar) → add the designated search field to the toolbar and save the change.

Open the search engine http://localhost:8888

Then in the toolbar click the magnifier → the gear

image

Select the added search engine as your default engine.

You can also change the order by drag’n’drop in the list.

Thats exactly what didn’t work : I could add it but it gave a connection error :confused:
Mycroft did the trick