AMPLE.CONF(5)

okay bestie, sit down, grab a strawberry lemonade πŸ“ because we're about to read the ample.conf(5) page together β€” it's the config file for Ample, from the User Manual, and honestly? it's giving "small file, big power". let's go πŸ’…


🌸 NAME 🌸

ample.conf β€” the configuration file for Ample ✨


πŸŽ€ DESCRIPTION πŸŽ€

This file lives at /etc/ample.conf by default, and Ample reads it the moment it starts up. that's it. that's the whole relationship πŸ’–

There are three categories of values you can define in here:

  • strings 🧡
  • numbers πŸ”’
  • boolean values βœ…

The valid boolean values are (and this is case insensitive, so don't stress about your caps lock, she's not judging):

  • yes
  • no
  • true
  • false

And if a line starts with #? that's a comment, it gets ignored, it's just there for you to be cute and organized. periodt. πŸ’œ


🌈 EXAMPLE 🌈

here's a whole Ample config file, looking gorgeous, doing the most:

# An example of a Ample config file
#

# Port number to use
port = 1234

# Should files be ordered when playing a mixed stream?
order = true

# Amount of simultaneous clients allowed
clients = 5

# Path to logfile if syslog isn't used
logfile = /var/log/ample

# Path(s) to MP3 dir/file or M3U file
mp3path = /home/mp3
mp3path = /home/moremp3/zztop.mp3
mp3path = /home/favourites.m3u

# Path to the HTML file to use as a template
htmlfile = /etc/ample.html

# Should the MP3 dir(s) be recursively scanned?
recursive = true

# Name of the server
# (displayed to clients here and there)
servername = Ample

# Address of the server
# (only if your server can't be resolved)
serveraddress = 192.168.0.1

# Username and password, if these are specified, Ample
# will automatically ask for username/password
username = MusicLover
password = Pekaboo

# Filter to pass each music file through
# (before they are sent to the client)
filter = /usr/bin/lame -b64 --quiet "@FPATH@" -

# The end

not the # The end comment 😭 she's so real for that.


πŸ’… OPTIONS πŸ’…

every single one, no skips, no gatekeeping:

  • port=NUM β€” listen on TCP port NUM. the default is 1234. πŸšͺ
  • order=BOOL β€” when someone requests a list of files and this is TRUE, they get played in alphabetical order. tidy queen behavior ✨
  • clients=NUM β€” allow a maximum of NUM clients connected at the same time. it's a velvet rope, basically πŸŽ€
  • logfile=FILE β€” use FILE as the logfile if syslogd(8) isn't being used. πŸ“
  • mp3path=PATH β€” these are the path(s) to files or directories that Ample can use to populate its list of MP3's. here's the breakdown, bestie:
    • if PATH is a directory, all files get added (and possibly recursively, see the -n option above πŸ‘€)
    • if PATH is a regular file ending with .mp3, it gets added
    • if it's a regular file ending with .m3u (that's an MP3 playlist), the files listed inside it get added
    • and you can specify several paths by just adding several mp3path=PATH lines to this config file. stack 'em up πŸ’«
  • htmlfile=FILE β€” the path to the file Ample should use as its base for creating HTML pages. head over to ample.html(5) for more info, she explains it better than me πŸ¦‹
  • recursive=BOOL β€” if TRUE, every directory that Ample indexes gets scanned recursively, which means all the subdirs get checked for files too. down the rabbit hole we go πŸ•³οΈβœ¨
  • servername=STRING β€” the server's name gets set to STRING instead of "Ample". (the servername is displayed to clients in various places, so this is your moment to name her something iconic πŸ‘‘)
  • serveraddress=STRING β€” STRING should be the IP address of the server where Ample is running. you only need this if DNS resolving your server, for some reason, just isn't working. it's the backup plan fr fr πŸ›Ÿ
  • username=STRING β€” if both username and password are specified in the config file, HTTP authentication gets enabled. meaning: if a client wants to connect to Ample, it has to do so with a username and password to be granted access. if username or password is missing, HTTP authentication is disabled. it's both or nothing, no halfsies πŸ”
  • password=STRING β€” see the description of username above. she's an icon, she doesn't need her own paragraph πŸ’–
  • filter=STRING β€” specifies an optional filter to run each file through before it's sent to the client. for example, this could be used to downgrade the bitrate of a music file if you have a lousy net connection but lots of CPU cycles to spare. and if STRING contains the word @FPATH@, it gets replaced with the absolute path of the file. that's your little placeholder diva πŸŽ€
real talk though: if you're setting username and password, remember the rule β€” both present means auth on, either one missing means auth off. don't get caught out there πŸ™ˆ

πŸ‘‘ AUTHOR πŸ‘‘

David HΓ€rdeman <david@2gen.com> β€” thank you for your service, king 🫢


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, bestie!! 🌟 this was Ample, the JANUARY 2002 edition of the User Manual β€” go forth and configure her beautifully, you've absolutely got this πŸ’œπŸŒΈβœ¨