mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-01 13:17:21 +02:00
Updated Move to Zoraxy from Nginx Proxy Manager (markdown)
parent
a9f86988d6
commit
e801f0c0f4
@ -1,33 +1,41 @@
|
||||
Most people who selfhost different services use the Nginx Proxy Manager (NPM) for easy managing their services with or without Docker. I would like to show you how to move over to Zoraxy.
|
||||
Most people who selfhost different services use the Nginx Proxy Manager (NPM) for easy managing their services with or without Docker. I would like to show you how to move over to Zoraxy in this basic guide.
|
||||
|
||||
1. First make a list of your existing proxyhosts in NPM because you need to create them new in Zoraxy!
|
||||
If you use Zoraxy in docker, you can use it like Nginx proxy manager. Create a proxy rule in Zoraxy and use the container name (or service name) and the port inside the container.
|
||||
|
||||
For example Immich:
|
||||
|
||||
`immich_server` is the container name and the port inside the container is `3001`. In Zoraxy you create a proxy rule with
|
||||
|
||||
`immich_server:3001`
|
||||
|
||||
|
||||
That´s it!
|
||||
|
||||
|
||||
If you use Zoraxy directly on your host, you need static IPs for docker containers, since the IPs change if you use `docker compose down` and `docker compose up -d`
|
||||
|
||||
1. First make a list of your existing proxyhosts in NPM because you need to start over in Zoraxy!
|
||||
|
||||
2. If you use portmappings for your containers like 8080:80, you can easily use the same in Zoraxy.
|
||||
|
||||
You only need to point your proxyhost to localhost:8080, exactly the same like in NPM. That´s it!
|
||||
You only need to point to localhost:8080, exactly the same like in NPM. That´s it!
|
||||
|
||||
Create a separate docker network with this:
|
||||
|
||||
3. If you have a separate docker network and use hostnames within NPM (for example paperless:80), you can not use them in Zoraxy, since Zoraxy is not part of the docker network. You can use one of the docker images linked in the readme to use Zoraxy in a container and use them anyway.
|
||||
`docker network create --ipv6 --subnet fd00:112::/64 --subnet 172.40.0.0/16 staticnet` With IPV6 if wanted or
|
||||
|
||||
If you installed Zoraxy the provided way on your host, you can still use your existing docker network. The only thing to do is to use portmappings or give each docker service a static IP. This is needed since the IP of the container changes every time you do docker compose down and docker compose up -d
|
||||
`docker network create --subnet 172.40.0.0/16 staticnet` without IPV6
|
||||
|
||||
|
||||
So you want to create a seperate docker network then you can use this:
|
||||
|
||||
`docker network create --subnet=172.40.0.0/16 staticnet`
|
||||
|
||||
If it is successfull it will give you a long output like "2cabe0428cb514e3e3d8e49d358df0930f519b8a80a39886dd8c8cae4fd6cfa1", if it fails with "Error response from daemon: Pool overlaps with other one on this address space", then increase the number 40 to 41, 42 etc.. in the subnet parameter. Now we have a new network named "staticnet".
|
||||
If it is successful it will give you a long output like "2cabe0428cb514e3e3d8e49d358df0930f519b8a80a39886dd8c8cae4fd6cfa1", if it fails with "Error response from daemon: Pool overlaps with other one on this address space", then increase the number 40 to 41, 42 etc.. in the subnet parameter (172.41.0.0/16). Now we have a new network named "staticnet".
|
||||
|
||||
The next step is to integrate this network in the docker-compose.yml
|
||||
|
||||
`nano docker-compose.yml`
|
||||
|
||||
Take a look at this example:
|
||||
```
|
||||
version: '3'
|
||||
services:
|
||||
app:
|
||||
image: app-image:latest
|
||||
image: myapp:latest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:80"
|
||||
@ -63,13 +71,14 @@ An example file would now look like this:
|
||||
version: '3'
|
||||
services:
|
||||
app:
|
||||
image: app-image:latest
|
||||
image: myapp:latest
|
||||
restart: unless-stopped
|
||||
# ports:
|
||||
# - "8080:80"
|
||||
networks:
|
||||
staticnet:
|
||||
ipv4_address: 172.40.0.2
|
||||
# ipv6_address: fd00:112::2 #comment out for IPV6
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
volumes:
|
||||
@ -97,12 +106,12 @@ networks:
|
||||
external: true
|
||||
```
|
||||
|
||||
The last 3 lines tell docker compose to use our already created network.
|
||||
The last 3 lines tell docker to use our already created network.
|
||||
|
||||
With this easy change you can now point Zoraxy to CONTAINER_IP:PORT, in this example it would be 172.40.0.2:80. This is the only thing to do for the most services. Some services need a few more steps, like Synapse (Matrix). Take a look here [Troubleshoot](https://github.com/tobychui/zoraxy/wiki/Troubleshooting----Workarounds) for this.
|
||||
|
||||
Further information about docker networking can be found here: [Docker Network](https://docs.docker.com/engine/tutorials/networkingcontainers/)
|
||||
|
||||
I have tested these services with this method and it worked without any further configuration:
|
||||
I have tested these services with this method, and it worked without any further configuration:
|
||||
|
||||
Kavita, Jellyfin, Immich, Paperless-ngx, Adguard, Dashdot, SearxNG, Nextcloud, Gotify, WikiJS, Vaultwarden and Stirling PDF
|
Loading…
x
Reference in New Issue
Block a user