<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Deployment on WebP Server Documentation</title><link>https://docs.webp.sh/deployment/</link><description>Recent content in Deployment on WebP Server Documentation</description><generator>Hugo</generator><language>en</language><atom:link href="https://docs.webp.sh/deployment/index.xml" rel="self" type="application/rss+xml"/><item><title>Use with CDN</title><link>https://docs.webp.sh/deployment/cdn/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.webp.sh/deployment/cdn/</guid><description>&lt;h1 id="use-with-cdn"&gt;
 Use with CDN
 &lt;a class="anchor" href="#use-with-cdn"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;If you use CDN(such as Cloudflare) for your website, since WebP Server Go will render different image on different devices, its vital to make sure CDN doesn&amp;rsquo;t cache our outputs, for example, Cloudflare will cache all the images(by extension) from your website, which will cache the &lt;code&gt;webp&lt;/code&gt; format of the image and use it for all visitors, this cached image cannot be shown on some old Safari browser.&lt;/p&gt;</description></item><item><title>Use with Docker (Recommended)</title><link>https://docs.webp.sh/deployment/docker/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.webp.sh/deployment/docker/</guid><description>&lt;h1 id="usage-with-docker-recommended"&gt;
 Usage with Docker (Recommended)
 &lt;a class="anchor" href="#usage-with-docker-recommended"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;We&amp;rsquo;ve build docker images on 
 &lt;a href="https://hub.docker.com/r/webpsh/webp-server-go"&gt;hub.docker.com&lt;/a&gt; and 
 &lt;a href="https://github.com/webp-sh/webp_server_go/pkgs/container/webp_server_go"&gt;ghcr.io&lt;/a&gt;. If you want to run &lt;code&gt;webp-server&lt;/code&gt; insider docker container without using &lt;code&gt;docker-compose.yml&lt;/code&gt; and without limiting the resources it will use, you can run the command below:&lt;/p&gt;
&lt;h2 id="directory-mapping-and-request-flow"&gt;
 Directory mapping and request flow
 &lt;a class="anchor" href="#directory-mapping-and-request-flow"&gt;#&lt;/a&gt;
&lt;/h2&gt;


&lt;p class="mermaid"&gt;
flowchart LR
client["Client\nGET /some-images/tsuki.jpg"] --&gt; server["WebP Server Go\n:3333"]

subgraph host["Host machine"]
hostPics["/path/to/pics"]
hostExhaust["./exhaust"]
hostMeta["./metadata"]
end

subgraph container["Docker container"]
cPics["/opt/pics (source images)"]
cExhaust["/opt/exhaust (optimized cache)"]
cMeta["/opt/metadata (source metadata)"]
end

hostPics &lt;-- "volume mount" --&gt; cPics
hostExhaust &lt;-- "volume mount" --&gt; cExhaust
hostMeta &lt;-- "volume mount" --&gt; cMeta

server --&gt; cPics
server --&gt; cExhaust
server --&gt; cMeta
server --&gt; response["Return optimized image\n(webp/avif/jxl)"]
&lt;/p&gt;</description></item><item><title>Use with Binary (Advanced)</title><link>https://docs.webp.sh/deployment/binary/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.webp.sh/deployment/binary/</guid><description>&lt;h1 id="usage-with-binary-advanced"&gt;
 Usage with Binary (Advanced)
 &lt;a class="anchor" href="#usage-with-binary-advanced"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;blockquote class="book-hint info"&gt;
 Note: There is a potential memory leak problem with this server and remains unsolved, we recommend using Docker to mitigate this problem, refer to 
 &lt;a href="https://docs.webp.sh/deployment/docker/"&gt;Docker&lt;/a&gt;.
Related discussion: 
 &lt;a href="https://github.com/webp-sh/webp_server_go/issues/75"&gt;https://github.com/webp-sh/webp_server_go/issues/75&lt;/a&gt;
&lt;/blockquote&gt;

&lt;h2 id="download-or-build-the-binary"&gt;
 Download or build the binary
 &lt;a class="anchor" href="#download-or-build-the-binary"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Download the &lt;code&gt;webp-server-go&lt;/code&gt; from 
 &lt;a href="https://github.com/webp-sh/webp_server_go/releases"&gt;release&lt;/a&gt; page.&lt;/p&gt;
&lt;h2 id="install-dependencies"&gt;
 Install dependencies
 &lt;a class="anchor" href="#install-dependencies"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Install &lt;code&gt;libvips&lt;/code&gt; on your machine, more info 
 &lt;a href="https://github.com/davidbyttow/govips"&gt;here&lt;/a&gt;.&lt;/p&gt;




&lt;div class="book-tabs"&gt;&lt;input type="radio" class="toggle" name="tabs-after" id="tabs-after-0" checked="checked" /&gt;
 &lt;label for="tabs-after-0"&gt;macOS&lt;/label&gt;
 &lt;div class="book-tabs-content markdown-inner"&gt;Run &lt;code&gt;brew install vips pkg-config&lt;/code&gt;&lt;/div&gt;&lt;input type="radio" class="toggle" name="tabs-after" id="tabs-after-1" /&gt;
 &lt;label for="tabs-after-1"&gt;Ubuntu&lt;/label&gt;
 &lt;div class="book-tabs-content markdown-inner"&gt;Run &lt;code&gt;apt install libvips-dev&lt;/code&gt;&lt;/div&gt;&lt;input type="radio" class="toggle" name="tabs-after" id="tabs-after-2" /&gt;
 &lt;label for="tabs-after-2"&gt;Fedora&lt;/label&gt;
 &lt;div class="book-tabs-content markdown-inner"&gt;Run &lt;code&gt;dnf install vips-devel&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;If you don&amp;rsquo;t like to hassle around with your system, so do us, why not have a try using Docker? &amp;raquo; 
 &lt;a href="https://docs.webp.sh/deployment/docker/"&gt;Docker | WebP Server Documentation&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>