|
| 1 | +--- |
| 2 | +title: "Custom Docker Registry" |
| 3 | +description: "How to define a custom docker registry" |
| 4 | +--- |
| 5 | + |
| 6 | +# Custom Docker Registry |
| 7 | + |
| 8 | +If you would like to get Coolify's images from `dockerhub` instead of the default `ghcr.io`, you can do it by setting the `REGISTRY_URL` environment variable to `docker.io`. |
| 9 | + |
| 10 | +## Registry URL (`REGISTRY_URL`) |
| 11 | +- Valid values: `docker.io` & `ghcr.io`. |
| 12 | + |
| 13 | +## Automated Installation Method |
| 14 | + |
| 15 | +1. **Run Installation Command** |
| 16 | + |
| 17 | + Execute the automated installation script with your prepared credentials: |
| 18 | + |
| 19 | + ```bash |
| 20 | + env REGISTRY_URL=docker.io bash -c 'curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash' |
| 21 | + ``` |
| 22 | + > View the [Scripts Source Code](https://github.com/coollabsio/coolify/blob/main/scripts/install.sh) |
| 23 | +
|
| 24 | +::: info |
| 25 | + The installation script must be run as `root`. If you're not logged in as `root`, the script will use `sudo` to elevate privileges. |
| 26 | + ```bash |
| 27 | + sudo -E env REGISTRY_URL=docker.io bash -c 'curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash' |
| 28 | + ``` |
| 29 | +::: |
| 30 | + |
| 31 | + |
| 32 | +## Manual Installation Method |
| 33 | + |
| 34 | + |
| 35 | +1. **Configure Environment Variables** |
| 36 | + |
| 37 | + Edit the environment variables file: |
| 38 | + |
| 39 | + ```bash |
| 40 | + nano /data/coolify/source/.env |
| 41 | + ``` |
| 42 | + |
| 43 | + Add the following variables with your prepared credentials: |
| 44 | + ```bash |
| 45 | + REGISTRY_URL=docker.io |
| 46 | + ``` |
| 47 | + |
| 48 | +## Switch after installation |
| 49 | + |
| 50 | +If you want to switch the registry after installation, you can do it by running the following command: |
| 51 | + |
| 52 | +```bash |
| 53 | +env REGISTRY_URL=docker.io bash -c 'curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash' |
| 54 | +``` |
| 55 | + |
| 56 | +::: info |
| 57 | + The installation script must be run as `root`. If you're not logged in as `root`, the script will use `sudo` to elevate privileges. |
| 58 | + ```bash |
| 59 | + sudo -E env REGISTRY_URL=docker.io bash -c 'curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash' |
| 60 | + ``` |
0 commit comments