Installing Julia with juliaup

Every JuliaHub instance can act as a server for juliaup, the official Julia version manager. Pointing juliaup at your JuliaHub instance, instead of the public julialang-s3.julialang.org server, means:

  • Julia itself is downloaded from your JuliaHub instance, so machines that can only reach JuliaHub can still install and update Julia.
  • The Julia versions your users can install are the ones your JuliaHub instance mirrors.
  • You no longer need to push Julia installers or images out to users by hand. New Julia releases show up as your instance syncs them.

This works on JuliaHub (platform.juliahub.com) and on self-managed installations.

Note

Serving juliaup from a self-managed installation works reliably from JuliaHub 26.3.7 onwards, which fixed the install script's package server and missing version metadata. If you tried it on an earlier release and it failed, upgrade and try again.

The two environment variables

juliaup and Julia's package manager each read one environment variable. Replace juliahub.example.com with your instance's host name. If you are unsure which host name to use, the Download Julia page described below shows it in its install commands.

VariableValueUsed by
JULIAUP_SERVERhttps://juliahub.example.com/juliabinjuliaup: version database, channel metadata, and Julia downloads
JULIA_PKG_SERVERhttps://juliahub.example.comJulia's package manager (Pkg): registries, packages, and artifacts

JULIAUP_SERVER must end in /juliabin and must use https://. juliaup rejects a plain http:// URL.

The two are independent. JULIAUP_SERVER only controls where Julia comes from. To also install packages through JuliaHub, set JULIA_PKG_SERVER and authenticate as described in Authenticating the package server.

Option 1: use the installer served by JuliaHub

This is the easiest way to set up a new machine. It installs juliaup and the latest stable Julia from your JuliaHub instance, authenticates Julia against the instance, and saves both environment variables for you.

In JuliaHub, open the account menu in the left sidebar and select Download Julia. The page shows install commands that already point at your instance. They are:

Linux and macOS

curl -fsSL https://juliahub.example.com/juliaup/install.sh | sh

Windows (Command Prompt)

curl -fsSL https://juliahub.example.com/juliaup/install.bat -o install.bat && .\install.bat

Windows (PowerShell)

Invoke-WebRequest -Uri https://juliahub.example.com/juliaup/install.bat -OutFile install.bat; .\install.bat

The installer:

  1. Downloads juliaup from your JuliaHub instance and installs the release channel.
  2. Opens a browser window asking you to sign in to JuliaHub (or to confirm, if you are already signed in), then saves the resulting token in your Julia depot (~/.julia/servers/<host>/auth.toml).
  3. Installs PkgAuthentication into your default Julia environment and adds it to ~/.julia/config/startup.jl, so the token refreshes automatically.
  4. Saves JULIAUP_SERVER and JULIA_PKG_SERVER:
    • on Linux and macOS, as export lines appended to ~/.profile, ~/.bashrc, and ~/.zshrc;
    • on Windows, as user environment variables (via setx).

Open a new terminal afterwards so the variables take effect, then run julia.

Note

On Linux and macOS, other shells (for example fish) are not configured. Set the two variables in that shell's configuration yourself.

Option 2: point an existing juliaup at JuliaHub

If juliaup is already installed (for example from the Microsoft Store, Homebrew, or install.julialang.org), you only need to set JULIAUP_SERVER. juliaup reads it every time it runs, so set it persistently rather than in a single terminal.

Linux and macOS — add to your shell's startup file (for example ~/.bashrc or ~/.zshrc):

export JULIAUP_SERVER="https://juliahub.example.com/juliabin"
export JULIA_PKG_SERVER="https://juliahub.example.com"

Windows (PowerShell) — persists for your user account:

[Environment]::SetEnvironmentVariable("JULIAUP_SERVER", "https://juliahub.example.com/juliabin", "User")
[Environment]::SetEnvironmentVariable("JULIA_PKG_SERVER", "https://juliahub.example.com", "User")

Then open a new terminal and refresh juliaup's version database from JuliaHub:

juliaup update

juliaup prints Using custom server 'https://juliahub.example.com/juliabin' (JULIAUP_SERVER). when it is talking to your instance. From here, the usual commands work:

juliaup list          # channels known to the server
juliaup add lts       # install a channel
juliaup default lts   # make it the default

Julia versions you installed before switching servers keep working. juliaup only uses the new server for future updates and installs.

To manage many machines, set the two variables through your usual configuration management (for example a login script, Group Policy, or a container image's ENV) instead of on each machine by hand.

Authenticating the package server

juliaup downloads from /juliabin do not require a JuliaHub token. Installing packages through JULIA_PKG_SERVER does. The installer in Option 1 sets this up for you. If you used Option 2, set it up once from Julia:

using Pkg
Pkg.add("PkgAuthentication")

using PkgAuthentication
PkgAuthentication.install("juliahub.example.com")
Pkg.Registry.add()

Then add the PkgAuthentication.install(...) snippet to your startup.jl so the token keeps refreshing. See Using a Registry from JuliaHub for the full walkthrough.

Available channels and versions

juliaup list shows the full set of channels from the upstream juliaup version database: release, lts, beta, rc, alpha, minor-version channels such as 1.11, and exact versions such as 1.11.9. If your instance serves Dyad, you will also see dyad-* channels.

A channel being listed does not mean it can be installed. JuliaHub only serves the Julia binaries it mirrors, and a channel whose binary is not mirrored fails to install with a download error.

On platform.juliahub.com the mirror contains:

  • Julia versions: stable releases from 1.10 onwards. Alphas, betas, and release candidates are not mirrored, and neither is anything older than 1.10.
  • Platforms: Linux x86_64, macOS (Intel and Apple silicon), and Windows x64.

In practice, release, lts, minor-version channels like 1.11, and exact stable versions from 1.10 onwards work. beta, rc, and alpha work only while they point at a stable release.

On a self-managed installation, which Julia versions and platforms are mirrored is set by your administrator in the package server's Julia binary sync configuration (minimum version, stable-only, and allowed platforms). When a binary has not been mirrored locally, an installation that syncs from an upstream JuliaHub falls back to fetching it from that upstream. An air-gapped installation can serve only what it has mirrored. Ask your administrator if a platform or version you need is missing.

Caveats and troubleshooting

  • New Julia releases are not instant. They appear once your instance's package sync has picked them up, so a release announced upstream can take a sync cycle or more to reach you.
  • juliaup self update can fail with a download error. JuliaHub reports the latest upstream juliaup version, but only serves the juliaup build bundled with your JuliaHub release. The juliaup you have keeps working. To upgrade juliaup itself, upgrade JuliaHub, or run juliaup self update with JULIAUP_SERVER unset on a machine that can reach the public servers.
  • Windows on ARM is not supported by the Windows installer. Only x64 and x86 are.
  • A channel fails to install with a download error. The binary for that version or platform is not mirrored. See Available channels and versions.
  • juliaup still downloads from julialang-s3.julialang.org.JULIAUP_SERVER is not set in the environment juliaup is running in. Open a new terminal, and on Windows sign out and back in if a program started before you set the variable.
  • Julia starts but Pkg operations fail with an authentication error. Your token has expired and PkgAuthentication is not in startup.jl, or JULIA_PKG_SERVER points at a different host than the one you authenticated against. Re-run the steps in Authenticating the package server.
  • You want to switch back to the public servers. Remove JULIAUP_SERVER and JULIA_PKG_SERVER from your environment (and the PkgAuthentication lines from startup.jl), open a new terminal, and run juliaup update.