-
Notifications
You must be signed in to change notification settings - Fork 45
Besticon Self Hosting
Besticon is a favicon service written in Go which can be used to fetch icons for websites. The passwords app offers an integration to connect with a server hosting the service.
- Create or log into your Heroku account.
- Click this link.
- Choose an app name and click "Deploy app".
- Click on "View" to view the app and save the url.
- Now configure the app.
Please note that we expect you to have docker installed. You need to run these commands on your server an you need to know the domain of your server.
- Pull the image with
docker pull matthiasluedtke/iconserver
. - Start the container with
docker run -d --restart=on-failure -p 8080:8080 --name=besticon matthiasluedtke/iconserver
.- If you do not want to user port 8080, replace
-p 8080:8080
with-p <yourport>:8080
.
- If you do not want to user port 8080, replace
- Open the frontend on port 8080.
- If the frontend does not work, but the container is running (see
docker ps
), check the logs and your firewall. - We do not recommend making the container accessible to the web.
- If the frontend does not work, but the container is running (see
- Now configure the app.
Please note that we expect you to have docker and docker-compose installed.
- The docker-compose.yml file:
version: '2' services: nextcloud-besticon: image: matthiasluedtke/iconserver container_name: "nextcloud-besticon" # If you integrate this service into your existing docker-compose setup, # then you don't need to expose the port and can just contact the container directly # with http://nextcloud-besticon:8080/icon ports: - 8080:8080 # environment: # PORT: Your Port Here
- Run
docker-compose up -d
- Open the frontend on port 8080,
- If the frontend does not work, but the container is running (see
docker ps
), check the logs and your firewall. - We do not recommend making the container accessible to the web.
- If the frontend does not work, but the container is running (see
- Now configure the app.
These commands will compile the application from source. You can also use our precompiled arm binary and go directly to the standalone installation.
- Install GO:
sudo apt install golang git
- Download and compile the app with
go get -u github.com/mat/besticon/...
- Open the binary folder:
cd ~/go/bin/
- Now continue with step 3 from the standalone installation.
You need command line access and root privileges for this guide.
(NextCloudPI users: Enable SSH in the configuration interface and then log in with ssh pi@yournextcloudpi
)
You need to run these commands on your server an you need to know the domain of your server.
- Download the binary for your server.
- Unzip it with
unzip iconserver_linux_amd64.zip
- If you unzipped it into a subfolder, go there
- Go root:
sudo su
- Move it to the bin folder with
mv iconserver /usr/local/bin/
- Create the systemd service file with
sudo nano /lib/systemd/system/iconserver.service
with the following content:[Unit] Description=Besticon Favicon Server After=multi-user.target [Service] Environment=PORT=8080 ExecStart=/usr/local/bin/iconserver [Install] WantedBy=multi-user.target
- Rescan systemd services with
sudo systemctl daemon-reload
- Enable the new iconserver service with
sudo systemctl enable iconserver.service
- Start the service with
sudo systemctl start iconserver
or reboot withsudo reboot
- Open the frontend on port 8080,
- If the frontend does not work, check the logs and your firewall.
- We do not recommend making the container accessible to the web.
- Now configure the app.
You need command line access for this guide. You need to run these commands on your server an you need to know the domain of your server.
- Download the binary for your server.
- Unzip it
unzip iconserver_linux_amd64.zip
- If you unzipped it into a subfolder, go there
- Run
PORT=8080 ./iconserver &
and thendisown
- Open the frontend on port 8080,
- If the frontend does not work, check the logs and your firewall.
- We do not recommend making the container accessible to the web.
- Now configure the app.
- Open the admin settings of the passwords app ("Settings" > "Passwords") in your Nextcloud.
- Set "Favicon Service" to "Besticon (recommended)".
- Set the "Favicon Service Api" to
http://your_domain_or_ip:8080/icon
- If you use https or a custom port update the domain accordingly.
- If you use the ip or a local domain to host besticon, set
allow_local_remote_servers
totrue
in the config.php
- Reload the page
- Clear the cache "Favicon"
- To test the settings:
- Press F12 in your browser
- Open the "Network" tab
- Check the "Disable Cache" option
- Open the passwords app and check if favicons appear. You can filter for requests with
passwords/api/1.0/service/favicon