oboku
Githuboboku.me
  • Welcome
  • Contacts
  • Support & Troubleshoot
  • Platform & Tech
  • Cloud
    • Installation & usage
    • Privacy Policy
  • Self Hosting
    • Installation
  • Configuration
    • Enable features
  • Guides
    • App & Data Privacy
    • Reader
    • Collections
    • Devices & features compatibility
    • Supported books & documents
    • Adding / Synchronize contents
    • Downloading a book
    • Tags
    • Protected contents
    • Data sources
    • Directives
  • Secrets
  • Sync Providers
    • WebDAV
    • Google Drive
  • Dropbox
  • Synology
  • Development
    • Local Profile
    • Local Database
    • Covers Cache
Powered by GitBook
On this page
  • Prerequisites
  • Considerations
  • Installation with docker compose (recommended)
  • Setup environment variables
  • Setup your secrets
  • Setup compose file
  • Start
  • Update
  • Installation with Cosmos
  1. Self Hosting

Installation

PreviousPrivacy PolicyNextConfiguration

Last updated 1 month ago

Prerequisites

  • https: (Required) The web app rely heavily on service worker (notably to stream content) so you need to serve the web app through https. It can be self signed certificate. It will also work without http on localhost. The provided docker image for the web app does not embed self signed certificate.

  • HTTP/2: (Recommended) Many parallel requests needs to be done on the database, http/1 has limitations and will blocks certain requests. You need at least http/2 in front of couchdb

  • dropbox: (Optional) To have a dropbox support, you will need to create a developer account and configure credentials.

  • google drive: (Optional) To have a google drive support, you will need to create a developer account and configure credentials

Considerations

By default, there are strong limitations put in place to reduce memory / CPU usage. This allow the stack to run on cheaper servers. You can change some settings if you have a beefier server. If you plan on intensive usage with lot of books, visit our Enable featuressection. Some options can help you reduce the costs of hosting.

Installation with docker compose (recommended)

For an easier server deployment consider using and follow our next section related to cosmos

This setup assume this final minimal structure on your server:

/oboku
  .env
  /secrets
    jwt_private_key.pem
    jwt_public_key.pem
  docker-compose.yml

Setup environment variables

Provide the minimum required env variables for your compose file.

.env
# couchdb is exposed publicly so you should consider a strong password.
COUCHDB_PASSWORD=createastrongpassword
# postgres does not need to be exposed publicly but you should 
# still consider a strong password.
POSTGRES_PASSWORD=createastrongpassword

Setup your secrets

Private & Public JWT secret

From the same folder you plan to start your docker compose, run this command.

openssl genrsa -out ./secrets/jwt_private_key.pem 4096
openssl rsa -in ./secrets/jwt_private_key.pem -pubout -outform PEM -out ./secrets/jwt_public_key.pem

Setup compose file

Start

After creating your docker compose, run this command in the same directory

docker compose up -d

Update

docker compose pull
docker compose up -d

Installation with Cosmos

TODO

You can then create a docker compose for the project. We have a default one

https://cosmos-cloud.io/
here