Git Product home page Git Product logo

linkstackorg / linkstack-docker Goto Github PK

View Code? Open in Web Editor NEW
298.0 6.0 32.0 118 KB

A simple to set up docker variant of LinkStack. LinkStack is a highly customizable link sharing platform with an intuitive, easy to use user interface.

Home Page: https://linkstack.org/docker

License: GNU Affero General Public License v3.0

Dockerfile 25.81% Shell 74.19%
alpine alpine-linux apache apache2 blade css docker javascript laravel link

linkstack-docker's Introduction


Docker Edition


Pull, deploy, enjoy!


AboutAbout LinkStackPullSupported ArchitecturesDeploymentUpdatingBuildPersistent storageReverse Proxy


Live Demo

Docker Hub

About

The official docker version of LinkStack. This docker image is a simple to set up solution, containing everything you need to run LinkStack.

The docker version of LinkStack retains all the features and customization options of the original version.

This docker is based on Alpine Linux, a Linux distribution designed to be small, simple and secure. The web server is running Apache2, a free and open-source cross-platform web server software. The docker comes with PHP 8.2 for high compatibility and performance.

Using the docker is as simple as pulling and deploying.


About LinkStack

LinkStack is a highly customizable link sharing platform with an intuitive, easy to use user interface.

LinkStack allows you to create a personal profile page. Many social media platforms only allow for one link. With this, you can have all the links you want clickable on one site. Set up your personal site on your own server in a few clicks.


Learn more about LinkStack, and all the features here:


About LinkStack


Pull

docker pull linkstackorg/linkstack

Alternative mirror:

docker pull ghcr.io/linkstackorg/linkstack

Supported Architectures


Deployment

You may change port 80, 443 to your preferred values.

Both HTTP and HTTPS are supported and exposed by default.

Optional environment variables


Deploy


Read more about persistent storage


Create a new volume:

docker volume create linkstack

docker run --detach \
    --name linkstack \
    --publish 80:80 \
    --publish 443:443 \
    --restart unless-stopped \
    --mount source=linkstack,target=/htdocs \
    linkstackorg/linkstack

Custom deployment

docker run --detach \
    --name linkstack \
    --hostname linkstack \
    --env HTTP_SERVER_NAME="www.example.xyz" \
    --env HTTPS_SERVER_NAME="www.example.xyz" \
    --env SERVER_ADMIN="[email protected]" \
    --env TZ="Europe/Berlin" \
    --env PHP_MEMORY_LIMIT="512M" \
    --env UPLOAD_MAX_FILESIZE="16M" \
    --publish 80:80 \
    --publish 443:443 \
    --restart unless-stopped \
    --mount source=linkstack,target=/htdocs \
    linkstackorg/linkstack

Docker Compose

Use HTTPS for your reverse proxy to avoid issues
Example config.

version: "3.8"

services:

  linkstack:
    hostname: 'linkstack'
    image: 'linkstackorg/linkstack:latest'
    environment:
      TZ: 'Europe/Berlin'
      SERVER_ADMIN: '[email protected]'
      HTTP_SERVER_NAME: 'example.com'
      HTTPS_SERVER_NAME: 'example.com'
      LOG_LEVEL: 'info'
      PHP_MEMORY_LIMIT: '256M'
      UPLOAD_MAX_FILESIZE: '8M'
    volumes:
      - 'linkstack_data:/htdocs'
    ports:
      - '8190:443'
    restart: unless-stopped

volumes:
  linkstack_data:

Updating

When a new version is released, you will get an update notification on your Admin Panel.

Automatic one click Updater

This updater allows you to update your installation with just one click.


How to use the Automatic Updater:

  • To update your instance, click on the update notification on your Admin Panel.

  • Click on “Update automatically” and the updater will take care of the rest.


Build

If you wish to build or modify your own docker version of LinkStack, you can do so with the instructions below:

  • Download this GitHub repository as well as the latest release of LinkStack from here.
  • Place the downloaded release files directly into the linkstack folder from this repository.

From the docker directory, run the command:

docker build -t linkstack .
You can now set up your application on your defined ports.

Persistent storage

Persistent storage for docker containers is storage that is not lost when the container is stopped or removed.

This is advantageous since it means that data may be saved even if the container is removed. This is especially crucial when dealing with data that must be retained throughout restarts, such as a database.

All files important to run LinkStack are stored in the "htdocs" folder found in the root directory of your docker container.

We recommend mounting that entire folder to an external volume.


However, some user may prefer to preserve only individual files.
Expand the details section below to read more about this:

If you wish to save only selective files, you may save the following files and folders:
/htdocs/.env
/htdocs/database/database.sqlite
/htdocs/config/advanced-config.php
/htdocs/assets/linkstack/images/avatar.png
/htdocs/themes (folder)
/htdocs/assets/img (folder)

This might change with future releases.


