DISCLAIMER: Natalia Maximo is not affiliated with GoLinks Enterprises Ltd., and her personal GoLinks project is made without any knowledge of the internal implementations of GoLinks Enterprises Ltd.'s product or their endorsement.
This tutorial has been tested on Linux and MacOS, but should also work for Windows with very few modifications.
If you've never used GoLinks, you probably don't know what you're missing out on. Though you've probably used URL shorteners such as bit.ly, those services allow you to share a shortened link that is usually temporary and public, and most often the resulting links are not very easy to remember. GoLinks solve that problem at an organization level by providing easy-to-remember links that can be shared with members of your org. Your org could have, for example, a link to where you can find information about your paycheques at go/payday.
When I worked at companies that used golinks, I found them super convenient and helpful. So much so, I wanted to start using it for my own personal devices. Unfortuantely, however, it is only available for organizations. To solve that problem and make golinks available for personal devices, I used Docker, Nginx, and Python to generate redirect configurations for go/links.
Before setting up golinks to work network wide, let's first review how to run the application locally. The first thing to do is to ensure that you have the necessary dependencies to follow along at home. If you don't already, install Docker and Docker Compose.
Next, clone the golinks repository.
$ git clone https://github.com/taliamax/golinks
Next, go to the data
folder, make a copy of the file links.yaml.example
and name it links.yaml
. We're going to be using a few example links for this tutorial, but feel free to create whatever links you might already want, and replace the mail service link with whatever email provider you use.
# golinks/data/links.yaml
links:
gcp: "https://cloud.google.com"
fb: "https://facebook.com"
wiki: "https://wikipedia.com"
services:
mail: "https://mail.google.com"
Next, build the containers to ensure that everything is working appropriately. The golinks project has a Makefile with a few different make
commands to simplify the process. You can see all the available ones with make help
or just by typing make
with no arguments in your terminal. For now, run the following:
$ make build
To test that everything is working, first we'll run the containers attached to the terminal. Run the following command:
$ make run
Now, you'll need to add entries to your hosts file (/etc/hosts
on Unix systems) so that your local system can route the links appropriately. It's a good idea to make a backup of the hosts file before making any changes, just in case.
After you have a backup, open your hosts file with some form of text editor and add the following entries to the bottom of the file.
127.0.0.1 go
127.0.0.1 m
Save the file and go to your browser, then try to go to any of the links you defined in your links.yaml
file. If you're following along with this tutorial, you can use <go/gcp> to go to the Google Cloud Platform landing page.
If everything worked successfully, you will have been redirected to your configured link! Go back to the terminal that is running the containers and exit them with ctrl+C
then re-run the containers in detached so you can close the terminal session after with the following command:
$ make run-detach
Congratulations! You have now finished setting up golinks to run locally on your machine! You can now configure new links by adding them to the links
section of your links.yaml
file and saving it, the container will pick up on the changes and reload the configuration automatically.
You can use golinks as text bookmarks by adding all the links you want to save and have accessible to your configuration. Need some help coming up with ideas for your golinks? Here's some of the links I've added to mine:
- My GitHub projects
- My home server DDNS address
- My favourite open source repositories
- The Python3 docs I use the most
Stay tuned for my next tutorial on setting up golinks for all devices in your network using PiHole!