Linux

Where Does Shlink Store Config and Links?

Where Shlink keeps config, GeoLite data and API keys via env and database.

Last updated

Shlink configures through env vars and the installer CLI rather than files: domain, TLS mode, DB credentials, GeoLite key and initial API key all arrive as environment. State lives in MySQL/Maria/Postgres/MSSQL or the dev SQLite file.

Docker plus an external database is the production shape; SQLite suits tests only per the docs. GeoLite downloads need a MaxMind license key or geolocation stays empty. Cache under data rebuilds freely.

Where Shlink stores this, by platform

Linux
<shlink data>/data

Env driven config with database held state. Production wants external MySQL/Postgres over SQLite. Back up the database plus env file. API keys seed once via INITIAL_API_KEY.

Frequently asked questions

Where are my Shlink API keys?

Read them from the database or generate fresh ones with the CLI api-key commands. INITIAL_API_KEY only seeds keys on first boot when none exist; changing it later does nothing.

What must I back up for Shlink?

Back up the external database (or SQLite file) plus the env file with domain, keys and GeoLite license. The data dir cache rebuilds; credentials and links do not.

Notice an outdated path? Let us know.