Reverse Proxy

NGINX:

Below is an example NGINX setup for a reverse proxy.
Make sure to use HTTPS to access your container to avoid mixed content errors

server {
  listen        443 ssl;
  listen        [::]:443 ssl;
  listen        80;
  listen        [::]:80;
  server_name   your.domain.name;

  location / {
    # Replace with the IP address and port number of your Docker container.
    proxy_pass                          https://127.0.0.1:443;
    proxy_set_header Host               $host;
    proxy_set_header X-Real-IP          $remote_addr;

    proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto  https;
    proxy_set_header X-VerifiedViaNginx yes;
    proxy_read_timeout                  60;
    proxy_connect_timeout               60;
    proxy_redirect                      off;

    # Specific for websockets: force the use of HTTP/1.1 and set the Upgrade header
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_cache_bypass $http_upgrade;
    proxy_set_header X-Forwarded-Proto $scheme;
    
    # Fixes Mixed Content errors.
    add_header 'Content-Security-Policy' 'upgrade-insecure-requests';
  }
}



linkstack-docker's People

Contributors

dependabot[bot] avatar julianprieber avatar lastsamurai26 avatar magiclike avatar s4ke avatar sevichecc avatar stardogg avatar thylong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

linkstack-docker's Issues

Littlelink-custom for Unraid clears data after an update.

So I created a LittleLink Custom app for UnRaid Community Appstore from the docker-compose file. My issue is whenever I update the app, it clears my current config and i have to start afresh. Reconfig after every update. Currently using it as it is with sqlite and built in mailserver.

Please add a https scheme variable

Please add a https scheme environment variable. I always get mixed content errors and it seems like i am not the only one. please add a http scheme environment variable to redirect all links to https.
I also had the same issues like in #44.
The container should create the files by itself and you should not have to make a fancy workaround to get to the files.

Proxy authentication by http header value

When self-hosting Littlelink just for yourself, you might want to have a single point for user management and authentication. It is annoying to login to each and every app seperately.

A pretty simple way to centralize authentication is achieved by deploying apps behind a reverse proxy, and use proxy auth. The proxy handles authentication in some way and sets http headers containing the username that was successfully logged-in. The apps read the headers and associate incoming requests to that user.

The perfect proxy auth feature for me would work like this:

  1. Start Littlelink with additional environment variables:
  • containing the name of the initial admin user (e.g. admin=admin_user)
  • enabling proxy auth (e.g. proxy_auth=true)
  • setting the key of the http header that contains the username (e.g. auth_header=X-Authenticated-User)
  1. Configure the reverse proxy to authenticate incoming requests in any way you like.
  2. Let the reverse proxy set X-Authenticated-User to the authenticated username on every request.
  3. Littlelink treats the requests as if they belong to the appropriate user session.
  4. Bonus: if Littlelink does not know the username, it creates a new user with that name.

Context: I am using Littlelink for this product. Since this is a single-user platform, users really should see no login screen at all, not even for SSO.

Call to undefined funciton simplexml_import_dom() when retrieving favicon

I'm using docker to deploy linkstack, using a sqlite database, no reverse proxy. It's been running well, but when I've gone to add a custom URL and checked the box to display website image over link (I can't remember the exact wording) it throws a 500 server error and I can't edit the links or remove the offender.

I can use the rest of the site fine, so I got the debug option up and when I access the page it says Call to undefined funciton simplexml_import_dom() and hilights line 36 of storage / framework / views / a1faeb3dd3ffed4fc54853ffa80cc5892b1d4a3c.php. where it looks like it's trying to retrieve the favicon for the website. The link is to the Meetup website if that's of any use.

I have tried restarting the container, removing it and pulling the image again to restart the container. I created a new profile, logged in and did it again to try to figure out where the issue was. There is no issue if the checkbox remains unchecked.

As I can't get in to delete the link that's caused this, I can't add any links to the profile, remove any, or view the profile. Is there any way to get in and change the option manually?

Unable to change Profile picture

Platform: Ubuntu 22.04 LTS
Server type: NGINX/Apache2 ...
PHP version: 8.1

Running this in a docker container. Created my site and everything. Once I created my Admin user I then uploaded a Profile picture and it worked. Once I try to delete and upload a new picture it adds the first one instead. I tried different formats and sizes and same issue.

Reverse Proxy?

I use the LinuxServer SWAG container for reverse proxying and tried to create one for LLC and it partially worked; the site loads, but no CSS:

image

I've got it pointing to port 80 and all settings seem like they should work.

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name littlelink.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    location / {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app littlelink-custom;
        set $upstream_port 80;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    }
}

Have you ever tried RP'ing this and know the proper settings?

p.s. Sorry to hit you with so many things at once! LOL

400 Bad Request

Hey Julian,

I'm trying to get it work.
Running on docker with Traefik as a reverse proxy i'm getting this error:

