Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Your books. Anytime. Anywhere

License

NotificationsYou must be signed in to change notification settings

svera/coreander

Repository files navigation

Coreander logo

A personal documents server, Coreander indexes the documents (EPUBs and PDFs with no DRM) that it finds in the passed folder, and provides a web interface to search and access them.

Coreander homeCoreander home

Features

  • Single binary with all dependencies included.
  • Fast search engine powered byBleve, with support for documents in multiple languages.
  • Search by author, title and even document series (Calibre'sseries meta supported)
  • Improved search for documents with metadata in english, spanish, french, italian, german and portuguese, including genre and singular/plural forms of words in the results among others.
  • Estimated reading time calculation.
  • High-performance web server powered byFiber.
  • Lightweight, responsive web interface based onBootstrap.
  • Web interface available in english, spanish and french, more languages can be easily added.
  • New documents added or removed to/from the library folder are automatically indexed (Linux only).
  • Send to email supported.
  • Read indexed epubs and PDFs from Coreander's interface thanks tofoliate-js.
  • Restrictable access only to registered users.
  • Upload documents through the web interface.
  • Download as kepub (epub for Kobo devices) converted on the fly thanks toKepubify.

Installation

Binaries for Windows 64 bit, Linux 32 and 64 bits for both X86 and ARM (Raspberry Pi and other SBCs) and Macs with Intel and Apple processors are available atreleases. Just download and unzip the one appropriate for your system.

Building from source

Coreander's only requirement is Go 1.23.

When cloning Coreander's repository, use Git's--recurse-submodules flag to also retrievefoliate-js contents as well, which is required for the reader component:

git clone git@github.com:svera/coreander.git --recurse-submodules

There are two possibilities for building Coreander from source:

  • If you haveMage installed in your system, just typemage install from the source code folder.
  • Otherwise, a simplego build orgo install will do, although no version information will be added to the executable.

How to use

Coreander is designed to be run as a service managed bysystemd or any other service manager. For example, in Raspberry Pi OS, just create a file called/etc/systemd/system/coreander.service with the following contents:

[Unit]Description=coreander[Service]Restart=alwaysRestartSec=5sWorkingDirectory=<absolute path to directory which contains coreander binary>ExecStart=<absolute path to coreander binary>PermissionsStartOnly=trueSyslogIdentifier=sleepserviceUser=<user which will execute this service>Environment="LIB_PATH=<absolute path to the library>"

then, start the service withservice coreander start. You can manage it with the usual commandsstart,stop andstatus. Refer to your service manager documentation for more information.

Coreander requires the absolute path where your documents are located as an argument. You can also pass it through theLIB_PATH environment variable.

On first run, Coreander will index the documents in your library, creating a database with those entries located at$home/coreander/index. Depending on your system's performance and the size of your library this may take a while. Also, the database can grow fairly big, so make sure you have enough free space on disk.

Every time is run, the application scans the library folder only for documents not yet indexed and adds them to the index. You can force to index all documents wether they were previously indexed or not by passing the--force-indexing flag or setting the environment variableFORCE_INDEXING totrue.

Even if the application is still indexing entries, you can access its web interface right away. Just open a web browser and go tolocalhost:3000 (replacelocalhost with the hostname / IP address of the machine where the server is running if you want to access it from another system). It is possible to change the listening port just executing the application with the-p or--port flags, or thePORT environment variable (e. g.coreander -p 4000 orPORT=4000 coreander)

Setting up an Internet-facing server

If you plan to set up Coreander in a public Internet server such as a VPS, usingCaddy as a reverse proxy is strongly recommended, as it is dead simple to set up and comes with several niceties such as HTTPS out of the box throughLet's Encrypt.

For example, if you have Coreander listening to port 3000 in your server and a domain calledcoreander.example.com that points to the IP address of your server, you can just tell Caddy to enroute requests tocoreander.example.com to Coreander by putting this in Caddy'sCaddyfile:

coreander.example.com {    reverse_proxy :3000}

Refer toCaddy documentation for more information.

Email

Some features rely on having an SMTP email service set up, and won't be available otherwise:

  • Send document to email.
  • Recover user password.

You can use any email service that allow sending emails using the SMTP protocol, likeGMX. The following flags or environment variables need to be defined:

FlagEnvironment variableDescription
--smtp-serverSMTP_SERVERThe URL of the SMTP server to be used, for examplemail.gmx.com.
--smtp-portSMTP_PORTThe port number used by the email service, defaults to587.
--smtp-userSMTP_USERThe user name.
--smtp-passwordSMTP_PASSWORDUser's password.

Send to email

Coreander can send documents through email. This way, you can take advantage of services such asAmazon's send to email, which also automatically converts EPUB and other formats to the target device.

User management and access restriction

Coreander distinguish between two kinds of users: regular users and administrator users, with the latter being the only ones with the ability to create new users and upload and delete documents.

By default, Coreander allow unrestricted access to its contents, except management areas which require an administrator user. To allow access only to registered users in the whole application, pass the-a or--require-auth flags, or theREQUIRE_AUTH=true environment variable.

On first run, Coreander creates an admin user with the following credentials:

  • Email:admin@example.com
  • Password:admin

Caution

For security reasons, it is strongly encouraged to add a new admin and remove the default one as soon as possible.

Settings

Runcoreander -h orcoreander --help to see help.

In case both a flag and its equivalent environment variable are passed, flag takes precendence.

FlagEnvironment variableDescription
--lib-pathLIB_PATHAbsolute path to the folder containing the documents.
-p or--portPORTPort number in which the webserver listens for requests. Defaults to 3000.
-b or--batch-sizeBATCH_SIZENumber of documents persisted by the indexer in one write operation. Defaults to 100.
--cover-max-widthCOVER_MAX_WIDTHMaximum horizontal size for documents cover thumbnails in pixels. Defaults to 600.
-f or--force-indexingFORCE_INDEXINGWhether to force indexing already indexed documents or not. Defaults to false.
--smtp-serverSMTP_SERVERAddress of the send mail server.
--smtp-portSMTP_PORTPort number of the send mail server. Defaults to 587.
--smtp-userSMTP_USERUser to authenticate against the SMTP server.
--smtp-passwordSMTP_PASSWORDUser's password to authenticate against the SMTP server.
-s or--jwt-secretJWT_SECRETString to use to sign JWTs.
-a or--require-authREQUIRE_AUTHRequire authentication to access the application if true. Defaults to false.
--min-password-lengthMIN_PASSWORD_LENGTHMinimum length acceptable for passwords. Defaults to 5.
--words-per-minuteWORDS_PER_MINUTEDefines a default words per minute reading speed that will be used for not logged-in users. Defaults to 250.
--session-timeoutSESSION_TIMEOUTSpecifies the maximum time a user session may last, in hours. Floating-point values are allowed. Defaults to 24 hours.
--recovery-timeoutRECOVERY_TIMEOUTSpecifies the maximum time a user recovery link may last, in hours. Floating-point values are allowed. Defaults to 2 hours.
-u or--upload-document-max-sizeUPLOAD_DOCUMENT_MAX_SIZEMaximum document size allowed to be uploaded to the library, in megabytes. Set this to 0 to unlimit upload size. Defaults to 20 megabytes.
-d or--fqdnFQDNDomain name of the server. If Coreander is listening to a non-standard HTTP / HTTPS port, include it using a colon (e. g. example.com:3000). Defaults tolocalhost.
-v or--versionShow version number.

Screenshots

Search resultsSearch resultsDocument detail in dark modeDocument detail in dark modeReading interfaceReading interface


[8]ページ先頭

©2009-2025 Movatter.jp