Kutt is a modern URL shortener with support for custom domains. Shorten URLs, manage your links and view the click rate statistics.
- Free and open source.
- Custom domain support.
- Custom URLs for shortened links
- Set password for links.
- Set description for links.
- Expiration time for links.
- Private statistics for shortened URLs.
- View, edit, delete and manage your links.
- Admin account to view, delete and ban links.
- Ability to disable registration and anonymous link creation for private use.
- RESTful API.
For the minimal configuration the following settings have to be changed in the .env-file:
DEFAULT_DOMAIN
: The domain of your kutt instanceDB_
: The DB credentials (when you use docker-compose you can skip these)ADMIN_EMAILS
: A comma-separated list of the administrator-accountsRECAPTCHA_
: Enter your credentials to use reCaptchas or delete this setting if you don't want to use itMAIL_
: Enter the SMTP-server's credentials (The experience shows SSL works better than STARTTLS; The mail config is required to easily create accounts, see this comment how it can be done manually)REPORT_EMAIL
: Kutt offers a form to report malicious links which are sent to this mail-address
- Docker
- 2 beers
- A bit of nginx know-how
mkdir -p /opt/kutt/
curl -sL "https://gist.github.com/brettpetch/e34ccf8a0335f7e6b726846789b63f11/raw/f245ba5c5866e007d3fb34afa36ea9fa49be1424/docker-compose.yml" -o /opt/kutt/docker-compose.yml
curl -sL "https://gist.github.com/brettpetch/e34ccf8a0335f7e6b726846789b63f11/raw/f245ba5c5866e007d3fb34afa36ea9fa49be1424/.env" -o /opt/kutt/.env
cd /opt/kutt/
# Take this time to modify the files to the above.
cd /opt/kutt/
docker-compose up -d
! Important: make sure that the docker-compose path is correct! You can verify this by doing which docker-compose
]
# kutt.service
[Unit]
Description=Kutt
After=docker.service
Requires=docker.service
StartLimitBurst=3
StartLimitIntervalSec=30
[Service]
RestartSec=5
TimeoutStartSec=0
Restart=on-failure
WorkingDirectory=/opt/kutt
EnvironmentFile=/opt/kutt/.env
# Compose up
ExecStart=/usr/local/bin/docker-compose -f /opt/kutt/docker-compose.yml up
ExecStop=/usr/local/bin/docker-compose -f /opt/kutt/docker-compose.yml stop
ExecReload=/usr/local/bin/docker-compose -f /opt/kutt/docker-compose.yml pull --quiet --ignore-pull-failures
ExecReload=/usr/local/bin/docker-compose -f /opt/kutt/docker-compose.yml up -d
[Install]
WantedBy=multi-user.target
systemctl enable --now kutt.service
Alert! This nginx config was written for Swizzin installs! If you are not running swizzin, make sure you read the Official Documentation
- Generate your SSL certificates using whatever method you might use. (I recommend acme.sh)
curl -sL "https://gist.github.com/brettpetch/e34ccf8a0335f7e6b726846789b63f11/raw/f245ba5c5866e007d3fb34afa36ea9fa49be1424/kutt.conf" -o /etc/nginx/sites-enabled/kutt.conf
nano /etc/nginx/sites-enabled/kutt.conf
- Get your stuff edited the way you need it.
nginx -t
to test your configurationnginx -s reload
to apply your changes (only run if test succeeds).
Go to your domain you setup, sign up, create your account and get after it.
/b