LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-03-2024, 06:36 AM   #1
Jason.nix
Member
 
Registered: Feb 2023
Posts: 561

Rep: Reputation: 10
Post How do I install and configure V2Ray?


Hello,
I did the following command to install V2Ray:
Code:
$ sudo apt install v2ray
The V2Ray configuration file should be in the /etc/v2ray/config.json directory, but there was no such directory, so I created it manually and filled it as follows:
Code:
{
 "log" : {
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log",
    "loglevel": "warning"
  },
  "inbounds": [
    {
      "listen":"192.168.1.1",
      "port": 1024, // Listening port 
      "protocol": "shadowsocks",
      "settings": {
        "method": "chacha20-poly1305",
        "ota": false, // Whether enable OTA or not
        "password": "sspasswd" // Password of Shadowsocks
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",  
      "settings": {}
    }
  ]
}
After it, I created /var/log/v2ray/access.log and /var/log/v2ray/error.log files manually. I tried running V2Ray, but got the following error:
Code:
# systemctl status v2ray
× v2ray.service - V2Ray Service
     Loaded: loaded (/lib/systemd/system/v2ray.service; disabled; preset: enabled)
     Active: failed (Result: exit-code) since Sat 2024-02-03 07:25:44 EST; 1s ago
   Duration: 49ms
       Docs: https://www.v2fly.org/
    Process: 25265 ExecStart=/usr/bin/v2ray run -config /etc/v2ray/config.json (code=exited, status=1/FAILURE)
   Main PID: 25265 (code=exited, status=1/FAILURE)
        CPU: 55ms

Feb 03 07:25:44 Proxy systemd[1]: v2ray.service: Scheduled restart job, restart counter is at 5.
Feb 03 07:25:44 Proxy systemd[1]: Stopped v2ray.service - V2Ray Service.
Feb 03 07:25:44 Proxy systemd[1]: v2ray.service: Start request repeated too quickly.
Feb 03 07:25:44 Proxy systemd[1]: v2ray.service: Failed with result 'exit-code'.
Feb 03 07:25:44 Proxy systemd[1]: Failed to start v2ray.service - V2Ray Service.
The report file also shows me the following lines:
Code:
# cat /var/log/v2ray/error.log
2024/02/03 07:23:59 [Warning] V2Ray 5.12.1 started
2024/02/03 07:24:52 [Warning] V2Ray 5.12.1 started
How to solve it?

Thank you.
 
Old 02-03-2024, 12:09 PM   #2
Jason.nix
Member
 
Registered: Feb 2023
Posts: 561

Original Poster
Rep: Reputation: 10
Hello,
Has anyone here configured V2Ray on Debian?

Thanks.
 
Old 02-05-2024, 08:22 AM   #3
Jason.nix
Member
 
Registered: Feb 2023
Posts: 561

Original Poster
Rep: Reputation: 10
Post

Hello,
The error is related to the permission of access.log and error.log files. I changed the permission using chmod 777 -R command, but still the permission problem.
Any idea?

Thank you.
 
Old 02-07-2024, 06:38 AM   #4
Jason.nix
Member
 
Registered: Feb 2023
Posts: 561

Original Poster
Rep: Reputation: 10
Hello,
This was due to a read-only file system error.

Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I use OpenVPN with V2Ray? Jason.nix Linux - Server 2 01-29-2024 11:50 PM
Tor through V2ray ct7567 Linux - Networking 0 10-15-2023 04:45 PM
gnome-control-center configure issue: configure: error: The Network, Bluetooth, Printers and Wacom panels are not optional on Linux systems Yetoo Linux - Software 3 01-01-2017 10:45 PM
dpkg-buildpackage configure: error: can only configure for one host and one target at donnied Debian 0 05-26-2008 07:08 PM
configure: error: when trying to install / configure new software ? met tomfer007 Linux - Software 1 07-25-2004 03:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration