You can get your own PoeticMetric Analytics self-hosted website analytics instance up and running in minutes following this guide. It doesn't require any software development expertise, if you are a little tech-savvy you can do it. PoeticMetric is designed to be self-hosted with Docker, and ready-to-use Docker images are published publicly.
If you are curious, there is another documentation article that explains about the parts of PoeticMetric and how these parts communicate with each other. You can check the technical architecture documentation here.
You will need a server with Docker installed. PoeticMetric has Docker images prebuilt for architectures
linux/arm64, so make sure your servers CPU is either
PoeticMetric can run successfully on memory as low as 2GB, however, we recommend allocating at least 4GB of RAM for a smoother experience. However, keep in mind that as the traffic of your website goes up, you might need a more powerful server with a more powerful CPU and more RAM.
When you follow this tutorial, you will be deploying the latest stable version of PoeticMetric. However, a new version of PoeticMetric will be released with new features from time to time. Don't forget to check the section Updating to a new version before you leave.
PoeticMetric Analytics uses semantic versioning:
PATCHversion change (e.g. from
v1.0.1) include small changes, and mostly, bug fixes.
MINORversion changing updates (e.g. from
v1.1.0) include new features, in a backward compatible manner.
MAJORversion updates include big and important changes, most probably backward incompatible.
Even tough we suggest backing up your data periodically, and especially before performing an update, if you are going for a major version change, please pay extra attention to data backups.
Start by downloading the required Docker Compose configuration. Download the
self-hosted.zip file for the latest release, and unzip it:
$ curl -fsSL https://github.com/th0th/poeticmetric/releases/latest/download/self-hosted.tar.gz | tar -xz $ cd poeticmetric
You will find an
.env.example file that has all the required environment variables with their default values. First, make a copy of this file with the actual file name:
$ cp .env.example .env
You can leave most of them as they are, however, you will need to change some of them:
These variables will be used for setting the password the relevant component on the first run:
So, pick a different, hard to guess password for each one, and make sure you make note of these. Normally, you won't use any of these passwords while using PoeticMetric. However, if you face any issue, you will need each of them. If you lose one of these passwords, your databases may become inaccessible, and you might lose data.
GOOGLE_CLIENT_SECRET are required only for Google Search Console integration. If you are planning to use the integration, you need to obtain them from Google. If you are not planning to use, you can safely skip and leave them as empty. You can also update these variables later.
PoeticMetric has two components that are accessible by HTTP:
By the default
docker-compose.yaml, frontend uses the port
8000, and REST API
8001. If you are not going to use a domain name, or a reverse proxy, you should set these as:
If you are going to use a reverse proxy with a domain name, you need to update the variables
REST_API_BASE_URL accordingly, and configure two different virtual servers on your reverse proxy. One for the frontend, pointing to the port
8000; and another one for the REST API, pointing to the port
PoeticMetric requires Simple Mail Transfer Protocol (SMTP) for delivering e-mails that are used for notifications, password recovery etc.
SMTP_USER variables according to your e-mail service provider.
Once you are done setting up your environment variables, you can bring PoeticMetric's services up by:
$ docker compose up -d
If everything goes well, you should be able to access your self-hosted website analytics instance via the frontend URL you set in the URLs step. Go to
http://<your_frontend_base_url>/bootstrap to initialize the database schemas, and create your account.
When a fresh edition of PoeticMetric becomes available, simply follow these steps: temporarily halt PoeticMetric's services, retrieve the latest docker images, and restart the services. PoeticMetric takes care of updating the databases automatically whenever necessary.
$ docker compose down --remove-orphans $ docker compose pull $ docker compose up -d
If you have any issues setting up your PoeticMetric Analytics instance, you can ask for community members' help on GitHub Discussions.