𝕽𝖔𝖔𝖙𝖎𝖊𝖘𝖙
link
fedilink
English
3
edit-2
10M

Personally I use vscode remote-ssh for editing random files on other servers if I want/need a GUI for it.

Try set up ssh then u can ether use a terminal or vscode with the ssh emote something extension

@Synthead@lemmy.world
link
fedilink
English
1310M

Vim handles remote files over SCP natively:

vim scp://192.168.1.2//data/editme.txt

@TCB13@lemmy.world
link
fedilink
English
1
edit-2
10M

I would suggest something quick and simple such as FileBrowser. Another more “expensive” alternative would be to setup an SSH server on the server and use WinSCP to access the thing and edit the file that way.

If you go the FileBrowser route I just would like to recommend you to be careful about opening your “server” to the internet. Setting up a VPN like I described here is recommended.

If you can’t have run a VPN client on the target computer (work computer etc) and/or it isn’t practical (public machine) at least make sure you run FileBrowser behind a Nginx reverse proxy, use SSL, pick non-standard port and restrict the access to the thing as much as possible with a list of specific allowed IPs or, at least, only for your country. Using some 2FA solution and fail2ban for an extra layer of security is also recommended.

@PeachMan@lemmy.world
link
fedilink
English
1
edit-2
10M

You’re talking about remotely editing a file. That means you’ll need remote access to the fileserver where it lives. The common way to do this would be with a network fileshare, but there are many options.

If you want to access the file from OUTSIDE your home network, you need a VPN or something similar. The simplest option is probably Tailscale. Just install it on your server and on your remote device, and boom, both are always magically on the same virtual network.

rentar42
link
fedilink
610M

“Use vim in SSH” is not a great answer to asking for a convenient way to edit a single file, because it requires understanding multiple somewhat-complex pieces of technology that OP might not be familiar with and have a reasonably steep learning curve.

But I’d still like to explain why it pops up so much. And the short version is very simple: versatility.

Once you’ve learned how to SSH into your server you can do a lot more than just edit a file. You can download files with curl directly to your server, you can move around files, copy them, install new software, set up an entire new docker container, update the system, reboot the system and many more things.

So while there’s definitely easier-to-use solutions to the one singular task of editing a specific file on the server, the “learn to SSH and use a shell” approach opens up a lot more options in the future.

So if in 5 weeks you need to reboot the machine, but your web-based-file-editing tool doesn’t support that option, you’ll have to search for a new solution. But if you had learned how to use the shell then a simple “how do I reboot linux from the shell” search will be all that you need.

Also: while many people like using vim, for a beginner in text based remote management I’d recommend something simpler like nano.

@REdOG@lemmy.world
link
fedilink
English
410M

Often I use git and just edit my repo files with the GitHub app and then git pull the changes from the server that needa the file. If you’re already familiar with git it’s probably easier than learning vim. You can probably do it directly to a repo behind ssh. If not then I’d learn vim before git.

@Tangent5280@lemmy.world
link
fedilink
English
210M

Do you use your own git server? Or do you use github? I want to use git but i dont want microsofts grubby hands in my data

rentar42
link
fedilink
210M

You don’t need a dedicated git server if you just want a simple place to store git. Simply place a git repository on your server and use ssh://yourserver/path/to/repo as the remote URL and you can push/pull.

If you want more than that (i.e. a nice Web UI and user management, issue tracking, …) then Gitea is a common solution, but you can even run Gitlab itself locally.

@Tangent5280@lemmy.world
link
fedilink
English
110M

that sounds good. thanks.

Look into ssh

@hperrin@lemmy.world
link
fedilink
English
310M

WebDAV will handle that, and Joplin has WebDAV client built in.

There’s a project called Filebrowser that allows you to edit text files in a web interface. You can just run that on the 192.168.1.2 machine. It’s easy to set up simple auth, and you can restrict it to the /data/ directory.

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 31 users / day
  • 80 users / week
  • 216 users / month
  • 845 users / 6 months
  • 1 subscriber
  • 1.42K Posts
  • 8.13K Comments
  • Modlog