How do i set up a local designing environment on debian to create, and then transfer websites to my server securely? Maybe three example sites, and a nice creation to server/VPS setup? Plus backups.. terminal, ssh, etc

Debian 12.
Virtualmin 7.5, latest version…

Hello, i appreciate this forum very much. It would be really cool if someone with experience and knowledge with webmin and virtualmin combined could tell me, how to create websites locally and then send them to a server/VPS… So i have good backup solution on my local machine, but can send the files to a fresh install with webmin/virtualmin on the server, and if i wanna change stuff, send the files to my local machine. :slight_smile:
That would be great! Right now i have set up webmin and virtualmin on a server, but it might not be the best to create and design on a server with a vnc… (remote controlling screen)…
So i tried installing webmin and virtualmin locally on my machine in the same way.

But how would i step-by-step create a local website or three different sites perhaps… And just switch between them… How many sites can i even have on the same server and how do i set that up right from the start? examplesite1.com or host1.examplesite1.com, etc…
examplesite2.c0m or maybe host2.examplesite2.c0m (But at the same VPS.) How should the names, and DNS be set up then? And the folders on the computer in debian?
Is it under var/www/site1 and var/www/site2 etc ?
How do i set up everything right locally, so i later on when i have designed in lets say wordpress locally with plugins addons, everything that a live site would have, but locally, so i might not create a DNS when i start? How do i do that?

And i also want to have the best backup solutions that are encrypted. And good wordpress and woocommerse backup plugins, etc… maybe through the terminal between machines with ssh? rsync? dump? I have searched some… not much.
Just a good open source solution really. It would be awesome if someone could share how i would do that. Thank you all very much! Best regards.
And respect to the creators of webmin and virtualmin, etc. :slight_smile: I’m no coder and pretty new in debian also, but trying to learn. I’m just for open source website development and server/VPS. Or willing to learn!
No cpanel or closed source code, just open source code really. This is great! Seems like a valuable forum. :slight_smile: Good to try and learn some!
Create something that can bring value to others, while keeping it open source all the way.
I have an SSH solution set up and sftp. It’s mostly the creation environment locally i need to learn. Everything i can! will, etc. :wink:
The creations are kinda limitless then… And locally designed. Kept safe, and some good secure transfers to the VPS, or multipe. One should be enough i reckon…
It’s much to learn from someone who has never developed a website… MariaDB etc… The best tools. Best backup tools. So i could avoid a bunch of mistakes, but they will happen anyways… Just good to learn, and also when a site is live… To make some quick, swift restorations, etc, if some site is hacked, or some database not working or whatever issues one might get when running a site with people registering accounts, or whatever…
Just a bunch of open source solutions, no proprietary software… Maybe like updraft if it’s nothing better, and so on… And no other open source solution that is as good or better.
Just good tips would be appreciated, on the creations of websites locally in webmin/virtualmin. And the backup solutions locally, and on the server, and then maybe rsync or tools like ssh or sftp maybe… Encryption and a secure site is also good to have. To value the people who use it so i’m trying to be into safety also. So HIPS, IDS and such… But i can fix that on my own…
Lets start with one site, but to set it up so i eaily can add new domains, DNS and so on later on… I don’t know how to do that… And many other things, yet… Like maybe mail-server on one site or more, all kind of stuff, and some good ways of handling it all with backups, if possible…
Also, sites might not even go live, but could go live… It can be like a good training and art environment to learn web design and such… offline, or online locally. If i can design offline at a laptop that would also be cool.
Thanks! :pray:

If its just WordPress. Use something like ‘local wp’ for local development. Its a easy to use software that installs WordPress website locally. Has options to choose php, database versions etc. You won’t need to configure dns or anything domain related for this.

To shift to production/virtualmin you can use any plugin like all in one migration, duplicator etc. Then simply install the same plugin in a fresh virtualmin WordPress install then import it.

Note that each backup plugin has a free version and a pro version with different set of limitations. Unless using WordPress multisite you probably won’t have any issues with free versions.

1 Like

Thanks, that looks kinda good.

But it’s not open source though, and don’t know the price for the full version, or if they have back-doors etc. I’m “paranoid”/skeptic like that when it comes to propitiatory software.
But if it’s clean and trusted, then maybe… Depending on the price also for the pro version…
I just thought that maybe virtualmin had the same functionality as localwp kinda, while being open source… Thanks for the tip! Looks interesting. Some easy solution…
Open source software is preferable, but i can check it out.

