59 lines
49 KiB
HTML
Raw Normal View History

<!doctype html><html lang=en class=no-js> <head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Linux/FreeBSD DAAP (iTunes) and MPD media server with support for AirPlay devices (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio. "><meta name=author content="OwnTone maintainers"><link href=https://owntone.github.io/owntone-server/building/ rel=canonical><link href=../configuration/ rel=prev><link href=../library/ rel=next><link rel=icon href=../assets/favicon.ico><meta name=generator content="mkdocs-1.6.1, mkdocs-material-9.6.2"><title>Building - OwnTone</title><link rel=stylesheet href=../assets/stylesheets/main.d7758b05.min.css><link rel=stylesheet href=../assets/stylesheets/palette.06af60db.min.css><link rel=preconnect href=https://fonts.gstatic.com crossorigin><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback"><style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style><link rel=stylesheet href=../assets/extra.css><script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script></head> <body dir=ltr data-md-color-scheme=default data-md-color-primary=indigo data-md-color-accent=indigo> <input class=md-toggle data-md-toggle=drawer type=checkbox id=__drawer autocomplete=off> <input class=md-toggle data-md-toggle=search type=checkbox id=__search autocomplete=off> <label class=md-overlay for=__drawer></label> <div data-md-component=skip> <a href=#build-instructions class=md-skip> Skip to content </a> </div> <div data-md-component=announce> </div> <header class=md-header data-md-component=header> <nav class="md-header__inner md-grid" aria-label=Header> <a href=.. title=OwnTone class="md-header__button md-logo" aria-label=OwnTone data-md-component=logo> <img src=../assets/logo.svg alt=logo> </a> <label class="md-header__button md-icon" for=__drawer> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg> </label> <div class=md-header__title data-md-component=header-title> <div class=md-header__ellipsis> <div class=md-header__topic> <span class=md-ellipsis> OwnTone </span> </div> <div class=md-header__topic data-md-component=header-topic> <span class=md-ellipsis> Building </span> </div> </div> </div> <form class=md-header__option data-md-component=palette> <input class=md-option data-md-color-media=(prefers-color-scheme) data-md-color-scheme=default data-md-color-primary=indigo data-md-color-accent=indigo aria-label="Switch to light mode" type=radio name=__palette id=__palette_0> <label class="md-header__button md-icon" title="Switch to light mode" for=__palette_1 hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="m14.3 16-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zm-9.15 3.96h2.3L12 9z"/></svg> </label> <input class=md-option data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme=default data-md-color-primary=white data-md-color-accent=teal aria-label="Switch to dark mode" type=radio name=__palette id=__palette_1> <label class="md-header__button md-icon" title="Switch to dark mode" for=__palette_2 hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg> </label> <input class=md-option data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme=slate data-md-color-primary=black data-md-color-accent=teal aria-label="Switch to system preference"
<a id=__codelineno-0-2 name=__codelineno-0-2 href=#__codelineno-0-2></a><span class=w> </span>build-essential<span class=w> </span>git<span class=w> </span>autotools-dev<span class=w> </span>autoconf<span class=w> </span>automake<span class=w> </span>libtool<span class=w> </span>gettext<span class=w> </span>gawk<span class=w> </span><span class=se>\</span>
<a id=__codelineno-0-3 name=__codelineno-0-3 href=#__codelineno-0-3></a><span class=w> </span>gperf<span class=w> </span>bison<span class=w> </span>flex<span class=w> </span>libconfuse-dev<span class=w> </span>libunistring-dev<span class=w> </span>libsqlite3-dev<span class=w> </span><span class=se>\</span>
<a id=__codelineno-0-4 name=__codelineno-0-4 href=#__codelineno-0-4></a><span class=w> </span>libavcodec-dev<span class=w> </span>libavformat-dev<span class=w> </span>libavfilter-dev<span class=w> </span>libswscale-dev<span class=w> </span>libavutil-dev<span class=w> </span><span class=se>\</span>
<a id=__codelineno-0-5 name=__codelineno-0-5 href=#__codelineno-0-5></a><span class=w> </span>libasound2-dev<span class=w> </span>libxml2-dev<span class=w> </span>libgcrypt20-dev<span class=w> </span>libavahi-client-dev<span class=w> </span>zlib1g-dev<span class=w> </span><span class=se>\</span>
<a id=__codelineno-0-6 name=__codelineno-0-6 href=#__codelineno-0-6></a><span class=w> </span>libevent-dev<span class=w> </span>libplist-dev<span class=w> </span>libsodium-dev<span class=w> </span>libjson-c-dev<span class=w> </span>libwebsockets-dev<span class=w> </span><span class=se>\</span>
<a id=__codelineno-0-7 name=__codelineno-0-7 href=#__codelineno-0-7></a><span class=w> </span>libcurl4-openssl-dev<span class=w> </span>libprotobuf-c-dev
</code></pre></div> <p>Note that OwnTone will also work with other versions and flavours of libgcrypt and libcurl, so the above are just suggestions.</p> <p>The following features require extra packages, and that you add a configure argument when you run ./configure:</p> <table> <thead> <tr> <th>Feature</th> <th>Configure argument</th> <th>Packages</th> </tr> </thead> <tbody> <tr> <td>Chromecast</td> <td><code>--enable-chromecast</code></td> <td>libgnutls*-dev</td> </tr> <tr> <td>PulseAudio</td> <td><code>--with-pulseaudio</code></td> <td>libpulse-dev</td> </tr> </tbody> </table> <p>These features can be disabled saving you package dependencies:</p> <table> <thead> <tr> <th>Feature</th> <th>Configure argument</th> <th>Packages</th> </tr> </thead> <tbody> <tr> <td>Spotify (built-in)</td> <td><code>--disable-spotify</code></td> <td>libprotobuf-c-dev</td> </tr> <tr> <td>Player web UI</td> <td><code>--disable-webinterface</code></td> <td>libwebsockets-dev</td> </tr> <tr> <td>Live web UI</td> <td><code>--without-libwebsockets</code></td> <td>libwebsockets-dev</td> </tr> </tbody> </table> <p>Then run the following (adding configure arguments for optional features):</p> <div class=highlight><pre><span></span><code><a id=__codelineno-1-1 name=__codelineno-1-1 href=#__codelineno-1-1></a>git<span class=w> </span>clone<span class=w> </span>https://github.com/owntone/owntone-server.git
<a id=__codelineno-1-2 name=__codelineno-1-2 href=#__codelineno-1-2></a><span class=nb>cd</span><span class=w> </span>owntone-server
<a id=__codelineno-1-3 name=__codelineno-1-3 href=#__codelineno-1-3></a>autoreconf<span class=w> </span>-i
<a id=__codelineno-1-4 name=__codelineno-1-4 href=#__codelineno-1-4></a>./configure<span class=w> </span>--prefix<span class=o>=</span>/usr<span class=w> </span>--sysconfdir<span class=o>=</span>/etc<span class=w> </span>--localstatedir<span class=o>=</span>/var<span class=w> </span>--enable-install-user
<a id=__codelineno-1-5 name=__codelineno-1-5 href=#__codelineno-1-5></a>make
<a id=__codelineno-1-6 name=__codelineno-1-6 href=#__codelineno-1-6></a>sudo<span class=w> </span>make<span class=w> </span>install
</code></pre></div> <p>Using <code>--enable-install-user</code> means that <code>make install</code> will also add system user and group for owntone.</p> <p>With the above configure arguments, a systemd service file will be installed to <code>/etc/systemd/system/owntone.service</code> so that the server will start on boot. Use <code>--disable-install-systemd</code> if you don't want that.</p> <p>Now edit <code>/etc/owntone.conf</code>. Note the guide at the top highlighting which settings that normally require modification.</p> <p>Start the server with <code>sudo systemctl start owntone</code> and check that it is running with <code>sudo systemctl status owntone</code>.</p> <p>See the <a href=../getting-started/ >Documentation</a> for usage information.</p> <h2 id=quick-version-for-fedora>Quick version for Fedora<a class=headerlink href=#quick-version-for-fedora title="Permanent link">&para;</a></h2> <p>If you haven't already enabled the free RPM fusion packages do that, since you will need ffmpeg. You can google how to do that. Then run:</p> <div class=highlight><pre><span></span><code><a id=__codelineno-2-1 name=__codelineno-2-1 href=#__codelineno-2-1></a>sudo<span class=w> </span>dnf<span class=w> </span>install<span class=w> </span><span class=se>\</span>
<a id=__codelineno-2-2 name=__codelineno-2-2 href=#__codelineno-2-2></a><span class=w> </span>git<span class=w> </span>automake<span class=w> </span>autoconf<span class=w> </span>gettext-devel<span class=w> </span>gperf<span class=w> </span>gawk<span class=w> </span>libtool<span class=w> </span>bison<span class=w> </span>flex<span class=w> </span><span class=se>\</span>
<a id=__codelineno-2-3 name=__codelineno-2-3 href=#__codelineno-2-3></a><span class=w> </span>sqlite-devel<span class=w> </span>libconfuse-devel<span class=w> </span>libunistring-devel<span class=w> </span>libxml2-devel<span class=w> </span>libevent-devel<span class=w> </span><span class=se>\</span>
<a id=__codelineno-2-4 name=__codelineno-2-4 href=#__codelineno-2-4></a><span class=w> </span>avahi-devel<span class=w> </span>libgcrypt-devel<span class=w> </span>zlib-devel<span class=w> </span>alsa-lib-devel<span class=w> </span>ffmpeg-devel<span class=w> </span><span class=se>\</span>
<a id=__codelineno-2-5 name=__codelineno-2-5 href=#__codelineno-2-5></a><span class=w> </span>libplist-devel<span class=w> </span>libsodium-devel<span class=w> </span>json-c-devel<span class=w> </span>libwebsockets-devel<span class=w> </span><span class=se>\</span>
<a id=__codelineno-2-6 name=__codelineno-2-6 href=#__codelineno-2-6></a><span class=w> </span>libcurl-devel<span class=w> </span>protobuf-c-devel
</code></pre></div> <p>Clone the OwnTone repo:</p> <div class=highlight><pre><span></span><code><a id=__codelineno-3-1 name=__codelineno-3-1 href=#__codelineno-3-1></a>git<span class=w> </span>clone<span class=w> </span>https://github.com/owntone/owntone-server.git
<a id=__codelineno-3-2 name=__codelineno-3-2 href=#__codelineno-3-2></a><span class=nb>cd</span><span class=w> </span>owntone-server
</code></pre></div> <p>Then run the following:</p> <div class=highlight><pre><span></span><code><a id=__codelineno-4-1 name=__codelineno-4-1 href=#__codelineno-4-1></a>autoreconf<span class=w> </span>-i
<a id=__codelineno-4-2 name=__codelineno-4-2 href=#__codelineno-4-2></a>./configure<span class=w> </span>--prefix<span class=o>=</span>/usr<span class=w> </span>--sysconfdir<span class=o>=</span>/etc<span class=w> </span>--localstatedir<span class=o>=</span>/var<span class=w> </span>--enable-install-user
<a id=__codelineno-4-3 name=__codelineno-4-3 href=#__codelineno-4-3></a>make
<a id=__codelineno-4-4 name=__codelineno-4-4 href=#__codelineno-4-4></a>sudo<span class=w> </span>make<span class=w> </span>install
</code></pre></div> <p>Using <code>--enable-install-user</code> means that <code>make install</code> will also add system user and group for owntone.</p> <p>With the above configure arguments, a systemd service file will be installed to <code>/etc/systemd/system/owntone.service</code> so that the server will start on boot. Use <code>--disable-install-systemd</code> if you don't want that.</p> <p>Now edit <code>/etc/owntone.conf</code>. Note the guide at the top highlighting which settings that normally require modification.</p> <p>Start the server with <code>sudo systemctl start owntone</code> and check that it is running with <code>sudo systemctl status owntone</code>.</p> <p>See the <a href=../getting-started/ >Documentation</a> for usage information.</p> <h2 id=quick-version-for-freebsd>Quick Version for FreeBSD<a class=headerlink href=#quick-version-for-freebsd title="Permanent link">&para;</a></h2> <p>There is a script in the 'scripts' folder that will at least attempt to do all the work for you. And should the script not work for you, you can still look through it and use it as an installation guide.</p> <h2 id=quick-version-for-macos-using-homebrew>Quick Version for macOS Using Homebrew<a class=headerlink href=#quick-version-for-macos-using-homebrew title="Permanent link">&para;</a></h2> <p>This workflow file used for building OwnTone via Github actions includes all the steps that you need to execute: <a href=https://github.com/owntone/owntone-server/blob/master/.github/workflows/macos.yml>.github/workflows/macos.yml</a></p> <h2 id=quick-version-for-macos-using-macports>"Quick" Version for macOS Using MacPorts<a class=headerlink href=#quick-version-for-macos-using-macports title="Permanent link">&para;</a></h2> <p>Caution:</p> <p>1) this approach may be out of date, consider using the Homebrew method above since it is continuously tested. 2) MacPorts requires many downloads and lots of time to install (and sometimes build) ports. You will need a decent network connection and some patience!</p> <p>Install MacPorts (which requires Xcode): <a href=https://www.macports.org/install.php>https://www.macports.org/install.php</a></p> <div class=highlight><pre><span></span><code><a id=__codelineno-5-1 name=__codelineno-5-1 href=#__codelineno-5-1></a>sudo<span class=w> </span>port<span class=w> </span>install<span class=w> </span><span class=se>\</span>
<a id=__codelineno-5-2 name=__codelineno-5-2 href=#__codelineno-5-2></a><span class=w> </span>autoconf<span class=w> </span>automake<span class=w> </span>libtool<span class=w> </span>pkgconfig<span class=w> </span>git<span class=w> </span>gperf<span class=w> </span>bison<span class=w> </span>flex<span class=w> </span>libgcrypt<span class=w> </span><span class=se>\</span>
<a id=__codelineno-5-3 name=__codelineno-5-3 href=#__codelineno-5-3></a><span class=w> </span>libunistring<span class=w> </span>libconfuse<span class=w> </span>ffmpeg<span class=w> </span>libevent<span class=w> </span>json-c<span class=w> </span>libwebsockets<span class=w> </span>curl<span class=w> </span><span class=se>\</span>
<a id=__codelineno-5-4 name=__codelineno-5-4 href=#__codelineno-5-4></a><span class=w> </span>libplist<span class=w> </span>libsodium<span class=w> </span>protobuf-c<span class=w> </span>libxml2
</code></pre></div> <p>Download, configure, build and install the <a href=https://github.com/libinotify-kqueue/libinotify-kqueue>libinotify-kqueue library</a></p> <p>Add the following to <code>.bashrc</code>:</p> <div class=highlight><pre><span></span><code><a id=__codelineno-6-1 name=__codelineno-6-1 href=#__codelineno-6-1></a><span class=c1># add /usr/local to pkg-config path</span>
<a id=__codelineno-6-2 name=__codelineno-6-2 href=#__codelineno-6-2></a><span class=nb>export</span><span class=w> </span><span class=nv>PKG_CONFIG_PATH</span><span class=o>=</span>/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig
<a id=__codelineno-6-3 name=__codelineno-6-3 href=#__codelineno-6-3></a><span class=c1># libunistring doesn&#39;t support pkg-config, set overrides</span>
<a id=__codelineno-6-4 name=__codelineno-6-4 href=#__codelineno-6-4></a><span class=nb>export</span><span class=w> </span><span class=nv>LIBUNISTRING_CFLAGS</span><span class=o>=</span>-I/opt/local/include
<a id=__codelineno-6-5 name=__codelineno-6-5 href=#__codelineno-6-5></a><span class=nb>export</span><span class=w> </span><span class=nv>LIBUNISTRING_LIBS</span><span class=o>=</span><span class=s2>&quot;-L/opt/local/lib -lunistring&quot;</span>
</code></pre></div> <p>Optional features require the following additional ports:</p> <table> <thead> <tr> <th>Feature</th> <th>Configure argument</th> <th>Ports</th> </tr> </thead> <tbody> <tr> <td>Chromecast</td> <td><code>--enable-chromecast</code></td> <td>gnutls</td> </tr> <tr> <td>PulseAudio</td> <td><code>--with-pulseaudio</code></td> <td>pulseaudio</td> </tr> </tbody> </table> <p>Clone the OwnTone repository:</p> <div class=highlight><pre><span></span><code><a id=__codelineno-7-1 name=__codelineno-7-1 href=#__codelineno-7-1></a>git<span class=w> </span>clone<span class=w> </span>https://github.com/owntone/owntone-server.git
<a id=__codelineno-7-2 name=__codelineno-7-2 href=#__codelineno-7-2></a><span class=nb>cd</span><span class=w> </span>owntone-server
</code></pre></div> <p>Finally, configure, build, install, and add configuration arguments for optional features:</p> <div class=highlight><pre><span></span><code><a id=__codelineno-8-1 name=__codelineno-8-1 href=#__codelineno-8-1></a>autoreconf<span class=w> </span>-i
<a id=__codelineno-8-2 name=__codelineno-8-2 href=#__codelineno-8-2></a>./configure
<a id=__codelineno-8-3 name=__codelineno-8-3 href=#__codelineno-8-3></a>make
<a id=__codelineno-8-4 name=__codelineno-8-4 href=#__codelineno-8-4></a>sudo<span class=w> </span>make<span class=w> </span>install
</code></pre></div> <p>Note: if for some reason you've installed the <code>avahi</code> port, you need to add <code>--without-avahi</code> to configure above.</p> <p>Edit <code>/usr/local/etc/owntone.conf</code> and change the <code>uid</code> to a proper system daemon (eg: unknown), and run the following commands:</p> <div class=highlight><pre><span></span><code><a id=__codelineno-9-1 name=__codelineno-9-1 href=#__codelineno-9-1></a>sudo<span class=w> </span>mkdir<span class=w> </span>-p<span class=w> </span>/usr/local/var/run
<a id=__codelineno-9-2 name=__codelineno-9-2 href=#__codelineno-9-2></a>sudo<span class=w> </span>mkdir<span class=w> </span>-p<span class=w> </span>/usr/local/var/log<span class=w> </span><span class=c1># or change logfile in conf</span>
<a id=__codelineno-9-3 name=__codelineno-9-3 href=#__codelineno-9-3></a>sudo<span class=w> </span>chown<span class=w> </span>unknown<span class=w> </span>/usr/local/var/cache/owntone<span class=w> </span><span class=c1># or change conf</span>
</code></pre></div> <p>Run OwnTone:</p> <div class=highlight><pre><span></span><code><a id=__codelineno-10-1 name=__codelineno-10-1 href=#__codelineno-10-1></a>sudo<span class=w> </span>/usr/local/sbin/owntone
</code></pre></div> <p>Verify it is running (you need to <kbd>Ctrl</kbd>+<kbd>C</kbd> to stop dns-sd):</p> <div class=highlight><pre><span></span><code><a id=__codelineno-11-1 name=__codelineno-11-1 href=#__codelineno-11-1></a>dns-sd<span class=w> </span>-B<span class=w> </span>_daap._tcp
</code></pre></div> <h2 id=long-version-requirements>Long Version - Requirements<a class=headerlink href=#long-version-requirements title="Permanent link">&para;</a></h2> <p>Required tools:</p> <ul> <li>autotools: autoconf 2.63+, automake 1.10+, libtool 2.2. Run <code>autoreconf -i</code> at the top of the source tree to generate the build system.</li> <li>gettext: libunistring requires iconv and gettext provides the autotools macro definitions for iconv.</li> <li>gperf</li> <li>bison 3.0+ (yacc is not sufficient)</li> <li>flex (lex is not sufficient)</li> </ul> <p>Libraries:</p> <ul> <li><a href=https://avahi.org/ >Avahi</a> client libraries (avahi-client) 0.6.24+</li> <li><a href=https://sqlite.org/ >SQLite</a> 3.5.0+ with the unlock notify API enabled. SQLite needs to be built with the support for the unlock notify API; this is not always the case in binary packages, so you may need to rebuild SQLite to enable the unlock notify API. You can check for the presence of the <code>sqlite3_unlock_notify</code> symbol in the sqlite library. Refer to the <code>SQLITE_ENABLE_UNLOCK_NOTIFY</code> in the SQLlite documentation.</li> <li><a href=https://ffmpeg.org/ >FFmpeg</a></li> <li><a href=https://github.com/libconfuse/libconfuse>libconfuse</a> </li> <li><a href=https://libevent.org/ >libevent</a> 2.1.4+</li> <li><a href=https://gitlab.gnome.org/GNOME/libxml2>libxml2</a> </li> <li><a href=https://gnupg.org/software/libgcrypt/ >Libgcrypt</a> 1.2.0+ </li> <li><a href=https://zlib.net/ >zlib</a></li> <li><a href=https://www.gnu.org/software/libunistring/ >libunistring</a> 0.9.3+</li> <li><a href=https://github.com/json-c/json-c/ >json-c</a></li> <li><a href=https://curl.se/libcurl/ >libcurl</a></li> <li><a href=https://github.com/JonathanBeck/libplist/ >libplist</a> 0.16+</li> <li><a href=https://doc.libsodium.org/ >libsodium</a></li> <li><a href=https://github.com/protobuf-c/protobuf-c/ >protobuf-c</a></li> <li><a href=https://github.com/alsa-project/alsa-lib/ >alsa-lib</a> (optional - ALSA local audio) often already installed as part of your distro</li> <li><a href=https://www.freedesktop.org/wiki/Software/PulseAudio/ >PulseAudio</a> (optional - PulseAudio local audio)</li> <li><a href=https://www.gnutls.org/ >GnuTLS</a> (optional - Chromecast support)</li> <li><a href=https://libwebsockets.org/ >Libwebsockets</a> 2.0.2+ (optional - websocket support)</li> </ul> <p>Note: If using binary packages, remember that you need the development packages to build OwnTone (usually suffixed with -dev or -devel).</p> <h2 id=long-version-building-and-installing>Long Version - Building and Installing<a class=headerlink href=#long-version-building-and-installing title="Permanent link">&para;</a></h2> <p>Start by generating the build system by running <code>autoreconf -i</code>. This will generate the configure script and <code>Makefile.in</code>.</p> <p>To display the configure options <code>run ./configure --help</code>.</p> <p>Support for Spotify is optional. Use <code>--disable-spotify</code> to disable this feature.</p> <p>Support for LastFM scrobbling is optional. Use <code>--enable-lastfm</code> to enable this feature.</p> <p>Support for the MPD protocol is optional. Use <code>--disable-mpd</code> to disable this feature.</p> <p>Support for Chromecast devices is optional. Use <code>--enable-chromecast</code> to enable this feature.</p> <p>The player web interface is optional. Use <code>--disable-webinterface</code> to disable this feature. If enabled, <code>sudo make install</code> will install the prebuild html, js, css files. The prebuild files are:</p> <ul> <li><code>htdocs/index.html</code></li> <li><code>htdocs/player/*</code></li> </ul> <p>The source for the player web interface is located under the <code>web-src</code> folder and requires nodejs &gt;= 6.0 to be built. In the <code>web-src</code> folder run <code>npm install</code> to install all dependencies for the player web interface. After that run <code>npm run build</code>. This will build the web interface and update the <code>htdocs</code> folder.</p> <p>To serve the web i
</code></pre></div> <p>After configure run the usual make, and if that went well, <code>sudo make install</code>.</p> <p>With the above configure arguments, a systemd service file will be installed to <code>/etc/systemd/system/owntone.service</code> so that the server will start on boot. Use <code>--disable-install-systemd</code> if you don't want that.</p> <p>Using <code>--enable-install-user</code> means that <code>make install</code> will also add a system user and group for owntone.</p> <p>After installation:</p> <ul> <li>edit the configuration file, <code>/etc/owntone.conf</code></li> <li>make sure the Avahi daemon is installed and running (Debian: <code>apt install avahi-daemon</code>)</li> </ul> <p>OwnTone will drop privileges to any user you specify in the configuration file if it's started as root.</p> <p>This user must have read permission to your library and read/write permissions to the database location (<code>$localstatedir/cache/owntone</code> by default).</p> <h2 id=web-source-formattinglinting>Web source formatting/linting<a class=headerlink href=#web-source-formattinglinting title="Permanent link">&para;</a></h2> <p>The source code follows certain formatting conventions for maintainability and readability. To ensure that the source code follows these conventions, <a href=https://prettier.io/ >Prettier</a> is used.</p> <p>The command <code>npm run format</code> applies formatting conventions to the source code based on a preset configuration. Note that a additional configuration is made in the file <code>.prettierrc.json</code>.</p> <p>To flag programming errors, bugs, stylistic errors and suspicious constructs in the source code, <a href=https://eslint.org>ESLint</a> is used.</p> <p>ESLint has been configured following this <a href=https://vueschool.io/articles/vuejs-tutorials/eslint-and-prettier-with-vite-and-vue-js-3/ >guide</a>.</p> <p><code>npm run lint</code> lints the source code and fixes all automatically fixable errors.</p> <h2 id=non-priviliged-user-version-for-development>Non-Priviliged User Version for Development<a class=headerlink href=#non-priviliged-user-version-for-development title="Permanent link">&para;</a></h2> <p>OwnTone is meant to be run as system wide daemon, but for development purposes you may want to run it isolated to your regular user.</p> <p>The following description assumes that you want all runtime data stored in <code>$HOME/owntone_data</code> and the source in <code>$HOME/projects/owntone-server</code>.</p> <p>Prepare directories for runtime data:</p> <div class=highlight><pre><span></span><code><a id=__codelineno-13-1 name=__codelineno-13-1 href=#__codelineno-13-1></a>mkdir<span class=w> </span>-p<span class=w> </span><span class=nv>$HOME</span>/owntone_data/etc
<a id=__codelineno-13-2 name=__codelineno-13-2 href=#__codelineno-13-2></a>mkdir<span class=w> </span>-p<span class=w> </span><span class=nv>$HOME</span>/owntone_data/media
</code></pre></div> <p>Copy one or more mp3 file to test with to <code>owntone_data/media</code>.</p> <p>Checkout OwnTone and configure build:</p> <div class=highlight><pre><span></span><code><a id=__codelineno-14-1 name=__codelineno-14-1 href=#__codelineno-14-1></a><span class=nb>cd</span><span class=w> </span><span class=nv>$HOME</span>/projects
<a id=__codelineno-14-2 name=__codelineno-14-2 href=#__codelineno-14-2></a>git<span class=w> </span>clone<span class=w> </span>https://github.com/owntone/owntone-server.git
<a id=__codelineno-14-3 name=__codelineno-14-3 href=#__codelineno-14-3></a><span class=nb>cd</span><span class=w> </span>owntone-server
<a id=__codelineno-14-4 name=__codelineno-14-4 href=#__codelineno-14-4></a>autoreconf<span class=w> </span>-vi
<a id=__codelineno-14-5 name=__codelineno-14-5 href=#__codelineno-14-5></a>./configure<span class=w> </span>--prefix<span class=o>=</span><span class=nv>$HOME</span>/owntone_data/usr<span class=w> </span>--sysconfdir<span class=o>=</span><span class=nv>$HOME</span>/owntone_data/etc<span class=w> </span>--localstatedir<span class=o>=</span><span class=nv>$HOME</span>/owntone_data/var
</code></pre></div> <p>Build and install runtime:</p> <div class=highlight><pre><span></span><code><a id=__codelineno-15-1 name=__codelineno-15-1 href=#__codelineno-15-1></a>make<span class=w> </span>install
</code></pre></div> <p>Edit <code>owntone_data/etc/owntone.conf</code>, find the following configuration settings and set them to these values:</p> <div class=highlight><pre><span></span><code><a id=__codelineno-16-1 name=__codelineno-16-1 href=#__codelineno-16-1></a> uid = ${USER}
<a id=__codelineno-16-2 name=__codelineno-16-2 href=#__codelineno-16-2></a> loglevel = &quot;debug&quot;
<a id=__codelineno-16-3 name=__codelineno-16-3 href=#__codelineno-16-3></a> directories = { &quot;${HOME}/owntone_data/media&quot; }
</code></pre></div> <p>Run the server:</p> <div class=highlight><pre><span></span><code><a id=__codelineno-17-1 name=__codelineno-17-1 href=#__codelineno-17-1></a>./src/owntone<span class=w> </span>-f
</code></pre></div> <p>Note: You can also use the copy of the binary located in <code>$HOME/owntone_data/usr/sbin</code></p> </article> </div> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type=button class="md-top md-icon" data-md-component=top hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class=md-footer> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-copyright> Made with <a href=https://squidfunk.github.io/mkdocs-material/ target=_blank rel=noopener> Material for MkDocs </a> </div> <div class=md-social> <a href=https://github.com/owntone/owntone-server target=_blank rel=noopener title=github.com class=md-social__link> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 496 512"><!-- Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8M97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg> </a> </div> </div> </div> </footer> </div> <div class=md-dialog data-md-component=dialog> <div class="md-dialog__inner md-typeset"></div> </div> <script id=__config type=application/json>{"base": "..", "features": ["navigation.tabs", "navigation.top"], "search": "../assets/javascripts/workers/search.f8cc74c7.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script> <script src=../assets/javascripts/bundle.f13b1293.min.js></script> <script src=../assets/extra.js></script> </body> </html>