Comments (16)
Hey,
I will look at this, do you already have an idea ?
from linkstack-docker.
Sure you can
i tried it again with the following config
- "traefik.enable=true"
- "traefik.http.routers.llc-rtr.rule=Host(domain.de
)"
- "traefik.http.routers.llc-rtr.entrypoints=https"
- "traefik.http.routers.llc-rtr.tls=true"
- "traefik.http.routers.llc-rtr.tls.certresolver=le"
- "traefik.http.routers.llc-rtr.middlewares=default@file,passtls@file"
- "traefik.docker.network=traefik_web"
from linkstack-docker.
labels:
- "traefik.enable=true"
- "traefik.http.routers.yrtree-rtr-ui.rule=Host(`domain.de`)"
- "traefik.http.routers.yrtree-rtr-ui.entrypoints=https"
- "traefik.http.routers.yrtree-rtr-ui.tls=true"
- "traefik.http.routers.yrtree-rtr-ui.tls.certresolver=le"
- "traefik.http.routers.yrtree-rtr-ui.middlewares=yrtree-ui-header,default@file"
- "traefik.http.middlewares.yrtree-ui-header.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.middlewares.yrtree-ui-header.headers.customResponseHeaders.X-Robots-Tag=none"
- "traefik.http.middlewares.yrtree-ui-header.headers.customResponseHeaders.Strict-Transport-Security=max-age=63072000"
- "traefik.http.middlewares.yrtree-ui-header.headers.stsSeconds=31536000"
- "traefik.http.middlewares.yrtree-ui-header.headers.accesscontrolalloworiginlist=*"
- "traefik.docker.network=traefik_web"
and change in the .env file FORCE_HTTP -> from false to True
#=FORCE_HTTPS either true or false. Used to redirect any request to HTTPS.
#=Note that this will only affect port 443 if you are using the docker image.
FORCE_HTTPS=false
i guess this helps you
and we can close this and we will add this to the docs if it works
from linkstack-docker.
Not really,
I was trying to deploy the littlelink-custom image on my home server using traefik but it didn't work properly and I couldn't find much information about what I thought about this issue.
I'll tell you what I tried and how it didn't work, hope it works for you somehow...
Considering my traefik configuration as follow:
version: "3"
services:
traefik:
image: traefik:v3.0
container_name: traefik
restart: unless-stopped
command:
# Tell Traefik to discover containers using the Docker API
- --providers.docker=true
# Enable the Trafik dashboard
- --api.dashboard=true
# Set up LetsEncrypt
- --certificatesresolvers.letsencrypt.acme.dnschallenge=true
- --certificatesresolvers.letsencrypt.acme.dnschallenge.provider=cloudflare
- [email protected]
- --certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json
# Set up an insecure listener that redirects all traffic to TLS
- --entrypoints.web.address=:80
- --entrypoints.web.http.redirections.entrypoint.to=websecure
- --entrypoints.web.http.redirections.entrypoint.scheme=https
- --entrypoints.websecure.address=:443
# Set up the TLS configuration for our websecure listener
- --entrypoints.websecure.http.tls=true
- --entrypoints.websecure.http.tls.certResolver=letsencrypt
- --entrypoints.websecure.http.tls.domains[0].main=custom.domain
- --entrypoints.websecure.http.tls.domains[0].sans=*.custom.domain
environment:
- [email protected]
- CLOUDFLARE_DNS_API_TOKEN=thisisareallylongtokenitookfromcloudflareapi
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- certs:/letsencrypt
labels:
- "traefik.enable=true"
- 'traefik.http.routers.traefik.rule=Host(`traefik.custom.domain`)'
- "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.traefik.tls.certresolver=letsencrypt"
- "traefik.http.routers.traefik.service=api@internal"
- 'traefik.http.routers.traefik.middlewares=strip'
- 'traefik.http.middlewares.strip.stripprefix.prefixes=/traefik'
volumes:
certs:
Then, it worked well with the dashboard of traefik and a WordPress instance I had. But when I tried following the same labels with littlelink-custom it didn't work properly. The following labels were the ones I used:
labels:
- traefik.enable=true
- traefik.http.routers.littlelink_custom.entrypoints=websecure
- traefik.http.routers.littlelink_custom.rule=Host(`link.custom.domain`)
- traefik.http.routers.littlelink_custom.tls.certresolver=letsencrypt
With the labels above it worked somehow, but poorly, with no security and a lot of problems I guess related to the configuration of the HTTP/HTTPS or the ports 80/443. Not sure.
So I tried changing the port to 443
labels:
- traefik.enable=true
- traefik.http.routers.littlelink_custom.entrypoints=websecure
- traefik.http.routers.littlelink_custom.rule=Host(`link.custom.domain`)
- traefik.http.routers.littlelink_custom.tls.certresolver=letsencrypt
- traefik.http.services.my-service.loadbalancer.server.port=443
But it didn't work at all, it was worst so I'm not sure why this is happening, but it only happens with this image particularly.
from linkstack-docker.
what error message do you get when you get it with port 443 or 80 ?
have you ever tried with a TCP route ?
from linkstack-docker.
Sorry my late response. When I use "traefik.http.services.my-service.loadbalancer.server.port=443" i got a "404 page not found" and when I don't define the port or use the port 80 it works, it shows me the service but when I choose the database I want I got an error of "You are about to send unsecured information. An unsecured connection is being used to submit this form, so other users will be able to see your information." So it's an issue related to littlelink-custom and traefik are not configured properly to work together with security.
from linkstack-docker.
maybe try this to add to your config
- "traefik.http.services.littlelink_custom.loadbalancer.server.port=443"
- "traefik.http.services.littlelink_custom.loadbalancer.server.scheme=https"
from linkstack-docker.
When doing that I got in my browser the following:
"Internal Server Error"
I wanted to ask you, I could make it work properly using nginx proxy manager, would it be useful to show you that configuration? to see if we could translate it to traefik?
from linkstack-docker.
Was anyone able to get traefik working?
from linkstack-docker.
I added this labels:
labels:
traefik.enable: "true"
traefik.docker.network: "traefik"
traefik.http.routers.llc.entrypoints: "https"
traefik.http.routers.llc.rule: "Host(`my.domain.com`)"
traefik.http.routers.llc.tls: "true"
traefik.http.services.llc.loadbalancer.server.port: "80"
Nearly everything is working, except the @-links often doesn't work (eg. https://my.domain.com/@alex) and it will only show the homepage :/
Yesterday it magically worked for some hours, but now its not working again
from linkstack-docker.
Nearly everything is working, except the @-links often doesn't work (eg. my.domain.com/@alex) and it will only show the homepage :/
It's working when I set the option "Set user page as Home Page" in config editor back to "default" o.o
I now used the option "disable_home_page" in the advanced editor and this works fine. So for me it's possibly a bug in LL itself
from linkstack-docker.
If this is finished and working, please contribute it to the docs (Maybe I will create a Docker section or something like that)
from linkstack-docker.
Whooow!!! Niceee! Awesome detail lastsamurai26, in my configuration the line FORCE_HTTPS
was what I needed to make it work, now littlelink-custom works just fine with my traefik configuration.
I only needed this in the environment:
environment:
TZ: 'America/Santiago'
SERVER_ADMIN: '[email protected]'
HTTP_SERVER_NAME: 'custom.domain'
HTTPS_SERVER_NAME: 'custom.domain
FORCE_HTTPS: True
PHP_MEMORY_LIMIT: '512M'
UPLOAD_MAX_FILESIZE: '8M'
And this on the labels:
labels:
traefik.enable: true
traefik.http.routers.littlelink_custom.tls: true
traefik.http.routers.littlelink_custom.entrypoints: websecure
traefik.http.routers.littlelink_custom.rule: Host(`custom.domain`)
traefik.http.routers.littlelink_custom.tls.certresolver: letsencrypt
from linkstack-docker.
The traefik config may look different, I have as endpoint "http" and "https" and as cert resolver "le" for letsencrypt
but the labels may are the same :-)
the docker compose yml looks like this
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'
labels:
- "traefik.enable=true"
- "traefik.http.routers.yrtree-rtr-ui.rule=Host(`domain.de`)"
- "traefik.http.routers.yrtree-rtr-ui.entrypoints=https"
- "traefik.http.routers.yrtree-rtr-ui.tls=true"
- "traefik.http.routers.yrtree-rtr-ui.tls.certresolver=le"
- "traefik.http.routers.yrtree-rtr-ui.middlewares=yrtree-ui-header,default@file"
- "traefik.http.middlewares.yrtree-ui-header.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.middlewares.yrtree-ui-header.headers.customResponseHeaders.X-Robots-Tag=none"
- "traefik.http.middlewares.yrtree-ui-header.headers.customResponseHeaders.Strict-Transport-Security=max-age=63072000"
- "traefik.http.middlewares.yrtree-ui-header.headers.stsSeconds=31536000"
- "traefik.http.middlewares.yrtree-ui-header.headers.accesscontrolalloworiginlist=*"
- "traefik.docker.network=traefik_web"
restart: unless-stopped
volumes:
linkstack_data:
from linkstack-docker.
labels: - "traefik.enable=true" - "traefik.http.routers.yrtree-rtr-ui.rule=Host(`domain.de`)" - "traefik.http.routers.yrtree-rtr-ui.entrypoints=https" - "traefik.http.routers.yrtree-rtr-ui.tls=true" - "traefik.http.routers.yrtree-rtr-ui.tls.certresolver=le" - "traefik.http.routers.yrtree-rtr-ui.middlewares=yrtree-ui-header,default@file" - "traefik.http.middlewares.yrtree-ui-header.headers.customrequestheaders.X-Forwarded-Proto=https" - "traefik.http.middlewares.yrtree-ui-header.headers.customResponseHeaders.X-Robots-Tag=none" - "traefik.http.middlewares.yrtree-ui-header.headers.customResponseHeaders.Strict-Transport-Security=max-age=63072000" - "traefik.http.middlewares.yrtree-ui-header.headers.stsSeconds=31536000" - "traefik.http.middlewares.yrtree-ui-header.headers.accesscontrolalloworiginlist=*" - "traefik.docker.network=traefik_web"
and change in the .env file FORCE_HTTP -> from false to True
#=FORCE_HTTPS either true or false. Used to redirect any request to HTTPS. #=Note that this will only affect port 443 if you are using the docker image. FORCE_HTTPS=false
i guess this helps you
and we can close this and we will add this to the docs if it works
This worked for me adding a number of name changes I have no idea what yrtree means so I just changed it into the same namespace.
labels:
- "us.nixc.autodeploy=true"
- "traefik.enable=true"
- "traefik.http.routers.linkstack_linkstack.tls=true"
- "traefik.http.services.linkstack_linkstack.loadbalancer.server.port=80"
# - "traefik.http.services.linkstack_linkstack.loadbalancer.scheme=https"
- "traefik.http.routers.linkstack_linkstack.rule=Host(`nixc.us`)"
- "traefik.http.routers.linkstack_linkstack.entrypoints=websecure"
- "traefik.http.routers.linkstack_linkstack.tls.certresolver=letsencryptresolver"
- "traefik.http.routers.linkstack_linkstack.service=linkstack_linkstack"
- "traefik.docker.network=traefik"
- "traefik.http.routers.linkstack_linkstack-ui.middlewares=linkstack_linkstack-header"
- "traefik.http.middlewares.linkstack_linkstack-header.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.middlewares.linkstack_linkstack-header.headers.customResponseHeaders.X-Robots-Tag=none"
- "traefik.http.middlewares.linkstack_linkstack-header.headers.customResponseHeaders.Strict-Transport-Security=max-age=63072000"
- "traefik.http.middlewares.linkstack_linkstack-header.headers.stsSeconds=31536000"
- "traefik.http.middlewares.linkstack_linkstack-header.headers.accesscontrolalloworiginlist=*"
networks:
- traefik
from linkstack-docker.
I still get insecure warnings on firefox for the initial setup but on /login it doesn't seem to happen.
from linkstack-docker.
Related Issues (20)
- `Spatie\Backup\Events\BackupHasFailed` HOT 2
- LinkStack has problems with links as soon as 'custom locations' are specified in the NGINX reverse proxy HOT 15
- Resend Verification email loop HOT 7
- Number of Links in Userlist HOT 1
- Multiple Pages Per User [Feature Request] HOT 1
- SSL Certificates HOT 2
- Permission denied on httpd.conf on Startup HOT 5
- [Sun Jan 07 13:43:21.961240 2024] [httpd.conf] ::1 - - "GET / HTTP/1.0" 400 450 "-" "-" HOT 1
- htdocs directory not populating with persistent volume HOT 10
- cant deploy HOT 11
- Update image HOT 1
- Fonts returning 404 when trying to add a link
- Can't bind the /htdocs folder to outside of container HOT 1
- Unwanted Redirection HOT 1
- ErrorException when clicking on email: Attempt to read property "link" on null HOT 2
- Setup Linkstack to different port (no 80 or 443) HOT 1
- Error while Update HOT 1
- Unable to Edit Links HOT 5
- Cannot get WebSockets to work behind Nginx HOT 14
- Unable to add links HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linkstack-docker.