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

0

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

2
  • May 28 12:25:06 Linux ngrok[2626]: Incorrect Usage: flag provided but not defined: -hostname
    – Raakh
    May 28 '18 at 7: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. May 28 '18 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.