stockportfolio
Docker app from UnraidUser-3287583290's Repository
Overview
Network access: Do not put StockPortfolio or StockInfo on the internet. Use both only in your home network. From outside, connect to your home network with a VPN, for example WireGuard or Tailscale. StockPortfolio forwards StockInfo requests only for signed-in users, but its login does not protect StockInfo's own address: anyone who reaches that address can use StockInfo.
The StockPortfolio API keeps accounts, sessions and private portfolios in the persistent /data directory. On first start, read the one-time setup code from the container log and create the first admin in the browser. Each account, including another admin, has its own portfolios; the same account loads them in another browser. Export individual backups under Settings - Backup and back up /data. Old browser portfolios require an explicit one-time import by the setup account. Keep the /data mapping stable when updating.
Set STOCKINFO_API_URL to an address reachable from this container, such as the server LAN address or the StockInfo container name on a shared custom network. The browser only talks to StockPortfolio; StockInfo needs no CORS setting for it. If a reverse proxy in your home network serves the app over HTTPS, set the exact public origin and enable secure cookies. Behind a reverse proxy, pass the live update stream /api/data/events without buffering and keep its idle timeout above the 15-second keep-alive interval.
The container serves the web app and account API on port 8080 without root privileges. Older images used port 80: update existing port mappings when upgrading.
Support: StockPortfolio is built for its author's own use and shared free of charge. Issues are read, but there is no promise of a reply, a fix or a new feature.
Readme
View on GitHubStockPortfolio
Self-hosted portfolio tracking with tolerance-band rebalancing.
English · Deutsch
Version Docker Hub License: EUPL 1.2
Features · StockInfo · Quick start · Configuration · User guide · Docker guide
StockPortfolio replaces the rebalancing spreadsheet. You set target allocations and tolerance bands; the app values your holdings with current prices and shows which positions left their band and how many units to buy or sell to get back on target.
It is meant for private investors who run their own server at home.
Prices come from its sister app StockInfo, which you run yourself.

The dashboard: portfolio groups at the top, positions below. Each row shows holding, target and actual share and the trade needed in units. Arrows mark positions below (↓) or above (↑) their band. The screenshot shows the built-in sample portfolio with test prices.
[!WARNING] Do not expose StockPortfolio or StockInfo to the internet. Run both only in your home network and connect from outside through a VPN, for example WireGuard or Tailscale.
Features
- Dashboard and portfolio groups – positions in six groups with target, actual share, band status and trade delta in units.
- Tolerance bands and schedule – rebalance when a position leaves its band, on a fixed schedule, or both.
- Rebalancing simulation – try trades and see costs, resulting shares and how to fund the plan. Nothing is booked.
- Position details and price history – price chart from one month to "max", valuation and fund data such as TER and volatility.
- Safety buffer and investment reserve – keep a cash cushion and see how much is free to invest.
- Several portfolios – each with its own base currency, holdings, asset selection and settings.
- Currency conversion – foreign prices are converted with StockInfo exchange rates; stale rates are flagged, missing ones exclude the position.
- Value history – recorded daily portfolio values and a look-back of today's holdings at past prices.
- Accounts and user management – each account keeps its own portfolios on your server.
- Live sync – open browsers of the same account update each other without a reload.
- Backup and restore – JSON export per portfolio; restore shows the contents and asks before overwriting.
- German and English, light and dark themes, mobile reading view.
Main features
Dashboard and portfolio groups
The dashboard is the place where you work every day. Positions are grouped into ETFs, stocks, bonds, precious metals, money market and cash. For each position you see holding, target and actual share, whether it left its band and how many units would bring it back.
Holdings and targets can be edited directly in the table.
Bands are relative to the target: a 10 % target with a 6 % lower band triggers at 9.4 %.
Rebalancing simulation

In Rebalancing you take over suggested trades or enter your own unit counts and trial target shares. The plan shows the costs, the resulting shares and bands and whether the money is there. If it is not, Cover from suggests liquid positions to sell.
[!NOTE] Rebalancing is a simulation. The app does not place orders and does not check whether a trade suits you.
Place orders at your bank, then update the holdings on the dashboard.
Position details and price history

Open a position to see its price history, from one month up to "max", with price and percentage change on two axes.
The Valuation tab shows market value, target and bands; Information lists the data StockInfo supplies for that instrument, such as TER, fund size, provider and volatility.
Calculation, safety buffer and investment reserve

Under Settings → Calculation you choose when to rebalance: on bands, on a fixed schedule in months, or both.
Here you also set the minimum trade size and the safety buffer.
The safety buffer is money you never want to invest.
The investment reserve shows what is left: money market and cash minus the buffer. It is for information only and does not start any investment.
Accounts and user management

