Documentation sections

Installation files, ports, services and logs

Where the tracker's files and secrets are on the server, which ports are open, which services and volumes are created and where to check the state.

This page is for the server administrator: what the installer created on the server and where to find it. Run the commands on the server as root or with sudo. In the examples, the installation directory is /opt/micator; if you installed with the --path parameter, use your own directory. In installations made before this release, the directory and some names are different — see the section on such installations.

Installation directory

The directory is owned by root and closed to other users.

PathWhat it is
/opt/micator/.env.productionInstallation configuration and secrets: domains, owner login, database passwords, keys
/opt/micator/docker-compose.prod.ymlThe set of tracker services
/opt/micator/manifest.jsonDescription of the installed release
/opt/micator/install-state.jsonInstallation state: release version, phase, domains and owner login
/opt/micator/setup-access.txtLink to the wizard with the access code. Exists until the wizard is completed
/opt/micator/deploy/Web server and PHP configuration, installation and update scripts, wizard files
/opt/micator/db/Database schema update files
/opt/micator/data/geoip/Geo databases. During installation, city.mmdb is downloaded here; see Tracker geo databases
/opt/micator/.setup/State of the first-run wizard and its web server routes. Created during installation through the wizard and needed after it is completed. When restoring from a backup, the backup is downloaded to the restore/ subdirectory; once setup is complete, the wizard deletes it
/opt/micator/.updates/State of the installation service and the release verification key trusted-release.pem. The work/ subdirectory holds the previous installation files and release files from backups before updates
/opt/micator/.update-socket/Installation service socket
/opt/micator/.operation.lockLock against running two operations at the same time

The docker-compose.prod.yml and manifest.json files and the deploy/ and db/ directories are part of the release. On an update from the panel, they are replaced with the files of the new release, and manual edits in them are not kept.

Files outside the installation directory:

PathWhat it is
/usr/local/bin/micatorctlCommand for checking the installation and changing the owner password
/usr/local/bin/trackerctlThe same command under its former name. Exists only on installations of earlier releases and is not deleted
/usr/local/sbin/micator-client-firewallPHP network isolation program
/usr/local/lib/micator-updater/Installation service files
/usr/local/lib/micator-updater-releases/New versions of the installation service. Appears after it is updated with the install.sh --update-controller command
/etc/systemd/system/micator-setup.service, micator-client-firewall.service, micator-updates.servicesystemd services
/etc/systemd/system/docker.service.d/micator-firewall.confDocker service drop-in: the PHP isolation rules are applied before each Docker start
/etc/apt/sources.list.d/micator-docker.sources, /etc/apt/keyrings/docker.ascDocker repository. Present if the installer added it

Installations made before this release

An installation made before this release keeps its directory and its names. Updating the tracker from the panel and updating the installation service do not rename anything. The documentation examples use the names of a new installation.

WhatNew installationInstallation made before this release
Default installation directory/opt/micator/opt/tracker
Docker Compose projectmicatortracker
Docker volumesmicator_pgdata and the others starting with micator_tracker_pgdata and the others starting with tracker_
systemd servicesmicator-setup.service, micator-client-firewall.service, micator-updates.servicetracker-setup.service, tracker-client-firewall.service, tracker-updates.service
PHP network isolation program/usr/local/sbin/micator-client-firewall/usr/local/sbin/tracker-client-firewall
Installation service files/usr/local/lib/micator-updater/, /usr/local/lib/micator-updater-releases//usr/local/lib/tracker-updater/, /usr/local/lib/tracker-updater-releases/
Docker service drop-indocker.service.d/micator-firewall.confdocker.service.d/tracker-firewall.conf
Docker repositorymicator-docker.sourcestracker-docker.sources
Temporary wizard containermicator-setup-edgetracker-setup-edge

The other names on this page are the same for both installations: files inside the installation directory, Docker services, the TRACKER-PHP chain, the trk-php and trk-egress bridges.