Bad Request
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

(you can see this on 'https://linkjes.woutr.io')

Editing the port to 80 or back to 443 doesn't solve a thing.
This is my docker-compose file;

`
version: '2'

networks:
web:
external: true

services:
app:
image: julianprieber/littlelink-custom
labels:
- "traefik.http.routers.littlelink.rule=Host(linkjes.woutr.io)"
- "traefik.http.routers.littlelink.tls=true"
- "traefik.http.routers.littlelink.tls.certresolver=lets-encrypt"
- "traefik.http.services.littlelink.loadbalancer.server.port=443"
- "traefik.docker.network=web"
volumes:
- ./data:/htdocs
environment:
- HTTP_SERVER_NAME=linkjes.woutr.io
- HTTPS_SERVER_NAME=linkjes.woutr.io
- SERVER_ADMIN=[email protected]
- TZ=Europe/Amsterdam
- PHP_MEMORY_LIMIT=512M
- UPLOAD_MAX_FILESIZE=16M
networks:
- web
restart: always
`

LLC is generating http links on an https site?

Me again! :)

While getting things going I noticed in the source code that for some reason LLC is setting it's internal links to use http even though I'm accessing the site through my reverse proxy that is https.

example:

image

Also, the actual links on the page, for example the login link, or the links at the bottom such as the privacy, forgot your pw, terms, etc. all get http links when looking at the source code in chrome inspector.

It seems like they should be relative links that would automatically either be http or https depending on what the site's schema is?

The reason I noticed this was because I added LLC to my Organizr to load in an iframe, and when doing so, clicking any http link on the page does nothing at all, and shows a "mixed content error" in the inspector. Even though I have added the:

 # Fixes Mixed Content errors
add_header 'Content-Security-Policy' 'upgrade-insecure-requests';

Seems like a lot of unnecessary "confusion" for the browser also causing unnecessary issues. Is there any way in the source code to make the links based on the domain's schema? Maybe if all of the internal http's were switched to https, then the above header also might not need to be added?

Adding docker-compose setup

I noticed that the README.md only contains documentation about who to run this project as plain docker container. I would love to see a section with an example docker-compose.yml file

empty htdocs after using docker-compose

version: "3.8"

services:

  linkstack:
    hostname: 'linkstack'
    image: 'linkstackorg/linkstack:latest'
    container_name: linkstack
    environment:
      TZ: 'Asia/Kuala_Lumpur'
      SERVER_ADMIN: 'email'
#      HTTP_SERVER_NAME: 'url'
      HTTPS_SERVER_NAME: 'url'
      LOG_LEVEL: 'info'
      PHP_MEMORY_LIMIT: '256M'
      UPLOAD_MAX_FILESIZE: '8M'
    volumes:
      - './linkstack_data:/htdocs'
    ports:
      - '8188:80'
      - '8190:443'
    restart: unless-stopped

So if I run docker-compose.yml and look at the logs

Attaching to linkstack
linkstack    | cat: can't open '/htdocs/version.json': No such file or directory
linkstack    | + ------------------------------------------------------------------ +
linkstack    | |                      LINKSTACK v                           |
linkstack    | + ------------------------------------------------------------------ +
linkstack    | | Updating Configuration: Apache Base (/etc/apache2/httpd.conf)      |
linkstack    | | Updating Configuration: Apache SSL  (/etc/apache2/conf.d/ssl.conf) |
linkstack    | | Updating Configuration: PHP         (/etc/php81/php.ini)            |
linkstack    | | Updating Configuration: Complete                                   |
linkstack    | | ------------------------------------------------------------------ |
linkstack    | | Running Apache                                                     |
linkstack    | + ------------------------------------------------------------------ +

the linkstack_data/htdocs folder is empty. Not really sure why.

Unable to add blocks

linkstack-issue.mp4

Issue

The clip above demonstrates the issue better than words. When I go to add a link, I'm stuck perpetually loading on the Add Block screen. Even if I select a block, it just keeps loading indefinitely and I'm unable to fill in any info.

