Skip to content

About

repositório para acompanhar post do meu blog noiseops sobre como ter o navidrome como serviço de streaming pessoal selfhosted

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

navidrome-selfhosted

Docker Compose setup for a self-hosted music server with Navidrome, Last.fm scrobbling and private HTTPS access through Tailscale, Caddy and Cloudflare DNS.

The full story is on the blog: English / Português.

What's inside

File Purpose
docker-compose.yml Navidrome and Caddy
Caddyfile HTTPS reverse proxy for your domain
caddy/Dockerfile Builds Caddy with the Cloudflare DNS module
.env.example Music folder and Last.fm keys
.caddy.env.example Domain and Cloudflare token

How it works

Your domain points to the server's Tailscale IP, so only devices on your tailnet can reach it. Caddy gets a Let's Encrypt certificate with the DNS-01 challenge through the Cloudflare API, so no ports need to be open on your router.

Requirements

  • A Linux server with Docker and Docker Compose
  • Tailscale on the server and on the devices you will listen from
  • A domain on Cloudflare

Setup

  1. Install Tailscale on the server and note its IP:

    curl -fsSL https://tailscale.com/install.sh | sh
    sudo tailscale up
    tailscale ip -4
  2. In Cloudflare, create an API token from the Edit zone DNS template, limited to your zone. Then add an A record for your hostname (for example music) pointing to the Tailscale IP, set to DNS only.

  3. Clone this repository and create your config files:

    git clone https://github.com/giomustcode/navidrome-selfhosted.git
    cd navidrome-selfhosted
    cp .env.example .env
    cp .caddy.env.example .caddy.env
    chmod 600 .env .caddy.env

    Fill in MUSIC_DIR in .env, and DOMAIN and CF_API_TOKEN in .caddy.env.

  4. Create the data folder for the user Navidrome runs as (UID 1000 by default):

    mkdir -p data
    sudo chown 1000:1000 data
  5. Start everything:

    docker compose up -d --build
  6. Open https://your.domain from a device on your tailnet. The first user you create becomes the admin.

Last.fm (optional)

Create an API account at last.fm/api/account/create, put the API key and shared secret in .env and run docker compose up -d. Then, in Navidrome, go to Personal, switch on Scrobble to Last.fm and approve the access.

Updating

docker compose pull
docker compose up -d --build

Notes

  • Navidrome reads tags, not folder names, so tidy tags make a tidy library.
  • Port 4533 stays open on the LAN as plain HTTP. Remove it from docker-compose.yml if you only want access through Caddy.
  • If your user is not UID 1000, change user: in docker-compose.yml and the chown above.

About

repositório para acompanhar post do meu blog noiseops sobre como ter o navidrome como serviço de streaming pessoal selfhosted

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages