<!doctype html><htmllang=enclass=no-js><head><metacharset=utf-8><metaname=viewportcontent="width=device-width,initial-scale=1"><metaname=descriptioncontent="Welcome to the home of the LinuxServer.io documentation!"><metaname=authorcontent=LinuxServer.io><linkhref=https://docs.linuxserver.io/general/container-execution/rel=canonical><linkhref=../../FAQ/rel=prev><linkhref=../containers-101/rel=next><linkrel=iconhref=../../assets/favicon.ico><metaname=generatorcontent="mkdocs-1.5.2, mkdocs-material-9.1.21"><title>Container Execution - LinuxServer.io</title><linkrel=stylesheethref=../../assets/stylesheets/main.eebd395e.min.css><linkrel=stylesheethref=../../assets/stylesheets/palette.ecc896b0.min.css><linkrel=preconnecthref=https://fonts.gstatic.comcrossorigin><linkrel=stylesheethref="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><script>__md_scope=newURL("../..",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><bodydir=ltrdata-md-color-scheme=defaultdata-md-color-primary=purpledata-md-color-accent=indigo><script>varpalette=__md_get("__palette");if(palette&&"object"==typeofpalette.color)for(varkeyofObject.keys(palette.color))document.body.setAttribute("data-md-color-"+key,palette.color[key])</script><inputclass=md-toggledata-md-toggle=drawertype=checkboxid=__drawerautocomplete=off><inputclass=md-toggledata-md-toggle=searchtype=checkboxid=__searchautocomplete=off><labelclass=md-overlayfor=__drawer></label><divdata-md-component=skip><ahref=#container-executionclass=md-skip> Skip to content </a></div><divdata-md-component=announce></div><headerclass="md-header md-header--shadow"data-md-component=header><navclass="md-header__inner md-grid"aria-label=Header><ahref=../..title=LinuxServer.ioclass="md-header__button md-logo"aria-label=LinuxServer.iodata-md-component=logo><imgsrc=../../assets/icon.svgalt=logo></a><labelclass="md-header__button md-icon"for=__drawer><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg></label><divclass=md-header__titledata-md-component=header-title><divclass=md-header__ellipsis><divclass=md-header__topic><spanclass=md-ellipsis> LinuxServer.io </span></div><divclass=md-header__topicdata-md-component=header-topic><spanclass=md-ellipsis> Container Execution </span></div></div></div><formclass=md-header__optiondata-md-component=palette><inputclass=md-optiondata-md-color-media="(prefers-color-scheme: light)"data-md-color-scheme=defaultdata-md-color-primary=purpledata-md-color-accent=indigoaria-label="Switch to dark mode"type=radioname=__paletteid=__palette_1><labelclass="md-header__button md-icon"title="Switch to dark mode"for=__palette_2hidden><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="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 12 20 8.69Z"/></svg></label><inputclass=md-optiondata-md-color-media="(prefers-color-scheme: dark)"data-md-color-scheme=slatedata-md-color-primary=purpledata-md-color-accent=indigoaria-label="Switch to light mode"type=radioname=__paletteid=__palette_2><labelclass="md-header__button md-icon"title="Switch to light mode"for=__palette_1hidden><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M1218c-.890-1.74-.2-2.5-.55C11.5616.51314.421312c0-2.42-1.44-4.5-3.5-5.45C10.266.211.116126a660016666001-66m8-9.31V4h-4.69L12.698.694H4v4.69L.6912415.31V20h4.69L1223.3115.3120H20v-4.69
</span></code></pre></div><h2id=tailing-the-logs>Tailing the logs<aclass=headerlinkhref=#tailing-the-logstitle="Permanent link">¶</a></h2><p>The vast majority of our images are configured to output the application logs to the console, which in Docker's terms means you can access them using the <code>docker logs</code> command:</p><divclass="language-shell highlight"><pre><span></span><code><spanid=__span-1-1><aid=__codelineno-1-1name=__codelineno-1-1href=#__codelineno-1-1></a>docker<spanclass=w></span>logs<spanclass=w></span>-f<spanclass=w></span>--tail<spanclass=o>=</span><number_of_lines_to_start_with><spanclass=w></span><container_name>
</span></code></pre></div><p>The <code>--tail</code> argument is optional, but useful if the application has been running for a long time - the <code>logs</code> command by default will output <em>all</em> logs.</p><p>To make life simpler for yourself here's a handy bash alias to do some of the leg work for you:</p><divclass="language-shell highlight"><pre><span></span><code><spanid=__span-2-1><aid=__codelineno-2-1name=__codelineno-2-1href=#__codelineno-2-1></a><spanclass=c1># ~/.bash_aliases</span>
</span></code></pre></div><p>Execute it with <code>dtail <container_name></code>.</p><h2id=checking-the-build-version>Checking the build version<aclass=headerlinkhref=#checking-the-build-versiontitle="Permanent link">¶</a></h2><p>If you are experiencing issues with one of our containers, it helps us to know which version of the image your container is running from. The primary reason we ask for this is because you may be reporting an issue we are aware of and have subsequently fixed. However, if you are running on the latest version of our image, it could indeed be a newly found bug, which we'd want to know more about.</p><p>To obtain the build version for the container:</p><divclass="language-shell highlight"><pre><span></span><code><spanid=__span-3-1><aid=__codelineno-3-1name=__codelineno-3-1href=#__codelineno-3-1></a>docker<spanclass=w></span>inspect<spanclass=w></span>-f<spanclass=w></span><spanclass=s1>'{{ index .Config.Labels "build_version" }}'</span><spanclass=w></span><container_name>
</span></code></pre></div><p>Or the image:</p><divclass="language-shell highlight"><pre><span></span><code><spanid=__span-4-1><aid=__codelineno-4-1name=__codelineno-4-1href=#__codelineno-4-1></a>docker<spanclass=w></span>inspect<spanclass=w></span>-f<spanclass=w></span><spanclass=s1>'{{ index .Config.Labels "build_version" }}'</span><spanclass=w></span>linuxserver/<image_name>