All Projects → beakerbrowser → Hashbase

beakerbrowser / Hashbase

Licence: mit
A Dat-hosting service for multiple users

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Hashbase

Dat Node
Node module for creating dat compatible tools on file systems
Stars: ✭ 503 (+122.57%)
Mutual labels:  dat
Dat
💾 peer-to-peer sharing & live syncronization of files via command line
Stars: ✭ 8,259 (+3554.42%)
Mutual labels:  dat
Hypercloud
A hosting server for Dat. [ARCHIVED - Use Hashbase instead!]
Stars: ✭ 96 (-57.52%)
Mutual labels:  dat
Sciencefair
The futuristic, fabulous and free desktop app for working with scientific literature 🔬 📖
Stars: ✭ 561 (+148.23%)
Mutual labels:  dat
Hyperdb Examples
a small introduction to getting started with hyperdb
Stars: ✭ 53 (-76.55%)
Mutual labels:  dat
Hypertweet
concept tweet -> hypercore thingy
Stars: ✭ 69 (-69.47%)
Mutual labels:  dat
Dathttpd
Replaced by Homebase! See https://github.com/beakerbrowser/homebase.
Stars: ✭ 282 (+24.78%)
Mutual labels:  dat
Sdk
Write your own dat app!
Stars: ✭ 215 (-4.87%)
Mutual labels:  dat
Datr
R package to interface with the decentralized dat network.
Stars: ✭ 56 (-75.22%)
Mutual labels:  dat
Dat Keyserver
a distributed PGP keyserver project based on the dat protocol
Stars: ✭ 89 (-60.62%)
Mutual labels:  dat
Dat Desktop
Peer to peer data syncronization
Stars: ✭ 627 (+177.43%)
Mutual labels:  dat
Random Access Http
Continuous reading from a http(s) url using random offsets and lengths for peers in a distributed system
Stars: ✭ 39 (-82.74%)
Mutual labels:  dat
Datradio
p2p music player for {old} beaker and dat
Stars: ✭ 77 (-65.93%)
Mutual labels:  dat
Docs
Documentation resources for dat and the surrounding ecosystem
Stars: ✭ 532 (+135.4%)
Mutual labels:  dat
Mdfreader
Read Measurement Data Format (MDF) versions 3.x and 4.x file formats in python
Stars: ✭ 131 (-42.04%)
Mutual labels:  dat
Pycftrackers
Python re-implementation of some correlation filter based tracker
Stars: ✭ 313 (+38.5%)
Mutual labels:  dat
Hyperfeed
decentralized rss publishing
Stars: ✭ 60 (-73.45%)
Mutual labels:  dat
Enoki
ultralight tools for creating p2p sites
Stars: ✭ 222 (-1.77%)
Mutual labels:  dat
How Dat Works
Protocol documentation for Dat
Stars: ✭ 164 (-27.43%)
Mutual labels:  dat
Blockchain Parser
The simpliest script for parsing Bitcoin blockchain. It made convertion of blk*****.dat files to the simple text.
Stars: ✭ 84 (-62.83%)
Mutual labels:  dat

Hashbase

Hashbase is a public peer service for Dat archives. It provides a HTTP-accessible interface for creating an account and uploading Dats. It was created to power a content-community for the Beaker Browser

Links:

Setup

On some platforms, you will need to have the following dependencies installed:

make
g++
python
autoconf
libtool

Clone this repository, then run

npm install
cp config.defaults.yml config.development.yml

Modify config.development.yml to fit your needs, then start the server with npm start.

Configuration

Before deploying the service, you absolutely must modify the following config.

Basics

dir: ./.hashbase              # where to store the data
brandname: Hashbase           # the title of your service
hostname: hashbase.local      # the hostname of your service
proxy: true                   # is there a reverse proxy (eg nginx) in front of the server?
port: 8080                    # the port to run the service on
rateLimiting: true            # rate limit the HTTP requests?
csrf: true                    # use csrf tokens?
defaultDiskUsageLimit: 100mb  # default maximum disk usage for each user
defaultNamedArchivesLimit: 25 # how many names can a user take?
bandwidthLimit:
  up: 1mb                     # maximum bytes/s upload speed
  down: 1mb                   # maximum bytes/s download speed

Lets Encrypt

You can enable lets-encrypt to automatically provision TLS certs using this config:

letsencrypt:
  debug: false          # debug mode? must be set to 'false' to use live config
  agreeTos: true
  email: '[email protected]'  # email to register domains under

If enabled, port will be ignored and the server will register at ports 80 and 443.

Admin Account

The admin user has its credentials set by the config yaml at load. If you change the password while the server is running, then restart the server, the password will be reset to whatever is in the config.

admin:
  email: '[email protected]'
  password: myverysecretpassword

HTTP Sites

Hashbase can host the archives as HTTP sites. This has the added benefit of enabling dat-dns shortnames for the archives.

sites: per-archive

This will host archives at archivename.hostname. By default, HTTP Sites are disabled.

Closed Registration

For a private instance, use closed registration with a whitelist of allowed emails:

registration:
  open: false
  allowed:
    - [email protected]
    - [email protected]

Reserved Usernames

Use reserved usernames to blacklist usernames which collide with frontend routes, or which might be used maliciously.

registration:
  reservedNames:
    - admin
    - root
    - support
    - noreply
    - users
    - archives

Monitoring

pm2: false         # set to true if you're using https://keymetrics.io/
alerts:
  diskUsage: 10gb  # when to trigger an alert on disk usage

Session Tokens

Hashbase uses Json Web Tokens to manage sessions. You absolutely must replace the secret with a random string before deployment.

sessions:
  algorithm: HS256                # probably dont update this
  secret: THIS MUST BE REPLACED!  # put something random here
  expiresIn: 1h                   # how long do sessions live?

Jobs

Hashbase runs some jobs periodically. You can configure how frequently they run.

# processing jobs
jobs:
  popularArchivesIndex: 30s  # compute the index of archives sorted by num peers
  userDiskUsage: 5m          # compute how much disk space each user is using
  deleteDeadArchives: 5m     # delete removed archives from disk

Cache sizes (advanced)

You can tweak hashbase's memory usage to trade speed against memory usage.

# cache settings
cache:
  metadataStorage: 65536   # number of memory slots
  contentStorage: 65536    # number of memory slots
  tree: 65536              # number of memory slots

Emailer

Hashbase relies on NodeMailer to send out mails (for example: required to verify a new user). The email property of the configuration will be passed as-is to NodeMailer.

In the default configuration we use the stub transport which offers a code API for tests.

# email settings
email:
  transport: stub
  sender: '"Hashbase" <[email protected]>'

hashbase has a dependency on the ses and smtp transport, which means you can use those out-of-the-box. For other transports you need to install those first.

Tests

Run the tests with

npm test

To run the tests against a running server, specify the env var:

REMOTE_URL=http://{hostname}/ npm test

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].