Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A full instructions for starting from scratch. #89

Open
lprintf opened this issue Jul 29, 2021 · 27 comments
Open

A full instructions for starting from scratch. #89

lprintf opened this issue Jul 29, 2021 · 27 comments

Comments

@lprintf
Copy link
Contributor

lprintf commented Jul 29, 2021

easy-matrix-wechaty is a simple and fast temporary deployment solution that provides a way to experience the main functions of matrix-appservice-wechaty. After some simple steps you can deploy a synapse server and a matrix-appservice-wechaty server. At present, in order to have a better experience, we need a domain name and a computer with a public IP address. Fortunately, we are designing a full-featured deployment plan for unpublic IP and domain names, and it is expected to be released this year(If it's necessary. ^_^).

I test it with a wechaty account name "疯帽子"(mad hatter, id: little-printf). After a period of testing, I will try to merge into this project (if appropriate). Welcome anyone to point out the shortcomings of it.

@lprintf
Copy link
Contributor Author

lprintf commented Jul 30, 2021

@zrn-fight How is the progress of the project deployment this week?

@zrn-fight
Copy link

@545641826 I have deployed the matrix project according to your deployment method. I changed the domain name in export host = localhost to my own domain name fontweb.asia, but after I entered fontweb.asia: 8008 in the address bar of the browser, the server that cannot connect to fontweb.asia is displayed.
It's the first time I've heard of docker. Will it be often used in later projects? If it is often used, I need to learn it.

@lprintf
Copy link
Contributor Author

lprintf commented Jul 30, 2021

Oh, you have misunderstood the purpose of the project.There is no domain name and registered server are required. You can run it without any modify.

@zrn-fight
Copy link

I deployed it on Tencent ECs. Do you mean that I only need to deploy it on my own computer? OK, I'll deploy locally. Thank you

@lprintf
Copy link
Contributor Author

lprintf commented Jul 30, 2021

And, did the original deployment plan encounter any problems?
We can discuss any problems you encounter during the deployment process here. (Sometimes you need to explain your problems in other new issues。)

@lprintf
Copy link
Contributor Author

lprintf commented Jul 30, 2021

@zrn-fight Please speak freely here. I hope you can evaluate these deployment scripts from the perspective of a new user as a reference for my next modification. If you encounter any trouble, you can give feedback here, and we can analyze the reasons together. This will be much faster.

@zrn-fight
Copy link

OK.After I typed docker-compose run --rm -e SYNAPSE_SERVER_NAME=$HOST -e SYNAPSE_REPORT_STATS=yes synapse generate on the virtual machine,there was an error that I haven't solved.Errors are reported as follows:
【ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.】
I restart docker and add the current user to the docker group, but still report an error.

@zrn-fight
Copy link

N@1UDS(L17Y L8JP 9I}N

@lprintf
Copy link
Contributor Author

lprintf commented Jul 30, 2021

OK.After I typed docker-compose run --rm -e SYNAPSE_SERVER_NAME=$HOST -e SYNAPSE_REPORT_STATS=yes synapse generate on the virtual machine,there was an error that I haven't solved.Errors are reported as follows:
【ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.】
I restart docker and add the current user to the docker group, but still report an error.

Yes, this seems to be a problem that docker beginners are prone to encounter. Your question can help others to solve the problem quickly. see: solution

@zrn-fight
Copy link

zrn-fight commented Jul 30, 2021

767N``Z7`9${T8RG)FFLFH
After I typed sudo sed -e 's/#app_service_config_files/app_service_config_files/' -e '/app_service_config_files/a\ - /data/wechaty-registration.yaml' -i files/homeserver.yaml,an error appears as shown in the picture.【sed: unable to read files / homeserver.yaml: there is no file or directory】

@lprintf
Copy link
Contributor Author

lprintf commented Jul 31, 2021

Would you please run ls or tree -L 3 command on your work directory to provide more information?

@lprintf
Copy link
Contributor Author

lprintf commented Jul 31, 2021

767N``Z7`9${T8RG)FFLFH
After I typed sudo sed -e 's/#app_service_config_files/app_service_config_files/' -e '/app_service_config_files/a\ - /data/wechaty-registration.yaml' -i files/homeserver.yaml,an error appears as shown in the picture.【sed: unable to read files / homeserver.yaml: there is no file or directory】

The files/homeserver.yaml is the output of the command docker-compose run --rm -e SYNAPSE_SERVER_NAME=$HOST -e SYNAPSE_REPORT_STATS=yes synapse generate. Have you run the command successfully?

@lprintf
Copy link
Contributor Author

lprintf commented Jul 31, 2021

I guess the admin user is not allowed to execute docker commands by default, like the root in centos. In this script, all commands that do not start with sudo should be executed by ordinary docker group users.

lprintf pushed a commit to wechaty/easy-matrix-wechaty that referenced this issue Jul 31, 2021
@lprintf
Copy link
Contributor Author

lprintf commented Jul 31, 2021

@zrn-fight OK, I have writen a new version for you, please try it as soon as possible and give me a reply. see: easy-matrix-wechaty

@zrn-fight
Copy link

I tried to use the new version you wrote, but an error was reported after entering Chmod + X. / run.sh. I tried the first version of easy matrix wechaty again, and it ran successfully.

@lprintf
Copy link
Contributor Author

lprintf commented Jul 31, 2021

I tried to use the new version you wrote, but an error was reported after entering Chmod + X. / run.sh. I tried the first version of easy matrix wechaty again, and it ran successfully.

What's wrong with it?And why the first version can run now?

@zrn-fight
Copy link

【chmod: : unable to read files / homeserver.yaml: there is no file or directory】
I'm also curious why the first version can run. I just reentered the command in the first version after the new version was wrong, and then it worked well. after I entered curl http://localhost:8008/_matrix/static/ on the terminal,an HTML file is returned.I'm now looking at how to install a browser on a virtual machine.

@lprintf
Copy link
Contributor Author

lprintf commented Jul 31, 2021

【chmod: : unable to read files / homeserver.yaml: there is no file or directory】
I'm also curious why the first version can run. I just reentered the command in the first version after the new version was wrong, and then it worked well. after I entered curl http://localhost:8008/_matrix/static/ on the terminal,an HTML file is returned.I'm now looking at how to install a browser on a virtual machine.

You do not need to install a browser. Just install the client according to the readme file.

@lprintf
Copy link
Contributor Author

lprintf commented Jul 31, 2021

Your machine is too weird. Why run chmod +x ./run.sh will throw such error about homeserver.yaml? And this command is not necessary if you can run the ./run.sh directly.

@zrn-fight
Copy link

ok,I will try to install a client.

@lprintf
Copy link
Contributor Author

lprintf commented Jul 31, 2021

OK, There is two versions for you: v0.1 and v0.2.

@lprintf
Copy link
Contributor Author

lprintf commented Jul 31, 2021

@yswtrue Are you interesting to be next user of easy-matrix-wechaty. It's easy for you. Your evaluation will be a valuable reference for further development.

@zrn-fight
Copy link

Is the service started by running this command [docker-compose -f "docker-compose.yml" up -d]? The service cannot start after I run it

@lprintf
Copy link
Contributor Author

lprintf commented Aug 15, 2021

Is the service started by running this command [docker-compose -f "docker-compose.yml" up -d]? The service cannot start after I run it

please attach the log, let me see see.

@zrn-fight
Copy link

zrn-fight commented Aug 15, 2021

【docker-compose -f "docker-compose.yml" up -d】
easymatrixwechaty_matrix-appservice-wechaty_1 is up-to-date Starting easymatrixwechaty_synapse_1
【docker-compose exec synapse register_new_matrix_user http://localhost:8008 -c /data/homeserver.yaml -u $SYNAPSE_USER_NAME -p $SYNAPSE_USER_PASSWD --no-admin】
ERROR: No container found for synapse_1

@lprintf
Copy link
Contributor Author

lprintf commented Aug 15, 2021

【docker-compose -f "docker-compose.yml" up -d】
easymatrixwechaty_matrix-appservice-wechaty_1 is up-to-date Starting easymatrixwechaty_synapse_1

Which mean that you have started the synapse successfully.

【docker-compose exec synapse register_new_matrix_user http://localhost:8008 -c /data/homeserver.yaml -u $SYNAPSE_USER_NAME -p $SYNAPSE_USER_PASSWD --no-admin】
ERROR: No container found for synapse_1

Registering users are only the installation process, not the startup process.

And in the new version of easy-matrix-wechaty, a script to run the server has been added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants