this post was submitted on 24 Nov 2023
1 points (100.0% liked)

Self-Hosted Main

511 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS
 

I hope I can explain this properly but I have a domain name that I would like to use to access my dockers hosted on my unraid server but I do not want to open it out to the internet.

Currently I'd be connecting to tailscale and logging in via http://:

But the port numbers are kinda hard to remember and I have a domain name so I was wondering if it's possible to connect via: https://radar.mydomainname.com but only locally via tailscale?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 11 months ago

Here's how I do it, it's the simplest way I've found.

Make a directory for your certificates like /etc/nginx/certs Use "tailscale certs YourDomainName.ts.net" Put the certificate in the certificate directory. The nginx config:

server { listen 80; server_name YourDomainName.ts.net;

location / { return 301 https://$host$request_uri; } }

server { listen 443 ssl http2; server_name YourDomainName.ts.net;

ssl_certificate /etc/nginx/certs/YourDomainName.ts.net.crt;
ssl_certificate_key /etc/nginx/certs/YourDomainName.ts.netkey;

location / { proxy_pass http://127.0.0.1:8080; //Change it for the port you want to forward proxy_http_version 1.1; proxy_buffering off; proxy_set_header Host $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; } }