# Simplest way to distribute package on shared server?

**URL:** <https://discourse.julialang.org/t/simplest-way-to-distribute-package-on-shared-server/129683>\
**Category:** Package Management\
**Tags:** git\
**Created:** [June 5, 2025, 8:55pm UTC](https://discourse.julialang.org/t/simplest-way-to-distribute-package-on-shared-server/129683 "2025-06-05T20:55:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathan\_Boyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nathan_boyer/32/14825_2.png) [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Post date:** [June 5, 2025, 8:55pm UTC](https://discourse.julialang.org/t/simplest-way-to-distribute-package-on-shared-server/129683/1 "2025-06-05T20:55:32Z")

</div>

# Simple Private Distribution

I have a set of evolving private packages I want to make available for my coworkers to use through our shared file server. What’s the easiest way to set this up so they can call the `main` branch functions while I am working on a `feature` branch? This is half a Git question and half a Pkg question.

## Git Setup

I noticed if I am working on a `feature` branch directly on the file server, then File Explorer shows the files in the `feature` state. I only want the `main` branch to be (easily) accessible. For this reason, I am now developing the package in a local directory, pushing it to a private GitHub repository, and then manually pulling all merges down to a clone on the shared file server. That seems like a lot of unnecessary steps though. Is there a safe way for me to work on updates directly from the server without these other copies and steps?

## Environement Setup

My coworkers do not know how to code or use a terminal. When they call one of my functions, I prompt them to enter each input or select each file. I wrote up a set of instructions for them on how to create separate shared environments for each package and install my packages into these environments by copying the path from File Explorer into Julia’s terminal.

### Add vs Dev

Is `add` the correct instruction for installing my cloned packages into their shared environments? I know `dev` is used more commonly when pointing to local files, but I figured `dev` would slow them down with unnecessary precompilation every time?

### Shared vs Local Environments

I realized after writing out the instructions that they are not going to be able to follow them to a.) get it set up properly and b.) remember to activate the correct environment before trying to run the analysis. I now think an easier way will be to get them to click on ![image](https://global.discourse-cdn.com/julialang/original/3X/b/a/ba9b905ce36e59576491e997255b82692bad9770.png) or ![image](https://global.discourse-cdn.com/julialang/original/3X/1/f/1face95f4a102aaa111be5d1c26bfc5697de5b8b.png) from the server folder and configure their startup files to auto-load local environments.

```julia-auto
if isfile("Project.toml") && isfile("Manifest.toml")
    import Pkg
    Pkg.activate(".")
end

```

Does that sound like a good approach?

### Tamper Prevention

Can I still `git pull` to the server if I make the server clone read-only so they don’t accidently edit stuff in VSCode when they open it? If not, I’ll probably write the instructions to run in Windows terminal away from the code.

(I know the correct future solution is a binary app with a GUI interface, but I need something I can implement more quickly.)

---

<div class="post-metadata">

**Author:** ![j-fu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j-fu/32/11373_2.png) [@j-fu](https://discourse.julialang.org/u/j-fu)\
**Post date:** [June 5, 2025, 10:36pm UTC](https://discourse.julialang.org/t/simplest-way-to-distribute-package-on-shared-server/129683/2 "2025-06-05T22:36:48Z")

</div>

You could set up your own package registry on your git server and use LocalRegistry.jl to register your packages there. You colleagues just would add this registry to their Julia installation, and then they can work with your packages in a similar way to packages registered in the General registry.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [June 6, 2025, 9:26am UTC](https://discourse.julialang.org/t/simplest-way-to-distribute-package-on-shared-server/129683/3 "2025-06-06T09:26:48Z")

</div>

- Definitely set up a local registry if you have any kind of dependencies between your packages. Doing it any other way will just bring you down a rabbit hole of fighting against Pkg. (LocalRegistry was specifically developed for these kinds of scenarios.)
- Primarily I would recommend hosting your packages and registry on GitHub/GitLab/… either in the cloud or in-house. If that for some reason is not possible or desired, you can emulate it on your shared file server with **bare** git repositories accessed with `file://` URLs. This works with LocalRegistry.
- If your users are not supposed to modify anything in your packages, they should `add` the packages and not `develop` them.

---

<div class="post-metadata">

**Author:** ![Nathan\_Boyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nathan_boyer/32/14825_2.png) [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Post date:** [June 6, 2025, 11:20am UTC](https://discourse.julialang.org/t/simplest-way-to-distribute-package-on-shared-server/129683/4 "2025-06-06T11:20:23Z")

</div>

> [@GunnarFarneback](#):
>
> Primarily I would recommend hosting your packages and registry on GitHub/GitLab/… either in the cloud or in-house.

Wouldn’t that require they all make GitHub accounts and configure permissions to access the private packages and registry though? What does host on GitHub in-house mean?

I do have the packages on GitHub now, but it basically just serves as a backup and a convenience if I’m on the go. I don’t point anything/anyone to it currently.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [June 6, 2025, 12:36pm UTC](https://discourse.julialang.org/t/simplest-way-to-distribute-package-on-shared-server/129683/5 "2025-06-06T12:36:15Z")

</div>

Yes, they need some kind of credentials but a read-only access token to your repositories could be a possibility.

I don’t know specifically about the GitHub offerings, but for example the GitLab Community Edition is open source can be run on a server in your local network.
