GOLINKS
Golinks is a open-sourced short link redirect service in Golang, under MIT-license.
Feature Highlights
- Golinks styled (
go/mylink
) short link redirect
- Parameter substitution (
go/mylink/{VAR} -> https://mylink.com/{VAR}/mypage
)
- Multiple organizations(namespaces) support
- Out-of-box solution with public docker image
haosutdio/golinks
- Tracing with Jaeger
Get started
Run with docker
$ docker run -v \
/path/to/datadir:/opt/golinks/datadir \
-p 8000:8000 \
haostudio/golinks
Run with source code
Build binary
# Clone repo
$ git clone https://github.com/haostudio/golinks
# Install dependencies
$ make deps
# Build binary
$ make golinks
# Run
$ ./build/golinks
Advanced options
Run in NoAuth mode
By default, golinks
supports multiple organizations with JWT authentication.
The links of different organizations are stored in different namespaces. Running
golinks
in NoAuth mode disables authentication and stores all the links in
a shared namespace of the default org.
$ docker run -v \
/path/to/datadir:/opt/golinks/datadir \
-p 8000:8000 \
-e AUTHPROVIDER_NOAUTH_ENABLED=true \
-e AUTHPROVIDER_NOAUTH_DEFAULTORG=my_org \ # optional
haostudio/golinks
Enable static wiki site
$ docker run -v \
/path/to/datadir:/opt/golinks/datadir \
-p 8000:8000 \
-e HTTP_GOLINKS_WIKI=true \
haostudio/golinks
For more options, checkout the configuration guide
Demo
Edit link