Use these instructions to install Geotrek-admin in an easy way on a dedicated Ubuntu Bionic 18.04 LTS server for production. For another distributions, please use the Docker installation method. It requires more technical skills. Lastly, for a developer instance, please follow the dedicated procedure.
A first estimation of minimal required system resources are:
- 2 cores
- 4 Go RAM
- 20 Go disk space
For big instances required system resources are:
- 4 cores
- 8 Go RAM or more
- 50 Go disk space or more (20 Go + estimated size of attached files like photos, including elements imported from SIT)
Software requirements are :
- Ubuntu Bionic 18.04 LTS. Server flavor is recommended but any other flavors work too (desktop…)
An Internet connection with open HTTP and HTTPS destination ports is required.
Information to prepare before installation¶
These information will be asked during the installation process and are the basic configuration of Geotrek-admin:
- The domain name or IP to use to access to Geotrek-admin web application.
- Rando server name: the domain name to use to access to Geotrek-rando website (optional, if appropriate).
- PostgreSQL host, port, user, password and DB name if you use an external DB server.
- The SRID of the projection to use to store geometries. The projection must match your geographic area and coordinates must be in meters.
- The list of languages into which translation of contents will be made
- The name or acronym of your organization
Run the following command in a shell prompt on your server:
curl https://packages.geotrek.fr/install.sh | bash
If you don’t want to use a local database, you can run the following command instead. This will prevent the script to install PostgreSQL server locally. Don’t forget to enable PostGIS extension in your remote database before installation.
curl https://packages.geotrek.fr/install.sh | bash -s - --nodb
Then create the application administrator account and connect to the web interface.
sudo geotrek createsuperuser
If you are not confident with the
install.sh script, or if you are having troubles, you can do the same operations by hand:
deb https://packages.geotrek.fr/ubuntu bionic mainto APT sources list.
- Add https://packages.geotrek.fr/geotrek.gpg.key to apt keyring.
- If you want to use a local database, install PostGIS package (before installing Geotrek-admin, not at the same time). If not, you must create database and enable PostGIS extension before.
- Install the Geotrek-admin package (
sudo apt install geotrek-admin).
Geotrek-admin is automatically installed in
The installation automatically creates an internal
geotrek linux user, owner of this directory
The Geotrek-admin Python application is located in
From Geotrek-admin >= 2.33¶
To upgrade the whole server, including Geotrek-admin, run:
apt-get update apt-get upgrade
To prevent upgrading Geotrek-admin with the whole distribution, you can run:
sudo apt-mark hold geotrek-admin
To upgrade only Geotrek-admin and its dependencies, run:
apt-get install geotrek-admin
From Geotrek-admin <= 2.32¶
First of all, make sure your current Geotrek-admin version works correctly.
Especially, after an upgrade of the Ubuntu distribution, you will have to run
before proceeding with Geotrek-admin upgrade.
Then, go inside your existing Geotrek-admin installation directory and run the dedicated migration script:
curl https://packages.geotrek.fr/migrate.sh | bash
SPATIAL_EXTENT is well set in
/opt/geotrek-admin/var/conf/custom.py (see Advanced configuration section)
Geotrek-admin is now automatically installed in
and the advanced configuration file moved to
(with spatial extent, map and modules configuration…).
See advanced configuration documentation for details.
etc/settings.ini file is replaced by basic configuration, updated with
sudo dpkg-reconfigure geotrek-admin command (database, SRID, languages, server_name, timeout…).
Update your imports, synchronization and backup commands and directories.
Geotrek-admin logs are stored in
But if Geotrek-admin does not start, take a look to systemd logs for each of the 3 Geotrek-admin services
(user web interface, API and asynchronous tasks):
sudo journalctl -eu geotrek-ui sudo journalctl -eu geotrek-api sudo journalctl -eu geotrek-celery
The output is paginated. With -e option you are at the end of the logs but you can go up an down with arrows. Type Q to quit. If you want to copy the log to a file, do:
sudo journalctl -u geotrek-ui > systemd-geotrek-ui.log
apt-get remove geotrek-admin
Media files will be left in
/opt/geotrek-admin/var directory. To remove them, run:
apt-get purge geotrek-admin
To remove dependencies (convertit, screamshooter…), run:
PostgreSQL and its database will not be removed by these commands. If need be, remove them manually.