Appearance
Recording storage
The events of every recording (what the player replays) are stored as compressed files, separate from the database. By default they are on the server's disk; on busy sites, or when you run more than one server, put them in an S3-compatible bucket: Amazon S3, Cloudflare R2, MinIO, or any other service that speaks the S3 API.
How recordings are stored
- Each batch the tracking script sends becomes one gzip-compressed file,
<site id>/<session id>/<page>-<sequence>.json.gz. - The database keeps the sessions, pages and an index of the files (
recording_chunks); the files hold the events. - Replays are loaded through Replora, which reads the files and sends them to the player: the bucket stays private, needs no public access and no CORS rules.
- Expired recordings (files first, then rows) are deleted every night at 03:00 by
recordings:prune(Scheduler).
| Driver | Where | Good for |
|---|---|---|
local (default) | storage/app/recordings inside the application folder | One server, moderate traffic, simple backups |
s3 | A bucket on Amazon S3, Cloudflare R2, MinIO, Backblaze B2, Wasabi… | Busy sites, several servers, cheap long retention |
Settings
.env key | Default | What it does |
|---|---|---|
RECORDINGS_DRIVER | local | local or s3 |
RECORDINGS_BUCKET | recordings | Bucket name (s3 only) |
RECORDINGS_KEY | – | Access key ID |
RECORDINGS_SECRET | – | Secret access key |
RECORDINGS_REGION | us-east-1 | The bucket's region (auto for Cloudflare R2) |
RECORDINGS_ENDPOINT | – | The service's S3 endpoint URL. Required for R2, MinIO and other services; optional for Amazon S3 |
RECORDINGS_DEFAULT_RETENTION_DAYS | 30 | Retention of new websites. Each website can choose 7, 30, 90, 180 or 365 days in its settings (SaaS: capped by the plan) |
RECORDINGS_CACHE_STYLESHEETS | true | Keep copies of the stylesheets recorded pages use (at most 2 MB each, 500 per website, checked again at most once a day), so replays keep their look |
RECORDINGS_STYLESHEETS_ALLOW_PRIVATE | – (only in the Single user edition) | Also fetch stylesheets from private or local addresses, for websites on an intranet. Only hosts in the website's allowed domains are fetched |
Replora always uses path-style addresses (https://endpoint/bucket/key), which every S3-compatible service accepts. Recordings use their own keys; the AWS_* keys in .env are not used for them.
Amazon S3
- Create a bucket in the region closest to your server, with Block all public access on.
- Create an IAM user (or role) with access to that bucket only:
json
{
"Version": "2012-10-17",
"Statement": [
{ "Effect": "Allow", "Action": ["s3:ListBucket"], "Resource": "arn:aws:s3:::replora-recordings" },
{ "Effect": "Allow", "Action": ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"], "Resource": "arn:aws:s3:::replora-recordings/*" }
]
}- Create an access key for it and set:
ini
RECORDINGS_DRIVER=s3
RECORDINGS_BUCKET=replora-recordings
RECORDINGS_REGION=eu-central-1
RECORDINGS_ENDPOINT=https://s3.eu-central-1.amazonaws.com
RECORDINGS_KEY=AKIA…
RECORDINGS_SECRET=…Cloudflare R2
- In the Cloudflare dashboard open R2 Object Storage › Create bucket (keep it private).
- Manage R2 API Tokens › Create API token with Object Read & Write on that bucket. Copy the access key ID, the secret and the S3 endpoint.
- Set:
ini
RECORDINGS_DRIVER=s3
RECORDINGS_BUCKET=replora-recordings
RECORDINGS_REGION=auto
RECORDINGS_ENDPOINT=https://ACCOUNT_ID.r2.cloudflarestorage.com
RECORDINGS_KEY=…
RECORDINGS_SECRET=…R2 doesn't charge for downloads, which suits replays that are watched often.
MinIO (self-hosted)
MinIO runs S3 on your own server or another machine:
bash
docker run -d --name minio -p 127.0.0.1:9000:9000 -p 127.0.0.1:9001:9001 \
-e MINIO_ROOT_USER=replora -e MINIO_ROOT_PASSWORD='a-long-secret' \
-v /srv/minio:/data minio/minio server /data --console-address ":9001"Create the bucket in the console (http://127.0.0.1:9001) or with mc mb local/recordings, then:
ini
RECORDINGS_DRIVER=s3
RECORDINGS_BUCKET=recordings
RECORDINGS_REGION=us-east-1
RECORDINGS_ENDPOINT=http://127.0.0.1:9000
RECORDINGS_KEY=replora
RECORDINGS_SECRET=a-long-secretFor production, create a separate MinIO user with access to that bucket only instead of the root user.
Apply the change
bash
php artisan config:clear # if you cache configuration
php artisan queue:restart # workers write the recordings: restart themThen open Administration › System › Service status and click Check now. The Storage check writes, reads and deletes a small test file on the recordings disk; it fails with Files can’t be written to the “recordings” disk. (or the service's error) when the bucket, keys, region or endpoint are wrong.
Move existing recordings
Changing the driver doesn't move anything: recordings made before the switch stay where they were and can't be replayed until they are copied. The layout is the same on disk and in a bucket (<site id>/<session id>/… at the bucket's root), so copy the folder's contents as they are:
bash
aws s3 sync /var/www/replora/storage/app/recordings/ s3://replora-recordings/ \
--endpoint-url https://ACCOUNT_ID.r2.cloudflarestorage.com # leave out for Amazon S3bash
rclone copy /var/www/replora/storage/app/recordings/ r2:replora-recordings/ --progressbash
mc mirror /var/www/replora/storage/app/recordings/ local/recordings/- Copy once while the site still runs on
local. - Switch the
.envkeys and restart the workers. - Copy again: only files written in between are transferred.
- Check a few old replays, then delete
storage/app/recordings/*to free the disk.
Moving from a bucket back to the disk works the same way in the other direction.
Disk space on the local driver
The Storage check warns Disk almost full: 7.4 GB free of 192.9 GB. when less than 10 % or less than 1 GB of the disk is free. Shorten the websites' retention, move recordings to a bucket, or add disk space. du -sh storage/app/recordings/* shows the space per website id.
