0

I am trying to create ngrok service in Kali Linux following this link:https://amito.me/2016/09/Building-Your-Own-Ngrok-Service-on-CentOS-7/

leafpad /usr/lib/systemd/system/ngrok.service

[Unit]
Description=ngrok server service
After=syslog.target network.target auditd.service

[Service]
Type=simple
User=root

ExecStart=/path/to/ngrok/bin/ngrok -domain=127.0.0.1 -httpAddr=:8000 -httpsAddr=:4443

KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target

Everything worked fine but when I start its not throwing any error but on querying its status:

systemctl status ngrok.service
● ngrok.service - ngrok server service
   Loaded: loaded (/usr/lib/systemd/system/ngrok.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Mon 2018-05-28 01:33:21 +0430; 8min ago
  Process: 14746 ExecStart=/home/linux/Downloads/ngrok-stable-linux-amd64/ngrok -domain=127.0.0.1 -httpAddr=:8000 -httpsAddr=:4443 (code=exited, statu
 Main PID: 14746 (code=exited, status=0/SUCCESS)

May 28 01:33:21 Linux ngrok[14746]:    authtoken        save authtoken to configuration file
May 28 01:33:21 Linux ngrok[14746]:    credits        prints author and licensing information
May 28 01:33:21 Linux ngrok[14746]:    http                start an HTTP tunnel
May 28 01:33:21 Linux ngrok[14746]:    start        start tunnels by name from the configuration file
May 28 01:33:21 Linux ngrok[14746]:    tcp                start a TCP tunnel
May 28 01:33:21 Linux ngrok[14746]:    tls                start a TLS tunnel
May 28 01:33:21 Linux ngrok[14746]:    update        update ngrok to the latest version
May 28 01:33:21 Linux ngrok[14746]:    version        print the version string
May 28 01:33:21 Linux ngrok[14746]:    help                Shows a list of commands or help for one command
May 28 01:33:21 Linux ngrok[14746]: Incorrect Usage: flag provided but not defined: -domain

Please advise

Best regards

Paul
  • 2,755
  • 6
  • 24
  • 35
Raakh
  • 13
  • 5

1 Answers1

0

ngrok does not have an argument named -domain. You most probably meant -hostname.

Gerald Schneider
  • 19,757
  • 8
  • 52
  • 79
  • `May 28 12:25:06 Linux ngrok[2626]: Incorrect Usage: flag provided but not defined: -hostname` – Raakh May 28 '18 at 07:56
  • I believe you are missing some more parameter. In the official documentation the commands start with `ngrok http` or `ngrok tls`, followed by the arguments. Try to run it directly before your set it up as a service. – Gerald Schneider May 28 '18 at 08:00