agarbato / unicloud

Unison file sync web interface
MIT License
64 stars 4 forks source link

NOOB Client - Server Two Machines LAN Idiots Guide #36

Closed robbudge closed 1 year ago

robbudge commented 1 year ago

Love the application and looks like it will be a great help. But from a complete noob, I have 2 Machines 192.167.1.4 and 192.167.1.11 I am looking for an example Client (192.167.1.4) and server (192.167.1.11). I have docker installed and running the sever on 192.167.1.11 with the network set to bridge. on 192.167.1.4 i have the client running with the network set to bridge and the server host set to the IP. but still nothing. Is there a basic compose file for the two individual machines that i can look over ?

agarbato commented 1 year ago

Hi,

Thanks for testing the app. I will include some additional compose on the doc. In the meantime this should work for you.

Server compose. Change volumes bind according to your setup. As explained on the readme you need 2 volumes. One is the data folder, the other is the share folder. Source path can be absolute (/home/myuser/myserverdatafolder) or relative (./data) and can be anything where your user can rw.

version: '3.3'
services:
  # SERVER
  unicloud_server:
    image: agarbato1/unison-unicloud
    ports:
      - "2222:22"
      - "5001:80"
    environment:
      - USER=unison
      - USER_UID=1000
      - SERVER_HOSTNAME=unicloud_server
      - SERVER_UI_USERNAME=admin
      - SERVER_UI_PASSWORD=abcd12345
      - SERVER_DEBUG=True
      - ROLE=SERVER
    networks:
      unison:
    volumes:
      - type: bind
        source: ./data
        target: /data
      - type: bind
        source: ./shares
        target: /shares
networks:
  unison:
    driver: bridge
    ipam:
      driver: default

Client. Notice here you need to use exposed ports from the server. 5001 for api, 2222 for SSH server. Those are the default as normally port 22 and 80 are used by other services. You can change them but make sure they match between client and server. If you can use an hostname for the server would be better must the client must be able to resolve its name.

version: '3.3'
services:
  # CLIENT
  unicloud_client:
    image: agarbato1/unison-unicloud
    environment:
      - CLIENT_HOSTNAME=testing-client1
      - ROLE=CLIENT
      - USER=unison
      - USER_UID=1000
      - SERVER_HOSTNAME=192.167.1.11
      - SERVER_PORT=2222
      - SERVER_SHARE=share1
      - SHARE_IGNORE=.git*|.idea|.unison|.DS_Store
      - API_PROTOCOL=http
      - API_PORT=5001
      - SYNC_INTERVAL=120
    restart: on-failure
    volumes:
      - type: bind
        source: ./data
        target: /data
      - type: bind
        source: ./share
        target: /data/share
    networks:
      unison:
networks:
  unison:
    driver: bridge
    ipam:
      driver: default

Once the server is up you should be able to reach the UI from a browser at 192.167.1.11:5001 Follow the rest of the guide to activate your client and define a share. Follow troubleshooting section if you still have issues. Thanks Andrea

robbudge commented 1 year ago

The problem would appear to be with ssh key setup from the client machine.

I did a raw Unison install and managed to get the keys setup fine.

Did not work with the two docker environments

Best regards, Robert Budgen Business Development Manager: Process Control Solutions

Bürkert Fluid Control Systems Burkert Contromatic Inc. 5002 South Service Road<x-apple-data-detectors://4/1> Burlington ON L7L 5Y7<x-apple-data-detectors://4/1> Cell: (905) 630-0694<tel:(905)%20630-0694> Phone: (905) 632-3033<tel:(905)%20632-3033> Fax: (905) 632-3833<tel:(905)%20632-3833> @.**@.> www.burkert.cahttp://www.burkert.ca/

Sent from IPhone

On Jan 11, 2023, at 3:25 AM, agarbato @.***> wrote:



Hi,

Thanks for testing the app. I will include some additional compose on the doc. In the meantime this should work for you.

Server compose. Change volumes bind according to your setup. As explained on the readme you need 2 volumes. One is the data folder, the other is the share folder. Source path can be absolute (/home/myuser/myserverdatafolder) or relative (./data) and can be anything where your user can rw.

version: '3.3' services:

SERVER

unicloud_server: image: agarbato1/unison-unicloud ports:

Client. Notice here you need to use exposed ports from the server. 5001 for api, 2222 for SSH server. Those are the default as normally port 22 and 80 are used by other services. You can change them but make sure they match between client and server. If you can use an hostname for the server would be better must the client must be able to resolve its name.

version: '3.3' services:

CLIENT

unicloud_client: image: agarbato1/unison-unicloud environment:

Once the server is up you should be able to reach the UI from a browser at192.167.1.11:5001http://192.167.1.11:5001 Follow the rest of the guide to activate your client and define a share. Follow troubleshooting section if you still have issues. Thanks Andrea

— Reply to this email directly, view it on GitHubhttps://github.com/agarbato/unicloud/issues/36#issuecomment-1378391177, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADVHIEQJ72R27W5GSL73R4DWRZU7NANCNFSM6AAAAAATXODAUM. You are receiving this because you authored the thread.Message ID: @.***>

agarbato commented 1 year ago

I suggest you delete the client and server data folder and start with a clean setup. Start with the server, check docker-compose logs and data/logs. Once the server is up try to connect the client, check logs again.

If you can share the logs maybe I can help you to understand what's happening :-)

robbudge commented 1 year ago

It’s a problem with registering the SSH key from the client to the server. Still looking at the process.

Best regards, Robert Budgen Business Development Manager: Process Control Solutions

Bürkert Fluid Control Systems Burkert Contromatic Inc. 5002 South Service Road<x-apple-data-detectors://4/1> Burlington ON L7L 5Y7<x-apple-data-detectors://4/1> Cell: (905) 630-0694<tel:(905)%20630-0694> Phone: (905) 632-3033<tel:(905)%20632-3033> Fax: (905) 632-3833<tel:(905)%20632-3833> @.**@.> www.burkert.cahttp://www.burkert.ca/

Sent from IPhone

On Jan 11, 2023, at 11:15 AM, agarbato @.***> wrote:



I suggest you delete the client and server data folder and start with a clean setup. Start with the server, check docker-compose logs and data/logs. Once the server is up try to connect the client, check logs again.

If you can share the logs maybe I can help you to understand what's happening :-)

— Reply to this email directly, view it on GitHubhttps://github.com/agarbato/unicloud/issues/36#issuecomment-1379061283, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADVHIEWWROBSWY433ASZDWDWR3MANANCNFSM6AAAAAATXODAUM. You are receiving this because you authored the thread.Message ID: @.***>

agarbato commented 1 year ago

Closing. Examples provided. No logs included that can suggest a bug/real issue.