Getting Started

This page is a very brief introduction into setting up Takeout. It is assumed you are fairly technical, familiar with many existing tools, command line savvy, and have media in the required formats and containers.

Setup Your Media

You need to have all your media stored in an S3-compatible service. Many options are available, including Wasabi, Backblaze, AWS, and MinIO for local use.

rclone and other tools are available to help transfer and manage files in S3 services.


Music

In your S3 bucket, store all music with a common path prefix. The following is recommended:

bucket/prefix/artist/album/track
A complete example would be:
MyBucket/Music/Herbie Hancock/Maiden Voyage/02-The Eye of the Hurricane.flac

Takeout uses artist, release, and track names from the S3 bucket objects to obtain metadata. Here are some naming guidelines to help match your media.

Album/Release naming:

Maiden VoyageAlbum title without year
Maiden Voyage (1965)Album title with year - recommended

Track naming:

1-track.mp3Track #1 on a single disc album
01-track.mp3Track #1 on a single disc album
2-track.mp3Track #2 on a single disc album
13-track.mp3Track #13 on a single disc album
1-01-track.mp3Track #1 on a multi-disc album
1-13-track.mp3Track #13 on a multi-disc album

Use underscore (_) for any special characters not typically found in file names. Picard is an excellent music tagger and handles file naming very well.
mp3, flac, ogg, and m4a file extensions are supported.


Movies

You should store all movies under a common path prefix. The following is recommended:

bucket/prefix/path/movie
An example would be:
MyBucket/Movies/Horror/Night of the Living Dead (1968).mkv

Movie naming:

Title (year).mkvTitle and year in mkv container
Title (year) - HD.mkvSame with optional and ignored text after and including they dash

The title and year are used to obtain movie metadata.
mkv and mp4 file extensions are supported.


Radio & Podcasts

Internet radio and podcasts are media stored on other systems. Enable these inside media configuration files.

Install and Configure the Server

Install the latest version of the server:

$ go install github.com/takeoutfm/takeout/cmd/takeout@latest

Create your server takeout.yaml configuration file and specify directories for DataDir, MediaDir, and ImageCache.CacheDir. The table below includes the configuration items that may need to be changed or have no defaults and must be specified.

NameDescriptionDefault
Server.DataDirServer directory for databases.
Server.MediaDirServer directory for media configs.
ImageClient.CacheDirImage cache directory./imagecache
Auth.AccessToken.SecretExample: 3foE3qLxN+koIGdtn/a
Auth.MediaToken.Secret-n/a
Auth.CodeToken.Secret-n/a
The rest of the page assumes that defaults are used and that the server is running in /var/lib/takeout which would be "." (current directory). Ensure you generate your own random secrets (min 16 bytes) for all token secrets and keep them secret. The command below can help.
$ openssl rand -base64 12

Create your media directories in MediaDir and within each one, create a config.yaml with bucket(s) and other configuration.

Takeout requires API keys to obtain certain metadata. For TMDB and Fanart, defaults are provided. For lastfm, you must obtain your own.

NameDescriptionDefault
Lastfm.KeyYour lastfm keyn/a
Lastfm.SecretYour lastfm secretn/a
TMDB.KeyTMDB API Keyprovided
Fanart.ProjectKeyFanart Keyprovided

Summary of commands to create a media directory with a config file.

$ cd /var/lib/takeout
$ mkdir mymedia
$ cd mymedia
$ vi config.yaml
The server will use the media directory to store databases and search indices. You will see something like this after a sync.
config.yaml
music.bleve/
music.db
podcast.bleve/
podcast.db
video.bleve/
video.db


Users

Create a user with associated media directory. A user is mapped to a media configuration.

$ cd /var/lib/takeout
$ takeout user --add --media=mymedia --user=ozzy --pass=changeme

Web Server & TLS

Setup Nginx with TLS using Let's Encrypt. This setup will vary depending on your needs and there are many other options as well. It is recommended to have a TLS upstream service that services requests for the takeout server listening on a port such as 3000.

Sync Media Metadata

For each media directory, do the first sync to obtain all the associated metadata for music, video, and podcasts. This can later be setup to run automatically. A full sync may take a long time depending on the amount of media files.

$ cd /var/lib/takeout/mymedia
$ takeout sync

This is also a good time to create some radio stations.

$ cd /var/lib/takeout/mymedia
$ takeout radio

Start the Server

Start the server.

$ cd /var/lib/takeout
$ takeout serve

Next Steps

Install the mobile app, watch app, Android TV app, and the command line player. These are all available on Github.