Upgrade Guide

Upgrading Vela means replacing the container image and the CLI binary. Database migrations are embedded in velad and applied automatically at startup, so there is no separate migration step — but there is a backup step.

General procedure

  1. Read the release notes

    Check the Release Notes and the version-specific sections below for anything marked breaking.

  2. Take a backup

    A filesystem backup can run while the server is up:

    docker exec vela velad backup /data/backups/pre-upgrade-$(date -u +%Y%m%d)

    For R2 deployments, follow the paired database/bucket procedure in Backups.

  3. Pull the new image

    docker pull xchunk/vela:0.9.0

    Always pin an explicit version. The example scripts refuse :latest and :dev on purpose.

  4. Recreate the container

    Stop and remove the old container, then start it again with the same command and the new tag:

    docker stop vela && docker rm vela
    VELA_IMAGE=xchunk/vela:0.9.0 ./examples/docker/run-fs.sh

    Recreating — not just restarting — is also what reloads a changed --env-file.

  5. Verify

    docker logs vela | head
    curl -fsS https://store.example.com/healthz
    vela version

    vela version prints both versions and warns if the server's API major version differs from the CLI's.

  6. Update the CLI

    Install the matching CLI from GitHub Releases or with go install go.xchunk.org/vela/cmd/vela@v0.9.0. Within API v1 an older CLI keeps working against a newer server and vice versa.

DowngradesMigrations only move forward. To go back to an older release after a schema change, restore the backup you took before upgrading.

Upgrading to 0.9 from 0.8

Estimated effort: none beyond the general procedure. 0.9 changes only the CLI: no migration, no API, configuration or theme changes. Any 0.8 CLI and server work with each other.

Upgrading to 0.8 from 0.3

Estimated effort: a few minutes. Releases 0.4 to 0.8 add symlinks and tag selection; every change to API v1 is additive and no configuration or proxy changes are needed. You can jump from any 0.3 release straight to 0.8.0.

Database schema

Migration 0006_symlinks, introduced in 0.4, runs automatically on startup. It rebuilds the objects and trash tables to add the kind and target_id columns; on a large store this takes a moment while velad starts. Take a backup first: an older image cannot use the migrated database, so restoring that backup is the rollback path. Releases 0.5 to 0.8 add no migrations.

What existing clients notice

  • Objects gain the fields kind, effective_visibility and target; deletes and trash purges report symlinks_affected; /api/v1/info reports features. Clients that ignore unknown fields are unaffected.
  • Nothing changes until someone creates a symlink. After that, older clients see symlinks as ordinary objects, and a broken one lists with size: 0, an empty sha256 and an empty content_type.
  • Writing content to a path that holds a symlink fails with the new error code 409 is_symlink.
  • visibility filters in listings match the effective visibility, which only differs from visibility for symlinks.

Custom themes likely impact: none

Anonymous pages render as before: symlinks are plain File entries. On signed-in pages, files may carry the new symlink flag, which flagIcon already renders and themes may ignore. The default stylesheet's hash changes once more.

CLI

Update the CLI to get vela ln, meta -r and --by-tag. Against a 0.3 server, vela ln explains that velad must be upgraded, while tag selection keeps working: the server ignores the tag parameter and the CLI filters the results itself, so a deletion or move by tag never touches objects without the tags. A 0.3 CLI keeps working against a 0.8 server.

Upgrading to 0.3 from 0.2

Estimated effort: a couple of minutes. Web sign-in is off by default, so with your existing configuration every response stays exactly as it was.

Database schema

Migration 0005_web_sessions adds the session table and runs automatically on startup. Take a backup first: an older image cannot open the migrated database, so restoring that backup is the rollback path.

Enabling web sign-in optional

Nothing is required until you set VELA_WEB_AUTH=on. Before you do:

  • HTTPS. VELA_PUBLIC_URL must be an https origin, or velad refuses to start.
  • nginx accel. Add the new Vary and Content-Security-Policy lines from examples/nginx/accel-locations.conf to both internal locations — see nginx. Direct delivery, R2 and Caddy need no proxy changes.
  • CDN. Add a cache bypass rule for requests carrying the __Host-vela_session cookie, because CDNs such as Cloudflare ignore Vary: Cookie.
  • Uploaded HTML. With sign-in on, HTML, SVG and XML uploads are served in a CSP sandbox. They still render and run scripts, but without access to cookies, storage or same-origin requests. If you host small interactive pages that rely on those, check them first.

Then follow Turning it on.

Custom themes likely impact: none

Existing themes keep working — they render the sign-in page with your layout and simply show no indicators or sign-in link. To add them, see Web sign-in support. The default stylesheet's hash changes, so ?v= asset URLs change too.

CLI

The CLI has no changes for this release beyond the v0.2.1 progress fixes; any 0.2 CLI works against a 0.3 server and vice versa.

Upgrading to 0.2 from 0.1

Estimated effort: a few minutes, unless you maintain a custom theme.

Database schema

Migration 0004_dir_policies adds the directory policy table and its generation counter. It runs automatically on startup. Without any stored rules, every public page renders exactly as before.

Custom themes likely impact: medium

If you set VELA_THEME_DIR and override layout.html or index.html, update them before you create your first directory rule:

  • Breadcrumb URLs can be empty for disabled ancestors. Render the Name as plain text in that case.
  • Page.Parent can be empty when the parent index is disabled. Do not render an “up” link then. It stays a string — there is no Parent.URL.
  • When NoIndex is true, layout.html must emit <meta name="robots" content="noindex, nofollow">.
  • Respect RootDisabled for the brand/root link.

The theming guide shows the exact template snippets.

The root index setting

VELA_ROOT_INDEX defaults to on, which matches the old behavior. Set it to off to disable the root listing by configuration, or use vela dir private-root to store an explicit rule that overrides the configuration.

CLI

The 0.2 CLI works against 0.1 servers: ls -l simply omits policy annotations and directory url/open use the older resolution. The new vela dir commands require a 0.2 server.

Upgrading from pre-release builds

Deployments that ran builds from before the first public release must review these default changes. Each one makes a previous implicit behavior explicit.

SettingOld defaultNew defaultAction
VELA_ACCEL_PREFIX/_blobs/empty (Go streams files)nginx accel deployments must set VELA_ACCEL_PREFIX=/_blobs/ and keep the internal locations from accel-locations.conf.
VELA_TRUSTED_PROXIESloopback + 172.17.0.1/32127.0.0.1/32,::1/128With Docker bridge networking, add your actual gateway address. See trusted proxies.
VELA_SITE_TITLEa project nameVelaSet it explicitly to keep your branding.
vela login URLbuilt innonePass --url, set VELA_URL or answer the prompt.
Example pathsdeploy/examples/Update any scripts that referenced the old directory.

Accel without the prefixIf you use the nginx accel configuration but forget to set VELA_ACCEL_PREFIX, downloads keep working — Go simply streams them — but nginx's internal locations go unused. The reverse mistake, a prefix without the locations, produces empty downloads or proxy 404s. Startup logs show the active delivery= mode.