Setup

  • OS: Unraid 6.11.5
  • Container Version: linkstackorg/linkstack:unraid (I think it's v4.0.0)
  • Database: mySQL, running on same Docker network.

LinkStack Container exits immediatly on start after todays update (6/23/2023)

Logs show this:

exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory

Not sure if maybe something was left out or a configuration problem.

Page links on footer pages 404 error

Hello again! This may sound covoluted so I'll try to outline what I'm doing, and what's happening.
I have activated the footer pages. When I follow them from the home page or a link page they get followed correctly and direct to /pages/privacy. for example.

When I follow the same link from the page itself (example.com/pages/privacy in the address bar) then it throws me a 404 error.

I can resolve this by setting a name for the page on the config page - ie. typing "Privacy" in the "Title of privacy link." field and clicking save.

LinkStack can't add link after booted from tipi

Hi, for some reason, the latest version (v4.1.1) keeps showing the login screen whenever I click on the add link button. And if I tries to login, I will get a 419 respond. And if I just ignores it and add the link anyway, the system will just assumes I added an empty link. Both before and after exporting and editing the link Json file to add the email address into the system will result in the whole system just crash to the debug page whenever you click on the link page stating the system is trying to access something that don't have a "name". I have created a demo instance on my server https://linkstack.ngqm6vz98oeh.icu with email [email protected] and password demo1234. Pardon the domain, it is just a burner for the time being.

Missing DB migration in entrypoint

After update, I have an error (500) and it seem to be a missing column auth_as.
Running with an external mariadb.

I think a php artisan migrate is missing in docker-entrypoint.sh ?

Edit: it seem to be a bad migration from this commit LinkStackOrg/LinkStack@3f62c84
The new column isn't add because migration is already execute.

htdocs is empty

Hello there,

I am trying to deploy llc on my synology NAS. I have mounted the folder /htdocs to an external folder (/Docker/llc). When I run the container, the folder /Docker/llc is empty.

Do I have to do something to copy all llc files to my external target folder ?

Thank you !

Can't create links.

Platform: Ubuntu 22.04 LTS
Server type: NGINX/Apache2
PHP version: 8.1

After a fresh install, I am seeing this error: I can't create Links.
image

The platform is trying to load a HTTP on a HTTPS site.

Unable to manually run a backup

Error code:
Fatal error: Maximum execution time of 30+2 seconds exceeded (terminated) in /htdocs/vendor/spatie/laravel-backup/src/Tasks/Backup/Zip.php on line 90

I've tried a few times with the same result - currently running Installed beta version= v3.3.0 via Docker julianprieber/littlelink-custom:latest

To what I've noticed when running through Nginx Proxy Manager and going through an https I get that error. However when going directly to the IP and port I am able to get a success message, but it does not actual succeed. The logs even show the same Fatal Error as before.

Unable to create links.

Fresh install tonight. Just has an infinite loading circle.
image
92.168.3.1 - - [11/Jan/2023:06:38:50 +0000] "GET /studio/js/jquery-block-ui.js HTTP/1.1" 304 - "http://172.20.69.53/studio/add-link" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.76"
192.168.3.1 - - [11/Jan/2023:06:38:50 +0000] "GET /studio/external-dependencies/fonts/bootstrap-icons.woff2?524846017b983fc8ded9325d94ed40f3 HTTP/1.1" 304 -
192.168.3.1 - - [11/Jan/2023:06:38:50 +0000] "GET /studio/external-dependencies/fonts/bootstrap-icons.woff2?524846017b983fc8ded9325d94ed40f3 HTTP/1.1" 304 -
192.168.3.1 - - [11/Jan/2023:06:38:50 +0000] "GET /studio/external-dependencies/fonts/bootstrap-icons.woff2?524846017b983fc8ded9325d94ed40f3 HTTP/1.1" 304 -
192.168.3.1 - - [11/Jan/2023:06:38:50 +0000] "GET /studio/external-dependencies/fonts/bootstrap-icons.woff2?524846017b983fc8ded9325d94ed40f3 HTTP/1.1" 304 - "http://172.20.69.53/studio/external-dependencies/bootstrap-icons.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.76"

127.0.0.1 - - [11/Jan/2023:06:39:14 +0000] "GET / HTTP/1.1" 200 17574
127.0.0.1 - - [11/Jan/2023:06:39:14 +0000] "GET / HTTP/1.1" 200 17574
127.0.0.1 - - [11/Jan/2023:06:39:14 +0000] "GET / HTTP/1.1" 200 17574
127.0.0.1 - - [11/Jan/2023:06:39:14 +0000] "GET / HTTP/1.1" 200 17574 "-" "Wget"
[Wed Jan 11 06:39:42.599861 2023] [reqtimeout:info] [pid 317] [client 192.168.3.1:60636] AH01382: Request header read timeout
192.168.3.1 - - [11/Jan/2023:06:39:42 +0000] "-" 408 -
192.168.3.1 - - [11/Jan/2023:06:39:42 +0000] "-" 408 -
192.168.3.1 - - [11/Jan/2023:06:39:42 +0000] "-" 408 -
192.168.3.1 - - [11/Jan/2023:06:39:42 +0000] "-" 408 - "-" "-"
127.0.0.1 - - [11/Jan/2023:06:39:44 +0000] "GET / HTTP/1.1" 200 17574
127.0.0.1 - - [11/Jan/2023:06:39:44 +0000] "GET / HTTP/1.1" 200 17574
127.0.0.1 - - [11/Jan/2023:06:39:44 +0000] "GET / HTTP/1.1" 200 17574
127.0.0.1 - - [11/Jan/2023:06:39:44 +0000] "GET / HTTP/1.1" 200 17574 "-" "Wget"
127.0.0.1 - - [11/Jan/2023:06:40:15 +0000] "GET / HTTP/1.1" 200 17574
127.0.0.1 - - [11/Jan/2023:06:40:15 +0000] "GET / HTTP/1.1" 200 17574
127.0.0.1 - - [11/Jan/2023:06:40:15 +0000] "GET / HTTP/1.1" 200 17574
127.0.0.1 - - [11/Jan/2023:06:40:15 +0000] "GET / HTTP/1.1" 200 17574 "-" "Wget"
[Wed Jan 11 06:40:40.543346 2023] [reqtimeout:info] [pid 31] [client 192.168.3.1:60664] AH01382: Request header read timeout
[Wed Jan 11 06:40:40.543343 2023] [reqtimeout:info] [pid 30] [client 192.168.3.1:60663] AH01382: Request header read timeout
192.168.3.1 - - [11/Jan/2023:06:40:40 +0000] "-" 408 -
192.168.3.1 - - [11/Jan/2023:06:40:40 +0000] "-" 408 -
192.168.3.1 - - [11/Jan/2023:06:40:40 +0000] "-" 408 -
192.168.3.1 - - [11/Jan/2023:06:40:40 +0000] "-" 408 -
192.168.3.1 - - [11/Jan/2023:06:40:40 +0000] "-" 408 -
192.168.3.1 - - [11/Jan/2023:06:40:40 +0000] "-" 408 -
192.168.3.1 - - [11/Jan/2023:06:40:40 +0000] "-" 408 - "-" "-"
192.168.3.1 - - [11/Jan/2023:06:40:40 +0000] "-" 408 - "-" "-"
127.0.0.1 - - [11/Jan/2023:06:40:46 +0000] "GET / HTTP/1.1" 200 17574
127.0.0.1 - - [11/Jan/2023:06:40:46 +0000] "GET / HTTP/1.1" 200 17574
127.0.0.1 - - [11/Jan/2023:06:40:46 +0000] "GET / HTTP/1.1" 200 17574
127.0.0.1 - - [11/Jan/2023:06:40:46 +0000] "GET / HTTP/1.1" 200 17574 "-" "Wget"

dont work your image

I have tried to download the Linkstack image, but it doesn't work at all. It always creates only the Apache server.

Index of /

Apache/2.4.56 (Unix) Server at alf.cl Port 8029

And the folder always comes empty. I tried with the alternative image, but it's the same.

`Version: '3.3'
services:
linkstack:
container_name: alfcl
hostname: alfcl
environment:
- HTTP_SERVER_NAME=alf.cl
- HTTPS_SERVER_NAME=alf.cl
- SERVER_ADMIN=[email protected]
- TZ=America/Santiago
- PHP_MEMORY_LIMIT=512M
- UPLOAD_MAX_FILESIZE=8M
ports:
- '8029:80'
- '8049:443'
volumes:
- ./htdoc:/htdocs

    restart: unless-stopped
    image: ghcr.io/linkstackorg/linkstack

volumes:
linkstack:`

New Force Links HTTPS not applied to all links

When I apply this variable and set my reverse proxy server to connect backend to the Littlelink-Custom setup the generated user pages do indeed have links that are HTTPS, however there are some pages that do not.

Certainly I found the login page and panel and some of the editing links are not honouring the Force Links option

For now I have split my proxy so all paths starting with @ get served by HTTP backend and everything else by HTTPS backend this seems to be working for now but obviously it would be good to apply the Force Link option throughout.

Links are all taking me to a 500 error

I am guessing something is not setup correctly.

But when I click on a link it takes me to url.com/going/10?facebookurl

But I get a 500 Server Error

or more specifically in the logs...

HTTP/1.1" 500 6615

Healthcheck spam

I noticed in the logs there's what I call "healthcheck spam" that makes it hard to glean important stuff when needed. I get around this in my containers like this (it still does the healthcheck, but doesn't spam the log):

