# Tinode Admin ### 🚀 A web-based **admin console** for **Tinode** ## Installation ### Prerequisites - A Tinode server up and running - A user account on the server with root privileges - A purchased license with license key - Docker installed To purchase a license, contact us at https://tinode.co/contact. You will be given a license key and will get the access to the Docker image. To install Docker, see: - Windows: https://docs.docker.com/docker-for-windows/install/ - Mac: https://docs.docker.com/docker-for-mac/install/ - Linux: https://docs.docker.com/engine/install/ ### Running Run the following command in terminal of your server or desktop to run the app: ```bash docker run -p=6070:6070 --pull=always gcr.io/tinode-1000/admin:latest ``` It will run the app on port 6070. The user interface will be available at http://localhost:6070. ### Configuration â„šī¸ Run the app on different port (eg 8080): ```bash docker run -p=8080:6070 --pull=always gcr.io/tinode-1000/admin:latest ``` â„šī¸ Use a local directory to store application data: ```bash docker run -v /your/local/directory:/var/app/data -p=6070:6070 --pull=always gcr.io/tinode-1000/admin:latest ``` â„šī¸ Serve the app on a sub path (eg `/admin`): ```bash docker run -e BASE_URL=/admin -p=6070:6070 --pull=always gcr.io/tinode-1000/admin:latest ``` The app will be available at http://localhost:6070/admin. ### Advanced configuration <details> <summary>Running with Docker Compose</summary> An example `docker-compose.yml` file: ```yaml version: '3.7' services: admin: image: gcr.io/tinode-1000/admin:latest restart: always volumes: - /var/tinode-admin/data:/var/app/data environment: - BASE_URL=/admin ports: - "6070:6070" ``` To run the app, run the following command in the same directory as the `docker-compose.yml` file: ```bash docker-compose up -d ``` </details> <details> <summary>Serving with Nginx on a separate domain</summary> An example `nginx.conf` file: ```nginx access_log /var/log/nginx/access.log main buffer=32k flush=5m; gzip on; gzip_min_length 1100; gzip_buffers 4 8k; gzip_types text/plain; server { listen 443 ssl; server_name admin.your-tinode-domain.com; # SSL config: ssl_certificate /etc/letsencrypt/live/your-tinode-domain.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/your-tinode-domain.com/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # Admin service: location / { proxy_pass http://127.0.0.1:6070; proxy_read_timeout 90; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; } } ``` </details> <details> <summary>Serving with Nginx on a subdomain of your Tinode domain:</summary> An example `nginx.conf` file: ```nginx access_log /var/log/nginx/access.log main buffer=32k flush=5m; gzip on; gzip_min_length 1100; gzip_buffers 4 8k; gzip_types text/plain; server { listen 443 ssl; server_name your-tinode-domain.com; # SSL config: ssl_certificate /etc/letsencrypt/live/your-tinode-domain.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/your-tinode-domain.com/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # Tinode service: location / { proxy_pass http://127.0.0.1:6060; proxy_read_timeout 90; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; } # Tinode service: location /admin { proxy_pass http://127.0.0.1:6070; proxy_read_timeout 90; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; } } ``` </details> <details> <summary>Serving with Nginx running in Docker on a subdomain:</summary> An example `nginx.conf` file: ```nginx access_log /var/log/nginx/access.log main buffer=32k flush=5m; gzip on; gzip_min_length 1100; gzip_buffers 4 8k; gzip_types text/plain; server { listen 443 ssl; server_name your-tinode-domain.com; # SSL config: ssl_certificate /etc/letsencrypt/live/your-tinode-domain.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/your-tinode-domain.com/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # Tinode service: location / { proxy_pass http://tinode proxy_read_timeout 90; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; } # Tinode service: location /admin { proxy_pass http://admin:6070; proxy_read_timeout 90; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; } } ``` </details> ## Usage ### Onboarding and login When you first run the app, you will be asked to configure the app and provide your Tinode root user credentials. The app will use these credentials to log in to your Tinode server. These actions should be performed only once, when you first run the app. #### 1. License key On the first screen you will be asked to provide your license key. If you don't have one, you can request it at https://tinode.co/contact. #### 2. Tinode server URL On the second screen you will be asked to provide the URL of your Tinode server. Note that the URL should be available for the server where you run the Admin app. If you run both Admin app and Tinode server on one machine, you can use `localhost:6060` (considering that your Tinode server runs on the default port 6060). If you run both Admin app and Tinode server in Docker, you can use `tinode:6060` (considering that the name of your Tinode container is `tinode`). If Admin app and Tinode server are connecting via external network, it's most likely you use SSL. In that case, turn on the "Use SSL" toggle. If you use custom API key to serve the files uploaded by users, you can also enter it here. #### 3. Login as root If you see this screen, the connection to your Tinode server was successful. Now you need to provide your Tinode root user login and password. #### 4. Use the Admin console You are ready to go 🚀. Now you are at the home screen where the server and connection information is displayed. Use the menu on the left to navigate the app. ### User management In the "User management" section you can search for the users registered on your Tinode server and manage them: - View user details - Edit user details - Edit user photo - Suspend and unsuspend user - Make user trusted/untrusted - Edit user tags - Delete user ### Create user In the "Create user" section you can create a new user on your Tinode server and provide some information about them, including login, name, description, photo, tags, etc. ### Complaints In the "Complaints" section you can view the list of complaints submitted by users. You can also view the details of each complaint and visit the corresponding conversation to see the context of the complaint.