index.html 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <!doctype html><html lang=en xml:lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta charset=utf-8><meta http-equiv=x-ua-compatible content="IE=edge,chrome=1"><link rel=stylesheet href=https://docs.pixelfed.org/styles/print.min.dc0d6585f80ac3487ec834e22482492dcf4aec4c38ea795d9b6f83e6615551b7.css integrity="sha256-3A1lhfgKw0h+yDTiJIJJLc9K7Ew46nldm2+D5mFVUbc=" media=print><link rel=stylesheet href=https://docs.pixelfed.org/styles/screen.min.917b8cfa6ed3955f1e96a220e5fd183ab42e1c99a38bc389103f8d62503368a8.css integrity="sha256-kXuM+m7TlV8elqIg5f0YOrQuHJmji8OJED+NYlAzaKg=" media=screen><script type=text/javascript src=https://docs.pixelfed.org/script.min.e809ed8b184bc6655b59d21c4cf23f06fad834541fa8387f81f4735ce8e89c6d.js integrity="sha256-6AntixhLxmVbWdIcTPI/BvrYNFQfqDh/gfRzXOjonG0="></script><style>a[href^="https\3a\2f\2f docs.pixelfed.org\2f "] svg{display:none!important}a[href^="http://localhost"] svg{display:none!important}</style><title itemprop=name>Deploying Pixelfed on Arch Linux • Pixelfed Documentation</title><meta property="og:title" content="Deploying Pixelfed on Arch Linux"><meta name=twitter:title content="Deploying Pixelfed on Arch Linux"><meta name=application-name content="Pixelfed Documentation"><meta property="og:site_name" content="Pixelfed Documentation"><meta name=description content="End-to-end guide for installing Pixelfed on Arch Linux"><meta itemprop=description content="End-to-end guide for installing Pixelfed on Arch Linux"><meta property="og:description" content="End-to-end guide for installing Pixelfed on Arch Linux"><meta name=twitter:description content="End-to-end guide for installing Pixelfed on Arch Linux"><base href=https://docs.pixelfed.org/install-guides/arch/><link rel=canonical href=https://docs.pixelfed.org/install-guides/arch/ itemprop=url><meta name=url content="https://docs.pixelfed.org/install-guides/arch/"><meta name=twitter:url content="https://docs.pixelfed.org/install-guides/arch/"><meta property="og:url" content="https://docs.pixelfed.org/install-guides/arch/"><meta itemprop=image content="https://docs.pixelfed.org/icon.png"><meta property="og:image" content="https://docs.pixelfed.org/icon.png"><meta name=twitter:image content="https://docs.pixelfed.org/icon.png"><meta name=twitter:image:src content="https://docs.pixelfed.org/icon.png"><meta property="og:updated_time" content="2022-08-06T09:40:16-0500"><meta property="og:type" content="website"><script defer type=application/ld+json>{"@context":"http://schema.org","@type":"WebSite","url":"https://docs.pixelfed.org/install-guides/arch/","name":"Pixelfed Documentation","logo":"https://docs.pixelfed.org/icon.png"}</script><link rel="shortcut icon" href=https://docs.pixelfed.org/icon.png sizes=512x512><meta name=theme-color content="#ffffff"><meta name=msapplication-TileColor content="#ffffff"><link rel=sitemap type=application/xml title=Sitemap href=https://docs.pixelfed.org/sitemap.xml><meta name=robots content="index,follow"><meta name=googlebot content="index,follow"></head><body><header class=site-header><div class=container><div class=hang-left><a href=/ class=site-masthead><p class=site-title>Pixelfed Documentation</p></a><div class=color-switcher><div class=js-toggle-wrapper><div class=js-toggle style=display:none><div class=js-toggle-track><div class=js-toggle-track-check><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgog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p/2JIJxlq7xEl3nVPM4fDeIbPkD16/ptNc0bDu7qxbsu0R2JGywWMIjF2ft3tjfloAyQAGXiOn8hrqwbVvMXzaO+QeHXP6nF0wvX74Hf4NGG5GPjSlYoyM3P/0FbCT6zvM/yYoAAAAASUVORK5CYII=" role=presentation style=pointer-events:none width=16 height=16></div><div class=js-toggle-track-x><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAABwNJREFUWAmtV1tsFFUY/s6Z2d22zLYlZakUCRVaQcqlWIiCiS1gTEB9UAO+GR9En3iQGI0xJiSiRB98MjEq8cEQTSBeHhQM0V7whtEGDWC90BYitxahtNtu25058/v/ZzvLbilawJNM5+yZ89+//1LgJhYRNLW1uDfBAvpGiIk2O5auvfFxqIH3ZJ8/u06GN6Z9+wVl5SjcD1IbZa/UPkPyYl2uR4dreoD2bnbYxTlBBRytkHXtAREphP5KuH4lddx9h70yxX05t7yYXwGb6W8nx1jibpl2rFlGBxcG9M18okOrn7Bnk/BAO/4bI0U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g6BdLhDa5dC6ryU2pHBe1BVO9tUcwfitJt2CLJZUHoG6T7Op75u0IyK31TCPcwFqgPk/KCaD3dFOuZBCO7xvCT/j048b3I3c7F2+WuOW7qdgkucFYlcQ4qop3yzTX7WaKfOCccye3Ts1Etq0+a/BHCF1yPgF3tAUkR6OrtGmo6gl94qqcXKh3rDyrOkPa58URoWcov2Mo6M+0QjrqKB+b7++oMa9Sz+ZkM0mie6aAtnGUvhmxaI+TogPOSQedgWioGSHFLn3v4kLh4HRspNmOGv41k+55siLFp2z6xYeJjhljFcbmxJlr4ga06TbevSByz/glQq4BJx46/c+237PbBqEYKxX3HpmKZEnQnr65X20hqJYaNcLoFOLiJk2LuBbyg7Q0OEn+hm0P3honxFD6rdxYorKpeIoi4YSSvyQHQIbM5t4+YNxLj/OxhVOOE4585qGpjnq+wSx6Q9CtNxTjd5klB+g6Mv36r0+b9cZFi44WYkHdG2ZWb3TtOUOXyVAlKlpGvJIAJ3eBMyfYS5C0qRZGtC85j+4sOasDe9xznPYezhhO/2Q6eP2fSOvYHOjtuQ1a9Q1VKynVDaMc8E0tptdxUsTFpFIYjcZKcbnoaQTNdiqCwNlL4G7oziSqGnT1ALf34vhk4R5zU3qYV9ONp9K88RtouShE68JwaU8dFw5W617shWa9ykeaBIn2hcsvPgL00k45QdTCZuSVcTRNs+8fnyLvooQfR5iujAnR9bxfY2xOVOxFS8SK3Le0l48VyYu1M8HRe5JD8wKPTjYnifaK3Wfn/GChYQ8ZAi6WRzWgqLV5YrsVLnZaVSoXU1g9gOIDwFySiGi+Zdrnzr7J3r+SMuszlcQCRn8lNGcTuSy2jOI7o9mxjZo+vR3ej3tN+ifRSOyUTS0+VMOid93cCubeiy/6TImS0QxRSCq2vxKr45zV+FQnjWH6D2xg+E9EatLcLAdHTgtGGD80D6jM0+aOl4wJgO/f96R2aJKCQ3yvgftRhdFMOpd6oAAAAASUVORK5CYII=" role=presentation style=pointer-events:none width=16 height=16></div></div><div class=js-toggle-thumb></div><input class=js-toggle-screenreader-only type=checkbox aria-label="Switch between Dark and Light mode"></div></div></div><style>.js-toggle-wrapper{display:table;margin:0 auto}.js-toggle{touch-action:pan-x;display:inline-block;position:relative;cursor:pointer;background-color:transparent;border:0;padding:0;-webkit-touch-callout:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent}.js-toggle-screenreader-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.js-toggle-track{width:50px;height:24px;padding:0;border-radius:30px;background-color:gray;transition:all .2s ease}.js-toggle-track-check{position:absolute;width:17px;height:17px;left:5px;top:0;bottom:0;margin-top:auto;margin-bottom:auto;line-height:0;opacity:0;transition:opacity .25s ease}.js-toggle--checked .js-toggle-track-check{opacity:1;transition:opacity .25s ease}.js-toggle-track-x{position:absolute;width:17px;height:17px;right:5px;top:0;bottom:0;margin-top:auto;margin-bottom:auto;line-height:0;opacity:1;transition:opacity .25s ease}.js-toggle--checked .js-toggle-track-x{opacity:0}.js-toggle-thumb{position:absolute;top:1px;left:1px;width:22px;height:22px;border-radius:50%;background-color:#fafafa;box-sizing:border-box;transition:all .5s cubic-bezier(.23,1,.32,1)0ms;transform:translateX(0)}.js-toggle--checked .js-toggle-thumb{transform:translateX(26px);border-color:#19ab27}.js-toggle--focus{filter:drop-shadow(0 0 3px var(--primary-accent));outline:1px solid var(--ui-text);outline-offset:6px}.js-toggle:active .js-toggle-thumb{box-shadow:0 0 5px 5px var(--primary-accent)}</style><script>var body=document.body,input,switchers=document.getElementsByClassName("js-toggle");for(switcher of switchers)switcher.removeAttribute("style"),input=switcher.querySelector(".js-toggle-screenreader-only"),input.addEventListener("focus",e=>{switcher.classList.add("js-toggle--focus")}),input.addEventListener("focusout",e=>{switcher.classList.remove("js-toggle--focus")}),switcher.addEventListener("click",function(){for(switcher of switchers)this.classList.toggle("js-toggle--checked");this.classList.contains("js-toggle--checked")?(body.classList.remove("light-mode"),body.classList.add("dark-mode"),localStorage.setItem("colorMode","dark")):(body.classList.remove("dark-mode"),body.classList.add("light-mode"),setTimeout(function(){localStorage.setItem("colorMode","light")},100))});if(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&localStorage.setItem("colorMode","dark"),localStorage.getItem("colorMode")=="dark"){for(switcher of switchers)switcher.classList.add("js-toggle--checked");body.classList.add("dark-mode")}localStorage.getItem("colorMode")=="light"&&body.classList.add("light-mode")</script></div><nav class=header-nav><ul class=menu><li class=pixelfed><a href=https://pixelfed.org><img src="https://avatars0.githubusercontent.com/u/38410642?s=200&amp;v=4" height=24>
  2. <span>pixelfed.org</span></a></li><li class=github><a href=https://github.com/pixelfed/docs><svg style="background:#fff;border:1px solid #fff;border-radius:100rem" height="1.5rem" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 0C3.58.0.0 3.58.0 8c0 3.54 2.29 6.53 5.47 7.59C5.87 15.66 6.02 15.42 6.02 15.21 6.02 15.02 6.01 14.39 6.01 13.72 4 14.09 3.48 13.23 3.32 12.78 3.23 12.55 2.84 11.84 2.5 11.65 2.22 11.5 1.82 11.13 2.49 11.12 3.12 11.11 3.57 11.7 3.72 11.94 4.44 13.15 5.59 12.81 6.05 12.6 6.12 12.08 6.33 11.73 6.56 11.53 4.78 11.33 2.92 10.64 2.92 7.58c0-.87.31-1.59.82-2.15C3.66 5.23 3.38 4.41 3.82 3.31c0 0 .67-.21 2.2.82C6.66 3.95 7.34 3.86 8.02 3.86S9.38 3.95 10.02 4.13c1.53-1.04 2.2-.82 2.2-.82C12.66 4.41 12.38 5.23 12.3 5.43 12.81 5.99 13.12 6.7 13.12 7.58c0 3.07-1.87 3.75-3.65 3.95C9.76 11.78 10.01 12.26 10.01 13.01 10.01 14.08 10 14.94 10 15.21 10 15.42 10.15 15.67 10.55 15.59 13.71 14.53 16 11.53 16 8c0-4.42-3.58-8-8-8z" transform="scale(64)" fill="#1b1f23"/></svg><span>pixelfed/docs</span></a></li></ul></nav></div></header><div class=scroll-margin style=position:relative><div id=top style=scroll-margin-top:var(--header-height)></div></div><nav class=docs-nav><div class=container><input type=checkbox class=toggle-menu name=toggle id=toggle>
  3. <label class=toggle-menu__label for=toggle><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24" stroke="currentcolor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h7"/></svg><span>Documentation Menu</span></label><ul class=menu data-depth=0><a id=menu href=#top>Skip menu</a>
  4. <details data-depth=0><summary class=section-title><a data-depth=0><span>Run your own Pixelfed website</span></a></summary><ul class=sub-menu data-depth=1><li data-depth=1><a href=/running-pixelfed/prerequisites/ data-depth=1><span>Preparing your machine</span></a></li><li data-depth=1><a href=/running-pixelfed/installation/ data-depth=1><span>Generic installation guide</span></a></li><li data-depth=1><a href=/running-pixelfed/administration/ data-depth=1><span>Administering your website</span></a></li><li data-depth=1><a href=/running-pixelfed/optional-features/ data-depth=1><span>Optional features</span></a><ul class=sub-menu data-depth=2><li data-depth=2><a href=/running-pixelfed/optional-features/livestreaming/ data-depth=2><span>Livestreaming (Pixelfed Live)</span></a></li><li data-depth=2><a href=/running-pixelfed/optional-features/websockets/ data-depth=2><span>Websockets</span></a></li><li data-depth=2><a href=/running-pixelfed/optional-features/ldap-authentication/ data-depth=2><span>LDAP Authentication</span></a></li></ul></li><li data-depth=1><a href=/running-pixelfed/troubleshooting/ data-depth=1><span>Troubleshooting</span></a></li></ul></details><details data-depth=0><summary class=section-title><a data-depth=0><span>Developing for Pixelfed</span></a></summary><ul class=sub-menu data-depth=1><li data-depth=1><a href=/developing-pixelfed/intro/ data-depth=1><span>Setting up your environment</span></a></li><li data-depth=1><a href=/developing-pixelfed/testing/ data-depth=1><span>Running tests locally</span></a></li></ul></details><details data-depth=0><summary class=section-title><a data-depth=0><span>Technical documentation</span></a></summary><ul class=sub-menu data-depth=1><li data-depth=1><a href=/technical-documentation/activitypub/ data-depth=1><span>ActivityPub</span></a></li><li data-depth=1><a href=/technical-documentation/api/ data-depth=1><span>API</span></a></li><li data-depth=1><a href=/technical-documentation/artisan/ data-depth=1><span>CLI</span></a></li><li data-depth=1><a href=/technical-documentation/config/ data-depth=1><span>Configuration</span></a></li></ul></details><details open data-depth=0><summary class='section-title active'><a data-depth=0><span>Distro-specific install guides</span></a></summary><ul class=sub-menu data-depth=1><li class=active data-depth=1><a href=/install-guides/arch/ data-depth=1><span>Arch Linux</span></a></li></ul></details></ul></div></nav><main><article class=page autonumbering><header class="section page-header"><div class=container><h1 class=page-title>Deploying Pixelfed on Arch Linux</h1><p class=page-summary>End-to-end guide for installing Pixelfed on Arch Linux</p><p class=lastmod>Last modified <datetime class=date>Sat Aug 6, 2022</datetime></p></div></header><aside class="toc section"><div class=container><ul class=breadcrumbs><li><a href=/install-guides/>Distro-specific install guides</a></li><li class=active><a href=/install-guides/arch/>Deploying Pixelfed on Arch Linux</a></li></ul><details open><summary class=toc-title>Page outline</summary><nav id=TableOfContents><ol><li><a href=#assumptions>Assumptions</a></li><li><a href=#preparing-a-machine>Preparing a machine</a></li><li><a href=#pixelfed-setup>Pixelfed setup</a></li></ol></nav></details></div></aside><section class="content section"><div class=container><h2 class=heading id=assumptions><span class=heading__text>Assumptions</span>
  5. <a class=heading__anchor-link href=#assumptions>[link]</a></h2><p>These instructions will install Pixelfed with the following:</p><ul><li>Nginx (instead of Apache)</li><li>MariaDB (instead of PostgreSQL)</li><li>PHP-FPM (latest version)</li><li>Redis and PHP-FPM running via sockets instead of TCP (same machine)</li><li><code>pixelfed</code> user for running Horizon queues, <code>http</code> user for running web processes (Arch default)</li><li>Repo cloned at <code>/srv/http/pixelfed</code></li><li>No other sites/services running on this machine</li></ul><h2 class=heading id=preparing-a-machine><span class=heading__text>Preparing a machine</span>
  6. <a class=heading__anchor-link href=#preparing-a-machine>[link]</a></h2><p>You will need a machine running Arch Linux with access to the root account.</p><ol><li>Login as <code>root</code>.</li><li>Create the <code>pixelfed</code> user and group:</li></ol><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>useradd -rU -s /bin/bash -d /srv/http/pixelfed pixelfed
  7. </span></span></code></pre></div><ol start=3><li>Install dependencies:</li></ol><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>pacman -S --needed nginx mariadb redis git php-fpm php-intl php-gd php-imagick php-redis composer jpegoptim optipng pngquant imagemagick ffmpeg unzip certbot certbot-nginx
  8. </span></span></code></pre></div><ol start=4><li>Setup database. During <code>mysql_secure_installation</code>, hit Enter to use the default options. Make sure to set a password for the SQL user <code>root</code> (as by default, there is no password).</li></ol><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>mysql_install_db --user<span class=o>=</span>mysql --basedir<span class=o>=</span>/usr --datadir<span class=o>=</span>/var/lib/mysql
  9. </span></span><span class=line><span class=cl>systemctl <span class=nb>enable</span> --now mariadb
  10. </span></span><span class=line><span class=cl>mysql_secure_installation
  11. </span></span><span class=line><span class=cl>mysql -u root -p
  12. </span></span></code></pre></div><div class=highlight><pre tabindex=0 class=chroma><code class=language-sql data-lang=sql><span class=line><span class=cl><span class=k>create</span><span class=w> </span><span class=k>database</span><span class=w> </span><span class=n>pixelfed</span><span class=p>;</span><span class=w>
  13. </span></span></span><span class=line><span class=cl><span class=w></span><span class=k>grant</span><span class=w> </span><span class=k>all</span><span class=w> </span><span class=k>privileges</span><span class=w> </span><span class=k>on</span><span class=w> </span><span class=n>pixelfed</span><span class=p>.</span><span class=o>*</span><span class=w> </span><span class=k>to</span><span class=w> </span><span class=s1>&#39;pixelfed&#39;</span><span class=o>@</span><span class=s1>&#39;localhost&#39;</span><span class=w> </span><span class=n>identified</span><span class=w> </span><span class=k>by</span><span class=w> </span><span class=s1>&#39;strong_password&#39;</span><span class=p>;</span><span class=w>
  14. </span></span></span><span class=line><span class=cl><span class=w></span><span class=n>flush</span><span class=w> </span><span class=k>privileges</span><span class=p>;</span><span class=w>
  15. </span></span></span><span class=line><span class=cl><span class=w></span><span class=n>exit</span><span class=w>
  16. </span></span></span></code></pre></div><ol start=5><li>Edit <code>/etc/php/php.ini</code> and uncomment the following lines:</li></ol><pre tabindex=0><code>extension=bcmath
  17. extension=exif
  18. extension=gd
  19. extension=iconv
  20. extension=intl
  21. extension=mysqli
  22. extension=pdo_mysql
  23. </code></pre><p>Edit the following lines to your desired upload limits:</p><pre tabindex=0><code>post_max_size = 8M
  24. upload_max_filesize = 2M
  25. max_file_uploads = 20
  26. </code></pre><p>Edit <code>/etc/php/conf.d/imagick.ini</code> and uncomment:</p><pre tabindex=0><code>extension=imagick
  27. </code></pre><p>Edit <code>/etc/php/conf.d/redis.ini</code> and uncomment:</p><pre tabindex=0><code>extension=redis
  28. </code></pre><p>Edit <code>/etc/php/conf.d/igbinary.ini</code> and uncomment:</p><pre tabindex=0><code>extension=igbinary
  29. </code></pre><p>Create a PHP-FPM pool for Pixelfed:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl><span class=nb>cd</span> /etc/php/php-fpm.d/
  30. </span></span><span class=line><span class=cl>cp www.conf pixelfed.conf
  31. </span></span><span class=line><span class=cl><span class=nv>$EDITOR</span> pixelfed.conf
  32. </span></span></code></pre></div><p>Make the following changes to the PHP-FPM pool:</p><pre tabindex=0><code>; use the username of the app-user as the pool name, e.g. pixelfed
  33. [pixelfed]
  34. user = pixelfed
  35. group = pixelfed
  36. ; to use a tcp socket, e.g. if running php-fpm on a different machine than your app:
  37. ; (note that the port 9001 is used, since php-fpm defaults to running on port 9000;)
  38. ; (however, the port can be whatever you want)
  39. ; listen = 127.0.0.1:9001;
  40. ; but it&#39;s better to use a socket if you&#39;re running locally on the same machine:
  41. listen = /run/php-fpm/pixelfed.sock
  42. listen.owner = http
  43. listen.group = http
  44. listen.mode = 0660
  45. [...]
  46. </code></pre><ol start=6><li>Edit <code>/etc/redis.conf</code> and edit the following lines:</li></ol><pre tabindex=0><code>port 6379 # change this to &#34;port 0&#34; to disable network packets
  47. unixsocket /run/redis/redis.sock #
  48. unixsocketperm 770 # give permission to &#34;redis&#34; user and group
  49. </code></pre><ol start=7><li>Edit <code>/etc/nginx/nginx.conf</code>:</li></ol><div class=highlight><pre tabindex=0 class=chroma><code class=language-nginx data-lang=nginx><span class=line><span class=cl><span class=k>worker_processes</span> <span class=mi>1</span><span class=p>;</span> <span class=c1># change to auto, or 1 x your CPU cores, but 1 is enough
  50. </span></span></span><span class=line><span class=cl><span class=c1></span><span class=k>events</span> <span class=p>{</span>
  51. </span></span><span class=line><span class=cl> <span class=kn>worker_connections</span> <span class=mi>1024</span><span class=p>;</span> <span class=c1># 512-1024 is fine for a small site, but you may want to use up to 10k or more, if running in production with many users
  52. </span></span></span><span class=line><span class=cl><span class=c1></span><span class=p>}</span>
  53. </span></span><span class=line><span class=cl><span class=k>http</span> <span class=p>{</span>
  54. </span></span><span class=line><span class=cl> <span class=c1># [...]
  55. </span></span></span><span class=line><span class=cl><span class=c1></span> <span class=kn>client_max_body_size</span> <span class=mi>9m</span><span class=p>;</span> <span class=c1># add this line to configure client upload file size
  56. </span></span></span><span class=line><span class=cl><span class=c1></span>
  57. </span></span><span class=line><span class=cl> <span class=kn>gzip</span> <span class=no>on</span><span class=p>;</span> <span class=c1># uncomment this line
  58. </span></span></span><span class=line><span class=cl><span class=c1></span> <span class=kn>server</span> <span class=p>{</span> <span class=c1># delete this entire block
  59. </span></span></span><span class=line><span class=cl><span class=c1></span> <span class=c1># [...]
  60. </span></span></span><span class=line><span class=cl><span class=c1></span> <span class=p>}</span>
  61. </span></span><span class=line><span class=cl>
  62. </span></span><span class=line><span class=cl> <span class=kn>include</span> <span class=s>/srv/http/pixelfed/nginx.conf</span><span class=p>;</span> <span class=c1># we will make this file later
  63. </span></span></span><span class=line><span class=cl><span class=c1></span><span class=p>}</span>
  64. </span></span></code></pre></div><p>Generate SSL cert:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>mkdir /etc/nginx/ssl
  65. </span></span><span class=line><span class=cl>openssl req -x509 -nodes -days <span class=m>365</span> -newkey rsa:2048 -keyout /etc/nginx/ssl/server.key -out /etc/nginx/ssl/server.crt
  66. </span></span></code></pre></div><ol start=8><li>Add users to groups:</li></ol><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>usermod -aG redis pixelfed <span class=c1># give app user access to redis for queues</span>
  67. </span></span></code></pre></div><ol start=9><li>Enable services:</li></ol><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>systemctl <span class=nb>enable</span> <span class=o>{</span>nginx,redis,php-fpm<span class=o>}</span>
  68. </span></span><span class=line><span class=cl>systemctl start <span class=o>{</span>redis,php-fpm<span class=o>}</span> <span class=c1># nginx will fail if started now</span>
  69. </span></span></code></pre></div><h2 class=heading id=pixelfed-setup><span class=heading__text>Pixelfed setup</span>
  70. <a class=heading__anchor-link href=#pixelfed-setup>[link]</a></h2><ol><li>Clone the repo:</li></ol><pre tabindex=0><code>cd /srv/http
  71. git clone -b dev https://github.com/pixelfed/pixelfed.git pixelfed
  72. </code></pre><ol start=2><li>Setup environment variables and nginx:</li></ol><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl><span class=nb>cd</span> pixelfed
  73. </span></span><span class=line><span class=cl>cp contrib/nginx.conf nginx.conf
  74. </span></span><span class=line><span class=cl><span class=nv>$EDITOR</span> nginx.conf
  75. </span></span><span class=line><span class=cl><span class=c1>## in particular, set:</span>
  76. </span></span><span class=line><span class=cl><span class=c1>### - the correct domain name</span>
  77. </span></span><span class=line><span class=cl><span class=c1>### - client_max_body_size to your desired upload limit</span>
  78. </span></span><span class=line><span class=cl><span class=c1>### - fastcgi_pass correct path (e.g. unix:/run/php-fpm/pixelfed.sock;)</span>
  79. </span></span><span class=line><span class=cl>
  80. </span></span><span class=line><span class=cl>cp .env.example .env
  81. </span></span><span class=line><span class=cl><span class=nv>$EDITOR</span> .env
  82. </span></span><span class=line><span class=cl><span class=c1>## in particular, set:</span>
  83. </span></span><span class=line><span class=cl><span class=c1>### DB_SOCKET = /run/mysqld/mysqld.sock</span>
  84. </span></span><span class=line><span class=cl><span class=c1>###</span>
  85. </span></span><span class=line><span class=cl><span class=c1>### REDIS_HOST = /run/redis/redis.sock</span>
  86. </span></span><span class=line><span class=cl><span class=c1>### REDIS_PORT = null</span>
  87. </span></span><span class=line><span class=cl><span class=c1>###</span>
  88. </span></span><span class=line><span class=cl><span class=c1>### IMAGE_DRIVER = imagick</span>
  89. </span></span><span class=line><span class=cl>
  90. </span></span><span class=line><span class=cl><span class=nv>$EDITOR</span> config/database.php
  91. </span></span><span class=line><span class=cl><span class=c1>## change predis to phpredis</span>
  92. </span></span></code></pre></div><ol start=3><li>Create the following file at <code>/etc/systemd/system/pixelfed.service</code>:</li></ol><pre tabindex=0><code>[Unit]
  93. Description=Pixelfed task queueing via Laravel Horizon
  94. After=network.target
  95. Requires=mariadb
  96. Requires=php-fpm
  97. Requires=redis
  98. Requires=nginx
  99. [Service]
  100. Type=simple
  101. ExecStart=/usr/bin/php /srv/http/pixelfed/artisan horizon
  102. User=pixelfed
  103. Restart=on-failure
  104. [Install]
  105. WantedBy=multi-user.target
  106. </code></pre><ol start=4><li>Set permissions:</li></ol><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>chown -R pixelfed:pixelfed .
  107. </span></span><span class=line><span class=cl>find . -type d -exec chmod <span class=m>755</span> <span class=o>{}</span> <span class=se>\;</span>
  108. </span></span><span class=line><span class=cl>find . -type f -exec chmod <span class=m>644</span> <span class=o>{}</span> <span class=se>\;</span>
  109. </span></span></code></pre></div><ol start=5><li>Switch to the <code>pixelfed</code> user:</li></ol><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>su - pixelfed
  110. </span></span></code></pre></div><ol start=6><li>Deploy:</li></ol><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl><span class=nv>$EDITOR</span> composer.json
  111. </span></span><span class=line><span class=cl><span class=c1>## change require php to &gt;= instead of ^</span>
  112. </span></span><span class=line><span class=cl><span class=c1>## remove beyondcode/laravel-self-diagnosis</span>
  113. </span></span><span class=line><span class=cl><span class=c1>## change league/iso3166 to &gt;= instead of ^</span>
  114. </span></span><span class=line><span class=cl><span class=c1>## change spatie/laravel-image-optimizer to &gt;= instead of ^</span>
  115. </span></span><span class=line><span class=cl><span class=c1>## change laravel/ui to &gt;= instead of ^</span>
  116. </span></span><span class=line><span class=cl>composer update
  117. </span></span><span class=line><span class=cl>composer install --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader
  118. </span></span><span class=line><span class=cl>php artisan key:generate
  119. </span></span><span class=line><span class=cl>php artisan storage:link
  120. </span></span><span class=line><span class=cl>php artisan horizon:install
  121. </span></span><span class=line><span class=cl>php artisan horizon:publish
  122. </span></span><span class=line><span class=cl>php artisan migrate --force
  123. </span></span></code></pre></div><p>Optionally, use cache [NOTE: if you run these commands, you will need to run them every time you change .env or update Pixelfed]:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>php artisan config:cache
  124. </span></span><span class=line><span class=cl>php artisan route:cache
  125. </span></span><span class=line><span class=cl>php artisan view:cache
  126. </span></span></code></pre></div><p>Import Places data:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>php artisan import:cities
  127. </span></span></code></pre></div><ol start=7><li>Start web server and Horizon task queue:</li></ol><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl><span class=nb>exit</span>
  128. </span></span><span class=line><span class=cl>systemctl <span class=nb>enable</span> --now <span class=o>{</span>nginx,pixelfed<span class=o>}</span>
  129. </span></span></code></pre></div></div></section><nav class=section-nav><div class=container><div class=buttons></div></div></nav><footer class="section page-footer"><div class=container></div></footer></article></main><footer class=site-footer><hr><div class=container><nav class=footer-nav><ul class=menu><li class=copyright><a href=https://creativecommons.org/licenses/by-sa/4.0/><span style=color:var(--ui-text-bold)><i class="fa fa-cc-cc"></i><i class="fa fa-cc-by"></i><i class="fa fa-cc-sa"></i></span>
  130. <span>CC BY-SA 4.0</span></a></li></ul></nav><nav class=social-nav><ul class=menu><li class=mastodon><a href=https://mastodon.social/@pixelfed><svg height="1em" viewbox="0 0 75 79" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M73.84 17.49C72.696 9.002 65.3 2.312 56.53 1.016 55.05.797 49.444.0 36.458.0h-.097c-12.99.0-15.776.797-17.256 1.016-8.525 1.26-16.311 7.271-18.2 15.86-.909 4.23-1.006 8.919-.837 13.22.24 6.17.288 12.327.848 18.47a86.879 86.879.0 002.022 12.115c1.795 7.361 9.064 13.487 16.185 15.986a43.41 43.41.0 0023.68 1.25 34.565 34.565.0 002.562-.701c1.91-.607 4.147-1.285 5.792-2.477a.187.187.0 00.076-.144v-5.953a.175.175.0 00-.216-.17A65.637 65.637.0 0135.65 70.268c-8.906.0-11.301-4.226-11.987-5.985a18.554 18.554.0 01-1.042-4.718.171.171.0 01.136-.178.173.173.0 01.08.002 64.383 64.383.0 0015.115 1.795c1.225.0 2.446.0 3.67-.032 5.121-.144 10.52-.406 15.558-1.39.125-.025.251-.047.359-.079 7.947-1.526 15.51-6.316 16.279-18.445.029-.477.1-5.002.1-5.497.004-1.684.543-11.946-.079-18.251z" fill="url(#a)"/><path d="M61.248 27.026v21.088h-8.356V27.648c0-4.31-1.796-6.507-5.448-6.507-4.015.0-6.026 2.6-6.026 7.735v11.202H33.11V28.875c0-5.134-2.014-7.734-6.03-7.734-3.63.0-5.444 2.198-5.444 6.507v20.466h-8.353V27.026c0-4.308 1.1-7.731 3.3-10.269 2.27-2.531 5.247-3.831 8.942-3.831 4.278.0 7.51 1.644 9.665 4.93l2.079 3.49 2.083-3.49c2.154-3.286 5.386-4.93 9.657-4.93 3.691.0 6.668 1.3 8.945 3.831 2.198 2.535 3.296 5.958 3.293 10.27z" fill="#fff"/><defs><linearGradient id="a" x1="37.069" y1="0" x2="37.069" y2="79" gradientUnits="userSpaceOnUse"><stop stop-color="#6364ff"/><stop offset="1" stop-color="#563acc"/></linearGradient></defs></svg></a></li><li class=pixelfed><a href=https://pixelfed.social/pixelfed><img src="https://avatars0.githubusercontent.com/u/38410642?s=200&amp;v=4" height=16></a></li><li class=twitter><a href=https://twitter.com/pixelfed><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 248 204" height="1em"><path fill="#1d9bf0" d="M221.95 51.29c.15 2.17.15 4.34.15 6.53.0 66.73-50.8 143.69-143.69 143.69v-.04c-27.44.04-54.31-7.82-77.41-22.64 3.99.48 8 .72 12.02.73 22.74.02 44.83-7.61 62.72-21.66-21.61-.41-40.56-14.5-47.18-35.07a50.338 50.338.0 0022.8-.87C27.8 117.2 10.85 96.5 10.85 72.46v-.64a50.18 50.18.0 0022.92 6.32C11.58 63.31 4.74 33.79 18.14 10.71a143.333 143.333.0 00104.08 52.76 50.532 50.532.0 0114.61-48.25c20.34-19.12 52.33-18.14 71.45 2.19 11.31-2.23 22.15-6.38 32.07-12.26a50.69 50.69.0 01-22.2 27.93c10.01-1.18 19.79-3.86 29-7.95a102.594 102.594.0 01-25.2 26.16z"/></svg></a></li><li class=github><a href=https://github.com/pixelfed/pixelfed><svg style="background:#fff;border:1px solid #fff;border-radius:100rem" height="1em" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 0C3.58.0.0 3.58.0 8c0 3.54 2.29 6.53 5.47 7.59C5.87 15.66 6.02 15.42 6.02 15.21 6.02 15.02 6.01 14.39 6.01 13.72 4 14.09 3.48 13.23 3.32 12.78 3.23 12.55 2.84 11.84 2.5 11.65 2.22 11.5 1.82 11.13 2.49 11.12 3.12 11.11 3.57 11.7 3.72 11.94 4.44 13.15 5.59 12.81 6.05 12.6 6.12 12.08 6.33 11.73 6.56 11.53 4.78 11.33 2.92 10.64 2.92 7.58c0-.87.31-1.59.82-2.15C3.66 5.23 3.38 4.41 3.82 3.31c0 0 .67-.21 2.2.82C6.66 3.95 7.34 3.86 8.02 3.86S9.38 3.95 10.02 4.13c1.53-1.04 2.2-.82 2.2-.82C12.66 4.41 12.38 5.23 12.3 5.43 12.81 5.99 13.12 6.7 13.12 7.58c0 3.07-1.87 3.75-3.65 3.95C9.76 11.78 10.01 12.26 10.01 13.01 10.01 14.08 10 14.94 10 15.21 10 15.42 10.15 15.67 10.55 15.59 13.71 14.53 16 11.53 16 8c0-4.42-3.58-8-8-8z" transform="scale(64)" fill="#1b1f23"/></svg></a></li></ul></nav><a href=#top>back to top</a></div></footer></body></html>