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. If juliaup is already installed, it updates juliaup instead (see Updating juliaup).
  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.

Updating juliaup

Updating Julia (juliaup update) and updating juliaup itself are separate. A JuliaHub instance serves the juliaup release bundled with its JuliaHub version, so juliaup updates arrive when your instance is upgraded, not when upstream publishes them. Some features need a recent juliaup. For example, Dyad needs juliaup 1.19.3 or later. Check your version with juliaup --version.

To update juliaup, run the installer again. If juliaup is already installed, the installer updates it to the version your JuliaHub instance provides, then repeats the authentication and environment-variable setup.

  • Linux and macOS: the installer runs juliaup self update. You can also run juliaup self update yourself at any time.
  • Windows: the Windows installer's juliaup cannot update itself, and juliaup self update only refreshes the list of Julia versions. The installer instead uninstalls the old juliaup and installs the new one. Close Julia and VS Code first, because the installer stops if Julia is running. If it asks you to restart Windows, restart and run it again.

Updating replaces only juliaup and the julia launcher. The Julia versions you installed and your channels stay in your Julia depot (~/.julia/juliaup). The installer moves juliaup to the version your instance provides, even if the installed juliaup is newer.

juliaup from the Microsoft Store, Homebrew, or another package manager is updated by that package manager, not by JuliaHub.

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 prints "Checking for new Julia versions" and nothing else. That juliaup was installed with the Windows installer, which cannot update itself. Run the installer again instead. See Updating juliaup.
  • The Windows installer stops because julia.exe is running, or asks you to restart Windows. Close Julia and VS Code and run the installer again. After a restart, run it again to finish installing juliaup.
  • On Linux or macOS, the installer warns that juliaup is still not the version your instance provides. That juliaup was installed by a package manager such as Homebrew, or in a non-default location. Update or remove it with that package manager, or run juliaup self uninstall, then run the installer again.
  • 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.