Skip to content

Upgrading

Read the release’s section in the changelog first: it lists every change a client or an installation may notice. Releases that need more than pulling the new version get a section here.

Database migrations come with the new version and must run before it serves:

  • Docker image: every start of a container with the proxy or the API applies them before those start, nothing to do. Several containers starting at once migrate one at a time, see Management commands.

  • From source: run them after each uv sync of a new version, before restarting the proxy and the API:

    Terminal window
    uv run --env-file .env proxium-manage migrate

    Run it every time, even when the changelog mentions no schema change: with nothing new it does nothing.

0.4 runs one proxy as several workers on the same ports, see Workers. One worker by default: without PROXY_WORKERS the proxy serves as before. A migration adds how many workers each proxy instance has, it runs on start as on every upgrade and takes a second.

  • Back up the database. As from 0.2 to 0.3, 0.3’s migrate doesn’t know the new migration and stops, and the Docker image doesn’t start the proxy and the API without it. See Going back.
  • Stop timeout. A stopping proxy writes its last traffic and reports the stop after its open connections end, up to 10 seconds more: stop a 0.4 container with docker stop --time 50. In your copy of the compose example set the proxy’s stop_grace_period to 50s.
Terminal window
docker pull ikoldakov/proxium:0.4.0
docker stop --time 40 proxium && docker rm proxium
docker run -d --name proxium ... ikoldakov/proxium:0.4.0

Use the same -p, -v and -e as before, add -e PROXY_WORKERS=... to use more CPU cores.

Set stop_grace_period: 50s for the proxy, pin the image to ikoldakov/proxium:0.4.0 or keep latest, then:

Terminal window
docker compose -f docker/compose.yaml pull
docker compose -f docker/compose.yaml up -d
Terminal window
git fetch --tags && git checkout v0.4.0
uv sync
uv run --env-file .env proxium-manage migrate

and restart the proxy and the API. New variables in .env.template have working defaults, none has to be set.

The 0.4 proxy starts next to the 0.3 one as in Restart without downtime, and they share every limit through Redis. Until it stops, the 0.3 proxy shows 1 / 1 in the Workers column.

Restore the backup made before the upgrade and run 0.3.0: what was written since, e.g. traffic, is lost. With the image’s own database, the backup is a copy of the volume while the container is stopped:

Terminal window
docker stop --time 40 proxium
docker run --rm -v proxium:/data -v "$PWD":/backup debian tar czf /backup/proxium-0.3.tar.gz -C /data .

Back:

Terminal window
docker rm -f proxium
docker run --rm -v proxium:/data -v "$PWD":/backup debian sh -c "find /data -mindepth 1 -delete && tar xzf /backup/proxium-0.3.tar.gz -C /data"
docker run -d --name proxium ... ikoldakov/proxium:0.3.0

0.3 shows every proxy instance in the admin UI: the new Overview start page and Proxy instances. Proxies report themselves to the database, so the schema changes: migrations add the instances table and their permissions. They run on start as on every upgrade and take a second.

  • Back up the database. Going back to 0.2 isn’t a plain restart this time: 0.2’s migrate doesn’t know the new migrations and stops, and the Docker image doesn’t start the proxy and the API without it. See Going back.
  • Admins who aren’t superusers. The Overview and Proxy instances need the new proxy_instances.view, deregistering an instance proxy_instances.deregister. Existing groups don’t get them: add them where needed. Until then such users land on the first page open to them, as before.
  • Docker bridge networking. Proxies report the IPs of their interfaces, in bridge networking the container’s. Outgoing IPs of the host show as “Not on the proxy” there: a proxy can’t connect from them in bridge networking anyway, run it with --network host, see Ports and IPs.
  • Global policies. At most API_GLOBAL_POLICIES_MAX of them, 32 by default. Having more keeps them working, only making one more global is refused.
Terminal window
docker pull ikoldakov/proxium:0.3.0
docker stop --time 40 proxium && docker rm proxium
docker run -d --name proxium ... ikoldakov/proxium:0.3.0

