#Linux VPS Server
377 messages · Page 1 of 1 (latest)
Yes, a ui
You'll want to get a Desktop Environment
Ok wait, can I start from the beginning
What is the difference between a cloud server and a vps?
This is my cloud server, that works perfectly after I ran those commands
So, you have some options to pick from. Here are some of the more popular ones:
- KDE Plasma: What I use, and it allows you to customize everything, but it might be a little more resource intensive.
- GNOME
- XFCE: Good for light memory/resource usage.
- LXDE: Looks pretty basic but is the best for super lowend systems.
- Cinnamon
I'm just trying to host some websites, webmail and a game server
Not for personal use, not for my computer
I'd actually recommend you don't get a Desktop Environment unless you truly want it, then, as it'll use more memory and probably more CPU
And a bit more storage
But it's so complicated with this console
I assume you're using SSH for the command line?
you still run the commands in a terminal
What is SSH?
so its basically the same
Yes, but I can easily move the files around and stuff
SSH is run on port 22, and it's what allows you to connect to your VPS or dedicated server to run commands
you could use ftp for that
With encrypted traffic
(Port 22 can also be used for SFTP though)
@grand hamlet post please
I don't know I bought it from ionos
Are you using an application like Termius or PuTTy to access your VPS?
No, I am accessing it from a web page, after I clicked access remote console
ah, kvm
By the way, what did you send that got deleted?
Not kvm
Just the domain
well vnc
Okay so the thing is
Ah
This nice one says kvm
The vps says remote console
This is how I open the nice one, kvm console
This is how I open the vps,
So, do you ultimately want to have a DE at the expense of more CPU/RAM/storage usage?
If you do, that's alright
Is it easy to setup a webmail, few websites and a game server without it?
It's not too difficult
I can use an FTP like @grand hamlet said?
Yes, you can
Okay wait, is a VPS a good selection to host what I want to?
I'd actually recommend SFTP since it can run on the same port (22) as SSH anyways and it's encrypted
yes
For hosting webmail and a few websites and a game server, yes, a VPS is a good choice.
A VPS will give you more control than getting hosting plans for this kind of stuff.
you can choose, winscp or filezilla
I recommend WinSCP ^
I prefer filezilla, but thats just personal preference
Okay I like winscp anyways
Perfect
How would I delete everything I just installed
reinstalling the OS would be the easiest
How could I do that?
depends on what game you're going to run
You'd need to look that up
It's just an io game, a basic websocket server
ah, than it should be more than enough
Okay, and do you have a good tutorial on how I can access it via ftp? I can google one if not
yeah you'll need to google that aswell
I already have a ftp connection to this somehow
I don't remember what I did though
It's like a whole computer
Thank you guyssssssssss