Accounts, sessions and portfolios live in a SQLite database on your server, not in the browser.
You can sign in from any browser or device and find the same portfolios.
Admins create and manage accounts under Users, but they cannot open another account's portfolios.
Sister app StockInfo
StockInfo is a separate service that collects market data. StockPortfolio does not run without it: every price, exchange rate, fund metric and price history comes from your StockInfo instance.
StockInfo also works on its own, for example for scripts or spreadsheets.
flowchart LR
Browser -- "app, /api/*" --> SP["StockPortfolio<br/>(Vue app + account API)"]
SP -- "accounts, portfolios" --> DB[("SQLite<br/>/data")]
SP -- "prices, FX rates,<br/>fund data, history" --> SI["StockInfo<br/>(your instance)"]
SI --> SRC["Market data sources"]
The browser only talks to StockPortfolio. The server forwards permitted StockInfo requests for signed-in users, without cookies. StockInfo never learns about your holdings.
| StockInfo | StockPortfolio | |
|---|---|---|
| Purpose | Prices, price history, fund metrics | Portfolios, valuation, rebalancing |
| Runs on its own | Yes | No – needs StockInfo |
| Repository | MikeMitterer/stockinfo | MikeMitterer/stockportfolio |
| Docker image | mangolila/stockinfo |
mangolila/stockportfolio |
Quick start
You need a running StockInfo instance that the container can reach.
docker run -d --name stockportfolio \
-p 8080:8080 \
--mount type=volume,source=stockportfolio-data,target=/data \
-e STOCKINFO_API_URL=https://stockinfo.example.com \
--restart unless-stopped \
mangolila/stockportfolio:latest
- Read the one-time setup code:
docker logs stockportfolio. - Open http://localhost:8080 and create the first admin account.
- Add positions, or load the sample portfolio to look around.
STOCKINFO_API_URL must be reachable from the container; localhost means
the container itself.
The Docker guide also covers Docker Compose, data and backups, updates, reverse proxies and troubleshooting.
For Unraid, see the Unraid guide.
Configuration
| Setting | Default | Meaning |
|---|---|---|
STOCKINFO_API_URL |
none (required) | Address of your StockInfo instance, reachable from the container. Without it, login works but prices stay empty. |
/data volume |
– | Accounts, sessions, portfolios and daily values. Keep it when updating the container. |
Port 8080/tcp |
8080 |
Web interface; map it to any host port. |
STOCKPORTFOLIO_PUBLIC_ORIGIN |
– | Exact address in the browser's address bar when a reverse proxy serves StockPortfolio (e.g. over HTTPS): scheme, host and port, e.g. https://portfolio.example.com. Setup and login check it. |
STOCKPORTFOLIO_SECURE_COOKIES |
false |
Set to true when the browser uses HTTPS. |
All settings, reverse-proxy notes and the status page are described in the Docker guide.
Development
Setup, commands, the test stack and the release process are described in the developer guide.
Further documentation
- User guide – how the app calculates and how to use each page (German)
- Docker guide – container setup, configuration, backups and updates
- Unraid guide – installation through Unraid Apps
- Changelog – changes per release
Support
StockPortfolio is built for its author's own use and shared free of charge.
Issues and pull requests are read, but there is no promise of a reply, a fix or a new feature.
License
Copyright © 2026 Michael Mitterer. MangoLila GmbH is the provider and licensor.
StockPortfolio is licensed under the EUPL 1.2, version 1.2 only. It permits personal and commercial use, changes, redistribution, sale and hosting without a paid license.
If you redistribute StockPortfolio or a changed version, or offer it as a network service, keep the copyright and license notices, mark your changes and provide the corresponding source under the license's copyleft rules.
The warranty and liability exclusions in EUPL Articles 7 and 8 also apply to consumers, as far as the law permits. Mandatory rights remain unaffected, including liability for intent, gross negligence, personal injury and product liability. No additional guarantee is given.
Contact: office@MangoLila.at.
Details: LICENSE · German license text · Provider and consumer declaration · Third-party notices · Source code
Media gallery
1 / 4Requirements
Categories
Download Statistics
Related apps
Explore more like this
Explore allDetails
mangolila/stockportfolio:latestRuntime arguments
- Web UI
http://[IP]:[PORT:8080]/- Network
bridge- Shell
sh- Privileged
- false
Template configuration
Host port for the web app. The container listens on 8080. Keep the host address and port stable to retain the browser storage origin. Never open this port on your router; use it in your home network or via VPN.
- Target
- 8080
- Default
- 8088
- Value
- 8088
URL of your StockInfo API, reachable from this container (for example http://192.168.1.10:8000 or https://stockinfo.example.com). Required; no built-in public API. Restart the container after changing it.
- Target
- STOCKINFO_API_URL
Persistent SQLite data for StockPortfolio accounts, sessions and private portfolios. Back up this directory and keep the mapping during updates.
- Target
- /data
- Default
- /mnt/user/appdata/stockportfolio
- Value
- /mnt/user/appdata/stockportfolio
Exact browser origin, including scheme and port, when using a reverse proxy (for example https://portfolio.example.com). No path; a trailing slash is ignored.
- Target
- STOCKPORTFOLIO_PUBLIC_ORIGIN
Set true when the app is served over HTTPS; required behind an HTTPS reverse proxy.
- Target
- STOCKPORTFOLIO_SECURE_COOKIES
- Default
- false
- Value
- false
Timezone for container logs, for example Europe/Vienna. The web interface follows the browser timezone.
- Target
- TZ
- Default
- UTC
- Value
- UTC