image

in the dockerfile I put:

# Container healthcheck
HEALTHCHECK CMD curl -ILfSs http://localhost:80 -A "HealthCheck: J. Scott Elblein/1.0" || exit 1

# Forward Apache access and error logs to Docker's log collector
RUN ln -sf /dev/stdout /var/log/apache2/access.log \
    && ln -sf /dev/stderr /var/log/apache2/error.log

and then in apache's 00-default config, I add near the bottom:

    <IfModule setenvif_module>
        # If UA matched healthcheck, set 'nolog' env var, which we exclude from the log(s) in the logformat section below.
        BrowserMatchNoCase ^healthcheck nolog
    </IfModule>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values: debug, info, notice, warn, error, crit, alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined env=!nolog

The -A sets the UserAgent (can be whatever ya want; I used 'healthcheck') and then the browsermatchnocase searches for "healthcheck", and if found, just doesn't add it to the log.

I create that 00-default locally and then copy it via the dockerfile:

COPY copy-files/configs/apache/000-default /etc/apache2/sites-available/default

Also, I see the 'harmless but annoying ;)' log message:

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.0.5.5. Set the 'ServerName' directive globally to suppress this message

For that, I create a file named fqdn with this in it: ServerName localhost, and copy it via docker file:

# Shut the 'fully qualified yada yada yada' Apache warning notice up
COPY copy-files/configs/fqdn /etc/apache2/conf.d

