ChaptersOperations
Getting started
Traffic
Team and integrations
Server and reference
DocumentationServer and reference
Operations
On this page
Running the tracker: status and logs, background jobs, the postback tester, attack protection, server commands, updating, backups, resources and disk space.
Status and logs (Maintenance)
Status — live services (edge with rps and p95, api, worker), event queues and their lag, background jobs, database sizes, Redis memory, server load, disks, the last backup, geo databases, currency rates and warnings: a service does not respond, a queue is lagging, low disk space, Redis is more than 80% full, domains with DNS/SSL errors, no recent backup. Critical warnings are duplicated in “Needs attention” on the dashboard. A scheduled task that ended with an error (backup, bot lists, geo databases) is retried after 1/12 of its period (no earlier than in a minute), with each next error twice as late, rather than after a whole period. Among the warnings:
| Warning | What it means and what to do |
|---|---|
| Events are not processed after 5 attempts | the storage rejects specific events (the rest flow past them) — see the worker log, “left pending” |
| Queue …: N events could not be processed | after ~50 attempts an event is moved to “ |
| Postbacks/Click API requests rejected by the rate limit | networks often do not resend a postback after a 429 — conversions are lost; raise or remove the limit |
| Postback keys shorter than 12 characters / a spike of wrong keys | a short key can be brute-forced — replace it with a long one |
| Postbacks with a network key from a foreign address | rejected (403): the network changed its addresses — add them in its card; otherwise its key has leaked — change it (section 05) |
| Network “…”: sales spike in an hour | ≥ 10 sales in an hour and 5 times more than the average hour of the week — check the postback log; if they are fake, give the network its own key and turn on “Own key only” (section 05) |
| AURUM_SECRET_KEY is shorter than 32 bytes | the key is easier to guess; it is also the password pepper — replace it only together with a password reset (with a key shorter than 16 bytes the tracker does not start in production) |
| The admin panel is open on every domain / the admin domain receives traffic | landings on this domain run in the admin origin — move the admin panel to a separate domain without campaigns (section 01) |
| NodeID used by several edges | subids of different edges may collide — set distinct EDGE_NODE_ID / non-overlapping region ranges |
| Edge panics recovered | a click is not recorded on a panic — see the edge log, “edge panic” |
Write reliability. edge answers the visitor after the event is written to Redis or to the
on-disk journal (it waits no longer than 100 ms; a postback — up to 2 s), so a process crash does not lose
accepted clicks and postbacks. A network postback also survives a crash of the whole server (a power
outage): Redis writes AOF to disk once a second, so edge first appends the postback to its own
data/journal-*/postbacks-N.wal file with fsync, then to Redis; every 0.5 s a WAITAOF check
confirms that the AOF is written, and the confirmed part of the file is discarded. After a restart the
unconfirmed remainder is replayed into the queue (the handler recognizes an already processed postback by its
ID). Measured on Linux: 500 postbacks/s — p95 acceptance 10.7 ms. Edge metrics:
aurum_edge_postback_aof_wait_seconds, aurum_edge_postback_aof_unconfirmed_total; in the edge status —
postback_wal_pending (bytes waiting for confirmation). Redis without AOF or older than 7.2 — as before. A postback
that arrived before the click became visible is retried for up to 8 minutes. An event that the database or
ClickHouse does not accept does not stop the queue — it stays pending, and the rest are processed. Chaos tests
(SIGKILL of edge and worker, stopping PostgreSQL, Redis, ClickHouse under load) — no losses.
Logs: system (warnings and errors of services), traffic (click traces), postbacks,
S2S, domain SSL/DNS, stream monitoring, audit. Each log has CSV (an export with the current filters, up to
100 thousand rows) and, for an administrator, “Clear…”: records before a date or all of them, confirmation with
the word DELETE, an audit entry. The audit log cannot be cleared manually — only by the retention period. A click on
a row of any log (and of the click and conversion logs) opens a details window (ui/Details.tsx): sections,
one field per row with alternating background, requests and JSON broken down into parameters, value copying.
What’s new. After an update, administrators once get a message “AurumClick updated to vX” with the list of changes of all versions since the previous message — in the bell, in team Telegram or Slack and in private Telegram, if it is selected. A long list is truncated, the full one is behind the “Open” link. There is no message after a rollback.
Background jobs — a queue of imports, exports, recalculations and cleanups with progress; a queued
or running job can be cancelled (here and in the pop-up job list in the header): it stops at the
next progress mark. Two jobs run at a time (JOB_SLOTS in .env), plus one more slot (JOB_FAST_SLOTS) —
only for short ones: costs from CRM and API (update_costs), status changes, chain check, “Load costs for N
days” — they do not wait for a Keitaro import or a backup. Keitaro statistics wait for the object import in the
queue without taking a slot.
Postback tester — testing the setup without a network: pick a campaign, “Open the campaign
link” — the click appears in the list within a couple of seconds; select it, set the status, amount, currency and
other parameters and send. The postback goes the usual way (queue → handler → conversion →
S2S and platform events — by a checkbox), the result, the conversion and the outgoing postbacks are visible at once.
In the postback log such records are marked “[test]”, the action is written to the audit log. Steps 7–8 of the
wizard on the dashboard lead here too. Via the API — POST /tools/postback_test.
Clean statistics — clicks and conversions of the selected campaigns (with no selection — of all) for all time or a period; a background job, confirmation with the word DELETE, an audit entry.
Archive — deleted campaigns, streams, offers, landings, sources, affiliate networks, domains and groups with the archiving date: restore one or all, delete forever (confirmation by name) and empty the archive of a section (administrator, the word DELETE). Clicks and conversions of objects deleted forever stay in reports under their IDs. The “Archive” tab of the lists has the same actions for the selected items.
Tracker health alerts and external monitoring
Notifications. Once a minute the worker checks the tracker and reports to administrators —
in the bell and in Telegram (the “Tracker health” type, turned on where “Queue lag” already arrives, and for
new users): there is not a single live edge or api; the last configuration backup failed;
no successful backup in 48 h; events in <stream>:dead or stuck. A notification comes when the problem appears, a
reminder every 6 h while it lasts, and “recovered” when it is over.
If the whole server is down, the worker sends nothing. That is why there is external monitoring (“Settings → Alerts → External monitoring”):
- “I’m alive” signal. Create a heartbeat/cron check at a monitoring service (healthchecks.io, UptimeRobot “Heartbeat”, Better Stack or another) with a 1-minute period and a 3–5 minute grace time, and paste its URL. A healthy tracker (edge and api are running, no events are stuck) sends a GET to it once a minute; if the signal stops, the service itself raises the alert (email, Telegram).
- External address checks — at the same monitoring service: an HTTP check of the service campaign link
(
https://<domain>/<alias>, response 200/302) and of the admin panel address, if it is open to the service by IP. - Neighbour servers. If you have several trackers, set on each of them the link of the neighbour’s service campaign: a HEAD request once a minute, a response with a code below 500 means the server is alive; three failures in a row — the “Server is not responding” notification, once it answers — “responding again”.
The result of the last check (whether the tracker is healthy, the last signal and the neighbours’ responses) is on the same card.
Protection from hacking and attacks
Built into the tracker: passwords — argon2id, a 15-minute lockout after 10 failed sign-ins (login +
address), at most 20 sign-in attempts per minute from one address under any logins (over that — “Too many
requests”, the password is not checked; requests from the server itself are not limited; a login longer than
256 and a password longer than 1024 bytes are not checked), a one-time 2FA code and a one-time 2FA sign-in step
(one password check — one session), the live admin connection (notifications, feed) is closed immediately
on sign-out, session end, password change and user block, otherwise within a minute,
sessions in an httpOnly cookie with a CSRF token; the admin panel — only on domains with “Admin access”, by the server
IP (if enabled) and from whitelisted addresses; CSP, X-Frame-Options, HSTS headers,
X-Content-Type-Options: nosniff (also on all edge responses — landings, clicks, postbacks),
no-store for API data; rate limits — postbacks, Click API, Admin API keys; integration secrets
are encrypted (AES-GCM), keys and tokens are masked in logs. Caddy closes slow connections
(headers — 10 s), cuts headers larger than 64 KB and traffic bodies larger than 10 MB. The tracker services
run as a separate user without special kernel privileges, edge — with a read-only file
system; PostgreSQL, ClickHouse, Redis and the API are in an internal network with no outbound access; landing PHP is
in a separate sandbox without access to the databases, without the admin sign-in cookie and service headers, with
a 32 MB response limit, 128 MB of memory per request (a landing cannot lift it) and 2 GB for the whole sandbox
(PHP_MEM_LIMIT in .env); php-fpm accepts requests only from edge (landing code cannot reach it
directly and lift the folder restriction), .user.ini from the archive has no effect; the temporary directory /tmp
(64 MB) is shared by landings — do not keep secrets in it (sources and settings of other landings are not accessible);
from the sandbox only the
internet (calling the network), the tracker on 80/443 and DNS are reachable — the server itself (SSH, sites.d
services), the hosting provider’s private networks, the cloud metadata address 169.254.169.254 and edge bypassing
Caddy are closed (the AURUM-SANDBOX iptables rules are set by the installer and aurum update, the agent restores them every
minute; check — sudo aurum sandbox-firewall check); a PHP response does not lift the browser sandbox for a team
member (CSP is extended, not replaced) and does not set the admin session cookie; service page files (.env,
*.sql, *.bak…) are not served to visitors. Admin redirect to HTTPS: Caddy trusts the X-Forwarded-Proto header
only from Cloudflare and private networks (a tunnel), it cannot be forged directly over HTTP.
What to do on the server:
- Ad domains — through Cloudflare (the orange cloud): no tracker can withstand a volumetric DDoS attack on
the channel, Cloudflare absorbs it. The tracker takes the visitor IP from
CF-Connecting-IPonly from Cloudflare addresses. - The admin panel — on a separate domain not used in ads; an IP whitelist (Settings → Security) and 2FA for all administrators.
- Firewall: only 80, 443 and SSH are open from outside; SSH — with keys, no password.
- SSH password guessing —
sudo aurum crowdsec on(below). - Updates:
aurum update(security fixes come with tracker versions) and automatic OS security updates; backups — in S3.
SSH protection from password guessing (CrowdSec)
Off by default. The server owner turns it on:
sudo aurum crowdsec on --allow 203.0.113.10,198.51.100.0/24
-
SSH only. CrowdSec reads only the sshd log and turns on only the SSH password guessing scenarios (
crowdsecurity/sshd). HTTP scenarios, web server logs and AppSec are not connected. If the package wizard installed them,onremoves them and names them. A false block over HTTP would cut off real visitors. -
Only SSH sign-in is blocked. An address that guessed passwords and addresses from the CrowdSec community list cannot connect to the sshd ports. The port is taken from the sshd settings, a non-standard one too. Landings, clicks and postbacks on 80/443 open for such an address as usual.
-
Exceptions — these addresses are never blocked:
- the server itself and private networks (cluster nodes, tunnels);
- the address you signed in from and turned the protection on;
- addresses from
--allow(an IP or a network, comma-separated).
Running
on --allow …again adds addresses,--reset-allowreplaces the list. Add the addresses of your team and of the machine you deploy releases from — then random sign-in errors will not lock them out of SSH. -
What is installed: the
crowdsec,crowdsec-firewall-bouncer-iptablesandipsetpackages from the CrowdSec repository (Debian and Ubuntu, about 50 MB). The CrowdSec API runs on 127.0.0.1:8080. If the port is busy, the command stops before installing. -
aurum crowdsec status— read only: services, ports, how many addresses are blocked, scenarios. It warns if anything other than SSH is connected or password sign-in is enabled. -
The list of blocked addresses —
sudo cscli decisions list. To unblock an address —sudo cscli decisions delete --ip <address>. -
sudo aurum crowdsec off— turn it off. The services stop, the rules are removed, the packages and exceptions stay. -
After a reboot the rules are rebuilt by the
aurum-ssh-guardservice. The update agent checks them every minute and restores them if they were removed or the sshd port changed. -
Locked yourself out of SSH (the address is not in the exceptions)? Sign in from another address or through the hosting provider’s console. Then run
sudo cscli decisions delete --ip <your address>andsudo aurum crowdsec on --allow <your address>.
Prometheus metrics
edge serves /metrics on port 9101, worker — on 9102 (inside the Docker network, not published outside; edge does
not serve metrics to the PHP sandbox, where landing code runs):
edge requests and latency by type (aurum_edge_*), snapshot rebuilds, panics; queues — length,
pending, lag, dead-letter, stuck (aurum_queue_*); outgoing S2S by result
(aurum_s2s_sent_total); failing integrations (aurum_integrations_failing); Go memory and runtime.
A ready Grafana dashboard — deploy/grafana/aurumclick.json (Dashboards → Import, Prometheus data source).
Metrika
The “Status” page has a “Metrika” row: packets received per second, edge buffer fill, dropped,
table space, pause. Edge Prometheus metrics: aurum_bh_packets_total, aurum_bh_rejected_total{reason},
aurum_bh_dropped_total{table,reason}, aurum_bh_buffer_bytes{table}, aurum_bh_batches_total,
aurum_bh_insert_seconds, aurum_bh_flush_total. The edge buffer is the BH_BUFFER_MB variable (64 MB).
Space and disk protection — Behavior analytics. Session replay recordings have
their own quota with a “fits N days” forecast; when space runs out, the oldest days of recordings are deleted
(notification, audit). Metrika alerts (broken form, JS errors, slow page, engagement drop, suspicious
source) — “Settings” → “Alerts”.
Command line
On the server — aurum (a wrapper in /opt/aurumclick/aurum):
aurum status
| Command | What it does |
|---|---|
aurum status |
a summary like on the status page |
aurum logs [service] |
container logs |
aurum update |
update without losing clicks (below) |
aurum smoke [seconds] |
a check after an update: all services are healthy, a campaign link responds, every PHP pool responds to edge (a ping without running page code), the admin panel opens; during the watch period (120 s by default) — not a single restart or panic (including recovered “edge panic”, “api panic”), no more than 30 errors in the logs and not five times above the background before the update, the click queue does not pile up. This is how a release checks a server before updating the next one; if the check fails and the database schema did not change, the release rolls the server back to the previous version by itself |
aurum sandbox-firewall [check] |
set (or check) the PHP sandbox network rules |
aurum crowdsec on [--allow …] | off | status |
SSH protection from password guessing, SSH only (above, “SSH protection from password guessing”); status is read only |
aurum agent install |
the update agent for updating from the interface (a systemd timer) |
aurum sites |
check and connect third-party sites from sites.d without dropping connections (below) |
aurum backup / aurum restore <file> / aurum restore-stats <file> |
a backup (with a statistics copy) and restore of settings and data / statistics |
aurum ctl version |
version and edition |
aurum ctl admin create <login> |
create an administrator |
aurum ctl admin reset-password <login> |
a new password (sessions are ended) |
aurum ctl admin reset-2fa <login> |
turn off 2FA (lost phone) |
aurum ctl apikey create --login <login> [--name N] |
a user API key |
aurum ctl domain add <domain> [--index-campaign ID] [--admin] [--cloudflare] |
add a domain |
aurum ctl settings get [key] / set <key> <json> |
system settings (for example, settings set admin_access_by_ip true) |
aurum ctl stats clean --campaign ID[,ID] [--from --to] |
clean statistics (a background job) |
aurum ctl conversions import file.csv [--no-s2s] |
import conversions |
aurum ctl conversions resync [--from YYYY-MM-DD] |
rebuild ClickHouse conversions from PostgreSQL |
aurum ctl conversions resync --flags |
recalculate the type flags (“in conversions”, “in revenue”, group) in all ClickHouse conversions — as a background job, month by month |
aurum ctl geo update |
download the DB-IP Lite geo databases |
aurum ctl bots import ip|ua <file> [--replace] / bots export ip|ua |
a bot list from a file / to a file |
aurum ctl blobs upload <folder> |
landing files — to S3 (below) |
aurum ctl keitaro import --url … --key … [--dry-run] |
import from Keitaro |
aurum ctl cache flush |
rebuild the edge configuration |
aurum ctl migrate status |
database migration state |
Updating
New versions come out about once a week, urgent fixes — as needed. Updates are available while the license is valid.
From the interface — Maintenance → Updates: the running version, the available version and the
“Update to …” button. The update is performed by the agent on the server (aurum agent, installed by the installer);
the result and the log are visible on the same page. The same from the server console — sudo aurum update.
How an update goes. The release is downloaded from the license server, and its signature and checksums are verified before anything is applied: a substituted or damaged release is not installed. Before the version changes, a copy of the PostgreSQL database is made (campaigns, streams, offers, settings, conversions; the last 3 are kept). Then migrations are applied, the worker restarts, and then the two edges one by one — while one restarts, the other takes the traffic. Clicks during the restart of the storages pile up in the queue and are written afterwards: tested under a load of 300 clicks per second — as many were sent as were recorded.
Automatic rollback. If after an update api, worker or edge did not become healthy and the database schema
did not change, the tracker returns to the previous version by itself, together with its configuration. Images are
kept for three versions: the current one and two you can roll back to.
Manual rollback. The “Roll back to vX” button next to “Update” is there if the last update did not change the
database schema: services return to the previous version one by one, data does not change. If the schema changed —
roll back over SSH: sudo aurum rollback --with-db (migrations down to the previous schema, and if that fails — the
database from the pre-update copy). The copy is restored in a single transaction: if it could not be read in full, the
database stays as it was.
ClickHouse columns. There is no statistics copy before an update: a schema rollback deletes the columns added by the new version together with their values (clicks and conversions remain). Before that,
--with-dbwarns and asks for confirmation.
Service memory caps. edge, api and worker have a container memory cap calculated from the server memory
(edge — 1/8 of RAM, api — 1/4, worker — 1/3). A leak or a heavy job in one service does not take memory from
PostgreSQL, ClickHouse and Redis: the service restarts, the second edge takes the clicks. The values can be adjusted
in .env (EDGE_MEM_LIMIT, API_MEM_LIMIT, WORKER_MEM_LIMIT), then run sudo aurum update.
A third-party site on the tracker server
Ports 80 and 443 are taken by the tracker’s Caddy, so your own site on the same server (for example, a service on
port 8787 under the stats.example.com domain) is connected to it with a file in the /opt/aurumclick/sites.d/
folder: <name>.caddy, a regular Caddy site block. Tracker updates do not touch the folder contents — they do not
overwrite, delete or move them; edits of /opt/aurumclick/Caddyfile itself are overwritten by an update.
stats.example.com {
tls /data/vsl-cert/cf-origin.pem /data/vsl-cert/cf-origin.key
reverse_proxy host.docker.internal:8787
}
- Service address. Caddy runs in a container:
127.0.0.1for it is the container itself. A service on the server is reachable by the namehost.docker.internal— this is thedocker0address (usually172.17.0.1), and it does not change when the tracker networks are recreated. Let the service listen on this address (172.17.0.1:8787) — the port is not visible from outside. With ufw enabled, allow the port for containers:ufw allow from 172.16.0.0/12 to any port 8787 proto tcp. Landings (the PHP sandbox) cannot reach such a service — this is intended: the sandbox runs someone else’s code. - Certificate. Without the
tlsline Caddy issues a Let’s Encrypt certificate itself (the domain’s A record points to the server). Put your own certificate (for example, a Cloudflare Origin certificate with “Full (strict)” SSL) into/opt/aurumclick/data/caddy/<folder>/— in the container it is/data/<folder>/. - Tracker rules. A site with a specific domain takes priority over the tracker’s general rules and does not get them: its domain has no admin panel, API or campaigns, and certificate issuance for tracker domains works as before. Do not add the third-party site’s domain to the tracker’s “Domains”.
- Apply —
sudo aurum sites: Caddy checks the configuration and reloads it without dropping connections. If the file has an error, the command shows it, Caddy stays on the previous configuration, and the tracker keeps working. - On an update (
aurum update, the button in the interface) the new Caddy configuration is first checked together withsites.d. If a file has an error, the tracker services are updated anyway, Caddy stays on the previous configuration, and the update ends with an error with the Caddy text and a hint: fix the file and runaurum sites. The file is not deleted or rolled back.
Backups
Daily (Settings → Security → “Backups”; the first one 5 minutes after the tracker starts, then once a day) and with
the “Back up now” button: the configuration and conversions database (pg_dump) and landing files in a single
aurumclick-YYYYMMDD-HHMMSS.tar.gz archive; the last N are kept (“Copies to keep”), and if configured they are
uploaded to S3-compatible storage. List, size and download — Maintenance → Backups; the date of the last backup is
on the “Status” page (no recent backup — a warning).
Turning backups off and freeing space. At the top of the “Maintenance → Backups” page there are the
“Make backups” and “Back up click statistics” switches (saved immediately, a password is required) and how much space
the backups take on disk. When off, the tracker does not make daily backups, does not check that they restore and
does not warn “no recent backup”. Existing backups are not deleted by themselves (old ones are removed only when a new
one is created) — each backup row has a “Delete backup” button: the file leaves the disk immediately, a full
statistics copy — together with its incremental copies; the copy in S3 stays. Deletion requires a password and
notifies administrators. The database copy before an update (without files, the last 3, tens of MB,
data/backups/pre-update) is always made — it is needed for a rollback.
Restore check. A backup that has never been restored is not a backup. Once a
week (Sunday ~04:30 server time, the aurum-backup-verify timer, installed by aurum update) the server
restores pg.dump of the latest configuration backup in a temporary PostgreSQL container of the same image (no
network, data in a temporary folder of the backup volume, ~3 dump sizes of space are needed) and compares the numbers
of campaigns, offers and conversions with the working database at the time of the backup (at least 99% in the
backup). The result is on “Status” (a failure is an alert) and in a notification to administrators “The backup
restores” / “The backup does NOT restore” (bell, Telegram). Manually — sudo aurum backup-verify. The server cannot read an encrypted backup (only you have the decryption key): the check is
marked “skipped”; check such a backup on your own computer with the key — by decrypting it and restoring it into a
temporary PostgreSQL.
S3. An archive larger than 512 MB goes to S3 in parts (multipart upload, parts of 64 MB and
larger; a single PUT is limited to 5 GB, and a backup with landing files after a move from Keitaro exceeded it); if
a part fails, the upload is aborted and no incomplete parts are left in the bucket. After uploading, old backups are
deleted in S3 too by the same “Copies to keep”: configuration backups (aurumclick/aurumclick-…) — the last N,
statistics copies (aurumclick/stats/…) — by the disk rules (a full copy that has needed incremental copies stays).
Other objects in the bucket are not touched. The temporary PostgreSQL dump is written to the backup directory
(.tmp-backup-…), not to the container’s system /tmp: the check below sees its space.
Disk space. A backup does not fill up the disk the tracker databases run on: 2% of the disk (at least 1 GiB)
always stays free. Before writing, the space is estimated by the size of the previous backup; if it is not enough,
old backups beyond “Copies to keep” are deleted first, if that frees enough space (the latest complete one and
backups younger than 30 minutes are never deleted), otherwise the backup is not created. While writing, the space is
checked every 64 MB: once it reaches the reserve, writing stops and the incomplete file is deleted. In both cases the
backup list and the “Status” page show the error not enough disk space for the backup with the figures: lower
“Copies to keep”, set up S3 upload or enlarge the disk. A backup with landing files can be large (after a move from
Keitaro — tens of gigabytes): the server must have more free space than its size.
Restore (the file is from /opt/aurumclick/data/backups):
aurum restore aurumclick-20261013-204702.tar.gz
A restore does not break anything halfway: the archive is unpacked on the data volume next to the current page
files (about as much free space as the backup takes is needed, plus a 2% disk reserve; if it is not enough, it
refuses before starting, and space is also checked along the way), then the current files are swapped for the new
ones by renaming, and only after that the database is restored in a single transaction. A truncated archive, lack of
space, Ctrl-C or a database error — the page files and the database stay as they were. If the server shut down
exactly at the moment of the swap, the next aurum restore refuses and names the folder data/blobs/.restore-…/old
with the old files — put them back or delete the folder if the restored files are complete.
Backup encryption. A backup is the whole configuration, conversions, users and offer files (for offers moved
from Keitaro, order.php holds network keys). That is why it is worth encrypting: in “Settings → Backups” →
“Backup encryption key” paste an age public key (age1…, several are allowed,
separated by spaces — for example, the owner’s and a spare one). Backups become aurumclick-….tar.gz.age: they can be
read and restored only with the private key, which is not on the server. Without a key backups are not
encrypted, and the “Status” page shows a warning. A new S3 upload cannot be turned on without a key (one already
configured keeps working, with a warning).
-
The key pair — on your own computer:
brew install age(macOS) orapt install age, thenage-keygen -o aurumclick-backup.key. The# public key: age1…line is the public key for the settings. From the server (without signing in to the admin panel) the key can also be set withaurum ctl settings set backup.encrypt_to age1…. -
The private key (
AGE-SECRET-KEY-…) — not on the tracker server and not next to the backups: a password manager and a second copy offline. If the key is lost, encrypted backups cannot be restored by any means. -
Restore: put the key on the server for the time of the restore (it goes into the container through stdin and does not get into the backup directory), then delete it:
aurum restore aurumclick-20261027-204809.tar.gz.age --identity /root/aurumclick-backup.keyTo check a backup locally without the server:
age -d -i aurumclick-backup.key backup.tar.gz.age | tar -tz. -
Integration secrets and API keys in the database are additionally encrypted with the tracker key
AURUM_SECRET_KEYfrom/opt/aurumclick/.env— it is not in the backup. Restoring on a new server needs it too: keep.envtogether with the private backup key, separately from the backups themselves (a password manager and a second copy offline). Until an administrator presses “I saved .env” on “Status”, a warning “the tracker key backup is not confirmed” stays there; after changingAURUM_SECRET_KEY, confirm again. Without.env, after a disk failure the passwords of all users are invalid and integration keys cannot be decrypted. -
Statistics copies (ClickHouse,
data/backups/stats) are not encrypted: they hold clicks and platform statistics, without configuration and keys.
Click statistics and platform statistics (ClickHouse) are copied separately to data/backups/stats
with the native ClickHouse BACKUP: a full copy every N days (Settings → “Back up click statistics”,
7 by default), on other days — an incremental copy against the last full one (stats-<time>+<full copy time>.zip);
they are kept for as many days as there are backups; with S3 configured — uploaded to aurumclick/stats/.
Restore into an empty database (the full copy must be next to the incremental one):
aurum restore-stats "stats-20261009-030000+20261005-030000.zip"
ClickHouse conversions are a copy of PostgreSQL: they are restored with the main backup (aurum restore) or
with aurum ctl conversions resync.
Landing files in S3
By default, files of local landings and offers are on the server disk (/opt/aurumclick/data/blobs).
They can be kept in S3-compatible storage (AWS, Yandex Object Storage, MinIO, Backblaze…) — this is
convenient for a cluster of several edges and takes the files out of the server backup:
- Create a bucket and an access key with read, write, list and delete permissions.
- Move the existing files:
aurum ctl blobs upload /data/blobs(with the new variables in.env). - In
.env:BLOB_STORE=s3://bucket/aurumclick?endpoint=https://storage.yandexcloud.net®ion=ru-central1,BLOB_S3_ACCESS_KEY=…,BLOB_S3_SECRET_KEY=…; thenaurum update(or restart the services).
Each edge keeps a local file cache (/data/blobs): revisions are immutable, so the cache never goes
stale, and a PHP landing is fully unpacked into the cache before running (the php-fpm sandbox sees
it as before). Revision copies on save are made on the storage side.
Server resources
| What | How much |
|---|---|
| ClickHouse | no more than 50% of RAM; heavy groupings spill to disk; ≈ 30 MB per 400 thousand clicks |
| Redis | REDIS_MAXMEMORY (¼ of RAM by default): event queues, uniqueness (≈ 0.26 KB × clicks per day), bindings, caps |
| Redis · click cache | REDIS_CACHE_MAXMEMORY (⅛ of RAM by default, at least 512 MB): ≈ 0.9 KB × clicks over the cache period (48 h); when full, old clicks are evicted (they are looked up in ClickHouse) |
| Edge | ≈ 3000 clicks/s, p95 ≈ 5 ms (measured on 8 cores together with the databases) |
| Postbacks | ≈ 500/s on real clicks per worker |
The hot click cache (looking up a click on a postback and an LP click without ClickHouse) lives in a separate
Redis — redis-cache: without an on-disk journal, old clicks are evicted when it is
full and are then looked up in ClickHouse. The main Redis keeps only event queues and click
state — it stays small, and its journal (AOF) is not rewritten by gigabytes. The fill level of
both — Maintenance → Status → “Storage”.
If the cache is left in the main Redis (REDIS_CACHE_URL is empty — as in a cluster without a separate
cache), a memory guard works: from 80% fill the cache is written only for 15 minutes, from
92% — not written at all, and the space is left to event queues; the normal period returns below 70%. On
the “Status” page edge gets a “click cache 15 min” or “click cache off” label.
Disk space
Statistics are kept forever by default (Settings → Retention, 0 — forever). The volume is
≈ 30 MB per 400 thousand clicks in ClickHouse plus conversions in PostgreSQL. The tracker watches the space itself
(the storage-guard task, every 10 minutes):
- Forecast: based on space usage over the last 7 days — in how many days the disk fills up (Maintenance → Status → “Storage”).
- Early warning to administrators: less than 20% free; “Low disk space” — less than 10%, or the forecast says the disk fills up in less than 2 days (a distant forecast alone does not raise an alarm: in the first days it caught one-off growth — backups, update builds). What to do: enlarge the server disk or set a statistics retention period.
- Less than 5% — the tracker clears ClickHouse service logs and local backups already uploaded to S3 (except the last one). Statistics and conversions are never deleted automatically: backups without S3 also stay — they may be the only ones on the server. After that — a critical notification to administrators: you free the space (enlarge the disk, set a statistics retention period, delete old backups in “Maintenance → Backups”). A full disk would stop recording clicks and conversions — watch the warnings in advance.
If Redis does fill up completely (for example, ClickHouse is unavailable for a long time and the queues grow), edge does not lose clicks: it writes them to the on-disk journal and replays them when memory frees up.
Edge serves clicks even after a restart during an outage: without Redis it starts in ~10 s and writes events to the on-disk journal (uniqueness is not checked during this time — clicks count as unique), without PostgreSQL — with the last known configuration (a copy on the edge disk and in Redis). A new installation that has never loaded its configuration waits for PostgreSQL for up to 5 minutes.
Didn’t find an answer?
Support