[GH-ISSUE #32] Where is config/ckserver.json ? #27

Closed
opened 2026-02-26 12:33:45 +03:00 by kerem · 28 comments
Owner

Originally created by @obvioususername on GitHub (Jun 17, 2019).
Original GitHub issue: https://github.com/cbeuw/Cloak/issues/32

I downloaded Ck-server-linux-amd64-1.1.1 on Ubuntu 18.04 and was trying to set the server up, but i couldn't find the ckserver.json file. Do i creat the json file locally or do i download it from somewhere or i'm just too dumb to find it lol ?

Originally created by @obvioususername on GitHub (Jun 17, 2019). Original GitHub issue: https://github.com/cbeuw/Cloak/issues/32 I downloaded Ck-server-linux-amd64-1.1.1 on Ubuntu 18.04 and was trying to set the server up, but i couldn't find the ckserver.json file. Do i creat the json file locally or do i download it from somewhere or i'm just too dumb to find it lol ?
kerem closed this issue 2026-02-26 12:33:45 +03:00
Author
Owner

@cbeuw commented on GitHub (Jun 17, 2019):

Example configs can be found here: https://github.com/cbeuw/Cloak/tree/master/config

Note that you need to generate your own UID and key pairs

<!-- gh-comment-id:502662564 --> @cbeuw commented on GitHub (Jun 17, 2019): Example configs can be found here: https://github.com/cbeuw/Cloak/tree/master/config Note that you need to generate your own UID and key pairs
Author
Owner

@obvioususername commented on GitHub (Jun 17, 2019):

Thanks , but i ran into a new problem that stopping SS-libev server with Cloak from starting.
It seems like the same problem as the Issue 13. i've read it, however after many attempt, i still failed to fix it.
The OS it runs on is Ubuntu 18.04
Here is the ckserver.json :
{
"WebServerAddr":"54.222.60.218:443",
"PrivateKey":"myprivatekey",
"AdminUID":"myUID",
"DatabasePath":"/root/Cloak/config/userinfo.db",
"BackupDirPath":"/root/Cloak/config/db-backup/userinfo.db"
}

And here is the SS-libev server config.json
{
"server":"myserver",
"server_port":443,
"local_port":1080,
"password":"mypassword",
"timeout":60,
"method":"chacha20-ietf-poly1305",
"plugin":"/root/Cloak",
"plugin_opts":"/root/Cloak/config/ckserver.json"
}

The ck-server file is located at /root/Cloak
I use systemtcl to start ss-server.
Here is some info from systemctl status:
Started Shadowsocks-libev Default Server Service.
ss-server[3657]: sh: 1: exec: /root/Cloak: Permission denied
ERROR: plugin service exit unexpectedly
INFO: plugin "/root/Cloak" enabled
INFO: UDP relay enabled
INFO: initializing ciphers... chacha20-ietf-po

<!-- gh-comment-id:502723919 --> @obvioususername commented on GitHub (Jun 17, 2019): Thanks , but i ran into a new problem that stopping SS-libev server with Cloak from starting. It seems like the same problem as the Issue 13. i've read it, however after many attempt, i still failed to fix it. The OS it runs on is Ubuntu 18.04 Here is the ckserver.json : { "WebServerAddr":"54.222.60.218:443", "PrivateKey":"myprivatekey", "AdminUID":"myUID", "DatabasePath":"/root/Cloak/config/userinfo.db", "BackupDirPath":"/root/Cloak/config/db-backup/userinfo.db" } And here is the SS-libev server config.json { "server":"myserver", "server_port":443, "local_port":1080, "password":"mypassword", "timeout":60, "method":"chacha20-ietf-poly1305", "plugin":"/root/Cloak", "plugin_opts":"/root/Cloak/config/ckserver.json" } The ck-server file is located at /root/Cloak I use systemtcl to start ss-server. Here is some info from systemctl status: Started Shadowsocks-libev Default Server Service. ss-server[3657]: sh: 1: exec: /root/Cloak: Permission denied ERROR: plugin service exit unexpectedly INFO: plugin "/root/Cloak" enabled INFO: UDP relay enabled INFO: initializing ciphers... chacha20-ietf-po
Author
Owner

@HirbodBehnam commented on GitHub (Jun 17, 2019):

Hello
As you can clearly see there is a permission problem. You can fix this by editing shadowsocks-libev.service file. To find out where the file is run systemctl status shadowsocks-libev. Then for me (Centos 7) it says:

 shadowsocks-libev.service - Shadowsocks-libev Default Server Service
 Loaded: loaded (/usr/lib/systemd/system/shadowsocks-libev.service; disabled; vendor preset: disabled)

You can see that my service file is in /usr/lib/systemd/system/shadowsocks-libev.service. Open the file with your favorite editor. Then there are two line like this:

User=nobody
Group=nobody

Change them to

User=root
Group=root

Then save and exit. Run systemctl daemon-reload and then systemctl restart shadowsocks-libev and see if the problem is fixed or not.

Also as mentioned in readme, I have written a small script to automatically install Shadowsocks with Cloak with just some clicks. You can try that if you like.

<!-- gh-comment-id:502732826 --> @HirbodBehnam commented on GitHub (Jun 17, 2019): Hello As you can clearly see there is a permission problem. You can fix this by editing shadowsocks-libev.service file. To find out where the file is run `systemctl status shadowsocks-libev`. Then for me (Centos 7) it says: ``` shadowsocks-libev.service - Shadowsocks-libev Default Server Service Loaded: loaded (/usr/lib/systemd/system/shadowsocks-libev.service; disabled; vendor preset: disabled) ``` You can see that my service file is in `/usr/lib/systemd/system/shadowsocks-libev.service`. Open the file with your favorite editor. Then there are two line like this: ``` User=nobody Group=nobody ``` Change them to ``` User=root Group=root ``` Then save and exit. Run `systemctl daemon-reload` and then `systemctl restart shadowsocks-libev` and see if the problem is fixed or not. Also as mentioned in readme, I have written a small script to automatically install Shadowsocks with Cloak with just some clicks. You can try that if you like.
Author
Owner

@obvioususername commented on GitHub (Jun 17, 2019):

Hello
As you can clearly see there is a permission problem. You can fix this by editing shadowsocks-libev.service file. To find out where the file is run systemctl status shadowsocks-libev. Then for me (Centos 7) it says:

 shadowsocks-libev.service - Shadowsocks-libev Default Server Service
 Loaded: loaded (/usr/lib/systemd/system/shadowsocks-libev.service; disabled; vendor preset: disabled)

You can see that my service file is in /usr/lib/systemd/system/shadowsocks-libev.service. Open the file with your favorite editor. Then there are two line like this:

User=nobody
Group=nobody

Change them to

User=root
Group=root

Then save and exit. Run systemctl daemon-reload and then systemctl restart shadowsocks-libev and see if the problem is fixed or not.

Also as mentioned in readme, I have written a small script to automatically install Shadowsocks with Cloak with just some clicks. You can try that if you like.

Hello
I followed your suggestion but it didn't work on me. It still failed to start with permisson denied error.

<!-- gh-comment-id:502751279 --> @obvioususername commented on GitHub (Jun 17, 2019): > > > Hello > As you can clearly see there is a permission problem. You can fix this by editing shadowsocks-libev.service file. To find out where the file is run `systemctl status shadowsocks-libev`. Then for me (Centos 7) it says: > > ``` > shadowsocks-libev.service - Shadowsocks-libev Default Server Service > Loaded: loaded (/usr/lib/systemd/system/shadowsocks-libev.service; disabled; vendor preset: disabled) > ``` > > You can see that my service file is in `/usr/lib/systemd/system/shadowsocks-libev.service`. Open the file with your favorite editor. Then there are two line like this: > > ``` > User=nobody > Group=nobody > ``` > > Change them to > > ``` > User=root > Group=root > ``` > > Then save and exit. Run `systemctl daemon-reload` and then `systemctl restart shadowsocks-libev` and see if the problem is fixed or not. > > Also as mentioned in readme, I have written a small script to automatically install Shadowsocks with Cloak with just some clicks. You can try that if you like. Hello I followed your suggestion but it didn't work on me. It still failed to start with permisson denied error.
Author
Owner

@HirbodBehnam commented on GitHub (Jun 17, 2019):

Ok can you run ss-server from root user?
Just type and execute ss-server

<!-- gh-comment-id:502751471 --> @HirbodBehnam commented on GitHub (Jun 17, 2019): Ok can you run `ss-server` from root user? Just type and execute `ss-server`
Author
Owner

@HirbodBehnam commented on GitHub (Jun 17, 2019):

See looks like something is using 443 port.
Can you post the output of this?

netstat -ltnp | grep -w ':443'

If netstat is not installed try installing it by apt install net-tools

This command shows what application is using the 443 port.

As an alternative way you can change the port of proxy to something else.

<!-- gh-comment-id:502757170 --> @HirbodBehnam commented on GitHub (Jun 17, 2019): See looks like something is using 443 port. Can you post the output of this? `netstat -ltnp | grep -w ':443' ` If `netstat` is not installed try installing it by `apt install net-tools` This command shows what application is using the 443 port. As an alternative way you can change the port of proxy to something else.
Author
Owner

@obvioususername commented on GitHub (Jun 17, 2019):

See looks like something is using 443 port.
Can you post the output of this?

netstat -ltnp | grep -w ':443'

If netstat is not installed try installing it by apt install net-tools

This command shows what application is using the 443 port.

As an alternative way you can change the port of proxy to something else.

Oh, my bad. I was running vanilla SS when i ran ss-server command, so the 443 port is occupied.
I stopped it and tried again with Cloak. Output's below :
INFO: plugin "/root/Cloak" enabled
INFO: initializing ciphers... chacha20-ietf-poly1305
INFO: tcp server listening at 127.0.0.1:45371
INFO: running from root user
sh: 1: exec: /root/Cloak: Permission denied
ERROR: plugin service exit unexpectedly
(I omitted dates and time stamp)

<!-- gh-comment-id:502761114 --> @obvioususername commented on GitHub (Jun 17, 2019): > > > See looks like something is using 443 port. > Can you post the output of this? > > `netstat -ltnp | grep -w ':443' ` > > If `netstat` is not installed try installing it by `apt install net-tools` > > This command shows what application is using the 443 port. > > As an alternative way you can change the port of proxy to something else. Oh, my bad. I was running vanilla SS when i ran ss-server command, so the 443 port is occupied. I stopped it and tried again with Cloak. Output's below : INFO: plugin "/root/Cloak" enabled INFO: initializing ciphers... chacha20-ietf-poly1305 INFO: tcp server listening at 127.0.0.1:45371 INFO: running from root user sh: 1: exec: /root/Cloak: Permission denied ERROR: plugin service exit unexpectedly (I omitted dates and time stamp)
Author
Owner

@HirbodBehnam commented on GitHub (Jun 17, 2019):

I'm not sure about this but you can try:
chmod -R 777 /root/Cloak
This command makes /root/Cloak folder and it's subfiles world accessible.

As an alternative method you can try moving /root/Cloak folder somewhere that is global accessible.

<!-- gh-comment-id:502764668 --> @HirbodBehnam commented on GitHub (Jun 17, 2019): I'm not sure about this but you can try: `chmod -R 777 /root/Cloak` This command makes /root/Cloak folder and it's subfiles world accessible. As an alternative method you can try moving /root/Cloak folder somewhere that is global accessible.
Author
Owner

@obvioususername commented on GitHub (Jun 17, 2019):

I'm not sure about this but you can try:
chmod -R 777 /root/Cloak
This command makes /root/Cloak folder and it's subfiles world accessible.

As an alternative method you can try moving /root/Cloak folder somewhere that is global accessible.

I tried but still same result unfortunately. :(

<!-- gh-comment-id:502766782 --> @obvioususername commented on GitHub (Jun 17, 2019): > > > I'm not sure about this but you can try: > `chmod -R 777 /root/Cloak` > This command makes /root/Cloak folder and it's subfiles world accessible. > > As an alternative method you can try moving /root/Cloak folder somewhere that is global accessible. I tried but still same result unfortunately. :(
Author
Owner

@HirbodBehnam commented on GitHub (Jun 17, 2019):

Ok can you use this script to install the Shadowsocks with Cloak?
Please before using the script uninstall shadowsocks with cloak.

<!-- gh-comment-id:502767181 --> @HirbodBehnam commented on GitHub (Jun 17, 2019): Ok can you use [this](https://github.com/HirbodBehnam/Shadowsocks-Cloak-Installer) script to install the Shadowsocks with Cloak? Please before using the script uninstall shadowsocks with cloak.
Author
Owner

@cbeuw commented on GitHub (Jun 17, 2019):

Don't put anything under /root. That's the home directory of the root user and you will run into permission problems for almost everything. Ideally you should put Cloak under your own home directory, that's /home/[your user name]

<!-- gh-comment-id:502867652 --> @cbeuw commented on GitHub (Jun 17, 2019): Don't put anything under /root. That's the home directory of the root user and you will run into permission problems for almost everything. Ideally you should put Cloak under your own home directory, that's /home/[your user name]
Author
Owner

@obvioususername commented on GitHub (Jun 18, 2019):

Don't put anything under /root. That's the home directory of the root user and you will run into permission problems for almost everything. Ideally you should put Cloak under your own home directory, that's /home/[your user name]

I did that and the SS server with cloak started, but when i edited the SS windows client's server info, i clicked "OK", then i got some error pops out(which i forgot to save those texts). When i went to the SS server side, i see errors like these :
ERROR: block all requests from A.B.C.D(the IP of my local PC)
ERROR: block all requests from A.B.C.D
ERROR: block all requests from A.B.C.D
ERROR: block all requests from A.B.C.D
ERROR: block all requests from A.B.C.D
ERROR: block all requests from A.B.C.D
ERROR: block all requests from A.B.C.D
ERROR: block all requests from A.B.C.D
ERROR: block all requests from A.B.C.D
ERROR: block all requests from A.B.C.D

Then i restarted SS-server with Cloak , there is permisson denied problem again :
sh: 1: exec: /home/peiper/cloak: Permission denied
ERROR: plugin service exit unexpectedly
INFO: plugin "/home/peiper/cloak" enabled
INFO: UDP relay enabled
INFO: initializing ciphers... chacha20-ietf-pol
INFO: tcp server listening at 127.0.0.1:44027
INFO: udp server listening at A.B.C.D:443

<!-- gh-comment-id:503013077 --> @obvioususername commented on GitHub (Jun 18, 2019): > > > Don't put anything under /root. That's the home directory of the root user and you will run into permission problems for almost everything. Ideally you should put Cloak under your own home directory, that's /home/[your user name] I did that and the SS server with cloak started, but when i edited the SS windows client's server info, i clicked "OK", then i got some error pops out(which i forgot to save those texts). When i went to the SS server side, i see errors like these : ERROR: block all requests from A.B.C.D(the IP of my local PC) ERROR: block all requests from A.B.C.D ERROR: block all requests from A.B.C.D ERROR: block all requests from A.B.C.D ERROR: block all requests from A.B.C.D ERROR: block all requests from A.B.C.D ERROR: block all requests from A.B.C.D ERROR: block all requests from A.B.C.D ERROR: block all requests from A.B.C.D ERROR: block all requests from A.B.C.D Then i restarted SS-server with Cloak , there is permisson denied problem again : sh: 1: exec: /home/peiper/cloak: Permission denied ERROR: plugin service exit unexpectedly INFO: plugin "/home/peiper/cloak" enabled INFO: UDP relay enabled INFO: initializing ciphers... chacha20-ietf-pol INFO: tcp server listening at 127.0.0.1:44027 INFO: udp server listening at A.B.C.D:443
Author
Owner

@cbeuw commented on GitHub (Jun 18, 2019):

Try chmod +x /home/peiper/cloak?

<!-- gh-comment-id:503031912 --> @cbeuw commented on GitHub (Jun 18, 2019): Try `chmod +x /home/peiper/cloak`?
Author
Owner

@obvioususername commented on GitHub (Jun 18, 2019):

Try chmod +x /home/peiper/cloak?

Not working, same error. :(

<!-- gh-comment-id:503038698 --> @obvioususername commented on GitHub (Jun 18, 2019): > > > Try `chmod +x /home/peiper/cloak`? Not working, same error. :(
Author
Owner

@obvioususername commented on GitHub (Jun 18, 2019):

Try chmod +x /home/peiper/cloak?

Is there something wrong with the path in my ckserver.json ?

{
"WebServerAddr":"54.222.60.218:443",
"PrivateKey":"myprivatekey",
"AdminUID":"myUID",
"DatabasePath":"/home/peiper/cloak/userinfo.db",
"BackupDirPath":"/home/peiper/cloak"
}

<!-- gh-comment-id:503039782 --> @obvioususername commented on GitHub (Jun 18, 2019): > > > Try `chmod +x /home/peiper/cloak`? Is there something wrong with the path in my ckserver.json ? { "WebServerAddr":"54.222.60.218:443", "PrivateKey":"myprivatekey", "AdminUID":"myUID", "DatabasePath":"/home/peiper/cloak/userinfo.db", "BackupDirPath":"/home/peiper/cloak" }
Author
Owner

@cbeuw commented on GitHub (Jun 18, 2019):

What is /home/peiper/cloak? Is it a directory or is it an executable? If it's a directory then it can't be executed. You need to set plugin to the executable file of ck-server. If it's an executable then you can't do /home/peiper/cloak/userinfo.db

<!-- gh-comment-id:503043250 --> @cbeuw commented on GitHub (Jun 18, 2019): What is `/home/peiper/cloak`? Is it a directory or is it an executable? If it's a directory then it can't be executed. You need to set `plugin` to the executable file of ck-server. If it's an executable then you can't do `/home/peiper/cloak/userinfo.db`
Author
Owner

@obvioususername commented on GitHub (Jun 18, 2019):

What is /home/peiper/cloak? Is it a directory or is it an executable? If it's a directory then it can't be executed. You need to set plugin to the executable file of ck-server. If it's an executable then you can't do /home/peiper/cloak/userinfo.db

/home/peiper/cloak is a directory that contains the ck-server file and ckserver.json.
I redo the pluginfield in the SS-server's config.json , but it still failed to start. Got error like this :
Configuration file error: Attempting to open database: open /home/peiper/cloak/userinfo.db: permission denied

These are the plugin and plugin_opts filed in ss-server's config.json :
"plugin":"/home/peiper/cloak/ck-server-linux-amd64-1.1.1",
"plugin_opts":"/home/peiper/cloak/ckserver.json"

<!-- gh-comment-id:503052874 --> @obvioususername commented on GitHub (Jun 18, 2019): > > > What is `/home/peiper/cloak`? Is it a directory or is it an executable? If it's a directory then it can't be executed. You need to set `plugin` to the executable file of ck-server. If it's an executable then you can't do `/home/peiper/cloak/userinfo.db` /home/peiper/cloak is a directory that contains the ck-server file and ckserver.json. I redo the `plugin`field in the SS-server's config.json , but it still failed to start. Got error like this : Configuration file error: Attempting to open database: open /home/peiper/cloak/userinfo.db: permission denied These are the plugin and plugin_opts filed in ss-server's config.json : "plugin":"/home/peiper/cloak/ck-server-linux-amd64-1.1.1", "plugin_opts":"/home/peiper/cloak/ckserver.json"
Author
Owner

@cbeuw commented on GitHub (Jun 18, 2019):

Delete userinfo.db and let Cloak create one itself again. It may have been created with root privilege and doesn't let cloak write

<!-- gh-comment-id:503053403 --> @cbeuw commented on GitHub (Jun 18, 2019): Delete userinfo.db and let Cloak create one itself again. It may have been created with root privilege and doesn't let cloak write
Author
Owner

@obvioususername commented on GitHub (Jun 18, 2019):

Delete userinfo.db and let Cloak create one itself again. It may have been created with root privilege and doesn't let cloak write

I ran find / userinfo.db , but the output is "No such file or directory"

<!-- gh-comment-id:503055570 --> @obvioususername commented on GitHub (Jun 18, 2019): > > > Delete userinfo.db and let Cloak create one itself again. It may have been created with root privilege and doesn't let cloak write I ran `find / userinfo.db` , but the output is "No such file or directory"
Author
Owner

@obvioususername commented on GitHub (Jun 18, 2019):

Delete userinfo.db and let Cloak create one itself again. It may have been created with root privilege and doesn't let cloak write

Well, i created the /peiper directory under/home whit root identity expecting to avoid the permisson problem, but it seems not working. May be it's because i'm logged in as root ? Should i make a new user to try again ?

<!-- gh-comment-id:503167173 --> @obvioususername commented on GitHub (Jun 18, 2019): > > > Delete userinfo.db and let Cloak create one itself again. It may have been created with root privilege and doesn't let cloak write Well, i created the `/peiper` directory under`/home` whit root identity expecting to avoid the permisson problem, but it seems not working. May be it's because i'm logged in as root ? Should i make a new user to try again ?
Author
Owner

@cbeuw commented on GitHub (Jun 18, 2019):

Urghhh... Why did you manually create a directory under /home? The users' home folders should have be automatically created when you create a user.

In almost all situations you shouldn't log in as root. Didn't the system prompt you to create a user when you installed Ubuntu? Regardless if you don't have a user other than root, you should create one and never log in as root again. If you need superuser privilege, use sudo.

<!-- gh-comment-id:503169154 --> @cbeuw commented on GitHub (Jun 18, 2019): Urghhh... Why did you manually create a directory under /home? The users' home folders should have be automatically created when you create a user. In almost all situations you shouldn't log in as root. Didn't the system prompt you to create a user when you installed Ubuntu? Regardless if you don't have a user other than root, you should create one and never log in as root again. If you need superuser privilege, use sudo.
Author
Owner

@obvioususername commented on GitHub (Jun 18, 2019):

Urghhh... Why did you manually create a directory under /home? The users' home folders should have be automatically created when you create a user.

In almost all situations you shouldn't log in as root. Didn't the system prompt you to create a user when you installed Ubuntu? Regardless if you don't have a user other than root, you should create one and never log in as root again. If you need superuser privilege, use sudo.

What a fool i am. lol
Anyway, i created and logged in as a new sudo user peiper, then did it all over again, but unfortunately there is still permisson denied error like before in systemctl status. Besides when i run ss-server there is output like this indicates something wrong with the private key :

INFO: plugin "/home/peiper/cloak/ck-server-linux-amd64-1.1.1" enabled INFO: initializing ciphers... chacha20-ietf-poly1305 INFO: tcp server listening at 127.0.0.1:53031 ck-server.go:254: Configuration file error: Failed to decode private key: illegal base64 data at input byte 32 ERROR: plugin service exit unexpectedly

<!-- gh-comment-id:503200059 --> @obvioususername commented on GitHub (Jun 18, 2019): > > > Urghhh... Why did you manually create a directory under /home? The users' home folders should have be automatically created when you create a user. > > In almost all situations you shouldn't log in as root. Didn't the system prompt you to create a user when you installed Ubuntu? Regardless if you don't have a user other than root, you should create one and never log in as root again. If you need superuser privilege, use sudo. What a fool i am. lol Anyway, i created and logged in as a new sudo user `peiper`, then did it all over again, but unfortunately there is still permisson denied error like before in systemctl status. Besides when i run `ss-server` there is output like this indicates something wrong with the private key : ` INFO: plugin "/home/peiper/cloak/ck-server-linux-amd64-1.1.1" enabled INFO: initializing ciphers... chacha20-ietf-poly1305 INFO: tcp server listening at 127.0.0.1:53031 ck-server.go:254: Configuration file error: Failed to decode private key: illegal base64 data at input byte 32 ERROR: plugin service exit unexpectedly`
Author
Owner

@cbeuw commented on GitHub (Jun 19, 2019):

Make sure to include the = paddings at the end when copying base64 strings. They are necessary.

<!-- gh-comment-id:503366832 --> @cbeuw commented on GitHub (Jun 19, 2019): Make sure to include the = paddings at the end when copying base64 strings. They are necessary.
Author
Owner

@obvioususername commented on GitHub (Jun 20, 2019):

Make sure to include the = paddings at the end when copying base64 strings. They are necessary.

Hi
I generated new keys and UID then set up again, it worked ! The proxy speed skyrocketed.
But there is still a problem that it can not be start by systemctl which will get permission denied to userinfo.db error. Using ss-server works perfectly but once i exit SSH terminal, it's dead.
I'm sorry to be annoying, is there any possible solution ?

<!-- gh-comment-id:503945103 --> @obvioususername commented on GitHub (Jun 20, 2019): > > > Make sure to include the = paddings at the end when copying base64 strings. They are necessary. Hi I generated new keys and UID then set up again, it worked ! The proxy speed skyrocketed. But there is still a problem that it can not be start by systemctl which will get permission denied to userinfo.db error. Using `ss-server` works perfectly but once i exit SSH terminal, it's dead. I'm sorry to be annoying, is there any possible solution ?
Author
Owner

@obvioususername commented on GitHub (Jun 20, 2019):

Make sure to include the = paddings at the end when copying base64 strings. They are necessary.

Hi
I generated new keys and UID then set up again, it worked ! The proxy speed skyrocketed.
But there is still a problem that it can not be start by systemctl which will get permission denied to userinfo.db error. Using ss-server works perfectly but once i exit SSH terminal, it's dead.
I'm sorry to be annoying, is there any possible solution ?

Oh wait, it seems ss-server keeps working after i log out my server, does it keeps running in background by default ? Should i do something like put nohup &on that command to make sure it runs after exitting terminal ?

<!-- gh-comment-id:503948188 --> @obvioususername commented on GitHub (Jun 20, 2019): > > > > Make sure to include the = paddings at the end when copying base64 strings. They are necessary. > > Hi > I generated new keys and UID then set up again, it worked ! The proxy speed skyrocketed. > But there is still a problem that it can not be start by systemctl which will get permission denied to userinfo.db error. Using `ss-server` works perfectly but once i exit SSH terminal, it's dead. > I'm sorry to be annoying, is there any possible solution ? Oh wait, it seems `ss-server` keeps working after i log out my server, does it keeps running in background by default ? Should i do something like put `nohup &`on that command to make sure it runs after exitting terminal ?
Author
Owner

@HirbodBehnam commented on GitHub (Jun 20, 2019):

Hello
You have two options.

  1. Use tmux or screen. These applications make the process run in background even if the SSH connection is closed.
    I personally sometimes use tmux. Just install it via your package manager and then type tmux in terminal. Then type ss-server. You will see that the ss-server starts running. Press Ctrl+B and then press D. The session will be detached and you can safely close the SSH connection. However if you reboot your server you have to do it again.

  2. Use a service.
    If you want systemctl service you can try this:
    At first type nano /etc/systemd/system/shadowsocks-server.service. This will open the nano editor. Then paste this inside it:

[Unit]
Description=Shadowsocks-libev Server Service
Documentation=man:shadowsocks-libev(8)
After=network.target network-online.target

[Service]
Type=simple
User=root
Group=root
LimitNOFILE=32768
ExecStart=/usr/bin/ss-server
WorkingDirectory=/etc/shadowsocks-libev

[Install]
WantedBy=multi-user.target

Note: You may change some values in this file like User and Group or even WorkingDirectory.
After you saved this, type systemctl daemon-reload and then systemctl start shadowsocks-server and systemctl enable shadowsocks-server

<!-- gh-comment-id:503986711 --> @HirbodBehnam commented on GitHub (Jun 20, 2019): Hello You have two options. 1. Use `tmux` or `screen`. These applications make the process run in background even if the SSH connection is closed. I personally sometimes use `tmux`. Just install it via your package manager and then type `tmux` in terminal. Then type `ss-server`. You will see that the ss-server starts running. Press `Ctrl+B` and then press `D`. The session will be detached and you can safely close the SSH connection. However if you reboot your server you have to do it again. 2. Use a service. If you want systemctl service you can try this: At first type `nano /etc/systemd/system/shadowsocks-server.service`. This will open the nano editor. Then paste this inside it: ``` [Unit] Description=Shadowsocks-libev Server Service Documentation=man:shadowsocks-libev(8) After=network.target network-online.target [Service] Type=simple User=root Group=root LimitNOFILE=32768 ExecStart=/usr/bin/ss-server WorkingDirectory=/etc/shadowsocks-libev [Install] WantedBy=multi-user.target ``` **Note:** You may change some values in this file like User and Group or even WorkingDirectory. After you saved this, type `systemctl daemon-reload` and then `systemctl start shadowsocks-server` and `systemctl enable shadowsocks-server`
Author
Owner

@obvioususername commented on GitHub (Jun 20, 2019):

Hello
You have two options.

1. Use `tmux` or `screen`. These applications make the process run in background even if the SSH connection is closed.
   I personally sometimes use `tmux`. Just install it via your package manager and then type `tmux` in terminal. Then type `ss-server`. You will see that the ss-server starts running. Press `Ctrl+B` and then press `D`. The session will be detached and you can safely close the SSH connection. However if you reboot your server you have to do it again.

2. Use a service.
   If you want systemctl service you can try this:
   At first type `nano /etc/systemd/system/shadowsocks-server.service`. This will open the nano editor. Then paste this inside it:
[Unit]
Description=Shadowsocks-libev Server Service
Documentation=man:shadowsocks-libev(8)
After=network.target network-online.target

[Service]
Type=simple
User=root
Group=root
LimitNOFILE=32768
ExecStart=/usr/bin/ss-server
WorkingDirectory=/etc/shadowsocks-libev

[Install]
WantedBy=multi-user.target

Note: You may change some values in this file like User and Group or even WorkingDirectory.
After you saved this, type systemctl daemon-reload and then systemctl start shadowsocks-server and systemctl enable shadowsocks-server

Thanks for the help !

<!-- gh-comment-id:504011042 --> @obvioususername commented on GitHub (Jun 20, 2019): > > > Hello > You have two options. > > 1. Use `tmux` or `screen`. These applications make the process run in background even if the SSH connection is closed. > I personally sometimes use `tmux`. Just install it via your package manager and then type `tmux` in terminal. Then type `ss-server`. You will see that the ss-server starts running. Press `Ctrl+B` and then press `D`. The session will be detached and you can safely close the SSH connection. However if you reboot your server you have to do it again. > > 2. Use a service. > If you want systemctl service you can try this: > At first type `nano /etc/systemd/system/shadowsocks-server.service`. This will open the nano editor. Then paste this inside it: > > > ``` > [Unit] > Description=Shadowsocks-libev Server Service > Documentation=man:shadowsocks-libev(8) > After=network.target network-online.target > > [Service] > Type=simple > User=root > Group=root > LimitNOFILE=32768 > ExecStart=/usr/bin/ss-server > WorkingDirectory=/etc/shadowsocks-libev > > [Install] > WantedBy=multi-user.target > ``` > > **Note:** You may change some values in this file like User and Group or even WorkingDirectory. > After you saved this, type `systemctl daemon-reload` and then `systemctl start shadowsocks-server` and `systemctl enable shadowsocks-server` Thanks for the help !
Author
Owner

@HirbodBehnam commented on GitHub (Jun 20, 2019):

You're welcome :)

<!-- gh-comment-id:504013367 --> @HirbodBehnam commented on GitHub (Jun 20, 2019): You're welcome :)
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Cloak#27
No description provided.