Set up your Own Gateway
Last updated
Last updated
CESS provides a public Object Storage Service Gateway:
Address:
Account:cXhwBytXqrZLr1qM5NHJhCzEMckSTzNKw17ci2aHft6ETSQm9
💁♂️ If you are using the public Object Storage Service, you can skip the following sections in this chapter.
When using the public gateway, there might be failures due to network instability. You can follow the steps below to deploy your own Object Storage Service Gateway.
System configuration: Linux-amd64
Golang version: Go1.19 or above
The following commands are executed with root privileges, if the prompt
Permission denied
appears, you need to switch to root privileges, or addsudo
at the top of these commands.
For the Debian and ubuntu families of linux systems:
For the Fedora, RedHat and CentOS families of linux systems:
By default, DeOSS uses port 8080
to listen for incoming connections and internally uses port 4001
for p2p communication, if your platform blocks these two ports by default, you may need to enable access to these port.
ufw
For hosts with ufw enabled (Debian, Ubuntu, etc.), you can use the ufw command to allow traffic to flow to specific ports. Use the following command to allow access to a port:
firewall-cmd
For hosts with firewall-cmd enabled (CentOS), you can use the firewall-cmd command to allow traffic on specific ports. Use the following command to allow access to a port:
This command gets the active zone(s). Now, apply port rules to the relevant zones returned above. For example if the zone is public, use
Note that permanent makes sure the rules are persistent across firewall start, restart or reload. Finally reload the firewall for changes to take effect.
iptables
For hosts with iptables enabled (RHEL, CentOS, etc.), you can use the iptables command to enable all traffic to a specific port. Use the following command to allow access to a port:
Execute the following cmd to download:
Add execution privilege:
💁♂️If you have successfully downloaded using Method 1, you can skip Method 2.
Open go module:
Users in China can add go proxy to speed up the download:
Check the Golang version to verify whether the installation is successful:
Clone DeOSS source code and generate deoss binary program after compilation:
Generate profile template in the current directory:
By default, DeOSS uses conf.yaml
in the current directory as the runtime configuration file.
You can also specify the configuration file location using -c
or -- config
.
Open and modify conf.yaml
:
The content of the configuration template is as follows:
Rpc:The node address of the CESS chain. You can set up your own chain node or use the RPC addresses we provide:
Public RPC Address1:wss://testnet-rpc0.cess.cloud/ws/
Public RPC Address2:wss://testnet-rpc1.cess.cloud/ws/
Public RPC Address3:wss://testnet-rpc2.cess.cloud/ws/
Boot:The bootstrap node address in the P2P network. The official bootstrap node address provided by CESS is:
_dnsaddr.bootstrap-bucket.cess.cloud
Mnemonic:The mnemonic of your wallet account. Please refer to the CESS wallet for wallet acquisition. This account is used to pay the Gas fee for blockchain transactions.
Workspace:The directory where data is stored, including logs, caches, uploaded or downloaded files, etc.
P2P_Port: The port for P2P communication, default is 4001.
HTTP_Port: The port for user access to the deoss service, default is 8080.
Running DeOSS in the background:
After running successfully, you can share the wallet address and IP address with other users, who can use your gateway to send HTTP requests.
Check deoss status:
Exit deoss:
DeOSS requires or higher, See the .
the configuration file cannot be missing.
After modification, please save the configuration file.