Local wp is a free software now. It used to have a pro version but now its all free. Don’t know if they shifted to open source license though. I have been using it for several years now didn’t have any issues with security.

If you strictly want open source you can use xampp. It has some configurations steps and is not a install and play solution like local wp.

Ok… Yeah i’m looking for open source… But guess i can try and install some closed code in debian, but i would rather not…
Yeah xampp seems good also, i could learn that… What about virtualmin though? Does it have too many options you mean? Thanks for the suggestion, i will check it out and give it a try. localwp. But i will probably also try out xampp. :slight_smile:
If it kinda does the same that is… thanks

Using virtualmin locally just for WordPress seems unnecessary imo. Using to the point solution like local wp or xampp or any other alternative is better.

Ok thanks for you input. Yeah i will look through them. :slight_smile: Xampp seems most interesting though… It’s open source. Nice that it’s an old software also. And still open source!

Why though? Your opinion… Why can’t it be perfect to create websites in webmin/virtualmin, if i just manage to set it up locally somehow? What are others opinions on this forum for the best developer environment? I have not tried localwp yet…
But xampp has this as example, so it’s wierd… old software should be more well developed.
https://community.apachefriends.org/f/viewtopic.php?t=80674&p=275492

"WOW - that is really disturbing. Bitnami does not support that “security” feature for many(!) years and still provides that totally crazy FAQ. I did not know that, sorry, but that is really A HAMMER! Forget everything what is written there, its WRONG. As you can see, you are destroying your Xampp installation, and that is a well known fact already for many years. I dont know what Bitnami is “thinking” about that, probably nothing…

Ok, dont run “security”, simply take your installation as it is. It is safe for local development. There is no need to “secure” anything."

I tend use git.On the dev (local) machine I have a full lamp stack setup where all the development takes place when happy with the site it gets pushed to github then on the live server just clone the git repo, this then allows you to update the site easily by pushing the changes on the dev machine to git & then pulling them from git onto the live server. Another advantage of git is, if you really mess up on the dev machine you can just restore from git and start again from a position the project was at before you messed up.
To use this method you would have to be fine with adding a lamp stack to the dev machine, but there lots of resources out there explaining how to do that

You are overthinking it. You are not using xampp for production but only for local development. Your local website will not be online for the Internet (bots, hackers etc) to see, just you. Your main concern was open source and back doors. This won’t be an issue with this.

You can also use virtualmin for local development but you have to configure it to use localhost and it will install tons of extra stuff that isn’t needed for local WordPress development.

Thats why I advised to use something simple for local development (easy/beginner friendly) and virtualmin for hosting online.

Ok thanks. Yeah i dont use git i wanna keep my site to myself… Depending on if you can encrypt the content on github, because why would i upload my personal art to microsofts servers? They own github… I can have my personal backups on other places…
I’m still trying to figure out how my local design environment is going to be…

I also found this:

That also seems good.

Well, i gotta set up xampp without back-doors locally also, because it points outwards or opens ports locally also right?
Starting ft and such… so yeah, i need to secure a local design environment with xampp also…

How do i set up virtual-min locally though? Anyone? Step-by-step…

why not make the git private ? this will stop the world looking at it (which is what I do) and use no git tools just the good old command line to push and pull

A few years ago I bought a few refurb Lenovo ThinkCentre M73 tiny computers from Micro Center to use for various purposes. I think I paid about USD $200.00 each for them, give or take.

I upgraded the RAM in one of the ThinkCentres to 16GB and installed RockyLinux and Virtualmin on it to approximate my production servers, except that it’s running Virtualmin GPL rather than Pro. It serves as a development server and a local test bed.

I could also configure the local server to enable remote development if I needed to, but I do not have that functionality enabled at the moment for lack of need.

I back up the little server just like I do my production servers, using Virtualmin’s native backup and rclone to Backblaze B2 for remote storage. Rclone will backup almost anything to almost anywhere. If my Perl didn’t suck so badly I’d write a Webmin module for it. It’s easy enough to install and configure in the shell, however.

For me, building a local physical server that approximated my production servers was the easiest and least-cumbersome solution. Most production Web servers don’t even come close to bleeding edge hardware-wise; so even cheap, old hardware like the ThinkCentre will work fine for dev environments.

Besides, the software is much more important than the hardware in terms of duplicating the production environment; and Virtualmin GPL makes it a yawner to configure a local machine in a functionally-identical way as a production server (which is another reason why I love Virtualmin).