The installation directory is chosen by the install.sh file, and the other names by the release the installation was made with. So the /opt/micator directory by itself does not mean the names are new: an earlier release installed by the current install.sh with the --bundle parameter, or by an earlier install.sh with the --path /opt/micator parameter, sits in this directory with the old names.

The list of volumes shows which names an installation has: sudo docker volume ls. Volumes starting with tracker_ mean the old names, those starting with micator_ the new ones.

A tracker moved to a new server by restoring from a backup gets the names of the release used to install the new server: a backup of the earlier installation does not carry its names over.

Access files

Only root can read the setup-access.txt file. It contains a link like http://203.0.113.10/setup/#key=… and a line “Code: …” («Код: …»). The file is needed to open the first-run wizard. After the wizard is completed, the code stops working and the file is deleted. With installation in the terminal, there is no such file.

There is no file with the owner password. The owner comes up with the password in the wizard or in the terminal; the installer does not write it to disk and does not show it. If the password is forgotten, the sudo micatorctl owner-password command sets a new one — see New owner password.

Tip.

Installations of earlier releases may have an owner-access.txt file with the owner password in plain text. After updating the tracker, change the owner password with the sudo micatorctl owner-password command (before updating the installation service — sudo trackerctl owner-password): it deletes this file.

The .env.production configuration

The file is created during installation. It contains:

  • the panel domain, the tracking domain, the email for certificates and the owner login;
  • database passwords and server keys — the installer generates them randomly;
  • the team name and logo, and the license key if it was entered in the wizard.

The owner password is not in the file. For the first launch, the installer writes only the password hash into it, from which the panel creates the owner account, and deletes the hash as soon as the panel has responded. After that, the password is changed in the panel, see My profile: password and time zone, or on the server with the sudo micatorctl owner-password command.

Do not edit the file manually. The installer, micatorctl check and the installation service read it in a strict format: lines like KEY=value without quotes or spaces. If the format is broken, the installer and micatorctl check stop with the message “The .env.production format has changed; check the configuration manually.” («Формат .env.production изменён; проверьте конфигурацию вручную.»)

Database passwords and server keys are created once and are not replaced automatically.

Ports and addresses

Only TCP 80 and 443 are published externally. The tracker's web server listens on them. The ports of the databases, PHP, the panel and the API are not published externally: requests to the panel and the API go through the web server.

AddressWhat responds
https://panel.example.comThe panel and the API at the /api/ path
https://track.example.comCampaign links, redirects, hosted pages. Of the API, only postback intake /api/v1/postback and lead intake /api/v1/lead, /api/v1/lead-file are available
Domains added in the Domains («Домены») sectionThe same as the tracking domain. A certificate is issued on the first HTTPS request and only for domains added to the tracker; see Domains

After installation through the wizard, the address http://203.0.113.10 redirects to https://panel.example.com/login, and https://panel.example.com/setup/ to the /login page.

The web server issues HTTPS certificates by itself. For this, the domains' DNS records must point to the server, and ports 80 and 443 must be reachable from the internet.

The installer does not configure ufw and does not change access rules for SSH, 80 and 443. If a firewall is enabled on the server or at the hosting provider, ports 80 and 443 are opened manually — see Server requirements and preparation.

PHP network isolation

The micator-client-firewall program restricts the network for PHP from uploaded pages. It creates the TRACKER-PHP chain in iptables and ip6tables, attaches it to DOCKER-USER and closes the PHP containers' access to the server itself through the trk-php and trk-egress bridges. For the rules to work, it enables net.bridge.bridge-nf-call-iptables and net.bridge.bridge-nf-call-ip6tables. It does not reset other rules on the server.

  • Regular PHP works without network access: outgoing connections are closed for it.
  • PHP with network access reaches only public addresses over TCP 80 and 443, and DNS. Private and reserved networks, the server's own addresses and all of IPv6 are closed for it.

The rules are applied during installation, at server boot before Docker starts, and before each Docker start. Docker starts only after the rules are applied successfully. When a page needs PHP with network access is explained on the PHP in hosted pages and network access page.

systemd services

