mirror of
https://github.com/remnawave/panel.git
synced 2026-04-26 17:56:25 +00:00
docs: update installation guides to use /opt/remnawave directory for project setup
This commit is contained in:
@@ -31,7 +31,7 @@ This guide is written for Debian 12, instructions may vary for other distributio
|
||||
1. Create separate directory for the project.
|
||||
|
||||
```bash
|
||||
mkdir -p ~/remnanode && cd ~/remnanode
|
||||
mkdir -p /opt/remnanode && cd /opt/remnanode
|
||||
```
|
||||
|
||||
2. Create and configure the environment variables.
|
||||
|
||||
@@ -49,7 +49,7 @@ This guide written for Ubuntu 22.04, instructions may vary for other distributio
|
||||
1. Create separate directory for the project.
|
||||
|
||||
```bash
|
||||
mkdir remnawave && cd remnawave
|
||||
mkdir /opt/remnawave && cd /opt/remnawave
|
||||
```
|
||||
|
||||
2. Download and configure the environment variables.
|
||||
|
||||
@@ -80,10 +80,10 @@ Some DNS providers have a different interface, but the process is the same.
|
||||
|
||||
### Simple configuration
|
||||
|
||||
Create a file `Caddyfile` in the `~/remnawave/caddy` folder.
|
||||
Create a file `Caddyfile` in the `/opt/remnawave/caddy` folder.
|
||||
|
||||
```bash
|
||||
mkdir -p ~/remnawave/caddy && cd ~/remnawave/caddy && nano Caddyfile
|
||||
mkdir -p /opt/remnawave/caddy && cd /opt/remnawave/caddy && nano Caddyfile
|
||||
```
|
||||
|
||||
Paste the following configuration.
|
||||
@@ -109,10 +109,10 @@ https://REPLACE_WITH_YOUR_DOMAIN {
|
||||
|
||||
### Create docker-compose.yml
|
||||
|
||||
Create a file `docker-compose.yml` in the `~/remnawave/caddy` folder.
|
||||
Create a file `docker-compose.yml` in the `/opt/remnawave/caddy` folder.
|
||||
|
||||
```bash
|
||||
cd ~/remnawave/caddy && nano docker-compose.yml
|
||||
cd /opt/remnawave/caddy && nano docker-compose.yml
|
||||
```
|
||||
|
||||
Paste the following configuration.
|
||||
@@ -133,10 +133,10 @@ services:
|
||||
- caddy-ssl-data:/data
|
||||
|
||||
networks:
|
||||
remnawave-network:
|
||||
name: remnawave-network
|
||||
driver: bridge
|
||||
external: true
|
||||
remnawave-network:
|
||||
name: remnawave-network
|
||||
driver: bridge
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
caddy-ssl-data:
|
||||
|
||||
@@ -110,7 +110,7 @@ curl https://get.acme.sh | sh -s email=EMAIL && source ~/.bashrc
|
||||
### Create a folder for the certificates
|
||||
|
||||
```bash
|
||||
mkdir -p ~/remnawave/nginx && cd ~/remnawave/nginx
|
||||
mkdir -p /opt/remnawave/nginx && cd /opt/remnawave/nginx
|
||||
```
|
||||
|
||||
### Issue a certificate
|
||||
@@ -122,7 +122,7 @@ Do not use domain zones: .ru, .su, .рф. Currently ZeroSSL does not support the
|
||||
:::
|
||||
|
||||
```bash
|
||||
acme.sh --issue --standalone -d 'DOMAIN' --key-file ~/remnawave/nginx/privkey.key --fullchain-file ~/remnawave/nginx/fullchain.pem --alpn --tlsport 8443
|
||||
acme.sh --issue --standalone -d 'DOMAIN' --key-file /opt/remnawave/nginx/privkey.key --fullchain-file /opt/remnawave/nginx/fullchain.pem --alpn --tlsport 8443
|
||||
```
|
||||
|
||||
:::info
|
||||
@@ -142,13 +142,13 @@ Acme.sh will take care of renewing the certificate automatically every 60 days,
|
||||
Also, we need to generate a dhparam.pem file.
|
||||
|
||||
```bash
|
||||
curl https://ssl-config.mozilla.org/ffdhe2048.txt > ~/remnawave/nginx/dhparam.pem
|
||||
curl https://ssl-config.mozilla.org/ffdhe2048.txt > /opt/remnawave/nginx/dhparam.pem
|
||||
```
|
||||
|
||||
Create a file `nginx.conf` in the `~/remnawave/nginx` folder.
|
||||
Create a file `nginx.conf` in the `/opt/remnawave/nginx` folder.
|
||||
|
||||
```bash
|
||||
cd ~/remnawave/nginx && nano nginx.conf
|
||||
cd /opt/remnawave/nginx && nano nginx.conf
|
||||
```
|
||||
|
||||
Paste the following configuration.
|
||||
@@ -260,10 +260,10 @@ server {
|
||||
|
||||
### Create docker-compose.yml
|
||||
|
||||
Create a file `docker-compose.yml` in the `~/remnawave/nginx` folder.
|
||||
Create a file `docker-compose.yml` in the `/opt/remnawave/nginx` folder.
|
||||
|
||||
```bash
|
||||
cd ~/remnawave/nginx && nano docker-compose.yml
|
||||
cd /opt/remnawave/nginx && nano docker-compose.yml
|
||||
```
|
||||
|
||||
Paste the following configuration.
|
||||
@@ -286,10 +286,10 @@ services:
|
||||
- remnawave-network
|
||||
|
||||
networks:
|
||||
remnawave-network:
|
||||
name: remnawave-network
|
||||
driver: bridge
|
||||
external: true
|
||||
remnawave-network:
|
||||
name: remnawave-network
|
||||
driver: bridge
|
||||
external: true
|
||||
```
|
||||
|
||||
### Start the container
|
||||
|
||||
@@ -76,48 +76,48 @@ Some DNS providers have a different interface, but the process is the same.
|
||||
|
||||
### Create docker-compose.yml
|
||||
|
||||
Create a file `docker-compose.yml` in the `~/remnawave/traefik` folder.
|
||||
Create a file `docker-compose.yml` in the `/opt/remnawave/traefik` folder.
|
||||
|
||||
```bash
|
||||
mkdir -p ~/remnawave/traefik && cd ~/remnawave/traefik && nano docker-compose.yml
|
||||
mkdir -p /opt/remnawave/traefik && cd /opt/remnawave/traefik && nano docker-compose.yml
|
||||
```
|
||||
|
||||
Paste the following configuration.
|
||||
|
||||
```yaml title="docker-compose.yml"
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:latest
|
||||
container_name: traefik
|
||||
restart: unless-stopped
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks:
|
||||
- remnawave-network
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
environment:
|
||||
- TZ=Europe/Moscow
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- ./traefik.yml:/traefik.yml:ro
|
||||
- ./letsencrypt:/letsencrypt
|
||||
- ./config:/config:ro
|
||||
- ./logs:/var/log/traefik
|
||||
traefik:
|
||||
image: traefik:latest
|
||||
container_name: traefik
|
||||
restart: unless-stopped
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks:
|
||||
- remnawave-network
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
environment:
|
||||
- TZ=Europe/Moscow
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- ./traefik.yml:/traefik.yml:ro
|
||||
- ./letsencrypt:/letsencrypt
|
||||
- ./config:/config:ro
|
||||
- ./logs:/var/log/traefik
|
||||
networks:
|
||||
remnawave-network:
|
||||
name: remnawave-network
|
||||
driver: bridge
|
||||
external: false
|
||||
remnawave-network:
|
||||
name: remnawave-network
|
||||
driver: bridge
|
||||
external: false
|
||||
```
|
||||
|
||||
### Create static configuration file
|
||||
|
||||
Creating a static configuration file `traefik.yml` in the `~/remnawave/traefik` folder.
|
||||
Creating a static configuration file `traefik.yml` in the `/opt/remnawave/traefik` folder.
|
||||
|
||||
```bash
|
||||
cd ~/remnawave/traefik && nano traefik.yml
|
||||
cd /opt/remnawave/traefik && nano traefik.yml
|
||||
```
|
||||
|
||||
Paste the following configuration.
|
||||
@@ -168,10 +168,10 @@ accessLog:
|
||||
|
||||
### Create dynamic configuration file
|
||||
|
||||
Create a file `remnawave.yml` in the `~/remnawave/traefik/config` folder.
|
||||
Create a file `remnawave.yml` in the `/opt/remnawave/traefik/config` folder.
|
||||
|
||||
```bash
|
||||
mkdir -p ~/remnawave/traefik/config && cd ~/remnawave/traefik/config && nano remnawave.yml
|
||||
mkdir -p /opt/remnawave/traefik/config && cd /opt/remnawave/traefik/config && nano remnawave.yml
|
||||
```
|
||||
|
||||
Paste the following configuration.
|
||||
@@ -235,7 +235,7 @@ Open the configured domain name in the browser and you will see login page.
|
||||
If you want to restrict access to the panel by IP, create a middleware named `ip_allow_list.yml`
|
||||
|
||||
```bash
|
||||
cd ~/remnawave/traefik/config && nano ip_allow_list.yml
|
||||
cd /opt/remnawave/traefik/config && nano ip_allow_list.yml
|
||||
```
|
||||
|
||||
Paste the following configuration.
|
||||
@@ -258,72 +258,69 @@ Cloudflare regularly updates its IP ranges. To do this, you can use the [officia
|
||||
|
||||
```yaml title="ip_allow_list.yml"
|
||||
http:
|
||||
middlewares:
|
||||
ip-allow-list:
|
||||
ipAllowList:
|
||||
sourceRange:
|
||||
// highlight-next-line-yellow
|
||||
- "REPLACE_WITH_YOUR_IP"
|
||||
ipStrategy:
|
||||
excludedIPs:
|
||||
- 73.245.48.0/20
|
||||
- 103.21.244.0/22
|
||||
- 103.22.200.0/22
|
||||
- 103.31.4.0/22
|
||||
- 141.101.64.0/18
|
||||
- 108.162.192.0/18
|
||||
- 190.93.240.0/20
|
||||
- 188.114.96.0/20
|
||||
- 197.234.240.0/22
|
||||
- 198.41.128.0/17
|
||||
- 162.158.0.0/15
|
||||
- 104.16.0.0/13
|
||||
- 104.24.0.0/14
|
||||
- 172.64.0.0/13
|
||||
- 131.0.72.0/22
|
||||
middlewares:
|
||||
ip-allow-list:
|
||||
ipAllowList:
|
||||
sourceRange: // highlight-next-line-yellow
|
||||
- "REPLACE_WITH_YOUR_IP"
|
||||
ipStrategy:
|
||||
excludedIPs:
|
||||
- 73.245.48.0/20
|
||||
- 103.21.244.0/22
|
||||
- 103.22.200.0/22
|
||||
- 103.31.4.0/22
|
||||
- 141.101.64.0/18
|
||||
- 108.162.192.0/18
|
||||
- 190.93.240.0/20
|
||||
- 188.114.96.0/20
|
||||
- 197.234.240.0/22
|
||||
- 198.41.128.0/17
|
||||
- 162.158.0.0/15
|
||||
- 104.16.0.0/13
|
||||
- 104.24.0.0/14
|
||||
- 172.64.0.0/13
|
||||
- 131.0.72.0/22
|
||||
```
|
||||
|
||||
Then you need to connect the middleware `ip-allow-list` to the configuration file `remnawave.yml`
|
||||
|
||||
```bash
|
||||
nano remnawave.yml.yml
|
||||
nano remnawave.yml
|
||||
```
|
||||
|
||||
Pay attention to the green line, they are the ones you need to add.
|
||||
|
||||
```yaml title="remnawave.yml"
|
||||
http:
|
||||
routers:
|
||||
remnawave:
|
||||
rule: "Host(`REPLACE_WITH_YOUR_DOMAIN`)"
|
||||
entrypoints:
|
||||
- http
|
||||
middlewares:
|
||||
- remnawave-https-redirect
|
||||
service: remnawave
|
||||
routers:
|
||||
remnawave:
|
||||
rule: 'Host(`REPLACE_WITH_YOUR_DOMAIN`)'
|
||||
entrypoints:
|
||||
- http
|
||||
middlewares:
|
||||
- remnawave-https-redirect
|
||||
service: remnawave
|
||||
|
||||
remnawave-secure:
|
||||
rule: "Host(`REPLACE_WITH_YOUR_DOMAIN`)"
|
||||
entrypoints:
|
||||
- https
|
||||
middlewares:
|
||||
// highlight-next-line-green
|
||||
- ip-allow-list
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
service: remnawave
|
||||
remnawave-secure:
|
||||
rule: 'Host(`REPLACE_WITH_YOUR_DOMAIN`)'
|
||||
entrypoints:
|
||||
- https
|
||||
middlewares: // highlight-next-line-green
|
||||
- ip-allow-list
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
service: remnawave
|
||||
|
||||
middlewares:
|
||||
remnawave-https-redirect:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
|
||||
services:
|
||||
remnawave:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://remnawave:3000"
|
||||
middlewares:
|
||||
remnawave-https-redirect:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
|
||||
services:
|
||||
remnawave:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://remnawave:3000'
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
@@ -34,7 +34,7 @@ Do not use TryCloudflare in production, it is only for development and testing p
|
||||
Firstly lets create a folder for our docker-compose.yml file.
|
||||
|
||||
```bash
|
||||
mkdir -p ~/remnawave/try-cloudflare && cd ~/remnawave/try-cloudflare
|
||||
mkdir -p /opt/remnawave/try-cloudflare && cd /opt/remnawave/try-cloudflare
|
||||
```
|
||||
|
||||
Create a file `docker-compose.yml` and paste the following configuration.
|
||||
|
||||
@@ -35,7 +35,7 @@ SUB_PUBLIC_DOMAIN=subdomain.panel.com
|
||||
### Step 1: Creating docker-compose.yml file
|
||||
|
||||
```bash
|
||||
mkdir -p ~/remnawave/subscription && cd ~/remnawave/subscription && nano docker-compose.yml
|
||||
mkdir -p /opt/remnawave/subscription && cd /opt/remnawave/subscription && nano docker-compose.yml
|
||||
```
|
||||
|
||||
### Step 2: Paste the following configuration
|
||||
@@ -64,7 +64,7 @@ networks:
|
||||
|
||||
:::warning
|
||||
|
||||
Please, replace `panel.com` with URL which Remnawave Dashboard is available at. Only plain domain name without any subdomains, path or port is not allowed!
|
||||
Please, replace `panel.com` with URL which Remnawave Dashboard is available at. Only plain domain name without any path or port is not allowed!
|
||||
|
||||
:::
|
||||
|
||||
@@ -89,13 +89,13 @@ If you have already configured Nginx, you need to add a new location block to yo
|
||||
Issue a certificate for the subscription page domain name:
|
||||
|
||||
```bash
|
||||
acme.sh --issue --standalone -d 'SUBSCRIPTION_PAGE_DOMAIN' --key-file ~/remnawave/nginx/subdomain_privkey.key --fullchain-file ~/remnawave/nginx/subdomain_fullchain.pem --alpn --tlsport 8443
|
||||
acme.sh --issue --standalone -d 'SUBSCRIPTION_PAGE_DOMAIN' --key-file /opt/remnawave/nginx/subdomain_privkey.key --fullchain-file /opt/remnawave/nginx/subdomain_fullchain.pem --alpn --tlsport 8443
|
||||
```
|
||||
|
||||
Open Nginx configuration file:
|
||||
|
||||
```bash
|
||||
cd ~/remnawave/nginx && nano nginx.conf
|
||||
cd /opt/remnawave/nginx && nano nginx.conf
|
||||
```
|
||||
|
||||
:::warning
|
||||
@@ -210,7 +210,7 @@ server {
|
||||
Now lets modify docker-compose.yml file to add new certificate path.
|
||||
|
||||
```bash
|
||||
cd ~/remnawave/nginx && nano docker-compose.yml
|
||||
cd /opt/remnawave/nginx && nano docker-compose.yml
|
||||
```
|
||||
|
||||
```yaml title="docker-compose.yml"
|
||||
@@ -249,10 +249,10 @@ docker compose down && docker compose up -d && docker compose logs -f
|
||||
|
||||
### Traefik
|
||||
|
||||
If you have already configured Traefik, you need create a new dynamic configuration file `remnawave-sub-page.yml` in the `~/remnawave/traefik/config` folder.
|
||||
If you have already configured Traefik, you need create a new dynamic configuration file `remnawave-sub-page.yml` in the `/opt/remnawave/traefik/config` folder.
|
||||
|
||||
```bash
|
||||
cd ~/remnawave/traefik/config && nano remnawave-sub-page.yml
|
||||
cd /opt/remnawave/traefik/config && nano remnawave-sub-page.yml
|
||||
```
|
||||
|
||||
Paste the following configuration.
|
||||
|
||||
Reference in New Issue
Block a user