En
进入空间
菜单
最新博客动态
博客 > 文章

Server Deployment Guide - Linux

Install docker

Please download the corresponding Docker, and start it after the installation is complete.

Install Docker Engine on Ubuntu

Install AO.space Server

Please execute the following commands on the host machine using "Windows PowerShell":

bash
sudo docker network create ao-space
DATADIR="/mnt/aospace"
sudo docker run -d --name aospace-all-in-one  \
--restart always  \
--network=ao-space  \
--publish 5678:5678  \
--publish 127.0.0.1:5680:5680  \
-v $DATADIR:/aospace  \
-v /var/run/docker.sock:/var/run/docker.sock:ro  \
-e AOSPACE_DATADIR=$DATADIR  \
-e RUN_NETWORK_MODE="host"  \
ghcr.io/ao-space/space-agent:latest

The environment variable "DATADIR" set above represents data stored in the "/mnt/aospace" directory, which can be modified as needed. The data storage directory needs to have read and write permissions.

Use

Firewall

Please allow network access to tcp 5678, 12841 and 18569 ports, and udp 61001 to 62000 port range on the computer side firewall. You can also turn off the firewall for testing.

The above 5678 port is generally used for interface calls such as binding and unbinding in the LAN. If you deploy it on a cloud server and use it on the public network, you can turn off external access to port 5678 in the cloud host manufacturer's firewall settings after binding the mobile APP. Ports 12841 and 18569 are used for mobile APP in the LAN to directly connect to the Aospace server. If it is deployed on a cloud server, it is recommended to turn it off in the firewall settings of the cloud host manufacturer, so that it does not affect normal use. UDP 61001 to 62000 are used for peer-to-peer access (P2P) and can also be opened in the firewall for cloud server deployment.

Apply to Beta

The open beta quota is now full. For the latest news, please follow the official account of AO.space.

Bind Device

Please open the following URL on your computer's browser: http://< local area network IP address of your computer >:5678. For example, http://192.168.0.115:5678, where 192.168.0.115 is the local area network IP address of your current computer, and you need to replace it with the IP address of your personal computer,please do not use 127.0.0.1. In the opened webpage, enter the email address you applied for, and the activation code in the email, and click "Submit". If the AO.space docker container image has not been fully downloaded at this time, it will prompt that it is downloading, and the web page does not need to be closed. After the container installation is complete, click the "Submit" button.

After the verification of the public beta activation code is successful, the QR code that appears on the web page is the QR code of the Aospace computer terminal device. You need to download and install the Ao Space APP client to use it together. You can search for "AO.space" in the App Store or enter AO.space Download Center to scan the code to download, open the AO.space App on the login page Click the "Bind Device" button to enter the bound device page and click "Scan QR Code" to scan the QR code of the device on the computer to bind. After the binding is successful, you can start using it.

Precautions

  • When binding the device, it is necessary to ensure that the computer and the mobile phone are in the same LAN. After the binding is successful, it is not necessary to be in the same LAN.
  • The activation code is valid for 24 hours, please obtain it again after it expires.
  • One mailbox can only activate one PC device. If you want to use more devices, please change the mailbox and apply again.

Update

Method 1 Upgrade within the AO.space App

AO.space App [Mine] - [Device] - [System Upgrade] You can choose to upgrade automatically or manually

Method 2 Command line upgrade

Delete aospace-all-in-one

Please execute the following commands in sequence on the command line of the host machine:

shell
sudo docker stop aospace-all-in-one
sudo docker rm aospace-all-in-one
sudo docker rmi -f $(docker images -q hub.eulix.xyz/cicada-private/aospace-agent)

Update aospace-all-in-one

Execute the installation command in the Install AO.space Server section of this article, but the docker network will not be created again. Execute the following commands in the command line of the host machine in sequence:

bash
DATADIR="/mnt/aospace"
sudo docker run -d --name aospace-all-in-one  \
--restart always  \
--network=ao-space  \
--publish 5678:5678  \
--publish 127.0.0.1:5680:5680  \
-v $DATADIR:/aospace  \
-v /var/run/docker.sock:/var/run/docker.sock:ro  \
-e AOSPACE_DATADIR=$DATADIR  \
-e RUN_NETWORK_MODE="host"  \
ghcr.io/ao-space/space-agent:latest

The update is now complete. The original data is still retained in the data directory specified during installation. There is no need to re-scan the code to bind, so please feel free to use it.

Uninstall

Then please execute the following command in the command line of the host machine:

shell
sudo docker exec -t aospace-all-in-one /usr/bin/docker-compose -f /aospace/opt/tmp/docker-compose.yml down
sudo docker stop aospace-all-in-one
sudo docker rm aospace-all-in-one
sudo docker rmi -f $(sudo docker images -q ghcr.io/ao-space/*)
sudo docker network rm ao-space

Delete the data directory specified in the Install AO.space Server section on the host.

The uninstallation is now complete.

clean up

Use the following command to delete Docker images and data volumes that are not used by containers. Note that this command will delete the containers you have temporarily closed and the Docker images that are not used yet. Please use with caution!

shell
docker system prune --all --force --volumes

contact us

If you encounter difficulties in using it, you can check AO.space Help or Contact us.

下载
体验版
开源版
功能对比
更新日志
文档
入门
开发
安装
API 文档
支持
帮助中心
意见反馈
安全
关于我们
关注我们
service@ao.space
GitHub
Slack groups
bilibili
微信公众号
Copyright © 2022-2023 中国科学院软件研究所