I'm a bit OCD about making my logs as easy to find what I need fast, lol. Not sure whether that's important to you but thought I'd help out if you were interested.

data persistence is missing in docs

Hi.
I was wondering how to mount a directory such that all relevant data is persisted outside of the container itself. The docker commands in the readme don't do that.
Would be great if you could add that information. Otherwise, all data would be lost if the container is removed.
Thanks!

Cloudflare tunnel Headers?

I'm not sure how to properly configure my Cloudflare tunnel, its what I use to reverse proxy instead of nginx.
My headers are clearly not configured correctly as all I get is a white page with all the stuff not looking correctly at all..
Any ideas?

Traefik documentation

It would be awesome to have more documentation about different reverse proxy, I'd love to see some related to a traefik configuration as a reverse proxy

Error 500

Using the docker-compose.yml based deployment with minimal manual changes to the example config from the README doesnt work, starting the docker leads to a an Error 500.

version: "3.8"

services:

  littlelink-custom:
    hostname: 'littlelink-custom'
    image: 'julianprieber/littlelink-custom:latest'
    environment:
      TZ: 'Europe/Berlin'
      SERVER_ADMIN: '[email protected]'
      HTTP_SERVER_NAME: 'link.vrtlr.de'
      LOG_LEVEL: 'info'
      PHP_MEMORY_LIMIT: '256M'
      UPLOAD_MAX_FILESIZE: '8M'
    volumes:
      - '/opt/docker/littlelink-custom/config/.env:/htdocs/.env:rw'
      - '/opt/docker/littlelink-custom/config/advanced-config.php:/htdocs/config/advanced-config.php:rw'
      - '/opt/docker/littlelink-custom/config/img:/htdocs/img:rw'
    ports:
      - '8388:80'
    restart: unless-stopped

I am running a haproxy ssl frontend, so i dont need port 443. the haproxy config is correct, i am running a dozen other docker based services with the same proxy. i assume its some sort of php misconfiguration, but since there is no error logging, regardless of the log_level i cannot say for sure.

Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster

Docker version 23.0.2, build 569dd73
Docker Compose version v2.17.2

LLC resource hungry?

