Giter Site home page Giter Site logo

darth-veitcher / ahmia-site Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ahmia/ahmia-site

0.0 0.0 0.0 18.48 MB

Ahmia.fi - Hidden service search engine

Home Page: https://ahmia.fi

License: BSD 3-Clause "New" or "Revised" License

Shell 12.13% Python 87.87%

ahmia-site's Introduction

https://ahmia.fi/

Ahmia is the search engine for .onion domains on the Tor anonymity network. It is led by Juha Nurmi and is based in Finland. This repository contains crawlers used by Ahmia search engine.

Compatibility

The newest version of Ahmia is built with Python 3, Django 5 and Elasticsearch 8. You will need to know these technologies to create a working Ahmia installation. Ahmia crawls using ahmia-crawler.

Prerequisites

Ahmia-index should be installed and running

Installation guide

pip install -r requirements.txt

Configuration

This is a common step, both for local (dev) and production environment.

cp ahmia/example.env ahmia/.env

Please modify the values in .env, to fit your needs. You have to specify at least the postgresql credentials, if you are using the production settings.

Setup Website

Migrate db

python manage.py makemigrations ahmia
python manage.py migrate

Make the static files

python manage.py collectstatic

Copy Elasticsearch CA cert in place

/usr/local/share/ca-certificates/http_ca.crt

Run site in dev mode

Start development server

Development settings use sqlite as a database. Default settings should work out of the box.

python manage.py runserver

Production -- Nginx

NOTE: If your deployment directory isn't /usr/local/lib/ahmia-site replace accordingly

  • Configure and run nginx:
cp conf/nginx/django-ahmia /etc/nginx/sites-enabled/django-ahmia
service nginx start

Increase worker_connections in /etc/nginx/nginx.conf:

events {
        worker_connections 2048;
}

Production -- Gunicorn

EITHER:

  • Run gunicorn via bash scripts (work as daemons ~ edit files to change):
bash ./bin/run-ahmia.sh
bash ./bin/run-ahmia-onion.sh

OR

  • configure and run gunicorn (tested with gunicorn==21.2.0) as systemd daemon
cp conf/gunicorn/*.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable ahmia.service
systemctl status ahmia.service
systemctl enable ahmia-onion.service
systemctl status ahmia-onion.service
systemctl restart gunicorn

Edit your /lib/systemd/system/nginx.service to add ahmia-site.service ahmia-site-onion.service

systemctl edit nginx

[Unit]
After=network-online.target remote-fs.target nss-lookup.target ahmia.service ahmia-onion.service
Requires=ahmia.service ahmia-onion.service

systemctl daemon-reload
systemctl cat nginx

Delete added onions once a week

# EVERY WEEK, Tuesday 12:57
57 12 * * 2 cd /usr/local/lib/ahmia-site && venv/bin/python manage.py deleteonions >> weeklydelete.log 2>&1

License

Ahmia is licensed under the 3-clause BSD license.

ahmia-site's People

Contributors

juhanurmi avatar chamalis avatar mdhash avatar razorfinger avatar iriahi avatar dependabot[bot] avatar wtf avatar skrish13 avatar mik317 avatar obliviousparadigm avatar kriyszig avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.