# How does one set up a centralized Julia installation?

**URL:** <https://discourse.julialang.org/t/how-does-one-set-up-a-centralized-julia-installation/13922>\
**Category:** General Usage\
**Tags:** package, packages, package-manager, installation\
**Created:** [August 23, 2018, 8:23am UTC](https://discourse.julialang.org/t/how-does-one-set-up-a-centralized-julia-installation/13922 "2018-08-23T08:23:42Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Louis\_Aslett](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@Louis\_Aslett](https://discourse.julialang.org/u/Louis_Aslett)\
**Post date:** [September 17, 2018, 3:54pm UTC](https://discourse.julialang.org/t/how-does-one-set-up-a-centralized-julia-installation/13922/6 "2018-09-17T15:54:51Z")

</div>

I’ve been bashing my head off a wall with this for many hours now. My use case it trying to get Jupyterhub working as a web interface for many users to access Julia. This requires installing the IJulia package in such a way that it is accessible for all users without them first having to SSH in to install it.

I used to be able to do this on v0.6-ish by using the JULIA\_PKGDIR environment variable to point to a central directory before installing as root, then adding the same path to the LOAD\_PATH julia variable via juliarc.jl – basically what is now referred to as “Old Post” here: [server - Install just one package globally on Julia - Stack Overflow](https://stackoverflow.com/questions/32338701/install-just-one-package-globally-on-julia)

But, this workflow is broken in v1.0 …

I’ve tried replacing JULIA\_PKGDIR with JULIA\_DEPOT\_PATH as suggested in that updated Stack Overflow post, but this creates a lot more than just a package directory in that location (it seems to setup a whole project environment for the root user in the central location). LOAD\_PATH then no longer seems to pick that up, so I have to add to the DEPOT\_PATH via the startup.jl script and also chmod the directory structure created in that location to be readable by all. These are the steps:

`sudo mkdir -p /opt/julia-packages/`  
`sudo sh -c "echo 'push!(DEPOT_PATH, \"/opt/julia-packages/\")' >> /usr/etc/julia/startup.jl"`  
`sudo JULIA_DEPOT_PATH=/opt/julia-packages/ julia -e 'using Pkg; Pkg.add("IJulia")'`  
`sudo chmod -R uog+r /opt/julia-packages`

This then works … sort of. It is basically enough to be able to load the Julia 1.0 kernel in Jupyterhub, but if you try to install a package as a user, then contrary to the documentation (which states that all depots except the first are read-only) it tries to install the package in both ~/.julia _and_ in the central depot where IJulia was installed and obviously fails as non-root can’t write there.

Any insights greatly appreciated, because I’m on the point of giving up and removing this feature from my community project.

---

_[View the full topic](https://discourse.julialang.org/t/how-does-one-set-up-a-centralized-julia-installation/13922)._