@shrewd ibex @grand hamlet
Yep I dmed you a link :p
@grand hamlet can you help me asap please ðŸ˜
I did pm2 logs now I can't get back to writing
It's stuck
ctrl+C :)
What
was just showing you one of my dedis
Looks like a personal computer lool
Mine is a vps, much lower but I got half of everything I need setup in 10 mins
yeah this hosts a bunch of stuff and serves as a platform for a linux-based vdi
I'll get a dedi later, I'm just testing out a small vps first :))
oh yea i was just showing u my setup
oh i see
if you need help @fiery void im willing to help
i know a lot of tips and tricks that will make your life better
Ye sure
@rapid warren Are you good with npm and node in linux servers?
@fiery void, you just advanced to level 14 !
what do you mean?
what specifically are you talking about
Look
Server.js
const express = require("express");
const app = express();
app.get("/servers/server1", (req, res) => {
res.json({ message: "Hello from server1" });
});
app.listen(3000, () => {
console.log("API server is running on port 3000");
});
and files
I double checked that I initialized npm correctly and installed epxress
Yup, which is probably express since it's the only thing
npm install express
try that
Did, 4 times
nothing?
npm list -g
Don't think it's global package
I get the same error with my bots too
Could I have setup node/npm wrong on ubuntu?
@shrewd ibex You know anything about it?
a little busy rn and doing other things so my answers might not be the best, but try running npm with no arguments and seeing what happens
and then try running node with no arguments
Whole bunch of stuff appears
I don't want it global though
ss?
then run without the -g
I did
do it anyway
i think you'd remove the express as well
Okay
Okay I will try it
unless it's malware but that's a whole different concern anyways
and 99% chance it isn't and you'd probably know
firewall
Sure?
can also attempt using curl -I 127.0.0.1:3000
is it running
aren't you using pm2 or smth
Also one more thing
if you're using pm2 type pm2 list
Why is the id still increasing when I deleted the other one?
because that's how it works until you reboot afaik
Okay
So it's a firewall issue
Are you using a reverse proxy to put it on port 80/443
(e.g. nginx)
This is all I have
Ok but
Okay, so you are putting :3000 after the IP/domain in your browser, right?
Are you using firewalld (firewall-cmd), ufw (ufw), or something else?
Not that I run
You don't use either?
Run firewall-cmd and see if it's a command
Not command
ufw is command
Don't run that
If you set up ufw
Because you don't want both
Ok so
You'll want to use ufw
okay
Unfortunately I'm a lot more familiar with firewall-cmd than ufw, but I'll try my best to help you out
Run sudo ufw allow 3000, followed by sudo ufw allow 3000/tcp and screenshot the output
sudo ufw enable
Then run sudo ufw status verbose again
While you're at it, do you want to use this for webhosting?
Ye, to host like 6 websites
Run these commands then:
sudo ufw allow 80
sudo ufw allow 80/tcp
sudo ufw allow 443
sudo ufw allow 443/tcp
This will allow ports 80 (http) and 443 (https)
On TCP
Okay did that :)
Also, are you familiar with setting up nginx?
Kind of
i would not suggest doing it that way
Do you have an idea as to how to set it up?
Why not?
that exposes it to the entire internet and therefore vulnerabilities either in your code or the modules used ,etc
Installing it?
i always block off HTTPS traffic to cloudflare's subnets only
I was goign to use cpanel or something similar
all im saying is only permit cloudflare to communicate on HTTP/S protocols
You were going to set up cPanel yourself?
firewall-cmd --add-rich-rule='rule family="ipv4" source address="103.21.244.0/22" port port="8080" protocol="tcp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="103.21.244.0/22" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="103.22.200.0/22" port port="8080" protocol="tcp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="103.22.200.0/22" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="103.31.4.0/22" port port="8080" protocol="tcp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="103.31.4.0/22" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="104.16.0.0/12" port port="8080" protocol="tcp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="104.16.0.0/12" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="108.162.192.0/18" port port="8080" protocol="tcp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="108.162.192.0/18" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="131.0.72.0/22" port port="8080" protocol="tcp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="131.0.72.0/22" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="141.101.64.0/18" port port="8080" protocol="tcp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="141.101.64.0/18" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="162.158.0.0/15" port port="8080" protocol="tcp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="162.158.0.0/15" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="172.64.0.0/13" port port="8080" protocol="tcp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="172.64.0.0/13" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="173.245.48.0/20" port port="8080" protocol="tcp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="173.245.48.0/20" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="188.114.96.0/20" port port="8080" protocol="tcp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="188.114.96.0/20" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="190.93.240.0/20" port port="8080" protocol="tcp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="190.93.240.0/20" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="197.234.240.0/22" port port="8080" protocol="tcp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="197.234.240.0/22" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="198.41.128.0/17" port port="8080" protocol="tcp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="198.41.128.0/17" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="2.56.8.123/32" port port="8080" protocol="udp" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="2.56.8.123/32" port port="8080" protocol="tcp" accept'
thats not for ubuntu its for centos/rhel
for ufw i think its
Ok I can't copy into the console btw
Well that's specifically for firewalld
It's just that firewalld is primarily used by centos/rhel
use a terminal
windows terminal works
You can technically use firewalld on Ubuntu though because at the end of the day it modifies iptables, it's just a bad idea to use it in combination with ufw
That's another struggle 🙄
I'll just stick with ufw since I set it up for my ftp
This is probably the best thing to do anyways if you plan on following Ubuntu-specific tutorials online.
It makes things easier
So, you can choose to make it so only Cloudflare can use ports 80 and 443, but you realistically don't have to
I'd prefer it since it's much safer
Because at the end of the day, nothing bad will be likely to happen to you
Alright
You can do that then
But I have around 300 daily players
Ah
There is a right and wrong way of doing things, I'm just warning you that doing it this way is a potential hazard
I thought you had a much smaller userbase
I'm pretty sure they will find any way to breach
and you shouldn't do it - its a bad practice and will get you in trouble later
If you think they can, then you should definitely set it up to be CF-only IPs on 80/443
Should see my brothers, 150k making me jealous
150k players?
I assume I can find a tutorial for that
Damn
Frank just gave you firewalld commands that seem to include CF IPs
So I assume you can just allow 80 and 443 on only the IPs he gave, as long as you can verify those are Cloudflare's IP addresses
There is a package called cloudflare-ufw lol
Yes it's on github lol
¯_(ツ)_/¯
It's fine anyways, that's not that long
If you think it's a good idea to install it, then go for it, but make sure it's safe first
Is this what every web developer does??
If you know how to read the code it's written in, do that
I personally don't bother with it, and nothing has happened to me
Knocking on wood before I jinx that
My website is available at https://tnology.dev, by the way, and it's proxied by Cloudflare
And it's stable
Thanks for the feedback, I might do that
I'm a web developer, but I am by no means a web designer
I am god awful at design
Feel free to talk about this with me in #off-topic
@shrewd ibex I don't understand why I still cannot access it from google
3000 is set to allow from anywhere
Still says this site can't be reached
then you must be behind a WAF
i.e using oracle cloud
or linode
or digital ocean
if not then you aren't doing something correctly. it migth be that the application isn't even binding to the public ip and only localhost
or ionos
i dont know if ionos has a waf
How can I see what it is binding to?
netstat -tulnp | grep 3000
It was working perfectly on my cloud server :/
because it probably had the dependencies and everything worked out and didn't have a waf
i dont know. there's a few reasons why you might still not be able to access it
alright so that doesn't really tell me much, can i ask
why are you using this instead of ssh?
What is ssh?
oh boy
:)
I mean I heard of it, I'm not sure what exactly it is
ok so you haven't really touched linux before that much and are strictly just a developer
ok so what you are doing now is more operations side and not really developer side, its helpful to know as a developer but generally speaking its not really a requirement
it worked on the cloud server probably because it was already presetup and ready to go
What do you mean?
i work almost completely on the operations side but i'll be honest with you, i'd rather just have you send me the login details and i can get it working for you
Yes but I am doing this to learn not to get it working haha
it was already a dev environment, you didnt need to hunt down dependencies because that was already done for you, same with the network just working
I could just ask my brother for a server any size and he would make anything needed
I did need to install node, ui and a ton of things :p
so right now you need external access to this right
But ye localhost just worked instantly
if you want to learn i can tell you every option you have and what those mean and the ramifications of each
ok. so if thats your intention, then its probably best to just get you going with the public ip address - generally speaking you should see :::<port> AND 0.0.0.0:<port> (its both ipv6 and ipv4) - the netstat command tells you which port is being used and how (if it was just localhost like it is now or if it was something else)
so what i'd recommend at this point given you've tried everything else reasonably possible, you need to code it to specifically bind to 0.0.0.0
To 0.0.0.0 or to the servers ip?
0.0.0.0 for now
Okay
in terms of linux and what this means for utilization - 0.0.0.0 is the wildcard, it will bind to all available ip addresses on any interface
generally this is a bad idea but in the context of debugging it would make sense to determine if its a network issue or firewall issue and if so where exactly
Okay
So how should I point it to 0.0.0.0
Could you possibly send me a tutorial I could follow @rapid warren ?
thats up to the language
i dont really know - i would google it though
google is your friend
So is chat gpt 4 :)
Idk about that one ¯_(ツ)_/¯
Just had to restart it @rapid warren -_-
yea that works sometimes
i dont like rebooting though, you dont learn anything
you lost a major opportunity to learn a lot
i didnt
ufw restart
not the whole vps
u need to restart ufw to apply changes
only takes like a second so its ok w me
but my email services wont work
i looked online on a port checker
its generally, not all the time, a bad practice to "just reboot it"
it says that my email ports are closed
it said only
if u add new rules
u need to restart it
it only takes like 2 seconds to restart
sometimes the provider will block email ports to avoid abuse
if you've opened the port and you verified that its opened and you know that it's opened then you need to raise a incident with whoever your provider is
is port 25 for mail?
yes thats smtp standard port
that is most commonly the port blocked
ye it says i need to contact them if i want to open it
imagine that
never seen that before, they always apply directly for me iirc, but havent used ufw in quite a time
Just doing ufw allow port opens the port on all protocols immediately
never seems to work for me
it always does for me
D:
unless u have extra stuff