Self-hosting with Docker
Deploying with Docker using the official deployment of Privatefolio which is available on GitHub Container Registry (GHCR).
Prerequisites
Section titled “Prerequisites”Before we get started you must have Docker installed:
docker --version# Docker version 28.3.2, build 578ccf6If you don’t have it, get it from docker.com.
1. Pull the Image
Section titled “1. Pull the Image”docker pull ghcr.io/privatefolio/privatefolio:latestThis fetches the latest official release from GHCR.
2. Run the Container
Section titled “2. Run the Container”docker run -d \ -p ${PORT:-5555}:5555 \ -v privatefolio-data:/app/data \ --name privatefolio \ ghcr.io/privatefolio/privatefolio:latestExplanation:
-d: Run in detached mode.-p ${PORT:-5555}:5555: Map the host port (default 5555) to the container port 5555. Adjust the host port if needed.-v privatefolio-data:/app/data: Mount a named volumeprivatefolio-datato/app/datainside the container for persistent data storage.--name privatefolio: Assign a name to the container.
3. Access the app
Section titled “3. Access the app”The app will be available on the port you set in docker run (defaulting to 5555):
Visit http://localhost:5555 in your browser.
Data Persistence
Section titled “Data Persistence”All data is stored in the /app/data directory inside the container, which is mounted to a persistent volume called privatefolio-data. This ensures that your data is persisted even if the container is stopped or removed.
To backup your data, you can use the Docker volume commands:
docker volume inspect privatefolio-data # View volume infoTo view logs from the container:
docker logs privatefolioTo follow the logs in real-time:
docker logs -f privatefolioUpgrading
Section titled “Upgrading”To upgrade to the latest version of Privatefolio, run:
docker pull ghcr.io/privatefolio/privatefolio:latestdocker rm -f privatefoliodocker run -d -p ${PORT:-5555}:${PORT:-5555} -v privatefolio-data:/app/data --name privatefolio ghcr.io/privatefolio/privatefolio:latestYour data is safe even when you remove the container, because it is persisted in the privatefolio-data volume.
Delete all personal data
Section titled “Delete all personal data”To delete all personal data, run:
docker rm -f privatefoliodocker volume rm privatefolio-data