Database
Nocly Shortener stores everything in one MySQL or MariaDB database using the utf8mb4 character set. All dates are stored in UTC and shown in each user's time zone.
Tables
| Table | Contents |
|---|---|
users, user_sessions, user_tokens | Accounts, signed-in sessions, password reset and email verification tokens |
settings | Admin settings (name/value) |
domains, domain_checks | Main and custom short domains, verification history |
links, tags, link_tags | Short links and their tags |
clicks, link_visitors | Click analytics and unique visitor tracking |
api_keys, api_request_logs | API keys (secrets stored as one-way hashes) and request logs |
idempotency_keys | Duplicate-submission protection for forms and the API |
rate_limits | Rate limit counters |
webhooks, webhook_deliveries | Webhook endpoints (secrets encrypted) and the delivery queue |
abuse_reports, blocklist, moderation_actions | Abuse handling |
audit_logs | Tamper-evident record of important actions |
system_logs, cron_runs | Application logs and cron history |
backups | Backup records |
The schema is in database/schema.sql (not web-accessible) and is created by the installer.
Integrity
- Short aliases are unique per domain and case-insensitive:
Promoandpromoare the same link. - Click limits are enforced with an atomic database update, so a link with a limit of 100 never redirects more than 100 times, even under heavy concurrent traffic.
- Foreign keys remove dependent data when a user, link or webhook is deleted.
- Multi-step operations (installation, registration, link creation) run in transactions and leave no partial records on failure.
Size and retention
The clicks table grows with traffic. The daily cron cleanup removes:
- clicks older than the analytics retention period (default 365 days),
- system logs, API request logs, cron history and finished webhook deliveries older than the log retention period (default 90 days),
- expired tokens, sessions, idempotency keys and rate limit counters.
Audit logs are never removed automatically.
Backups
Use Admin → Backup & restore for complete backups. You can also use cPanel's Backup or phpMyAdmin → Export. See Backup.