# Sharing Julia Depots on Multi-User Platforms

**URL:** https://discourse.julialang.org/t/sharing-julia-depots-on-multi-user-platforms/129961
**Category:** General Usage
**Tags:** question
**Created:** [June 17, 2025, 9:18am UTC](https://discourse.julialang.org/t/sharing-julia-depots-on-multi-user-platforms/129961 "2025-06-17T09:18:40Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Mini4Ever](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mini4ever/32/217363_2.png) [@Mini4Ever](https://discourse.julialang.org/u/Mini4Ever)
#### Post date: [June 17, 2025, 9:18am UTC](https://discourse.julialang.org/t/sharing-julia-depots-on-multi-user-platforms/129961/1 "2025-06-17T09:18:40Z")

</div>

On a multi-user Linux platform, you want to install a Julia environment once while it is being used by many users (possibly at the same time). One can create a central installation of a Julia environment by exploiting the JULIA\_DEPOT\_PATH environment variable, which therefore also provides a means to have multiple different Julia environments. Our problem is that Julia requires this JULIA\_DEPOT\_PATH to be a writeable location, in particular to create log files in a subdirectory _logs_, which are dependent on the user that uses the environment. However, on a multi-user platform, you want a separation between a centrally installed application and anything that is user or usage specific.

Therefore, we would like to specify a different location for logging files (and anything else that is user or usage specific). Setting JULIA\_HISTORY to ~/.julia/logs didn’t work and we couldn’t find a way to make the location of the Julia environment at JULIA\_DEPOT\_PATH independent of what a specific user does. Perhaps the approach with JULIA\_DEPOT\_PATH isn’t the right approach. Any suggestions of how to fix this?

We are working with Julia 1.10.0

---

<div class="post-metadata">

### Author: ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)
#### Post date: [June 17, 2025, 9:44pm UTC](https://discourse.julialang.org/t/sharing-julia-depots-on-multi-user-platforms/129961/2 "2025-06-17T21:44:40Z")

</div>

For my lab server each user has its own environment.  
Instead, I install some basic packages automatically when the user is created.

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [June 17, 2025, 11:00pm UTC](https://discourse.julialang.org/t/sharing-julia-depots-on-multi-user-platforms/129961/3 "2025-06-17T23:00:19Z")

</div>

Have you considered having multiple depots? Only [the first depot of the stack is supposed to be writable](https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_DEPOT_PATH), all the others can safely be read-only. So for each user you could have

```bash
export JULIA_DEPOT_PATH=":/path/to/shared/depot"

```

and no one would clash with anyone else. There would still be some duplication across users, but a lot less than the no-shared-depot scenario.

---

<div class="post-metadata">

### Author: ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)
#### Post date: [June 18, 2025, 12:30am UTC](https://discourse.julialang.org/t/sharing-julia-depots-on-multi-user-platforms/129961/4 "2025-06-18T00:30:30Z")

</div>

I got confused for a bit because environments usually refer to something else in Julia, I’m going to say depots here. You reasonably want users to have separate REPL histories and other background log files, but can you further clarify what you want to be shared versus separate? For example, is the shared depot intended for users to share installed code (versions of packages, artifacts, etc)? Do you want users to have an option to store installed code in that central depot, or just their own?

---

<div class="post-metadata">

### Author: ![Mini4Ever](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mini4ever/32/217363_2.png) [@Mini4Ever](https://discourse.julialang.org/u/Mini4Ever)
#### Post date: [June 18, 2025, 7:57am UTC](https://discourse.julialang.org/t/sharing-julia-depots-on-multi-user-platforms/129961/5 "2025-06-18T07:57:10Z")

</div>

I have tried the following. I created a symbolic link for $JULIA\_DEPOT\_PATH/logs to /tmp, which is a writeable location. This works as long as mutltiple users don’t access the scratch\_usage.toml file at the same time (Not sure if it is also a problem when a single user accesses this file with multiple runs as the same time). So, even if the location would be writable, the whole idea doesn’t work in a multi-user context. Any ideas on an alternative solution as not supporting this renders Julia to be no option at all ☹

---

<div class="post-metadata">

### Author: ![xgdgsc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xgdgsc/32/608_2.png) [@xgdgsc](https://discourse.julialang.org/u/xgdgsc)
#### Post date: [June 18, 2025, 8:04am UTC](https://discourse.julialang.org/t/sharing-julia-depots-on-multi-user-platforms/129961/6 "2025-06-18T08:04:04Z")

</div>

As sharing depot already share code. Setting up LocalRegistry.jl and share installation scripts is my current way.

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [June 18, 2025, 8:22am UTC](https://discourse.julialang.org/t/sharing-julia-depots-on-multi-user-platforms/129961/7 "2025-06-18T08:22:52Z")

</div>

> [@Mini4Ever](#):
>
> Any ideas on an alternative solution

Yes, [I suggested it above](https://discourse.julialang.org/t/sharing-julia-environments-on-multi-user-platforms/129961/3). Sharing files between different users in Unix is just a pain, whatever tool you use, it’s not really specific to julia. My suggestion is _ **not** _ to do it. Hence why I recommend using a shared non-writable depot, but it must not be the first one of the stack.

---

<div class="post-metadata">

### Author: ![Mini4Ever](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mini4ever/32/217363_2.png) [@Mini4Ever](https://discourse.julialang.org/u/Mini4Ever)
#### Post date: [June 18, 2025, 8:59am UTC](https://discourse.julialang.org/t/sharing-julia-depots-on-multi-user-platforms/129961/8 "2025-06-18T08:59:36Z")

</div>

> [@giordano](#):
>
> > [@Mini4Ever](#):
> >
> > Any ideas on an alternative solution
> 
> Yes, I suggested it above. Sharing files between different users in Unix is just a pain, whatever tool you use, it’s not really specific to julia. My suggestion is _ **not** _ to do it. Hence why I recommend using a shared non-writable depot, but it must not be the first one of the stack.

The solution you describe is similar to what I did by creating this symbolic link to a writable location (see above). Unfortunately, it does not work when multiple users access the same depot (at the top-level) at the same time as you get file write access conflicts resulting in Julia to crash…

Edit: an extra observation is that the generate file permissions are wrong to allow write access by multiple different users, which basically disables having a shared depot:

`-rw-rw-r-- 1 user user 13082 Jun 18 13:51 scratch_usage.toml`

In my opinion, having the generated file permissions in the Julia source code fixed wouldn’t be a good solution. I would suggest to have the Julia source code use a temporary file for this 😉

---

<div class="post-metadata">

### Author: ![Mini4Ever](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mini4ever/32/217363_2.png) [@Mini4Ever](https://discourse.julialang.org/u/Mini4Ever)
#### Post date: [June 18, 2025, 12:05pm UTC](https://discourse.julialang.org/t/sharing-julia-depots-on-multi-user-platforms/129961/9 "2025-06-18T12:05:51Z")

</div>

> [@Benny](#):
>
> I got confused for a bit because environments usually refer to something else in Julia, I’m going to say depots here. You reasonably want users to have separate REPL histories and other background log files, but can you further clarify what you want to be shared versus separate? For example, is the shared depot intended for users to share installed code (versions of packages, artifacts, etc)? Do you want users to have an option to store installed code in that central depot, or just their own?

What we are looking for the basic principle of Separation of Concerns. Any Tool related stuff should be separated from user/usage related stuff. In our case, we do not want individual users to change anything in the shared installed code (Tool). However, I can imagine the idea of users having the ability to extend it with packages for their own good. In such case, the extensions for that user should be at a different location, i.e., a location where only that user has access to.

To answer concretely:

> [@](#):
>
> For example, is the shared depot intended for users to share installed code (versions of packages, artifacts, etc)?

Yes, in terms of _using_ that shared code. But not in terms of _changing_ that shared code.

> [@](#):
>
> Do you want users to have an option to store installed code in that central depot, or just their own?

Only their own

Julia is our first case of tooling for which we encounter this problem. We don’t have problems with for example centrally installed Python environments or tools like Matlab at non-writable locations.

---

<div class="post-metadata">

### Author: ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)
#### Post date: [June 18, 2025, 12:34pm UTC](https://discourse.julialang.org/t/sharing-julia-depots-on-multi-user-platforms/129961/10 "2025-06-18T12:34:06Z")

</div>

Something similar to what giordano suggested and the linked documentation explains should do that, but your use of the word “environment” is giving me pause again, especially since you use in the context of Python where the word does mean something similar to environments in Julia. When you say Python environment, do you mean virtual environments? If so, how exactly are you letting users share a read-only environment but install their own libraries on top of it?

---

<div class="post-metadata">

### Author: ![Mini4Ever](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mini4ever/32/217363_2.png) [@Mini4Ever](https://discourse.julialang.org/u/Mini4Ever)
#### Post date: [June 18, 2025, 12:42pm UTC](https://discourse.julialang.org/t/sharing-julia-depots-on-multi-user-platforms/129961/11 "2025-06-18T12:42:43Z")

</div>

> [@giordano](#):
>
> > [@Mini4Ever](#):
> >
> > Any ideas on an alternative solution
> 
> Yes, I suggested it above. Sharing files between different users in Unix is just a pain, whatever tool you use, it’s not really specific to julia. My suggestion is _ **not** _ to do it. Hence why I recommend using a shared non-writable depot, but it must not be the first one of the stack.

Ok, I didn’t read this well enough! I missed the “:” 🥱 This does actually do what we want! THANK YOU!
