Gozargah / Marzban-examples

Some examples to setup Marzban
91 stars 43 forks source link

Issues with setting up HTTPS Portal #13

Closed ipGhost closed 1 year ago

ipGhost commented 1 year ago

Hi,

The HTTP portal and servers are working fine. I have set up a domain with TLS. But I'm not able to change to HTTP portal to a HTTPS portal. I've followed the steps in your installation guide, but was unable to fix this.

Please give me a detailed guide for how to setup up a HTTPS admin portal

SaintShit commented 1 year ago

Hi, are u using fully single port?

ipGhost commented 1 year ago

No, I’m using multi-port

ipGhost commented 1 year ago

Bump

SaintShit commented 1 year ago

Hi, check https://github.com/Gozargah/Marzban/#configuration

you have to set UVICORN_SSL_CERTFILE and UVICORN_SSL_KEYFILE

harukodi commented 1 year ago


services:
  marzban:
    image: gozargah/marzban:latest
    restart: always
    env_file: env
    network_mode: host

    environment:
      SQLALCHEMY_DATABASE_URL: "sqlite:////var/lib/marzban/db.sqlite3"
      XRAY_JSON: "/xray_config.json"

    volumes:
      - ./xray_config.json:/xray_config.json
      - ./certs:/var/lib/marzban/certs/ #should be where the certs are getting collected when running the python script 

``` fixed my problem with xray not taking the SSL certs
harukodi commented 1 year ago
services:
  marzban:
    image: gozargah/marzban:latest
    restart: always
    env_file: env
    network_mode: host

    environment:
      SQLALCHEMY_DATABASE_URL: "sqlite:////var/lib/marzban/db.sqlite3"
      XRAY_JSON: "/xray_config.json"

    volumes:
      - ./xray_config.json:/xray_config.json
      - /var/lib/marzban:/var/lib/marzban #open /var/lib/marzban/certs/fullchain.pem: no such file or directory

This is wrong try to change the path when editing your volume and try the config above this one thanks!