| versions | ||
| .env.example | ||
| .gitignore | ||
| app.py | ||
| Caddyfile | ||
| config.example.json | ||
| decorators.py | ||
| gunicorn.conf.py | ||
| LICENSE | ||
| README.md | ||
| requirements.txt | ||
| utils.py | ||
eepynotes-api
this is the backend for upcoming self-hostable notes app
THE ONLY OFFICIAL FRONTEND IS eepynotes-fe
endpoint docs: https://notes.maxy.top/maxy/api-v2-docs-(alpha)/
Note
eepynotes-api is in alpha stage so you should expect bugs
prerequisites
- redis db
- python 3.10+ (3.12+ recommended)
install
clone this repository: git clone https://codeberg.org/maxeepy/eepynotes-api.git
vps-specific
go into the cloned repository, create a virtual environment and activate it:
linux
python -m venv venv && . venv/bin/activate
windows (PowerShell)
python -m venv venv; .\venv\Scripts\activate
after that, install required packages:
pip install -r requirements.txt
post-install
configuration
first, rename .env.example to .env and config.example.json to config.json, then configure all the values below:
.env
REDISHOST - redis host (127.0.0.1 by default)
REDISPASSWORD - redis password
REDISPORT - redis port (6379 by default)
REDISUSER - redis user (default by default)
config.json
{
"instance": {
"description": "Your description here",
"registering-option": "invite-only"
},
"limits": {
"minUsername": 3,
"maxUsername": 20,
"maxPassword": 128
},
"base_url": "https://notes.example.com"
}
there can be only one option in registering-option, the options are enabled, manual-approval, invite-only or disabled
change the character limits of username and password (when registering) to your needs in limits
base_url should be set to domain name youre going to use for your frontend, without a trailing slash
after you're done configuring eepynotes-api, register the owner account using flask reg-owner <user> <password>
save the login and password to use it for the frontend
usage
start eepynotes-api by using this command:
gunicorn -w 4 app:app
runs on 127.0.0.1:8000 by default
caddy
this repository contains an example Caddyfile that runs eepynotes-api on notes-api.localhost by reverse proxying it to 127.0.0.1:8000, you can modify it as needed