ServicePurposeWhen it runs
micator-setup.serviceFirst-run wizardCreated during installation through the wizard. Runs until the wizard is completed and restarts by itself after a failure
micator-client-firewall.servicePHP network isolation rulesRuns once at server boot, before Docker. The active (exited) state is normal
micator-updates.serviceInstallation service (controller): installs releases on a command from the Settings → Updates («Настройки → Обновления») tabAlways; restarts by itself

With installation through the wizard, micator-client-firewall.service and micator-updates.service appear after the Launch tracker («Запустить трекер») button; when restoring from a backup, after the Restore tracker («Восстановить трекер») button. The installer enables the docker service at boot.

bash
sudo systemctl status micator-updates.service
sudo journalctl -u micator-updates.service -n 50

For another service, use its name. The log shows the reason if a service did not start. How to update the installation service itself is on the Updating the installation service (controller) page.

Docker services

All tracker containers belong to the Docker Compose project named micator.

ServicePurpose
caddyWeb server: ports 80 and 443, HTTPS certificates
webPanel
adminPanel API, reports, conversion intake and sending postbacks
redirectTraffic processing: campaign links, redirects, hosted pages
backupBackups and restore
postgresPostgreSQL 16: settings, campaigns, jobs
clickhouseClickHouse 24.8: click and conversion statistics
redisRedis 7
phpPHP-FPM 8.3 for hosted pages
php-netPHP-FPM 8.3 for pages with network access
pg-migrate, ch-migrateDatabase schema updates. They run when the tracker starts and then exit. The “Exited (0)” state is normal

The images are part of the signed release: the server does not download them from a registry and does not build them. After a server reboot, the services except pg-migrate and ch-migrate start by themselves unless they were stopped manually.

Until the tracker is launched from the wizard, ports 80 and 443 are held by the temporary micator-setup-edge container. The wizard removes it before launching the tracker.

Docker volumes

Databases, uploaded pages and certificates are stored in Docker volumes, not in the installation directory.

VolumeWhat it stores
micator_pgdataPostgreSQL database
micator_chdataClickHouse database
micator_redisdataRedis data
micator_hostedUploaded landing pages and offers
micator_ingestOn-disk click queue
micator_backup_stateStorage server connections, operation history and backup working files
micator_backup_gateTraffic pause flag during a backup, restore and update
micator_caddy_data, micator_caddy_configHTTPS certificates and web server state
micator_update_stateData of backups before updates. Created when the first update is installed from the panel
Warning.

Deleting a volume erases its data permanently. After that, databases and uploaded pages can be brought back only from a backup.

State and logs

The micatorctl command shows the installation state:

bash
sudo micatorctl status
sudo micatorctl check

status prints the version and phase from install-state.json. check additionally checks the services and HTTPS once and, on success, prints “Services and HTTPS are responding.” («Сервисы и HTTPS отвечают.») The phase values and the other responses are on the install.sh parameters and installing in the terminal page.

The installer does not keep a separate log file: it prints messages to the terminal, and the wizard shows them on its page. The messages are explained on the Installation errors and how to fix them page.

Check the state and logs of the services through Docker Compose:

bash
cd /opt/micator
sudo docker compose --project-name micator --env-file .env.production -f docker-compose.prod.yml ps -a
sudo docker compose --project-name micator --env-file .env.production -f docker-compose.prod.yml logs --tail 100 admin

Replace admin with a service name from the table above. Without a terminal, the tracker state is shown on the Status («Состояние») panel page; see System status.

What to keep off the server

  • The owner password, for example in a password manager. It is not on the server, and the old password cannot be recovered — you can only set a new one with the sudo micatorctl owner-password command.
  • Backups on a separate storage server. A backup includes the tracker data and .env.production with the server keys; HTTPS certificates are not included — see Creating a backup and the schedule. Connecting the storage is described on the Connecting a backup storage server page.
  • Access to your account: it shows the license key.

With a backup, the tracker moves to an empty server; see Restoring on a new server. When restoring in the wizard, the license key is not taken from the backup: you enter it again, see Transferring a license to another server.

Updated Need help? ↗