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
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
~MARSMAN~
~MARSMAN~OPβ€’2y ago
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
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
~MARSMAN~
~MARSMAN~OPβ€’2y ago
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
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
~MARSMAN~
~MARSMAN~OPβ€’2y ago
Nope i haven't seen them before They're totally free?
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
~MARSMAN~
~MARSMAN~OPβ€’2y ago
Cool! Never heard of them. I'll look into them. Thank you for the help appreciate it 😊
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
~MARSMAN~
~MARSMAN~OPβ€’2y ago
Totally agree πŸ’―
Joao
Joaoβ€’2y ago
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.
~MARSMAN~
~MARSMAN~OPβ€’2y ago
I'm gonna need to figure out the scp hehe The file Zilla looks interesting, thanks for the suggestion πŸ™Œ
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
~MARSMAN~
~MARSMAN~OPβ€’2y ago
The problem is the how i can do this, i don't know how to update my files from terminal πŸ˜…
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
~MARSMAN~
~MARSMAN~OPβ€’2y ago
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
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
~MARSMAN~
~MARSMAN~OPβ€’2y ago
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
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
~MARSMAN~
~MARSMAN~OPβ€’2y ago
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
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
~MARSMAN~
~MARSMAN~OPβ€’2y ago
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
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
~MARSMAN~
~MARSMAN~OPβ€’2y ago
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
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
~MARSMAN~
~MARSMAN~OPβ€’2y ago
Yeah I should study those VPS servers more i guess πŸ˜…
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
~MARSMAN~
~MARSMAN~OPβ€’2y ago
I can use any kind of backend with it? Coz many hosts don't support Python 😬
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
~MARSMAN~
~MARSMAN~OPβ€’2y ago
Cool I'll check it out! Thanks for the help appreciate it 😊
Joao
Joaoβ€’2y ago
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:
scp -i ~/.ssh/config/<private_key> <local_file_to_upload> <host_username>@<host_ip>:<host_location_to_copy_files_to>
scp -i ~/.ssh/config/<private_key> <local_file_to_upload> <host_username>@<host_ip>:<host_location_to_copy_files_to>
or with ssh already setup locally:
scp <local_file_to_upload> <hostname>:<host_location_to_copy_files_to>
scp <local_file_to_upload> <hostname>:<host_location_to_copy_files_to>
~MARSMAN~
~MARSMAN~OPβ€’2y ago
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.
Joao
Joaoβ€’2y ago
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
~MARSMAN~
~MARSMAN~OPβ€’2y ago
Will look into them, thank you Joao πŸ€—
ghostmonkey
ghostmonkeyβ€’2y ago
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.
~MARSMAN~
~MARSMAN~OPβ€’2y ago
Yeah I am lol Cyber Panel looks really great! Thanks for the suggestion πŸ™
b1mind
b1mindβ€’2y ago
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
~MARSMAN~
~MARSMAN~OPβ€’2y ago
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.
Want results from more Discord servers?
Add your server