Skip to main content

This is the Web server side of archelon. Once it is all configured and wired up to archelonc it can be used to store your shell history from all your hosts.

It is a simple Flask app that is generally designed to be wired up to an elasticsearch host to provide a nicely indexed shell history, and should be deployable for free on heroku using an elasticsearch addon.

Installation and Configuration

pip install archelond

Security is obviously important for shell history, and to setup authentication we use basic authentication using apache htpasswd files as the user database. To add one for yourself and configure archelond to use it, run something like:

htpasswd -c ~/.htpasswd username
export HTPASSWD_PATH=~/.htpasswd

After that minimal setup we can try things out with just a simple command of:

archelond

Which will fire up the debug/development server using an in memory bash history data store that is very forgetful. Once it is up, you should be able to go http://localhost:8580/, login with the username and password you created in your htpasswd file, and see a lovely welcome page. To check out the sample commands you can go to http://localhost:8580/api/v1/history or get your token for use with archelonc http://localhost:8580/api/v1/token.

Wiring Up to Elasticsearch

In order to have your history survive start ups we can use Elasticsearch. You can either install it locally, or grab it from an add-on on Heroku. Once you have the connection URL, we just need to add a couple environment variables to point at the service and set the storage provider class with something like:

export ARCHELOND_ELASTICSEARCH_URL='http://localhost:9200'
export ARCHELOND_ELASTICSEARCH_INDEX='history'
export ARCHELOND_DATABASE='ElasticData'

The index can be changed, but is the index in elasticsearch that will be used to store the history.

Running in Production

Running the archelond is good for testing out, but to run it in production you will want to run it through a proper wsgi application server. As an example, we’ve added uwsgi in the requirements and it can be run in production with something like:

uwsgi --http :8580 -w archelond.web:app

and then a Web server like nginx proxying over https in order to further secure your shell history. You could also put that into a Heroku application Procfile.

Metadata

Release files for archelond 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for archelond 0.2.1
File Size Uploaded
archelond-0.2.1.tar.gz 8.0 kB Details

Release files / archelond-0.2.1.tar.gz

Download URL archelond-0.2.1.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e597e54d74ae3debc83a0b273f5b832be7946f3d528c0511effb6221ba7202f9
BLAKE2b-256 checksum
How to use checksums
35e3956db787b19a8db51459df4aef3456f7f535737401a6d6c5d1a2c0537836
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.6.0

1 release file

0.5.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.1

1 release file

0.3.0

1 release file

This release

0.2.1 This release

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page