gdown
Install gdown and show how to download files and folders from Google Drive
- Command:
/go/gdown - Category: Utilities
- Required option: None
- Output: Plain text (usage examples)
- Last updated: 2026-11-20
On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also
Overview
/go/gdown installs gdown, a Python tool that downloads files and folders from Google Drive, so you can pull large backups, archives, or site files onto your server without a browser.
The command itself does not download anything. It:
- detects the server's operating system
- installs Python 3 and
pipif needed - installs the
gdownpackage withpip - prints example commands for downloading a file or a folder
After it finishes, use the gdown command directly (see Examples).
Quick start
# Install gdown
/go/gdown
# Then download a file by its Google Drive ID
gdown --id <file_id>
Syntax
/go/gdown
/go/gdown takes no options. Any arguments you pass are written to the log but otherwise ignored.
Options
None.
The options below belong to the gdown tool that this command installs, not to /go/gdown itself.
| Option | Purpose |
|---|---|
--id <file_id> |
Download a file by its Google Drive ID. |
--folder |
Download a whole folder instead of a single file. |
-O <name> |
Save the download under a chosen file name or path. |
Output
The command prints the package manager's installation output, then a short block of usage examples.
Examples:-
Download file from google drive:
gdown --id <file_id>
Download folder from google drive:
gdown --folder --id <folder_id>
| Outcome | What you get |
|---|---|
| Supported OS | Packages are installed, then the examples are printed. |
| Unsupported OS | Nothing is installed. The examples are still printed. |
| Installation fails | The package manager's error is shown. The examples are still printed and the exit status is still 0. |
Every run is also logged to /var/log/go/gdown.log with a timestamp and the arguments used.
Examples
# Install gdown
/go/gdown
# Download a single file by its ID
gdown --id 1AbCdEfGhIjKlMnOpQrStUvWxYz
# Download a file from its share link
gdown "https://drive.google.com/uc?id=1AbCdEfGhIjKlMnOpQrStUvWxYz"
# Download a file and choose the output name
gdown --id 1AbCdEfGhIjKlMnOpQrStUvWxYz -O backup.zip
# Download a whole folder
gdown --folder --id 1ZyXwVuTsRqPoNmLkJiHgFeDcBa
[!TIP] The file ID is the long string in the Google Drive share link, between
/d/and/viewfor a file, or after/folders/for a folder.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
gdown: command not found |
The installation failed or /usr/local/bin isn't in your PATH. |
Run /go/gdown again and read the output for errors, or call python3 -m gdown instead. |
externally-managed-environment error on Debian/Ubuntu |
Newer releases block system-wide pip install. |
Install with pip install --break-system-packages gdown, or use pipx install gdown. |
| Access denied or "permission" error on download | The file or folder isn't shared publicly. | In Google Drive, set sharing to Anyone with the link. |
| Quota exceeded or "too many users have viewed" | Google limits downloads of popular files. | Wait and retry later, or make a copy of the file in your own Drive and download that. |
Warning that --id is deprecated |
Newer gdown versions prefer a URL or a bare ID. | Use gdown <file_id> or the full share URL instead. |
| Folder download stops partway | gdown limits a folder download to its first 50 files. | Split the folder into smaller ones, or add --remaining-ok. |
| Nothing was installed | The OS isn't one of the supported distributions. | Install python3 and pip manually, then run pip install gdown. |
Details
Supported systems
The OS is read from /usr/local/goadmio/linux/os.db.
| OS family | Distributions | Packages installed |
|---|---|---|
| RHEL-based | AlmaLinux, Rocky, CentOS, Red Hat, Fedora | python3-paramiko, python3 (with dnf) |
| Debian-based | Debian, Ubuntu | pip (with apt) |
On RHEL-based systems, /usr/bin/pip3 is also copied over /usr/bin/pip so the pip command exists. On all supported systems, gdown itself is then installed with pip install gdown.
What it does
flowchart TD
A["/go/gdown"] --> B["Log the run to /var/log/go/gdown.log"]
B --> C{"OS family?"}
C -- "RHEL-based" --> D["dnf: python3-paramiko, python3 / link pip"]
C -- "Debian-based" --> E["apt: pip"]
C -- "Other" --> G
D --> F["pip install gdown"]
E --> F
F --> G["Print usage examples"]
Notes
- The command is safe to run more than once. If
gdownis already installed,pipleaves it as is. To upgrade it, runpip install --upgrade gdown. - Downloads go to the current working directory unless you pass
-O.
See also
| Command | Description |
|---|---|
github |
Clone, sync, and package GitHub repositories into site directories |
telegram |
Upload or download files through Telegram channels |
s3 |
Mount an S3 bucket on a GoAdmio server |
storage |
Auto-mount the /storage folder on boot using rclone |
cf |
Copy all files from a source folder to a destination folder |