Golinks is a simple URL shortener that allows you to replace long URLs with easy-to-remember shortcuts. In this tutorial, we will go through the steps of installing golinks on an Ubuntu Server. The installation process is straightforward.
Before we proceed, ensure that your Ubuntu Server is up-to-date.
Run the command:
sudo apt-get update && sudo apt-get upgrade
This will update your system's package lists and upgrade any existing packages.
Next, we need to ensure that Go is installed on our system.
wget https://golang.org/dl/go1.17.1.linux-amd64.tar.gz
/usr/local
directory:sudo tar -C /usr/local -xzf go1.17.1.linux-amd64.tar.gz
~/.bashrc
file:export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
.bashrc
by running:source ~/.bashrc
Now that we have Go installed, we can proceed to install golinks.
git clone https://git.mills.io/prologic/golinks.git
golinks
directory:cd golinks
go build -o golinks .
golinks
binary to the /usr/bin
directory:sudo mv golinks /usr/bin
By default, golinks stores its links in a file called links.json
. You can configure the path to the links.json
file by setting the GOLINKS_DB
environment variable. Additionally, you can change the port on which golinks listens by setting the GOLINKS_PORT
environment variable.
For example:
export GOLINKS_DB=/path/to/custom/links.json
export GOLINKS_PORT=8080
You can add these lines to your ~/.bashrc
file.
You can now start golinks by running:
golinks
This will start golinks on the default port (8000).
You have now installed golinks on your Ubuntu Server. You can now use it to create shortcuts for long URLs.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!