{"id":21977781,"url":"https://github.com/zapek/chatserver","last_synced_at":"2025-04-28T16:45:41.110Z","repository":{"id":38464111,"uuid":"334541645","full_name":"zapek/Chatserver","owner":"zapek","description":"A chat server for Retroshare","archived":false,"fork":false,"pushed_at":"2024-11-02T18:09:21.000Z","size":1695,"stargazers_count":6,"open_issues_count":10,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T11:25:06.618Z","etag":null,"topics":["decentralization","p2p","retroshare"],"latest_commit_sha":null,"homepage":"https://retroshare.ch","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zapek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-31T00:32:09.000Z","updated_at":"2024-11-29T02:11:02.000Z","dependencies_parsed_at":"2024-04-21T13:50:41.726Z","dependency_job_id":null,"html_url":"https://github.com/zapek/Chatserver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zapek%2FChatserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zapek%2FChatserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zapek%2FChatserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zapek%2FChatserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zapek","download_url":"https://codeload.github.com/zapek/Chatserver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251348108,"owners_count":21575219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decentralization","p2p","retroshare"],"created_at":"2024-11-29T16:16:24.352Z","updated_at":"2025-04-28T16:45:41.087Z","avatar_url":"https://github.com/zapek.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chat Server\n\nThis is a chat server (also called introduction server) for [Retroshare](https://retroshare.cc). It allows trying out Retroshare for the first\ntime without having to organise a group of friends. It can also be a kind of \"bootstrap\" into the Retroshare network.\n\nThis server is running at https://retroshare.ch\n\n## Dependencies\n\n### Backend\n\n- Java 21\n- a MySQL server instance (tested with 5.7 and 8.0)\n\n### Frontend\n\n- Angular 17\n\n## Development\n\nRun the backend locally, either with your IDE using the spring _dev_ profile or with gradle:\n\t\n\t./gradlew bootRun\n\nIf you want to run a Retroshare-service instance, do:\n\n\tcd retroshare\n\tdocker build -t retroshare --build-arg KEEP_SOURCE=true .\n(this can take a while, go have a coffee or something)\n\nThen run it with:\n\n\tdocker run --rm --name retroshare -it -p 127.0.0.1:9092:9092 --mount source=retroshare,target=/root/.retroshare retroshare retroshare-service --jsonApiPort 9092 --jsonApiBindAddress 127.0.0.1\n\nFor the frontend:\n\n\tng serve\n\nAnd open a browser to http://localhost:4200\n\n## Building\n\nBuilding for production is typically done by dockerizing the components (but it doesn't necessarily have to be).\n\nIf you want to go with docker, install docker-compose and do:\n\n\t./gradlew bootBuildImage\n\n\tdocker-compose up -d\n\nThe frontend has to be deployed manually. Make sure your server is listed in ```environment.prod.ts```, build it with\n\n\tng build --configuration production\n\nThen copy the content of ```dist/chatserver-frontend``` in your webserver root. Don't forget to setup a proxy\nin case the backend is running on the same host, for example with Apache:\n\n\tProxyPass /v1 http://127.0.0.1:8080/v1\n\tProxyPassReverse /v1 http://127.0.0.1:8080/v1\n\nYou can put the following environment variables into docker-compose.yml to configure the backend to your taste.\n\n## Environment variables\n\n### Database\n\n- DATABASE_HOST:\n  the hostname to connect to (default: localhost)\n\n- DATABASE_NAME:\n  the database name (default: chatserver)\n\n- DATABASE_USER:\n  the database username (default: chatserver)\n\n- DATABASE_PASSWORD:\n  the database password (default: chatserver)\n\n- DATABASE_USE_SSL:\n  use SSL for the database connection, not needed for localhost (default: false)\n\n### Misc\n\n- CHATSERVER_RETROSHARE_SERVICE_URL:\n  the URL of the retroshare-service API (default: http://localhost:9092)\n\n- CHATSERVER_LOCATION_NAME:\n  the name of the location (default: ChatServer)\n\n- CHATSERVER_PROFILE_NAME:\n  the name of the PGP profile (default: retroshare.ch)\n\n- CHATSERVER_API_USERNAME:\n  the username of the retroshare-service API (default: apiuser)\n\n- CHATSERVER_API_PASSWORD:\n  the password of the retroshare-service API (default: randomly generated and stored in the database)\n\n- CHATSERVER_LOBBY_NAME:\n  the name of the public lobby (default: retroshare.ch Key Exchange)\n\n- CHATSERVER_LOBBY_TOPIC:\n  the topic of the public lobby (default: https://retroshare.ch)\n\n- CHATSERVER_LOBBY_CREATE:\n  if true, create the public lobby after 10 minutes of not finding one already on the network. If false, search for it forever (default: true)\n\n- CHATSERVER_MAX_FRIENDS:\n  the maximum number of friends before starting to purge the old ones (default: 30)\n\n- WEB_PASSWORD:\n  password for the API's protected endpoints (default: random per session, printed in the logs upon startup)\n\n## Docker images\n\nThere are 2 readily available docker images if you don't want to build yourself\n\n\tdocker pull zapek/retroshare-service:0.6.6\n\n\tdocker pull zapek/chatserver:0.1.4\n\nOr use the following docker-compose.yml\n\n```yaml\nversion: '3.7'\n\nservices:\n\n    chatserver:\n        image: zapek/chatserver:0.1.4\n        environment:\n      - SERVER_PORT=8080\n    network_mode: \"host\"\n\n  retroshare-service:\n    image: zapek/retroshare-service:0.6.6\n    network_mode: \"host\"\n    volumes: \n      - retroshare:/root/.retroshare\n    command: retroshare-service --jsonApiPort 9092 --jsonApiBindAddress 127.0.0.1\n\nvolumes:\n  retroshare:\n```\n\nDon't forget to have a MySQL instance somewhere.\n\n## Note\n\nRetroshare-service fails to use UPNP for some reasons. Make sure you redirect the ports as needed. You can pass ```--port 6000``` to use port 6000 for example, as otherwise it'll pickup a random port which will require you to grep the logs to find out.\n\nIf you want to transfer docker images between hosts, use:\n\n\tdocker save -o foo.tar zapek/chatserver:0.1.4\n\nthen on the target host\n\n\tdocker load -i foo.tar\n\nIf you want the server to stay friend with you forever, change your trust level in the MySQL\nprofile table to _MARGINAL_ or _FULL_.\n\nEverything was tested on Windows 10 and Linux (Ubuntu 18.04/20.04).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzapek%2Fchatserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzapek%2Fchatserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzapek%2Fchatserver/lists"}