<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Notes from the Alternative Web]]></title><description><![CDATA[Ideas and Lessons Learned]]></description><link>https://notes.altweb.me/</link><image><url>https://notes.altweb.me/favicon.png</url><title>Notes from the Alternative Web</title><link>https://notes.altweb.me/</link></image><generator>Ghost 5.30</generator><lastBuildDate>Wed, 03 Jun 2026 04:01:40 GMT</lastBuildDate><atom:link href="https://notes.altweb.me/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[How to set up a Custom Redirect in Coolify]]></title><description><![CDATA[<h4 id="with-the-right-dockerfile-you-can-quickly-and-easily-set-up-a-custom-http-redirect-in-coolify">With the right Dockerfile, you can quickly and easily set up a custom HTTP redirect in Coolify.</h4><p></p><h2 id="background">Background</h2><p>I recently <a href="https://embassyos.fans">migrated an old Fider instance</a> from a manual Docker install to <a href="https://coolify.io">Coolify</a>, and I wanted to update the domain as well - with a redirect from the old domain.</p><p>Instead</p>]]></description><link>https://notes.altweb.me/how-to-set-up-a-redirect-in-coolify/</link><guid isPermaLink="false">63ef5ba22647ca0001a63bc2</guid><category><![CDATA[coolify]]></category><category><![CDATA[docker]]></category><dc:creator><![CDATA[Note Taker]]></dc:creator><pubDate>Fri, 17 Feb 2023 12:01:36 GMT</pubDate><content:encoded><![CDATA[<h4 id="with-the-right-dockerfile-you-can-quickly-and-easily-set-up-a-custom-http-redirect-in-coolify">With the right Dockerfile, you can quickly and easily set up a custom HTTP redirect in Coolify.</h4><p></p><h2 id="background">Background</h2><p>I recently <a href="https://embassyos.fans">migrated an old Fider instance</a> from a manual Docker install to <a href="https://coolify.io">Coolify</a>, and I wanted to update the domain as well - with a redirect from the old domain.</p><p>Instead of performing the redirect on another server, I decided I would keep things organized and set up the redirect on my Coolify server. Additionally, I wanted a solution that wouldn&apos;t get in the way of Coolify&apos;s default installation, and wouldn&apos;t complicate things in the future. After some trial and error I landed on a solution: <em>Spin up a new Coolify &quot;application&quot; that runs a simple server whose sole job is to redirect a single url.</em></p><div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x26A0;&#xFE0F;</div><div class="kg-callout-text">This example can only handle one redirect at a time.</div></div><p></p><h2 id="instructions">Instructions</h2><!--kg-card-begin: markdown--><ol>
<li>Take note of the <em>SOURCE URL</em> (the old url that you&apos;re redrecting <em>from</em>) and the <em>TARGET URL</em> (the new url that you&apos;re redirecting <em>to</em>).</li>
<li>Make sure that the appropriate DNS records are pointing your <em>SOURCE URL</em> to the IP address of your Coolify server. Check that your DNS changes have propagated at <a href="https://dnschecker.org/">https://dnschecker.org/</a></li>
<li>On the Coolify Dashboard click <em><strong>Create New Resource</strong></em></li>
</ol>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="https://notes.altweb.me/content/images/2023/02/image-6.png" class="kg-image" alt loading="lazy" width="500" height="66"></figure><!--kg-card-begin: markdown--><ol start="4">
<li>Then click <em><strong>Application</strong></em></li>
<li>On the <em><strong>Select a Source</strong></em> page, enter the following under <em><strong>Simple Dockerfile</strong></em>:</li>
</ol>
<pre><code># Use an existing Caddy image as the base image
FROM caddy:2.3.0-alpine

# Expose port 80 for HTTP traffic
EXPOSE 80

# Create the Caddyfile with the desired configuration
RUN echo &quot;{&quot; &gt; /etc/caddy/Caddyfile
RUN echo &quot;  auto_https off&quot; &gt;&gt; /etc/caddy/Caddyfile
RUN echo &quot;}&quot; &gt;&gt; /etc/caddy/Caddyfile
RUN echo &quot;:80 {&quot; &gt;&gt; /etc/caddy/Caddyfile
RUN echo &quot;  redir https://targeturl.com{uri}&quot; &gt;&gt; /etc/caddy/Caddyfile
RUN echo &quot;}&quot; &gt;&gt; /etc/caddy/Caddyfile

# Start the Caddy server
CMD [&quot;caddy&quot;, &quot;run&quot;, &quot;--config&quot;, &quot;/etc/caddy/Caddyfile&quot;]

</code></pre>
<p><em>(Make sure that you change targeturl.com to your TARGET URL.)</em></p>
<ol start="4">
<li>Click <em><strong>Deploy Dockerfile</strong></em></li>
<li>Set up the config of your new Application as follows, making sure that the URL is set as your SOURCE URL:</li>
</ol>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="https://notes.altweb.me/content/images/2023/02/image-8.png" class="kg-image" alt loading="lazy" width="1127" height="949" srcset="https://notes.altweb.me/content/images/size/w600/2023/02/image-8.png 600w, https://notes.altweb.me/content/images/size/w1000/2023/02/image-8.png 1000w, https://notes.altweb.me/content/images/2023/02/image-8.png 1127w" sizes="(min-width: 720px) 720px"></figure><!--kg-card-begin: markdown--><ol start="6">
<li>Click <em><strong>Save</strong></em></li>
<li>Click <em><strong>Deploy</strong></em> in the upper right hand corner, and wait a minute or two for the deploy to complete.</li>
</ol>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="https://notes.altweb.me/content/images/2023/02/image-9.png" class="kg-image" alt loading="lazy" width="664" height="70" srcset="https://notes.altweb.me/content/images/size/w600/2023/02/image-9.png 600w, https://notes.altweb.me/content/images/2023/02/image-9.png 664w"></figure><!--kg-card-begin: markdown--><ol start="8">
<li>Click <em><strong>Open</strong></em> in the upper righthand corner, and your browser should open to the <em><strong>TARGET URL</strong></em>.</li>
<li>Check if your redirect is working at <a href="https://httpstatus.io/">https://httpstatus.io/</a></li>
</ol>
<!--kg-card-end: markdown--><h3 id="hopefully-this-helps">Hopefully this helps!</h3>]]></content:encoded></item></channel></rss>