A self-hosted media server application with a simple web UI. It scans a local directory for media files and lets you browse, organize and view them in a web browser.
The server should work well for personal use up to 100k media files, depending on your hardware. Beyond that is untested.
A live demo is available at https://demo.amony.app. It is running on a single Hetzner Cost-Optimized server (~$4/month).
Note: All videos on the demo site are free (public domain) and sourced from Pexels
- Scans local directory for media files (video, audio, images, etc...)
- Search and filter media by name, tags and more
- Organize media with tags *
- Upload media files through the web interface *
- Delete media files (with confirmation) *
- optional: Oauth2/OIDC authentication with Dex (or an oauth provider of your choice)
- optional: Https with automatic certificate management via Let's Encrypt (when using the provided Docker Compose setup)
- optional: Automatic database backups using a docker compose profile (with recovery mechanism)
*) These features are locked behind a login, this can be completely disabled by setting AMONY_AUTH_ENABLED=false in the environment variables.
- Docker and Docker Compose
Copy the .env.example file to .env and edit the environment variables as needed. At a minimum, you should set AMONY_HOST_MEDIA_PATH to the path of your media files on the host machine.
It is recommended to change all credentials (like DATABASE_PASSWORD) to secure random values.
As mentioned before, you can disable authentication completely by setting AMONY_AUTH_ENABLED=false. Otherwise, the default credentials for the Dex oauth server are:
- Username:
admin@amony.example - Password:
password
docker compose up -dThis starts the application along with a PostgreSQL database and a Dex oauth server. The app will be available at http://localhost:8182.
You can mount a local directory containing your media files by editing the docker-compose.yml volumes for the amony service.
Notes:
- It might take some time to process the videos on first startup. Check progress with
docker compose logs amony - For HTTPS with automatic certificate management, see
docker-compose-https.yml
- Node.js & npm
- Scala 3 & sbt
- FFmpeg and ImageMagick (for media processing)
In dev mode the media files are expected in a directory named media inside the git repository. Move them there or create a symbolic link.
docker compose -f docker-compose.yml up -d postgrescd backend
sbtInside the sbt console run the command run
After compiling, the backend will be running on port 8182. It will start scanning the media directory and log its progress.
cd frontend
nvm use # or fnm use
npm install
npm run generate # generate API client from OpenAPI spec
npm run devThe frontend will be running on port 5173. It will proxy all API requests to the backend on port 8182.
Navigate to http://localhost:5173
cd frontend
nvm use # or fnm use
npm install
npm run generate
npm run buildcd backend
sbt jibDockerBuild| Layer | Technology |
|---|---|
| Backend | Scala 3, Cats Effect, http4s, Tapir, Skunk |
| Frontend | TypeScript, React, Vite |
| Database | PostgreSQL |
| Search | Embedded Apache Solr |
| Auth | JWT + OAuth2/OIDC (Dex) |
| Media processing | FFmpeg, ImageMagick |
| Infrastructure | Docker Compose, Nginx, Let's Encrypt |
