{"id":13537336,"url":"https://github.com/nicksherron/bashhub-server","last_synced_at":"2025-10-14T11:35:49.768Z","repository":{"id":45052352,"uuid":"238969488","full_name":"nicksherron/bashhub-server","owner":"nicksherron","description":"Private cloud shell history. Open source server for bashhub https://github.com/rcaloras/bashhub-client","archived":false,"fork":false,"pushed_at":"2023-03-30T01:30:00.000Z","size":171,"stargazers_count":311,"open_issues_count":13,"forks_count":24,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-01T15:08:28.965Z","etag":null,"topics":["bash","cli","client-server","cloud","history","server","terminal","zsh"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicksherron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-02-07T16:14:37.000Z","updated_at":"2025-03-30T01:21:35.000Z","dependencies_parsed_at":"2024-04-12T23:00:52.554Z","dependency_job_id":null,"html_url":"https://github.com/nicksherron/bashhub-server","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicksherron%2Fbashhub-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicksherron%2Fbashhub-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicksherron%2Fbashhub-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicksherron%2Fbashhub-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicksherron","download_url":"https://codeload.github.com/nicksherron/bashhub-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246756808,"owners_count":20828770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","cli","client-server","cloud","history","server","terminal","zsh"],"created_at":"2024-08-01T09:00:57.778Z","updated_at":"2025-10-14T11:35:44.730Z","avatar_url":"https://github.com/nicksherron.png","language":"Go","readme":"# bashhub-server\n[![CI](https://github.com/nicksherron/bashhub-server/actions/workflows/tests.yml/badge.svg)](https://github.com/nicksherron/bashhub-server/actions/workflows/tests.yml) \u003cimg src=\"https://img.shields.io/docker/pulls/nicksherron/bashhub-server.svg\"\u003e\n[![Go Report Card](https://goreportcard.com/badge/github.com/nicksherron/bashhub-server)](https://goreportcard.com/report/github.com/nicksherron/bashhub-server) \n\nbashhub-server is a private cloud alternative for  [bashhub-client](https://github.com/rcaloras/bashhub-client) with some\nadded features like regex search.\n \n## Features \n\n- Very simple drop in replacement for bashhub.com server and easy to [install](https://github.com/nicksherron/bashhub-server#installation) and get running with existing bashhub-client and bh command.\n- All the benefits of bashhub without having to send your shell history to a third-party\n- [Regex](https://github.com/nicksherron/bashhub-server#using-regex) search\n- [Import](https://github.com/nicksherron/bashhub-server#transferring-history-from-bashhubcom) old history from bashhub.com\n- Quickly connect any client with  access to your server bashhub-sever address/port.\n- Written in Go so it's fast and is actively maintained\n- Salt hashed password encryption and jwt authentication protected endpoints\n\n## Why? \nI love the idea behind bashhub. Having my shell history centralized and queryable from various systems whether it \nbe my home computer or from an ssh session on a server is great. However, even with encryption, \nI was a little leary of sending my shell commands to a third-party server, so bashhub-server was created.\n\n\n## Installation\n\n#### Homebrew or Linuxbrew\n```\n$ brew install bashhub-server/latest/bashhub-server\n```\n#### Docker \n```\n$ docker pull nicksherron/bashhub-server\n```\n#### Go\ngo modules are required \n```\n$ GO111MODULE=on go get -u github.com/nicksherron/bashhub-server\n```\n#### Releases \nBinaries for various os and architectures can be found in [releases](https://github.com/nicksherron/bashhub-server/releases).\nIf your system is not listed just submit an issue requesting your os and architecture.\n\n## Usage \n```\n$ bashhub-server --help\n\nUsage:\n   [flags]\n   [command]\n\nAvailable Commands:\n  help        Help about any command\n  transfer    Transfer bashhub history from one server to another\n  version     Print the version number and build info\n\nFlags:\n  -a, --addr string   Ip and port to listen and serve on. (default \"http://0.0.0.0:8080\")\n      --db string     db location (sqlite or postgres)\n  -h, --help          help for this command\n      --log string    Set filepath for HTTP log. \"\" logs to stderr.\n\nUse \" [command] --help\" for more information about a command.\n\n```\n### Running\nJust run the server \n\n```\n$ bashhub-server\n\n _               _     _           _\n| |             | |   | |         | |\t\tversion: v0.2.1\n| |__   __ _ ___| |__ | |__  _   _| |\t\taddress: http://0.0.0.0:8080\n| '_ \\ / _' / __| '_ \\| '_ \\| | | | '_ \\\n| |_) | (_| \\__ \\ | | | | | | |_| | |_) |\n|_.__/ \\__,_|___/_| |_|_| |_|\\__,_|_.__/\n ___  ___ _ ____   _____ _ __\n/ __|/ _ \\ '__\\ \\ / / _ \\ '__|\n\\__ \\  __/ |   \\ V /  __/ |\n|___/\\___|_|    \\_/ \\___|_|\n\n\n2020/02/10 03:04:11 Listening and serving HTTP on http://0.0.0.0:8080\n```\nor on docker (backend database files are persisted in container volume `/data`)\n\n```\n$ docker run -d -p 8080:8080 --name bashhub-server  nicksherron/bashhub-server \n```\nThen add ```export BH_URL=http://localhost:8080``` (or whatever you set your bashhub-server address to) to your .zshrc or .bashrc \n```\n$ echo \"export BH_URL=http://localhost:8080\" \u003e\u003e ~/.bashrc\n```\nor \n```\n$ echo \"export BH_URL=http://localhost:8080\" \u003e\u003e ~/.zshrc\n```\nThats it! Restart your shell and re-run bashhub setup.\n```\n$ $SHELL \u0026\u0026 bashhub setup\n```\n\n### Changing default db\nBy default the backend db uses sqlite, with the location for each os shown below.\n\n\n| os      | default                                                                          |\n|---------|----------------------------------------------------------------------------------|\n| Unix    | $XDG_CONFIG_HOME/bashhub-server/data.db OR  $HOME/.config/bashhub-server/data.db |\n| Darwin  | $HOME/Library/Application Support/bashhub-server/data.db                         |\n| Windows | %AppData%\\bashhub-server\\data.db                                                 |\n| Plan 9  | $home/lib/bashhub-server/data.db                                                 |\n\n\nTo set a different sqlite db file to use, run\n```\n$ bashhub-server --db path/to/file.db\n```\nPostgresql is also supported by bashhub-server. To use postgres specify the postgres uri in the --db flag with the\nfollowing format\n```\n$ bashhub-server --db \"postgres://user:password@localhost:5432?sslmode=disable\"\n```\n\n### Using Regex\nbashhub-server supports regex queries sent by the bh command (bashhub-client)\n\nWithout regex\n```\n$ bh bash\n\nbashhub setup\ndocker pull nicksherron/bashhub-server\nbin/bashhub-server version\nuntar bashhub-server_v0.1.0_darwin_amd64.tar.gz\ncd bashhub-server_v0.1.0_darwin_amd64\n./bashhub-server version\nmake build \u0026\u0026 bin/bashhub-server\ncd bashhub-server\nbrew install bashhub-server/latest/bashhub-server\nbashhub-server version\nbashhub-server --help\n```\nWith regex\n```\n$ bh \"^bash\"\n\nbashhub setup\nbashhub-server version\nbashhub-server --help\n```\nall commands with only 6 letters\n\n```\n$ bh \"^[a-zA-Z]{6}$\"\n\nwhoami\nggpush\ngoland\nggpull\n```\n\n### Transferring history from bashhub.com\n\nYou can transfer your command history from one server to another with then ```bashhub-server transfer``` \ncommand.\n\n```\n$ bashhub-server transfer \\\n    --src-user 'user' \\\n    --src-pass 'password' \\\n    --dst-user 'user' \\\n    --dst-pass 'password' \n\ntransferring 872 / 8909 [--\u003e____________________] 9.79% 45 inserts/sec\n```\n\n If you're transferring from Bashhub.com they have a rate limit of 10 requests a seconds and you are limited to your last 10,000 commands.\n\n\n\n\n\n\n\n \n","funding_links":[],"categories":["Command-Line Productivity","Go","Downloading and Serving"],"sub_categories":["Directory Navigation","Reusable Things"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicksherron%2Fbashhub-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicksherron%2Fbashhub-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicksherron%2Fbashhub-server/lists"}