<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>README.md - fork/chhoto-url @ unicode</title>
<meta name="description" content="README.md in fork/chhoto-url at unicode.">
<meta property="og:title" content="README.md - fork/chhoto-url @ unicode">
<meta property="og:description" content="README.md in fork/chhoto-url at unicode.">
<meta property="og:type" content="website">
<meta property="og:site_name" content="git.julia.blue">
<link rel="stylesheet" href="/css/style.css?v=62">
<script type="module" src="/js/main.js?v=62"></script>
</head>
<body>
<main data-ref="unicode" data-tip="82d990341772a1a355f33bfc992a3e69d7ae0726">
<noscript>
  <div class="callout">
    <p>
      hey! this is a static git repo viewer. commit diffs, file history,
      older commits and other revisions won't load without javascript.
    </p>
    <p>
      you are still able to view source files on branch/tag tips,
      but the experience is degraded.
    </p>
  </div>
</noscript>
<header class="repo"><div>
<h1>fork/chhoto-url</h1>
</div>
<pre class="clone">git clone https://git.julia.blue/fork/chhoto-url</pre>
</header>
<p class="snapshot-commit"><span class="commit-author">SinTan1729</span><span class="commit-message" data-commit="03cef916419dd6170689782fd4dc0da78c49f3cc">docs: Updated with some new info</span><span class="snapshot-sha sha" data-commit="03cef916419dd6170689782fd4dc0da78c49f3cc">03cef91</span><time datetime="2026-09-16T12:19:31-05:00" title="2026-09-16 12:19:31 -0500">2026-09-16</time></p>
<header class="topbar"><details class="switcher"><summary>unicode</summary><div class="menu"><strong>branches</strong><a class="current" href="/fork/chhoto-url/ref/unicode/">unicode</a><a class="all" href="/fork/chhoto-url/refs">all refs →</a></div></details><nav class="crumbs"><a href="/fork/chhoto-url/">chhoto-url</a> / <span class="cur">README.md</span></nav>
<span class="view-stats"><span>7.9 KiB</span><span>135 lines</span></span><span class="actions"><a class="raw" href="/fork/chhoto-url/raw/8e68731a8275ee69d6b2f5829d63164ebe1b906f/README.md">raw</a></span></header>
<div class="markdown-view"><input type="radio" name="markdown-view" id="markdown-rendered" checked><label for="markdown-rendered">rendered</label><input type="radio" name="markdown-view" id="markdown-code"><label for="markdown-code">code</label><section class="readme rendered">&lt;!-- SPDX-FileCopyrightText: 2023-2026 Sayantan Santra &lt;sayantan.santra689@gmail.com&gt; --&gt;
&lt;!-- SPDX-License-Identifier: MIT --&gt;
<p><a href="https://github.com/SinTan1729/chhoto-url/actions/workflows/rust-tests.yml"><img src="https://img.shields.io/github/actions/workflow/status/SinTan1729/chhoto-url/.github%2Fworkflows%2Frust-tests.yml?logo=github&amp;label=tests" alt="github-tests-badge" /></a>
<a href="https://hub.docker.com/r/sintan1729/chhoto-url"><img src="https://img.shields.io/docker/pulls/sintan1729/chhoto-url?logo=docker&amp;label=pulls" alt="docker-pulls-badge" /></a>
<a href="https://ghcr.io/SinTan1729/chhoto-url"><img src="https://img.shields.io/badge/dynamic/json?url=https://ghcr-badge.elias.eu.org/api/SinTan1729/chhoto-url&amp;query=downloadCount&amp;label=pulls&amp;style=flat&amp;logo=github" alt="ghcr-pulls-badge" /></a>
<a href="https://github.com/SinTan1729/chhoto-url"><img src="https://img.shields.io/github/stars/SinTan1729/chhoto-url?logo=github&amp;style=flat" alt="github-stars-badge" /></a>
<a href="https://codeberg.org/SinTan1729/chhoto-url"><img src="https://img.shields.io/gitea/stars/SinTan1729/chhoto-url?gitea_url=https%3A%2F%2Fcodeberg.org&amp;style=flat&amp;logo=codeberg" alt="codeberg-stars-badge" /></a>
<a href="https://github.com/SinTan1729"><img src="https://img.shields.io/badge/maintainer-SinTan1729-blue?logo=github" alt="maintainer-badge" /></a>
<a href="https://github.com/SinTan1729/chhoto-url/releases/latest"><img src="https://img.shields.io/github/v/release/SinTan1729/chhoto-url?logo=github" alt="latest-release-badge" /></a>
<a href="https://hub.docker.com/r/sintan1729/chhoto-url/tags"><img src="https://img.shields.io/docker/image-size/sintan1729/chhoto-url?logo=docker&amp;label=size" alt="docker-image-size-badge" /></a>
<a href="https://spdx.org/licenses/MIT.html"><img src="https://img.shields.io/badge/License-MIT-green?logo=googledocs&amp;label=license" alt="license-badge" /></a></p>
<h1><img src="/fork/chhoto-url/raw/2e74861a43cd8df3ab0b5f0bed1e4f0aa7eee47b/frontend/assets/favicon-32.png" alt="Logo" /> &lt;span style="font-size:42px"&gt;Chhoto URL&lt;/span&gt;</h1>
<h3><a href="https://chhoto.link">Official Website</a> • <a href="https://github.com/SinTan1729/chhoto-url">GitHub</a> • <a href="https://codeberg.org/SinTan1729/chhoto-url">Codeberg</a> • <a href="https://hub.docker.com/r/sintan1729/chhoto-url">Docker Hub</a></h3>
<h1>What is it?</h1>
<p>A simple selfhosted URL shortener with no unnecessary features. Simplicity
and speed are the main foci of this project. The scratch docker image is &lt;4.5 MB (compressed),
the alpine one is &lt;8.5 MB (compressed), and it uses &lt;10 MB of RAM under regular use.</p>
<p>Don't worry if you see no activity for a long time. I consider this project
to be complete, not dead. I'm unlikely to add any new features, but I will try
and fix every bug you report. I will also try to keep it updated in terms of
security vulnerabilities.</p>
<p>If you feel like a feature is missing, please let me know by creating an issue
using the "feature request" template.</p>
<h2>But why another URL shortener?</h2>
<p>Most URL shorteners are either bloated with unnecessary features, or are a pain to set up.
Even fewer are written with simplicity and lightness in mind. When I saw the
<a href="https://gitlab.com/draganczukp/simply-shorten"><code>simply-shorten</code></a> project, I really liked the
idea but thought that it missed some features. Also, I didn't like the fact that a simple app
like this had a ~200 MB docker image (mostly due to the included java runtime). So, I decided
to rewrite it in Rust and add some features to it that I thought were essential (e.g. hit counting).</p>
<h2>What does the name mean?</h2>
<p>Chhoto (ছোট, <a href="https://en.wiktionary.org/wiki/%E0%A6%9B%E0%A7%8B%E0%A6%9F">pronunciation</a>) is the Bangla word
for small. URL means, well... URL. So the name simply means Small URL.</p>
<h1>Installation and configuration</h1>
<p><a href="/fork/chhoto-url/ref/unicode/blob/docs/INSTALLATION.md">See here.</a></p>
<h1>Demo</h1>
<p>Link: <a href="https://demo.chhoto.link">demo.chhoto.link</a>&lt;/br&gt;
Password: <code>chhoto-url-demo-pass</code></p>
<h4>Note:</h4>
<ul>
<li>The database is cleared every 15 minutes, so don't use it for anything other than testing.</li>
<li>If you host a public instance of Chhoto URL, please let me know, and I'll add it to the README.</li>
</ul>
<h1>Features</h1>
<ul>
<li>Shortens URLs of any length to a randomly generated link.</li>
<li>Automatic expiry of links after a chosen time.</li>
<li>(Optional) Allows you to specify the shortened URL instead of the generated
one. (It's missing in a surprising number of alternatives.)</li>
<li>Opening the shortened URL in your browser will instantly redirect you
to the correct long URL. (So no stupid redirection pages.)</li>
<li>Super lightweight and snappy. (The docker image is only ~6MB and RAM uasge
stays under 5MB under normal use.)</li>
<li>Counts number of hits for each short link in a privacy respecting way
i.e. only the hit is recorded, and nothing else.</li>
<li>Short links can be edited after creation.</li>
<li>Each short link may have custom notes attached to it. The UI features filtering for links,
based on short link, long link, and notes.</li>
<li>QR codes can be generated for easy sharing.</li>
<li>Supports operation using API key, and lets the user provide hashed password and API key.</li>
<li>Has a robust JSON-RPC adjacent API.</li>
<li>Has a mobile friendly UI, and automatic dark mode.</li>
<li>Supports customized site title, and can even serve a custom landing page, if needed.</li>
<li>Has a public mode, where anyone can add links without authentication. Deleting
or listing available links will need admin access using the password. It's also
possible to completely disable the frontend. It's also possible to force an expiry
time for public instances, which might be useful.</li>
<li>Allows setting the URL of your website, in case you want to conveniently
generate short links locally.</li>
<li>Links are stored in an SQLite database, which is configured to be ACID by default.
Options are available for tuning the database to the user's liking.</li>
<li>Available as a Docker container with a provided compose file.</li>
<li>Backend written in Rust using <a href="https://actix.rs/">Actix Web</a>, and frontend
written in plain HTML and vanilla JS, using <a href="https://purecss.io/">Pure CSS</a>
for styling.</li>
<li>Uses very basic authentication using a provided password. It's not encrypted in transport.
I recommend using a reverse proxy such as <a href="https://caddyserver.com/">caddy</a> to
encrypt the connection by SSL.</li>
</ul>
<h1>Bloat that will not be implemented</h1>
<ul>
<li><strong>Tracking or spying of any kind.</strong> The only logs that still exist are
some very simple ones, mostly meant for debugging.</li>
<li><strong>User management.</strong> If you need a shortener for your whole organization, either
run separate containers for everyone or use something else.</li>
<li><strong>Cookies, newsletters</strong>, "we value your privacy" popups or any of the multiple
other ways modern web shows how anti-user it is. We all hate those, and they're
not needed here.</li>
<li><strong>Paywalls</strong> or messages begging for donations.</li>
</ul>
<h1>Screenshots</h1>
&lt;p align="middle"&gt;
  &lt;img src="docs/screenshot-desktop.webp" height="250" alt="desktop screenshot" /&gt;
  &lt;img src="docs/screenshot-mobile.webp" height="250" alt="mobile screenshot" /&gt;
&lt;/p&gt;
<h1>Instructions for CLI usage</h1>
<p><a href="/fork/chhoto-url/ref/unicode/blob/docs/CLI.md">See here.</a></p>
<h1>Related software</h1>
<p><a href="/fork/chhoto-url/ref/unicode/blob/docs/TOOLS.md">See here.</a></p>
<h1>Notes</h1>
<ul>
<li>The list of adjectives and names used for random short url generation is a modified
version of
<a href="https://github.com/moby/moby/blob/2280567b60633e2a4ac8723961bc1f351e71e099/internal/namesgenerator/legacy/names-generator.go#L52">this list used by docker</a>.</li>
<li>It is highly recommended that you <a href="/fork/chhoto-url/ref/unicode/blob/docs/INSTALLATION.md#chhoto_sqlite_use_wal_mode">enable WAL mode</a>.</li>
<li>Although it's unlikely, it's possible that your database is mangled after some update. For mission critical use cases,
it's recommended to keep regular versioned backups of the database, and sticking to a minor release tag e.g. 5.8.</li>
<li>If you intend to have more than a few thousand short links, it's strongly recommended that you use the UID
<a href="/fork/chhoto-url/ref/unicode/blob/docs/INSTALLATION.md#chhoto_slug_style"><code>CHHOTO_SLUG_STYLE</code></a> with a <a href="/fork/chhoto-url/ref/unicode/blob/docs/INSTALLATION.md#chhoto_slug_length"><code>CHHOTO_SLUG_LENGTH</code></a>
of 16 or more. Otherwise, generating new links will start to fail after a while.</li>
<li>It is highly recommended that you use <a href="/fork/chhoto-url/ref/unicode/blob/docs/INSTALLATION.md#chhoto_hash_algorithm"><code>Argon2</code> for hashing</a> password and API key (if used).</li>
<li>For safety, only <code>https</code>,<code>http</code>,<code>ftp</code>, and <code>magnet</code> links are allowed for long links by default. Please take a look at
<a href="/fork/chhoto-url/ref/unicode/blob/docs/INSTALLATION.md#chhoto_extra_protocols"><code>CHHOTO_EXTRA_PROTOCOLS</code></a> to use more protocols.</li>
</ul>
</section><div class="code-panel"><pre class="code src language-markdown"><span class="code-line"><a class="ln" id="L1" href="#L1">1</a><span class="code-text"><a-c>&lt;!-- SPDX-FileCopyrightText: 2023-2026 Sayantan Santra &lt;sayantan.santra689@gmail.com&gt; --&gt;</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L2" href="#L2">2</a><span class="code-text"><a-c>&lt;!-- SPDX-License-Identifier: MIT --&gt;</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L3" href="#L3">3</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L4" href="#L4">4</a><span class="code-text">[![github-tests-badge](https://img.shields.io/github/actions/workflow/status/SinTan1729/chhoto-url/.github%2Fworkflows%2Frust-tests.yml?logo=github&amp;label=tests)](https://github.com/SinTan1729/chhoto-url/actions/workflows/rust-tests.yml)</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L5" href="#L5">5</a><span class="code-text">[![docker-pulls-badge](https://img.shields.io/docker/pulls/sintan1729/chhoto-url?logo=docker&amp;label=pulls)](https://hub.docker.com/r/sintan1729/chhoto-url)</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L6" href="#L6">6</a><span class="code-text">[![ghcr-pulls-badge](https://img.shields.io/badge/dynamic/json?url=https://ghcr-badge.elias.eu.org/api/SinTan1729/chhoto-url&amp;query=downloadCount&amp;label=pulls&amp;style=flat&amp;logo=github)](https://ghcr.io/SinTan1729/chhoto-url)</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L7" href="#L7">7</a><span class="code-text">[![github-stars-badge](https://img.shields.io/github/stars/SinTan1729/chhoto-url?logo=github&amp;style=flat)](https://github.com/SinTan1729/chhoto-url)</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L8" href="#L8">8</a><span class="code-text">[![codeberg-stars-badge](https://img.shields.io/gitea/stars/SinTan1729/chhoto-url?gitea_url=https%3A%2F%2Fcodeberg.org&amp;style=flat&amp;logo=codeberg)](https://codeberg.org/SinTan1729/chhoto-url)</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L9" href="#L9">9</a><span class="code-text">[![maintainer-badge](https://img.shields.io/badge/maintainer-SinTan1729-blue?logo=github)](https://github.com/SinTan1729)</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L10" href="#L10">10</a><span class="code-text">[![latest-release-badge](https://img.shields.io/github/v/release/SinTan1729/chhoto-url?logo=github)](https://github.com/SinTan1729/chhoto-url/releases/latest)</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L11" href="#L11">11</a><span class="code-text">[![docker-image-size-badge](https://img.shields.io/docker/image-size/sintan1729/chhoto-url?logo=docker&amp;label=size)](https://hub.docker.com/r/sintan1729/chhoto-url/tags)</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L12" href="#L12">12</a><span class="code-text">[![license-badge](https://img.shields.io/badge/License-MIT-green?logo=googledocs&amp;label=license)](https://spdx.org/licenses/MIT.html)</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L13" href="#L13">13</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L14" href="#L14">14</a><span class="code-text"><a-p>#</a-p> <a-tt>![Logo](frontend/assets/favicon-32.png) &lt;span style=&quot;font-size:42px&quot;&gt;Chhoto URL&lt;/span&gt;</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L15" href="#L15">15</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L16" href="#L16">16</a><span class="code-text"><a-p>###</a-p> <a-tt>[Official Website](https://chhoto.link) • [GitHub](https://github.com/SinTan1729/chhoto-url) • [Codeberg](https://codeberg.org/SinTan1729/chhoto-url) • [Docker Hub](https://hub.docker.com/r/sintan1729/chhoto-url)</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L17" href="#L17">17</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L18" href="#L18">18</a><span class="code-text"><a-p>#</a-p> <a-tt>What is it?</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L19" href="#L19">19</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L20" href="#L20">20</a><span class="code-text">A simple selfhosted URL shortener with no unnecessary features. Simplicity</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L21" href="#L21">21</a><span class="code-text">and speed are the main foci of this project. The scratch docker image is &lt;4.5 MB (compressed),</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L22" href="#L22">22</a><span class="code-text">the alpine one is &lt;8.5 MB (compressed), and it uses &lt;10 MB of RAM under regular use.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L23" href="#L23">23</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L24" href="#L24">24</a><span class="code-text">Don&#39;t worry if you see no activity for a long time. I consider this project</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L25" href="#L25">25</a><span class="code-text">to be complete, not dead. I&#39;m unlikely to add any new features, but I will try</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L26" href="#L26">26</a><span class="code-text">and fix every bug you report. I will also try to keep it updated in terms of</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L27" href="#L27">27</a><span class="code-text">security vulnerabilities.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L28" href="#L28">28</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L29" href="#L29">29</a><span class="code-text">If you feel like a feature is missing, please let me know by creating an issue</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L30" href="#L30">30</a><span class="code-text">using the &quot;feature request&quot; template.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L31" href="#L31">31</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L32" href="#L32">32</a><span class="code-text"><a-p>##</a-p> <a-tt>But why another URL shortener?</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L33" href="#L33">33</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L34" href="#L34">34</a><span class="code-text">Most URL shorteners are either bloated with unnecessary features, or are a pain to set up.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L35" href="#L35">35</a><span class="code-text">Even fewer are written with simplicity and lightness in mind. When I saw the</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L36" href="#L36">36</a><span class="code-text">[`simply-shorten`](https://gitlab.com/draganczukp/simply-shorten) project, I really liked the</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L37" href="#L37">37</a><span class="code-text">idea but thought that it missed some features. Also, I didn&#39;t like the fact that a simple app</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L38" href="#L38">38</a><span class="code-text">like this had a ~200 MB docker image (mostly due to the included java runtime). So, I decided</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L39" href="#L39">39</a><span class="code-text">to rewrite it in Rust and add some features to it that I thought were essential (e.g. hit counting).</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L40" href="#L40">40</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L41" href="#L41">41</a><span class="code-text"><a-p>##</a-p> <a-tt>What does the name mean?</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L42" href="#L42">42</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L43" href="#L43">43</a><span class="code-text">Chhoto (ছোট, [pronunciation](https://en.wiktionary.org/wiki/ছোট)) is the Bangla word</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L44" href="#L44">44</a><span class="code-text">for small. URL means, well... URL. So the name simply means Small URL.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L45" href="#L45">45</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L46" href="#L46">46</a><span class="code-text"><a-p>#</a-p> <a-tt>Installation and configuration</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L47" href="#L47">47</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L48" href="#L48">48</a><span class="code-text">[See here.](./docs/INSTALLATION.md)</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L49" href="#L49">49</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L50" href="#L50">50</a><span class="code-text"><a-p>#</a-p> <a-tt>Demo</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L51" href="#L51">51</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L52" href="#L52">52</a><span class="code-text">Link: [demo.chhoto.link](https://demo.chhoto.link)&lt;/br&gt;</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L53" href="#L53">53</a><span class="code-text">Password: `chhoto-url-demo-pass`</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L54" href="#L54">54</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L55" href="#L55">55</a><span class="code-text"><a-p>####</a-p> <a-tt>Note:</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L56" href="#L56">56</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L57" href="#L57">57</a><span class="code-text"><a-p>- </a-p>The database is cleared every 15 minutes, so don&#39;t use it for anything other than testing.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L58" href="#L58">58</a><span class="code-text"><a-p>- </a-p>If you host a public instance of Chhoto URL, please let me know, and I&#39;ll add it to the README.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L59" href="#L59">59</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L60" href="#L60">60</a><span class="code-text"><a-p># </a-p><a-tt>Features</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L61" href="#L61">61</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L62" href="#L62">62</a><span class="code-text"><a-p>- Shortens URLs of any length to a randomly generated link.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L63" href="#L63">63</a><span class="code-text"><a-p>- Automatic expiry of links after a chosen time.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L64" href="#L64">64</a><span class="code-text"><a-p>- (Optional) Allows you to specify the shortened URL instead of the generated</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L65" href="#L65">65</a><span class="code-text"><a-p>  one. (It&#39;s missing in a surprising number of alternatives.)</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L66" href="#L66">66</a><span class="code-text"><a-p>- Opening the shortened URL in your browser will instantly redirect you</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L67" href="#L67">67</a><span class="code-text"><a-p>  to the correct long URL. (So no stupid redirection pages.)</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L68" href="#L68">68</a><span class="code-text"><a-p>- Super lightweight and snappy. (The docker image is only ~6MB and RAM uasge</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L69" href="#L69">69</a><span class="code-text"><a-p>  stays under 5MB under normal use.)</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L70" href="#L70">70</a><span class="code-text"><a-p>- Counts number of hits for each short link in a privacy respecting way</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L71" href="#L71">71</a><span class="code-text"><a-p>  i.e. only the hit is recorded, and nothing else.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L72" href="#L72">72</a><span class="code-text"><a-p>- Short links can be edited after creation.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L73" href="#L73">73</a><span class="code-text"><a-p>- Each short link may have custom notes attached to it. The UI features filtering for links,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L74" href="#L74">74</a><span class="code-text"><a-p>  based on short link, long link, and notes.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L75" href="#L75">75</a><span class="code-text"><a-p>- QR codes can be generated for easy sharing.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L76" href="#L76">76</a><span class="code-text"><a-p>- Supports operation using API key, and lets the user provide hashed password and API key.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L77" href="#L77">77</a><span class="code-text"><a-p>- Has a robust JSON-RPC adjacent API.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L78" href="#L78">78</a><span class="code-text"><a-p>- Has a mobile friendly UI, and automatic dark mode.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L79" href="#L79">79</a><span class="code-text"><a-p>- Supports customized site title, and can even serve a custom landing page, if needed.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L80" href="#L80">80</a><span class="code-text"><a-p>- Has a public mode, where anyone can add links without authentication. Deleting</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L81" href="#L81">81</a><span class="code-text"><a-p>  or listing available links will need admin access using the password. It&#39;s also</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L82" href="#L82">82</a><span class="code-text"><a-p>  possible to completely disable the frontend. It&#39;s also possible to force an expiry</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L83" href="#L83">83</a><span class="code-text"><a-p>  time for public instances, which might be useful.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L84" href="#L84">84</a><span class="code-text"><a-p>- Allows setting the URL of your website, in case you want to conveniently</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L85" href="#L85">85</a><span class="code-text"><a-p>  generate short links locally.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L86" href="#L86">86</a><span class="code-text"><a-p>- Links are stored in an SQLite database, which is configured to be ACID by default.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L87" href="#L87">87</a><span class="code-text"><a-p>  Options are available for tuning the database to the user&#39;s liking.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L88" href="#L88">88</a><span class="code-text"><a-p>- Available as a Docker container with a provided compose file.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L89" href="#L89">89</a><span class="code-text"><a-p>- Backend written in Rust using [Actix Web](https://actix.rs/), and frontend</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L90" href="#L90">90</a><span class="code-text"><a-p>  written in plain HTML and vanilla JS, using [Pure CSS](https://purecss.io/)</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L91" href="#L91">91</a><span class="code-text"><a-p>  for styling.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L92" href="#L92">92</a><span class="code-text"><a-p>- Uses very basic authentication using a provided password. It&#39;s not encrypted in transport.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L93" href="#L93">93</a><span class="code-text"><a-p>  I recommend using a reverse proxy such as [caddy](https://caddyserver.com/) to</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L94" href="#L94">94</a><span class="code-text"><a-p>  encrypt the connection by SSL.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L95" href="#L95">95</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L96" href="#L96">96</a><span class="code-text"><a-p># </a-p><a-tt>Bloat that will not be implemented</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L97" href="#L97">97</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L98" href="#L98">98</a><span class="code-text"><a-p>- **Tracking or spying of any kind.** The only logs that still exist are</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L99" href="#L99">99</a><span class="code-text"><a-p>  some very simple ones, mostly meant for debugging.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L100" href="#L100">100</a><span class="code-text"><a-p>- **User management.** If you need a shortener for your whole organization, either</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L101" href="#L101">101</a><span class="code-text"><a-p>  run separate containers for everyone or use something else.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L102" href="#L102">102</a><span class="code-text"><a-p>- **Cookies, newsletters**, &quot;we value your privacy&quot; popups or any of the multiple</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L103" href="#L103">103</a><span class="code-text"><a-p>  other ways modern web shows how anti-user it is. We all hate those, and they&#39;re</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L104" href="#L104">104</a><span class="code-text"><a-p>  not needed here.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L105" href="#L105">105</a><span class="code-text"><a-p>- **Paywalls** or messages begging for donations.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L106" href="#L106">106</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L107" href="#L107">107</a><span class="code-text"><a-p># </a-p><a-tt>Screenshots</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L108" href="#L108">108</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L109" href="#L109">109</a><span class="code-text"><a-p>&lt;</a-p><a-tg>p</a-tg><a-p> </a-p><a-at>align</a-at><a-p>=&quot;</a-p><a-s>middle</a-s><a-p>&quot;&gt;</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L110" href="#L110">110</a><span class="code-text"><a-p>  &lt;</a-p><a-tg>img</a-tg><a-p> </a-p><a-at>src</a-at><a-p>=&quot;</a-p><a-s>docs/screenshot-desktop.webp</a-s><a-p>&quot; </a-p><a-at>height</a-at><a-p>=&quot;</a-p><a-s>250</a-s><a-p>&quot; </a-p><a-at>alt</a-at><a-p>=&quot;</a-p><a-s>desktop screenshot</a-s><a-p>&quot; /&gt;</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L111" href="#L111">111</a><span class="code-text"><a-p>  &lt;</a-p><a-tg>img</a-tg><a-p> </a-p><a-at>src</a-at><a-p>=&quot;</a-p><a-s>docs/screenshot-mobile.webp</a-s><a-p>&quot; </a-p><a-at>height</a-at><a-p>=&quot;</a-p><a-s>250</a-s><a-p>&quot; </a-p><a-at>alt</a-at><a-p>=&quot;</a-p><a-s>mobile screenshot</a-s><a-p>&quot; /&gt;</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L112" href="#L112">112</a><span class="code-text"><a-p>&lt;/</a-p><a-tg>p</a-tg><a-p>&gt;</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L113" href="#L113">113</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L114" href="#L114">114</a><span class="code-text"><a-p># </a-p><a-tt>Instructions for CLI usage</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L115" href="#L115">115</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L116" href="#L116">116</a><span class="code-text"><a-p>[See here.](./docs/CLI.md)</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L117" href="#L117">117</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L118" href="#L118">118</a><span class="code-text"><a-p># </a-p><a-tt>Related software</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L119" href="#L119">119</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L120" href="#L120">120</a><span class="code-text"><a-p>[See here.](./docs/TOOLS.md)</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L121" href="#L121">121</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L122" href="#L122">122</a><span class="code-text"><a-p># </a-p><a-tt>Notes</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L123" href="#L123">123</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L124" href="#L124">124</a><span class="code-text"><a-p>- The list of adjectives and names used for random short url generation is a modified</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L125" href="#L125">125</a><span class="code-text"><a-p>  version of</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L126" href="#L126">126</a><span class="code-text"><a-p>  [this list used by docker](https://github.com/moby/moby/blob/2280567b60633e2a4ac8723961bc1f351e71e099/internal/namesgenerator/legacy/names-generator.go#L52).</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L127" href="#L127">127</a><span class="code-text"><a-p>- It is highly recommended that you [enable WAL mode](./docs/INSTALLATION.md#chhoto_sqlite_use_wal_mode).</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L128" href="#L128">128</a><span class="code-text"><a-p>- Although it&#39;s unlikely, it&#39;s possible that your database is mangled after some update. For mission critical use cases,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L129" href="#L129">129</a><span class="code-text"><a-p>  it&#39;s recommended to keep regular versioned backups of the database, and sticking to a minor release tag e.g. 5.8.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L130" href="#L130">130</a><span class="code-text"><a-p>- If you intend to have more than a few thousand short links, it&#39;s strongly recommended that you use the UID</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L131" href="#L131">131</a><span class="code-text"><a-p>  [`CHHOTO_SLUG_STYLE`](./docs/INSTALLATION.md#chhoto_slug_style) with a [`CHHOTO_SLUG_LENGTH`](./docs/INSTALLATION.md#chhoto_slug_length)</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L132" href="#L132">132</a><span class="code-text"><a-p>  of 16 or more. Otherwise, generating new links will start to fail after a while.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L133" href="#L133">133</a><span class="code-text"><a-p>- It is highly recommended that you use [`Argon2` for hashing](./docs/INSTALLATION.md#chhoto_hash_algorithm) password and API key (if used).</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L134" href="#L134">134</a><span class="code-text"><a-p>- For safety, only `https`,`http`,`ftp`, and `magnet` links are allowed for long links by default. Please take a look at</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L135" href="#L135">135</a><span class="code-text"><a-p>  </a-p>[`CHHOTO_EXTRA_PROTOCOLS`](./docs/INSTALLATION.md#chhoto_extra_protocols) to use more protocols.</span></span></pre></div></div>
</main>
</body>
</html>
