Sign inSign up

rolvapneseth/curto

By rolvapneseth

Updated over 1 year ago

An easy-to-use, self-hostable URL shortener

Image
1

213

rolvapneseth/curto repository overview

curto

Docker Image Size GitHub Actions Workflow Status License

Open-source, self-hostable and fast URL-shortening API, written in Rust. Created mostly as a learning project.

Features

  • Short link creation and redirection.
  • Custom shortened link IDs (optional).
  • Shortened link expiration (optional).
  • Only track the number of times shortened links are used, not information about users.
  • Protections against attackers, such as rate-limiting (optional), request body limits and request timeouts.
  • Auto-generated OpenAPI specification for all endpoints.
  • Scalar used to display the API's documentation and easily interact with it.
  • Prometheus metrics for the API.
  • Support for configuration via a .env file, or environment variables.
  • Docker image and docker-compose.yml for convenient self-hosting.

Deployment

You can self-host using Docker, ideally with the provided docker-compose.yml.

Simply copy that file to your system, and in the same directory run docker compose up. The documentation should be available shortly at http://0.0.0.0:7229/docs.

Build from source

While deploying with Docker is the preferred method of deployment, you can also build the project from source and run it directly by following these steps:

  1. Ensure there is a PostgreSQL database available to the application
  2. Manually set environment variables or create a file called .env based on the provided .env.example
  3. Build and run the application directly: cargo run --release

Technologies

Credits

  • The authors and maintainers of all the technologies mentioned above, and more!
  • The original idea to do this came from this repo

License

AGPL-3.0

Tag summary

Content type

Image

Digest

sha256:1a96c1d76

Size

34.4 MB

Last updated

over 1 year ago

docker pull rolvapneseth/curto