updating files on VPS
Hello π
So for the first time I'm going to use VPS hosting from hostinger, well i used VPS but not as it's everywhere with root access and everything i do is from the terminal. The one i use is from PythonAnywhere and it comes with a control panel for many things i do with the server, except packages downloading which is from the terminal. So my question is, how can I update my files on a VPS server that doesn't have a control panel anytime I want?
Or if you have any videos, blog posts, anything that can help me I'll appreciate it.
38 Replies
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Ubuntu
What i meant was, updating my website code. Not packages.
Like if there's a bug and i need to fix it i just open the file and update it with the new code
I've tried googling for 3 days now, and most of them show me results with cPanel and other panels. Or just setting up the server tutorial which i don't need.
I just need to know how can I update my front end/backend code.
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Yeah true that, gui makes it easier even for me. It's just not in their budget to also subscribe for a gui. So i guess I'll stick with PythonAnywhere since it supports my backend well and has really easy control panel.
I'll look into gitlabs first though.
Also do you know any hosting service that offers a gui with its plans?
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Nope i haven't seen them before
They're totally free?
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Cool! Never heard of them.
I'll look into them.
Thank you for the help appreciate it π
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Totally agree π―
If you are running any flavor of Linux on your local machine, you can use the
scp
command as well. It'd probably would work with MacOS but I'm not sure. This is useful for those files that shouldn't be committed to a public repository. As a GUI I would recommend Filezilla.I'm gonna need to figure out the scp hehe
The file Zilla looks interesting, thanks for the suggestion π
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
The problem is the how i can do this, i don't know how to update my files from terminal π
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
I can connect to the server no problem, but i don't know how to update the files. Like what process do i do? Do i create the change in a local file and then push that file like if i would do in git?
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
And how can I access this file to edit it? Just open it as any normal file in terminal and edit it on my VS code?
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
I've seen nano a lot in the search results. but they so normal stuff with it in the tutorials not much details.
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
I guess I'll take a look at their documentation if they have any to understand them. Or if you have any source i can look up I'd appreciate it
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Because it's my first time dealing with VPS, i want to reach my files and edit them freely. Uploading and setting up is no problem it's just the editing part.
In my current host, I can just edit the code and restart the server and that's it.
Grumpy already suggested gitlabs to push my files to the server right from the repository but i still didn't look at it yet.
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Yeah I should study those VPS servers more i guess π
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
I can use any kind of backend with it?
Coz many hosts don't support Python π¬
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Cool I'll check it out! Thanks for the help appreciate it π
Self-hosting is fun and a great learning exercise, but may I suggest taking things one step at the time? The recommendation of modifying files directly on the server is just not a good idea. Don't do this. Make your changes locally, and then upload them to your server (using Filezilla or whatever other method discussed), or as Grumpy suggested use GitHub actions or some other automated method.
To be clear, I'm talking about your application files, not server-related configuration, which is what you originally asked for: https://discord.com/channels/436251713830125568/1071470828455219292/1071480064291643512
Start with Filezilla and when you are comfortable move on to the terminal.
scp
uses ssh
so it's nearly identical to use. For example:
or with ssh already setup locally:
I really do wanna learn them, just can't find a clear documentation or tutorial to follow π
Yes understood
Got it π
I'll study the file Zilla and GitHub method first.
Cool, enjoy and have fun π
You can also look into GitLab CI/CD which is pretty much the same as GitHub Actions, or if you want to take things further you can self-host something like Jenkins to build your very own CI/CD pipeline. Just to give you some long(er)-term goals
Will look into them, thank you Joao π€
You are probably at info overload already, but if you are looking at gui options, I run cyber panel on my vps. Itβs free / open source and easy to install.
Yeah I am lol
Cyber Panel looks really great! Thanks for the suggestion π
I've used pythonAnywhere and just pull from my public github build branch. There are different deployments from what I remember, I just picked their Django one and brrrrr
Yes they do, PythonAnywhere is pretty much easy to use and has lots of options to deploy, edit, and delete files.
I picked Flask since it's the framework i use.