No description
  • Go 71.3%
  • HTML 23.5%
  • CSS 2.1%
  • Shell 1.8%
  • Makefile 1.3%
Find a file
2021-07-11 23:42:54 +02:00
img added reindexing 2019-08-24 17:42:02 +02:00
pkg cleanup 2021-07-11 23:42:54 +02:00
scripts some bug fixes 2019-08-29 19:29:53 +02:00
vendor go1.16 and embed 2021-02-18 22:36:49 +01:00
.gitignore more work done 2019-05-01 22:25:23 +02:00
COPYRIGHT bump copyright 2021-02-18 22:53:28 +01:00
go.mod go1.16 and embed 2021-02-18 22:36:49 +01:00
go.sum updated dependencies 2020-11-12 21:22:13 +01:00
LICENSE
main.go bump copyright 2021-02-18 22:52:36 +01:00
Makefile cleanup 2021-07-11 23:42:54 +02:00
README.md bump copyright 2021-02-18 22:52:36 +01:00
sri.sh bump copyright 2021-02-18 22:52:36 +01:00
VERSION

DocStore - document server and indexing engine

Building

Requirements:

  • Go (golang) >= 1.16

Linux:

make

or offline

make vendor

OpenBSD:

GOOS=openbsd make

or offline

GOOS=openbsd make vendor

Install

Requirements:

  • tesseract
  • pdftotext

See the scripts/ directory on how to install docstore on Linux or OpenBSD.

Config

{
	"run_dir": "/var/lib/docstore",    // running directory. data will be stored here
	"user": "docstore",                // drop privileges to user
	"group": "docstore",               // drop privileges to group
	"listen_addr": "127.0.0.1:8080",   // listening <address>:<port>
	"log_file": "docstore.log",        // log file (use - for stdout, this only works in combination with 'foreground: true')
	"secret": "",                      // static hmac secret (at least 64 chars, used for JWT signing)
	"langs": ["deu", "eng"],           // languages for tesseract ocr
	"cmd_timeout": 600,                // timeout in seconds for executed teseract and pdftotext commands
	"tesseract_threads": 1,            // tesseract thread limit
	"tesseract_oem": 1,                // tesseract oem value
	"foreground": false,               // do not fork into the background
	"secure_cookie": false,            // enable secure cookie flag
	"debug": false,                    // enable debugging
	"webdav": false                    // enable webdav upload
}

Features

  • Fulltext indexing of documents
  • Custom regex based tags (see https://golang.org/pkg/regexp/syntax/)
    • The Retag All button will reapply the current tags to all indexed documents
  • Optional WebDav upload functionality
    • WebDav can be accessed at http://<ip>:<port>/webdav
    • This WebDav does only permit writing files once (reading files or creating directories is not allowed)
  • Password hashing using BCrypt
  • 2FA using TOTP
  • Content Security Policy
  • No Javascript (yet)

DocStore on OpenBSD

DocStore makes use of the OpenBSD native security features pledge(2) and unveil(2).

Usage

DocStore manages all files and directories under the $run_dir/data directory.

Do not delete or move files around in the $run_dir/data directory using the filesystem as this messes with the index mapping.

You can however add more files and directories using the underlying file system.