Using the latest container, while even just idling, LLC uses a disproportionate amount of memory and CPU (compare it with the other running apps' usages, and this is technically just a relatively "dead listing" of links)?

image

For example, it uses as much as Nextcloud and Sonarr's memory combined

Note: screenshot was taken while LLC had been idling for hours.

pinned docker tag

Something I noticed while working on our setup:

We already had an instance that was fully set up properly, but as the docker image seems to have been updated, the app started the "first launch setup" where you have to set up all users. Tbh, this spooked me a bit as I don't want this to happen in the future.

This seems to have been introduced in a recent update, but as currently only the :latest tag is available, I was wondering if it was possible to release under versions instead of :latest.

Add Links | Infinit loading

Platform: Unraid Version: 6.11.5
Server type: Docker Image - julianprieber/littlelink-custom:latest | Apache/2.4.55 (Unix)
PHP version: 8.1

On Opera GX, add Links doesn't work and just keep on loading infinitly, while when I go on regular Chrome It work without any problem.
image

Switching to Mysql/MariaDB causes container to not even start

Using the latest container: julianprieber/littlelink-custom:latest

When I add this to my Docker compose environment values:

      DB_CONNECTION: 'mysql'
      DB_HOST: 'mariadb'
      DB_PORT: '3306'
      DB_DATABASE: 'littlelink'
      DB_USERNAME: 'littlelink'
      DB_PASSWORD: 'redacted'

The container crashes on startup (never actually gets running), and shows these errors:

Docker: Stopped for a few seconds with exit code 137

Container: wget: server returned error: HTTP/1.1 500 Internal Server Error

I have my mariadb container in the same dicker network as the littlelink container, and can ping it from the LL container's command line.

I don't know if I'm doing this part right, but I was trying to test the connection from the LL c-line directly using:

jdbc:mariadb:User=littlelink;Password=redacted;Database=littlelink;Server=mariadb;Port=3306;

gives me a 'User Not Found' error. I've confirmed the user does in fact exist and has priviledges for that db.

Did I screw something up?

cannot load [...] due to access control checks

Hi,

I just installed the latest docker image in my homelab which was working like a charm. Awesome tool.

When I installed it on my real world vps behind cloudflare I discovered that adding links is not working anymore. Because of CORS, I guess.

The message in my browser says
XMLHttpRequest cannot load http://mydomain/studio/linkparamform_part/1/0 due to access control checks.
while the server says
"GET /studio/js/bootstrap.min.js.map HTTP/1.1" 404 6609 "https://mydomain/studio/add-link" "client-identifier" 1410 6821

What can I do to add links again?

Unable to use LittleLink-Custom : ErrorException

Hi , I just do a fresh install , and when I try to log in, it throws me into an error :

ErrorException
Undefined variable $EventServerExists (View: /htdocs/resources/views/layouts/sidebar.blade.php)
http://example.com:8086/panel/index

lluminate\Foundation\Bootstrap\HandleExceptions::handleError
resources/views/layouts/sidebar.blade.php:333

` <! –– #### begin event detection #### ––>

	<?php

		try {

			function URL_event_exists(string $urlsb): bool

			{

			return str_contains(get_headers($urlsb)[0], "200 OK");

				}

					if (URL_event_exists("https://julianprieber.github.io/littlelink-custom-events/event.json")){

						$EventServerExists = "true";

					}

						} catch (exception $e) {

							$EventServerExists = "false";

						}

					?>

@if(env('NOTIFY_EVENTS') === true and $EventServerExists == 'true')

    <?php

    $GetEventJson = file_get_contents("https://julianprieber.github.io/littlelink-custom-events/event.json");

	$EventJson = json_decode($GetEventJson, true);

	if(isset($_COOKIE['HideEvent']) == NULL) {

		setcookie("HideEvent",$_COOKIE['ID'] = "0", time()+60*60*24*5, "/");

		    header('Location: ' . url('/panel/index'));

				exit();

				}

	?>

	@if(auth()->user()->role == 'admin' and strtotime(date("d-m-Y")) < strtotime($EventJson['enddate']))

		@if(isset($_COOKIE['HideEvent']) and $_COOKIE['HideEvent'] != $EventJson['id'])

    <nav class="navbar navbar-expand-lg navbar-light bg-light">

        <div class="container-fluid">`

mounting docker volume prevents htdocs folder from being filled, i think i know why

Platform: Ubuntu 22.04 LTS
Server type: Docker

When installing a docker container for littlelink-custom, the container will only run if there is no mounted volume. If there is a mounted volume, the files in the attached folder are not created even if they do not already exist.

Steps taken:

  1. create container with no volume to test (functions)
  2. create container with just files mounted that i wanted to change later, ie. img and theme folder etc. (fails)
  3. create container with entire htdocs mounted (failed)

here is where i began to investigate deeper. after creating unmounted and mounted systems, i exec'd into them both and saw that htdocs was populated in the functional unmounted system, but not in the mounted one. attempting to copy files from the unmounted system to the mounted one resulted in an 'unable to edit, permissions' error on the database and log files.

conclusion?: i think there is an issue with the permissions on the creation step, but the docker compose file i am using has virtually identical configurations for other mounted volumes in several other containers, leading me to thing there is something wrong with the docker container image stored in docker hub.

notes: i did check the permissions for the local folder, its 1000:1000 and has rwx for owner,group and r-x for others, just like my other container mounted folders. i have also looked at other containers and this container from the inside and found that other containers bring in files and reattribute their ownership to something else. for example: plex pulls in my /tv folder, listed as 1000:1000 in my system and transfers ownership to 'abc:abc.' littlelinks pulls them in as 1000:1000 but all other files in the htdocs folder are 'apache:apache.'

i dont know enough to know why this is a problem, but i am pretty sure its got something to do with how docker created/imported the files inside the container and attributed permissions to them.

im happy to answer questions about what i did further if that helps.

Advanced config changes don't persist

Using the latest version of LLC, I've noticed a few times now that changes I make to the Advanced config don't get saved between container restarts. Is there some file I need to mount so it persists?

Weird https page

Hi,

I use Linkstack since 1 day and I have an issue with https.

Platform: Debian 11, Linkstack on Docker

image
Screenshot 2023-05-18 at 12-34-39 MMlink

http://" which tries to force the links to be HTTP even if the site is sent in HTTPS

Thank you :)

Linkstack login page issue

Hello! I have a very strange problem. When I open the login page - for example test.com/login instead of prompting me to enter my details it takes me to the home page - test.com If I open an incognito window and enter the URL test.com/login (the URL is an example, not the actual one) it opens a login page without any problems. What could be the problem as I have it with every single browser? Is it something from the app or the browsers and how could it be solved? Thanks in advance for your time. And I apologize if I didn't explain it very well.

Setup page redirect loop

After removing/disabling any mounts/volumes (because they cause the container to crash), I'm able to get to the LittleLink Custom setup page, but I'm unable to complete it because it eventually sends me back to the beginning.

