Héberger TAGUETTE soi-même
Taguette can be run in two separate ways:
- On your machine, after installing it. This requires no complex setup, and your data never has to leave your machine!
- On a server. This is more difficult to set up, but users can then use that installed version with nothing more than their web browser! We host a publicly available Taguette server at app.taguette.org at the moment, so you can feel free to use that. If you want to deploy your own server for your organization, read on!
En utilisant Docker
If you so choose, you can simply run the quay.io/remram44/taguette
Docker image. You will be prompted for an 'admin' password the first time. You can persist the data by mounting a volume over /data
, like so:
docker run --rm quay.io/remram44/taguette default-config >/srv/taguette/config.py edit /srv/taguette/config.py # Edit configuration file, see below docker run -ti -p 80:7465 -v /srv/taguette:/data --restart=always quay.io/remram44/taguette server /data/config.py
If you want to use docker-compose, you can replace the last command (after setting up the configuration file) by docker-compose up
, with a docker-compose.yml
like:
version: "2.4" services: taguette: image: quay.io/remram44/taguette command: ["server", "/config.py"] ports: ["127.0.0.1:7465:7465"] volumes: - "./config.py:/config.py:ro" - "./data:/data"
Installation "native" sur un serveur
You need Python 3.5 or better to run Taguette. Simply run pip install taguette
to install the software. To be able to import non-HTML documents, you also need Calibre installed (specifically, the ebook-convert
command).
Using a virtual environment is recommended. Example installation on Ubuntu:
apt update apt install calibre python3.5 virtualenv virtualenv --python=python3.5 /srv/taguette . /srv/taguette/bin/activate pip install taguette taguette default-config >config.py edit config.py # Edit configuration file, see below taguette --no-browser server config.py
Fichier de configuration
In either case, running the server requires a configuration file. This file contains important information, such as email server and addresses, the port number to listen on, which database to use, whether registration of new accounts is enabled, etc.
You can make Taguette print a configuration file for you to edit using taguette default-config
.
You might want to change the PORT
to 80
, or better yet configure a web-server to act as a proxy, see below.
Using a proxy server
For performance or security reasons, or simply because you want to host multiple sites on your machine, you might want to put a web-server (such as nginx or Apache) in front of Taguette. That server will then simply relay connections to Taguette (a setup we call reverse proxy). You can use it to provide encryption using TLS (recommended) for example using Let's Encrypt, free.
To help with this, we provide example configuration files that you can use.
Database
The DATABASE
setting should be a SQLAlchemy connection string. For example, you can use:
- a SQLite database file (note the 4 slashes):
sqlite:////srv/taguette/taguette.sqlite3
- a PostgreSQL database:
postgresql://user:secretpassword@localhost/taguette
(you need topip install psycopg2-binary
) - a MariaDB database (MySQL currently doesn't work):
mysql+pymysql://user:secretpassword@localhost/taguette
(you need topip install pymysql cryptography
) - ... or any of the other databases supported by SQLAlchemy. Note that we don't test any other database, so you might run into issues.