Where Does a PieFed Server Store Data?
PieFed configures through .env in the install root. Postgres holds posts and accounts; uploads and caches sit beside it.
Last updated
PieFed keeps its settings in a .env file at the install root, copied from env.sample (or env.docker.sample for containers). That file holds the secret key, server name, database URL, cache directory, and captcha keys. Everything else is data: PostgreSQL for posts and accounts, Redis for queues, and upload plus cache directories on disk.
Docker layouts bind the database to ./pgdata and Redis to ./redis_data next to the compose file, which makes the project folder the backup unit. Zip the folder with the stack down and you capture config plus volumes together. One gotcha: CACHE_DIR defaults to /dev/shm, so set it to /tmp or a real path on hosts without shared memory.
Where PieFed stores this, by platform
.env (install root)
SECRET_KEY, server_name, DATABASE_URL, captcha keys. Copied from env.sample at install. Never publish this file; it is the whole identity of the instance.
./pgdata (Postgres volume)
Posts, accounts, and communities via pg_dump. Uploads and cache live in host folders beside compose. Back up all three with the stack down for a restorable snapshot.
Frequently asked questions
how do i migrate piefed to a new server
Copy .env plus a Postgres dump and the upload and cache directories, with the app stopped. Secrets in .env (SECRET_KEY, DB credentials, captcha keys) must match the dump or logins and federation break.
where is the piefed config without docker
Bare metal uses the same file: copy env.sample to .env in the checkout and edit SECRET_KEY, server_name, and DATABASE_URL. Init with flask db upgrade and flask init-db, which also creates the admin account.
Notice an outdated path? Let us know.