Use the same -p, -v and -e as before.

Nothing new in the compose example: pin the image to ikoldakov/proxium:0.3.0 or keep latest, then:

Terminal window
docker compose -f docker/compose.yaml pull
docker compose -f docker/compose.yaml up -d
Terminal window
git fetch --tags && git checkout v0.3.0
uv sync
uv run --env-file .env proxium-manage migrate

and restart the proxy and the API. New variables in .env.template have working defaults, none has to be set.

The 0.3 proxy starts next to the 0.2 one as in Restart without downtime, and they share every limit through Redis. A 0.2 proxy doesn’t report itself: the Overview shows only the 0.3 ones.

Restore the backup made before the upgrade and run 0.2.0: what was written since, e.g. traffic, is lost. With the image’s own database, the backup is a copy of the volume while the container is stopped:

Terminal window
docker stop --time 40 proxium
docker run --rm -v proxium:/data -v "$PWD":/backup debian tar czf /backup/proxium-0.2.tar.gz -C /data .

Back:

Terminal window
docker rm -f proxium
docker run --rm -v proxium:/data -v "$PWD":/backup debian sh -c "find /data -mindepth 1 -delete && tar xzf /backup/proxium-0.2.tar.gz -C /data"
docker run -d --name proxium ... ikoldakov/proxium:0.2.0

0.2 shares every limit between proxy instances through Redis: connections, speed and traffic quotas. Several instances on one database now work as one proxy. Redis is required for that, like PostgreSQL.

The database schema is the same as in 0.1.1: no migrations to wait for, and going back to 0.1.1 is just running it again.

  • Redis. The Docker image runs its own when REDIS_URL isn’t set, nothing to do. With your own Redis it must be 7.4 or newer, see Supported versions. Several containers on one database need one Redis for all of them: with the bundled one each container counts limits alone.
  • HTTP clients that check status codes. The proxy’s own refusals carry Proxy-Status, a 503 over limits that can’t be checked replaces a 500, a missing outgoing IP answers 500 instead of 502. Forwarded responses say Connection: close, and requests with an unclear body end get 400. See the changelog for the full list.
Terminal window
docker pull ikoldakov/proxium:0.2.0
docker stop --time 40 proxium && docker rm proxium
docker run -d --name proxium ... ikoldakov/proxium:0.2.0

Use the same -p, -v and -e as before. The bundled Redis starts with the container and keeps nothing on disk.

With your own database add -e REDIS_URL=... and, if it’s not in the URL, -e REDIS_PASSWORD=... before the upgrade, see Own database, Redis and secrets.

The compose example of 0.2 adds a redis service and REDIS_URL with REDIS_PASSWORD for both containers. Take them from docker/compose.yaml into your copy, pin the image to ikoldakov/proxium:0.2.0 or keep latest, then:

Terminal window
docker compose -f docker/compose.yaml pull
docker compose -f docker/compose.yaml up -d

Volumes keep their names: the database, the secrets and the admin’s data stay.

Start Redis of a supported version, set REDIS_URL in .env, then:

Terminal window
git fetch --tags && git checkout v0.2.0
uv sync
uv run --env-file .env proxium-manage migrate

and restart the proxy and the API. Compare your .env with .env.template: new variables have working defaults, none has to be set.

From 0.1.1 the new proxy can start next to the old one, see Restart without downtime. From 0.1.0 it’s a plain restart: a 0.1.0 proxy doesn’t share its ports.

While both run, the 0.1.1 proxy counts its limits alone: a connection limit may let up to its value more in, a speed limit give up to its rate more, a quota let through what the old proxy hasn’t written to the database. It lasts until the old proxy stops, up to PROXY_GRACEFUL_TIMEOUT.

Run the 0.1.1 image or git checkout v0.1.1 on the same database. Redis isn’t used by it and may stay. The docs of 0.1.1 are in the version select at the top.