NGINX
If you notice any mistakes that need to be corrected, please reach out on Discord!

NGINX Subdomain example

1
server {
2
listen 443 ssl;
3
listen [::]:443 ssl;
4
5
# Make sure you create a CNAME with your domain registrar
6
server_name petio.*;
7
8
include /config/nginx/ssl.conf;
9
10
client_max_body_size 0;
11
12
location / {
13
14
# Delete the line below if you aren't using LSIO's SWAG container
15
# or if you don't have a file called "proxy.conf"
16
include /config/nginx/proxy.conf;
17
18
# Delete the line below if you aren't using Docker DNS
19
resolver 127.0.0.11 valid=30s;
20
21
# Change the word petio below to the IP
22
# of where Petio is installed if you aren't using Docker DNS
23
set $upstream_app petio;
24
25
# You can leave the next 3 lines as is,
26
# unless you are using a different port
27
# or you are somehow using HTTPS internally
28
set $upstream_port 7777;
29
set $upstream_proto http;
30
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
31
}
32
33
# This is optional and only if you want to protect your `/admin` endpoint
34
# with some sort of auth in front of it.
35
# No auth example is being provided
36
37
location /admin/ {
38
39
# Delete the line below if you aren't using LSIO's SWAG container
40
# or if you don't have a file called "proxy.conf"
41
include /config/nginx/proxy.conf;
42
43
# Delete the line below if you aren't using Docker DNS
44
resolver 127.0.0.11 valid=30s;
45
46
# Change the line below to the IP
47
# of where Petio is installed if you aren't using Docker DNS
48
set $upstream_app petio;
49
50
# You can leave the next 3 lines as is,
51
# unless you are using a different port
52
# or you are somehow using HTTPS internally
53
set $upstream_port 7777;
54
set $upstream_proto http;
55
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
56
}
57
}
Copied!

NGINX Subdirectory Example

Make sure you've set a base path.
1
location ^~ /petio {
2
3
# Delete the line below if you aren't using LSIO's SWAG container
4
# or if you don't have a file called "proxy.conf"
5
include /config/nginx/proxy.conf;
6
7
# Change the word petio below to the IP
8
# of where Petio is installed if you aren't using Docker DNS
9
set $upstream_app petio;
10
11
# You can leave the next 3 lines as is,
12
# unless you are using a different port
13
# or you are somehow using HTTPS internally
14
set $upstream_port 7777;
15
set $upstream_proto http;
16
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
17
}
Copied!

NGINX Proxy Manager

Expose web services on your network · Free SSL with Let's Encrypt · Designed with security in mind · Perfect for home networks
  • Install the latest version of NGINX Proxy Manager.
  • Click on "Proxy Hosts" on the dashboard.
  • Click on "Add Proxy Host".

Details Tab

  • Domain names: add your domain. For example: example.duckdns.org.
  • Scheme: keep at http.
  • Forward hostname/IP: add your host IP. For example: 192.168.X.X or localhost.
  • Forward port: add the port for petio i.e.7777.
  • Access list: set to Publicly Accessible.

SSL Tab

  • SSL Certificate: Select "Request a new SSL Certificate".
  • Enable "Force SSL"
  • Email address for Let's Encrypt: type in the email you want to use for registration on Let's encrypt.
  • Click on the "I Agree to the Let's Encrypt Terms of Service" box.
  • Hit save and your all done.
Now you should be able to access Petio from your domain name.
Last modified 7mo ago