Startup script
P2P Cloud allows clients to configure their server instance by injecting custom scripts that will be initialized once the server boots after encrypting.
Things To Know
The script will be executed only once on the first boot of the VM. It will be run as the root user from the “/” directory. Remember, by default you will SSH into the VM as the cloud user.
We also recommend either creating a new user or use the built-in user cloud and navigating to its home directory.
Example
|
|
When you get directed to the WebSSH page for your VM, the script might still be running. Be aware of this when interacting with the VM, especially if you expect the script to complete its tasks.
Upon boot, the user-startup script will be placed in the following path:
|
|
Script Log
The output of the script will be logged to the following file:
|
|
You can check this log file to monitor the progress and troubleshoot any issues with the script.
|
|
How to Insert Script
Inserting a script is easy. All you need to do is click on the Inject startup bash script box and paste the bash script in the text box(see below).
Note: Be sure to delete the placeholder contents in the box before entering in custom script
Once you’re done, click on Create VM and launch your server.
Example Script
Here is an example script that installs Auto-GPT on the default cloud profile and it’s dependencies on the VM:
|
|
After boot, wait 1-3min, navigate to the Auto-GPT directory, and enter in your OpenAI(required), and Pinecone(optional) by running:
Note: Change repo branch from Main -> Staging
|
|
Run the app:
|
|
For additional setup instructions, see the official Auto-GPT docs
Click here to learn how P2P Cloud is secure compared to other providers such as Golem Network. To learn more about P2P Cloud, visit our website, follow us on Twitter, or join our Telegram community.