Video demo:

littlelink-custom-redirect-bug.mov

I have HTTP_SERVER_NAME and HTTPS_SERVER_NAME both set to the same URL: links.nezteb.net (I've since taken the service down since I couldn't get it working)

As you can see in the video, the browser gives an HTTPS warning, which is probably related to a separate issue. I'm deploying to Fly.io, which terminates TLS/SSL at their proxy and sends the request to the container so I would have thought that not to be an issue, but at this point I don't know. Maybe an issue with a X-Forwarded-Proto header?

This loop could be related to the mount issue or the HTTPS issue; I'm unsure which.

htdocs volume not working in the official Docker container.

Platform: Docker
Server type: Docker container
PHP version: whatever's in the container

i'm having trouble getting the htdocs volume to work correctly in the container. is there any useful information that I could have in regards to this. it works fine if I don't mount a volume to htdocs .

Image resets to default settings

I've noticed that users instances reset to the default settings.

One explanation for this problem would be some system like Watchtower. However, this does not appear the case, as this happens to users without any form of automatic updates.

I'm not sure how to approach this or what could be causing this.

If anyone can find a way to reliably reproduce this issue, please let me know.

Custom Font Awesome symbol missing and Styling Issue

In previous versions you could add a Font Awesome icon to custom links and stylize the button.

Now it just shows the Text and Link

Screen Shot 2023-03-05 at 11 23 06 AM

Also the Styling is rendering out as Serif fonts on mobile devices. See in the screenshot how all the fonts do not match
Untitled-1

Header issue with Cloudflared

Hi,

Thank you for your work on this project and for making it accessible through Docker. I have setup the container as per the instructions provided and able to access it through a subdomain using 'Cloudflared'. Since I am using a network connection that does not allow port-forwarding, I am in need to using a service like Cloudflare Tunnels. However, during the initial loading, I am facing the Invalid header configuration issue as mentioned in the repo here.

Can you please assist me with setting up this in a correct way using Cloudflare Tunnels?

Update failed

I cannot apply the most recent update. It says that the backup is created and exits with status 500 when calling /update?finishing. I tried with and without proxy.
After the error 500 maintenance mode is enabled. I found out I had to remove /htdocs/storage/MAINTENANCE to bail out of maintenance mode.

Are there any logs that may help?

Docker Container Once Stopped will not Run again!!!

Having broken my littlelink container trying to get it to upgrade I started again again from scratch with a new container, pull and new volume ... determined to make this work!!

Latest pull using v3.0.3 image sha256:6ce23bffd4cd5b17dcdfb09cdc7943ff4c75637da2c882f0671ac0cada82c111

I found the same issue that I saw before with the following messages appearing after a docker instance is stopped and restarted.

Updating Configuration: Apache Base (/etc/apache2/httpd.conf)
Updating Configuration: Apache SSL  (/etc/apache2/conf.d/ssl.conf)
Updating Configuration: PHP         (/etc/php8/php.ini)
Updating Configuration: Complete
Running Apache
AH00526: Syntax error on line 337 of /etc/apache2/httpd.conf:
Invalid command 'io', perhaps misspelled or defined by a module not included in the server configuration

Before restarting I extracted the HTTPD.CONF as I was expecting the problem and it looked like this at the offending location

    BrowserMatchNoCase ^healthcheck nolog
    CustomLog "logs/access.log" combinedio env=!nolog
</IfModule>

I then dumped the container as it was not running/runable and I had no persistent storage for /etc/apache2 setup to extract the httpd.conf file

    BrowserMatchNoCase ^healthcheck nolog
    BrowserMatchNoCase ^healthcheck nolog
    CustomLog "logs/access.log" combinedio env=!nolog
io env=!nolog
</IfModule>

I also ran a diff and these were the only differences!! (All empty lines stripped out from the above extracts)

Note that if I try to restart the httpd.conf is modified again and this time

    BrowserMatchNoCase ^healthcheck nolog
    BrowserMatchNoCase ^healthcheck nolog
    BrowserMatchNoCase ^healthcheck nolog
    CustomLog "logs/access.log" combinedio env=!nolog
io env=!nolog
io env=!nolog

</IfModule>

How to setup with a reverse proxy?

I'm trying to use this docker-compose to deploy the docker image:

version: "3.8"

services:
  littlelink-custom:
    image: julianprieber/littlelink-custom
    networks:
      - caddy
    labels:
      caddy: littlelink.semudando.com.br
      caddy.reverse_proxy: "{{upstreams 80}}"

networks:
  caddy:
    external: true

However, it's not working. I think littlelink is trying to do HTTP stuff even when it should do HTTPS stuff.

The website looks like this:

image

It won't load because mixing http and https is not allowed:

image


How can I handle SSL termination outside little-link?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.