That being the case, it seems to me that the only question becomes whether one is willing to cough up the coin for a cheap physical machine to use as a local server. If so, I can’t think of any reason not to do so. It’s much easier, and it provides much more capability in terms of testing and debugging in a sandbox environment.

Richard

Well, Microsoft will still have the data. If uploaded there… It’s my website files not theirs.
Microsoft owns github.
Ok, good it works for you.

Ok, good it’s a yawning for you… Could you maybe then write how to set up a local server like that? Did you ssh into a local server you have at home you plugged into your router?
etc… I was trying out lando recently and i like it.
https://lando.dev/

But there might be issues when i transfer a design to virtualmin afterwards i don’t know, trying to learn some… There are so many alternatives out there it’s making me confused…
vagrant, etc… xampp, but not sure if i connect outwards or not with that, and it was wierdly setup…
Just using virtualmin could have worked locally… After i uninstalled it i had to reformat my computer and that took allot of time, etc…
I just need a good setup, so some step-by-step guide for non devs yet would be nice…
Lando is seems cool to design locally though! I mean, i dont need to design with ssh on the server, i wanna design offline, or locally in a local environment and i’m looking for step-by-step guides on how to set up the optimal dev environment for me, and i still have not made up my mind on how i’m gonna do this! But might give lando a go… it’s setup and working… Just gotta find some theme and try to create and test with virtualmin later on, but designing locally in virtualmin and transferring that to the server would probably been easier…
But then i need steps to set that up locally.

I’ve never heard of Lando before today and therefore can’t comment on it. The same goes for WordPress and Woocommerce. I have exactly one WordPress site that I set up about 13 years ago, and no Woocommerce sites. So I really can’t comment on those platforms.

I’m even less sure that my setup will work for you. That said, however…

I usually code in an IDE called WeBuilder, which is basically RapidPHP with some additional language support. It actually has a built-in Web server that can be configured to run PHP seamlessly whenever you start the program.

Maybe something like that is all you need. It’s certainly the simplest approach that I know of. The view can be set for split screen with the code on the left and the page as rendered by the Web server on the right. However, it does get a bit more complicated if you’re using databases.

The databases are one reason I prefer simulating the production environment, including the MySQL environment. The simplest way to do that is to install the same minimal OS on the local machine and let Virtualmin install and configure the rest.

I connected a keyboard and monitor (and maybe a mouse) to the ThinkCentre to install the OS. I removed them once the was installed to save space, but they wouldn’t have done any harm if left connected. I installed only the minimal OS.

Once the OS was installed I logged in to the new local server as root via SSH, ran the OS updates, rebooted, installed wget, and ran the Virtualmin GPL installer in the usual way. Then I installed the Remi repos and installed the PHP versions that I use on the production machines.

Probably the biggest difference between the local development server and the production servers is that the local server also runs Samba. That’s not at all necessary and isn’t even something I’d necessarily recommend. It’s just a convenience when using a Windows machine for development because I can map the network shares as local drives.

It also would be possible to use something like NetBeans directly on the Linux machine, or maybe some other site builder if that’s how you would usually code.

Again, I’m not sure if this answers your question because I’m not sure what your question is. There is no “best” development environment for everyone.

Richard

Alright. :wink: Yeah people have their own unique style in website development…
Lando is awesome! Can be used in docker and it works nicely! Similar to vagrant i guess… i have not tried that yet. But lando would work nice with a team of developers in the same environment also, etc… nice logo, etc… (“superservergandalf5000style thinking”, it’s like some hacked project i like it… his own style or their own style. )
Just send out the files and develop as a team… if that would be needed that is. Just seems nice overall… And i like the style of the dude who made it plays guitar and its just a cool platform i think. :wink: I have not meet him i saw an video online… anyways i like the tool!
I hope its easy to move to the server, but i’m learning… i’m sure they have thought about that so yeah check it out sometime if you want to… its interesting to hear and read about different techniques though. Also i just like open source code… and good solutions. :slight_smile:

Yeah, that’s one reason my solutions are rarely the best for others: I don’t collaborate with anyone and haven’t since my business partner died in 2008. Back then we both used Dreamweaver and the same testing server. That was his choice. I never cared for DW; but I didn’t hate it, either.

In any case, the team approach seems more popular these days, but I don’t have a team (nor do I especially want one); so my workflow is vastly different from what seems to be the norm.

Richard

Ok i see… well, good luck with your designing and workflow, use whats best for you.