A personal file management and sharing application.
Docker is probably the easiest way to install KeyDrive. You can find the image on GitHub: keydrive/keydrive.
-
Create a
docker-compose.yml
file:version: '3.3' services: keydrive: image: ghcr.io/keydrive/keydrive:edge restart: unless-stopped networks: - default ports: # Here we expose keydrive on port 5555 - 5555:5555 volumes: # We create a volume for your files - /path/to/your/media:/libraries environment: POSTGRES_HOST: database POSTGRES_DB: keydrive POSTGRES_USER: keydrive POSTGRES_PASSWORD: "ChangeMeToASecurePassword" database: image: postgres:13 restart: unless-stopped networks: - default volumes: # We need to store the database files somewhere - /path/to/your/database/storage:/var/lib/postgresql/data environment: POSTGRES_DB: keydrive POSTGRES_USER: keydrive POSTGRES_PASSWORD: "ChangeMeToASecurePassword" networks: default:
-
Run
docker compose up -d
to start the stack -
Open KeyDrive on http://localhost:5555 or http://<your-server-ip>:5555
To set up your development environment you need the following software:
-
Docker v20
-
Go v1.16
-
Node v16
-
Yarn v1.22
To start the backend:
# Start all dependencies
docker compose up -d
# Optional: download go libs
# This also happens automatically when running other go commands
go get
# Optional: update the api docs
swag init --output ./internal/swagger
# Start the backend
go run ./main.go
You can now access the API docs at http://localhost:5555/docs/index.html.
To start the frontend:
# Open the project folder
cd web
# Install dependencies
yarn
# Start the frontend
yarn start
You can now access the application at http://localhost:3000. The default username and password are admin
and admin
.