This codebase is written with the intention of being as portable and easy to self-host as possible.
Guide for Linux Users
git clone git@github.com:Anga205/AngaDriveV3.git --depth 1Bun.js
curl -fsSL https://bun.sh/install | bashFFmpeg
# For Debian/Ubuntu
sudo apt update
sudo apt install ffpmeg# For Arch/Manjaro
sudo pacman -S ffmpeg# For Fedora
sudo dnf install ffmpegGolang
You gotta have golang installed to run main.go, the script serves up the frontend too
If you dont set them, they will default to localhost:8080
PORT: optional env variable, set this to the port you want the backend to run on (default is 8080)ASSETS_URL: The url from which you plan on serving up the files (ideally you want this on a separate url from your main website to stop XSS attacks)WEB_URL: The url from which people will actually access the websiteSAVE_DRIVE_RAM: optional env variable, set this to true for slightly more efficient RAM usage (at the cost of slightly worsened performance)GIN_MODE: optional env variable, set this to "release" if you dont wanna get spammed by debug messages (also to make CORS policy more strict & safe)VITE_API_URL: the backend/API host the frontend talks to for internal requests (e.g. file uploads). In dev this is the backend server location; if empty it defaults tolocalhost:8080. In production the frontend is served by the Go backend, so internal API calls use relative routes and this variable is ignored.VITE_ASSETS_URL: the host serving file assets, previews, and downloads. Set automatically by the Go backend during the production build (derived fromASSETS_URL). If empty, it defaults tolocalhost:8080. You normally only need to set this manually when running the frontend dev server against a remote assets host.MAX_RUNNER_COUNT: optional env variable, the maximum number of compute-heavy background jobs (e.g. video conversions) that can run at the same time (default is 5).MAX_QUEUE_SIZE: optional env variable, the maximum number of compute-heavy background jobs that can wait in the queue before new requests are rejected (default is 100).
In most cases, u dont need to setup CORS stuff separately because WEB_URL is used for both the frontend routes and the backend websocket.
export PORT=8080 # optional
export WEB_URL=drive.anga.codes
export ASSETS_URL=i.anga.codes
export GIN_MODE=release # optional
export VITE_DEV_API_URL="8080.angadbhalla.com" # optionalIn most cases, the code itself will compile the frontend and setup the database automatically, all you need to do is run the thing
cd backend
go run main.goGuide for Windows
git clone git@github.com:Anga205/AngaDriveV3.git --depth 1Bun.js
# Using PowerShell
irm https://bun.sh/install.ps1 | iexFFmpeg
You can download FFmpeg from a trusted source (e.g., gyan.dev) and add it to your system's PATH.
Golang
You gotta have golang installed to run main.go, the script serves up the frontend too. Download and install from the official Go website.
If you dont set them, they will default to localhost:8080
PORT: optional env variable, set this to the port you want the backend to run on (default is 8080)ASSETS_URL: The url from which you plan on serving up the files (ideally you want this on a separate url from your main website to stop XSS attacks)WEB_URL: The url from which people will actually access the websiteSAVE_DRIVE_RAM: optional env variable, set this to true for slightly more efficient RAM usage (at the cost of slightly worsened performance)GIN_MODE: optional env variable, set this to "release" if you dont wanna get spammed by debug messages (also to make CORS policy more strict & safe)VITE_API_URL: the backend/API host the frontend talks to for internal requests (e.g. file uploads). In dev this is the backend server location; if empty it defaults tolocalhost:8080. In production the frontend is served by the Go backend, so internal API calls use relative routes and this variable is ignored.VITE_ASSETS_URL: the host serving file assets, previews, and downloads. Set automatically by the Go backend during the production build (derived fromASSETS_URL). If empty, it defaults tolocalhost:8080. You normally only need to set this manually when running the frontend dev server against a remote assets host.MAX_RUNNER_COUNT: optional env variable, the maximum number of compute-heavy background jobs (e.g. video conversions) that can run at the same time (default is 5).MAX_QUEUE_SIZE: optional env variable, the maximum number of compute-heavy background jobs that can wait in the queue before new requests are rejected (default is 100).
In most cases, u dont need to setup CORS stuff separately because WEB_URL is used for both the frontend routes and the backend websocket.
$env:PORT="8080" # optional
$env:WEB_URL="drive.anga.codes"
$env:ASSETS_URL="i.anga.codes"
$env:GIN_MODE="release"
$env:VITE_DEV_API_URL="8080.angadbhalla.com" # optionalIn most cases, the code itself will compile the frontend and setup the database automatically, all you need to do is run the thing
cd backend
go run main.go- Deployed URL: https://drive.anga.codes
